taoyds / spider

scripts and baselines for Spider: Yale complex and cross-domain semantic parsing and text-to-SQL challenge
https://yale-lily.github.io/spider
Apache License 2.0
848 stars 193 forks source link

Mistake in query 542 and 543 from dev_gold.sql #67

Open PedroEstevesPT opened 3 years ago

PedroEstevesPT commented 3 years ago

The column T1.student_id is repeated in both queries and it does not make sense according to the question in English:

Wrong query: SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count() , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count() DESC LIMIT 1

Right query: SELECT T1.first_name , T1.middle_name , T1.last_name , count() , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count() DESC LIMIT 1

Question in English: What is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program?