interaction_utterance
sequencelengths 0
6
| interaction_query
sequencelengths 0
6
| final_utterance
stringlengths 19
224
| final_query
stringlengths 22
577
| db_id
stringclasses 140
values |
---|---|---|---|---|
[
"Show me the project ids of all projects.",
"Which of those had the most number of outcomes?",
"Show me the project details as well."
] | [
"SELECT project_id FROM Projects;",
"SELECT T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1;",
"SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1;"
] | Which project made the most number of outcomes? List the project details and the project id. | SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1; | tracking_grants_for_research |
[
"Show me all the ids of projects with outcomes.",
"How many projects do not have outcome?",
"List their details."
] | [
"SELECT project_id FROM Project_outcomes;",
"SELECT count(*) FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes );",
"SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes );"
] | Which projects have no outcome? List the project details. | SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes ); | tracking_grants_for_research |
[
"Show me the number of research staff each organisation hired.",
"Which organisation hired the least number? Show ids.",
"How about the most number of research staff. List the organisation id, type and detail."
] | [
"SELECT count(*) FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id;",
"SELECT T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) ASC LIMIT 1;",
"SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;"
] | Which organisation hired the most number of research staff? List the organisation id, type and detail. | SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1; | tracking_grants_for_research |
[
"What are the number of project outcomes each project staff involved in?",
"Who is involved in the most number of project outcomes? Show ids.",
"Give me the person's role description."
] | [
"SELECT count(*) FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id;",
"SELECT T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1;",
"SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1;"
] | Show the role description and the id of the project staff involved in most number of project outcomes? | SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1; | tracking_grants_for_research |
[
"Show me all the document type description.",
"How about document type code?",
"Which one is described with the prefix 'Initial'?"
] | [
"SELECT document_description FROM Document_Types;",
"SELECT document_type_code FROM Document_Types ;",
"SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%';"
] | Which document type is described with the prefix 'Initial'? | SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'; | tracking_grants_for_research |
[
"Show me all the grants start dates.",
"Which ones of those have documents described as 'Regular'?",
"How about ones that have both documents described as 'Regular' and documents described as 'Initial Application'?"
] | [
"SELECT grant_start_date FROM Grants;",
"SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular';",
"SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'"
] | For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date. | SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application' | tracking_grants_for_research |
[
"How many documents are there?",
"How many documents does each grant have? List the grant id and number.",
"Give me the one having the most documents."
] | [
"SELECT count(*) FROM Documents;",
"SELECT grant_id , count(*) FROM Documents GROUP BY grant_id ;",
"SELECT grant_id , count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1;"
] | How many documents can one grant have at most? List the grant id and number. | SELECT grant_id , count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1; | tracking_grants_for_research |
[
"Show me the organisation types.",
"How about the type description?",
"Find the ones detailed as \"quo\"."
] | [
"SELECT organisation_Type FROM organisation_Types;",
"SELECT organisation_type_description FROM organisation_Types;",
"SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo';"
] | Find the organisation type description of the organisation detailed as 'quo'. | SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo'; | tracking_grants_for_research |
[
"Show me all the details of organisations.",
"Among the result, which ones are described as 'Sponsor'?",
"Sort the result in an ascending order."
] | [
"SELECT organisation_details FROM Organisations;",
"SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor';",
"SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details ASC;"
] | What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order. | SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details ASC; | tracking_grants_for_research |
[
"Show me the number of project staffs.",
"How many of those worked as leaders?",
"How about the number of those who either worked as leaders or started working before '1989-04-24 23:51:54'?"
] | [
"SELECT count(*) FROM Project_Staff;",
"SELECT count(*) FROM Project_Staff WHERE role_code = 'leader';",
"SELECT count(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54';"
] | How many project staff worked as leaders or started working before '1989-04-24 23:51:54'? | SELECT count(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'; | tracking_grants_for_research |
[
"What are the start dates of project staff?",
"What about the end date of them?",
"What's the last date among the result?"
] | [
"SELECT date_from FROM Project_Staff;",
"SELECT date_to FROM Project_Staff;",
"SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1;"
] | What is the last date of the staff leaving the projects? | SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1; | tracking_grants_for_research |
[
"Give me the outcome descriptions of research outcomes.",
"What are the result description of the project whose detail is 'sed'?",
"How about 'sint'?"
] | [
"SELECT outcome_description FROM Research_outcomes;",
"SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sed';",
"SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint';"
] | What are the result description of the project whose detail is 'sint'? | SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'; | tracking_grants_for_research |
[
"Show me the outcome count for each organisation.",
"Which organisation has the least number of outcome? Show ids.",
"How about the one with the most outcome count? Show the count as well."
] | [
"SELECT count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id;",
"SELECT T1.organisation_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) ASC LIMIT 1;",
"SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;"
] | List the organisation id with the maximum outcome count, and the count. | SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1; | tracking_grants_for_research |
[
"What're the project details?",
"Show me only the one launched by the organisation with the most number of projects.",
"How about the one with most projects?"
] | [
"SELECT project_details FROM Projects;",
"SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) ASC LIMIT 1 );",
"SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 );"
] | List the project details of the projects launched by the organisation with the most number of projects. | SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 ); | tracking_grants_for_research |
[
"How tasks are there?",
"How many tasks does each project have?",
"Show the project details as well."
] | [
"SELECT count(*) FROM Tasks;",
"SELECT count(*) FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id;",
"SELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id;"
] | How many tasks does each project have? List the task count and the project detail. | SELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id; | tracking_grants_for_research |
[
"Show me all the role codes.",
"How about those of staff who starts working after 2003-04-19 15:06:20?",
"List those of the staff who starts working after 2003-04-19 15:06:20 and ends working before 2016-03-15 00:33:18?"
] | [
"SELECT role_code FROM Project_Staff;",
"SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20';",
"SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'"
] | What are the staff roles of the staff who starts working after 2003-04-19 15:06:20 and ends working before 2016-03-15 00:33:18? | SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18' | tracking_grants_for_research |
[
"What are all the papers?",
"Give me the titles of those who are published by \"Jeremy Gibbons\"?"
] | [
"SELECT * FROM PAPERS",
"SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Jeremy\" AND t1.lname = \"Gibbons\""
] | What are the titles of papers published by "Jeremy Gibbons"? | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Jeremy" AND t1.lname = "Gibbons" | icfp_1 |
[
"What are all the papers?",
"Show me the ones that are published by \"Aaron Turon\"."
] | [
"SELECT * FROM PAPERS",
"SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Aaron\" AND t1.lname = \"Turon\""
] | Find all the papers published by "Aaron Turon". | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Aaron" AND t1.lname = "Turon" | icfp_1 |
[
"How many papers are there?",
"How many authors are there?",
"How many of those papers are published by \"Atsushi Ohori\"?"
] | [
"SELECT count(*) FROM papers",
"SELECT count(*) FROM authors",
"SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Atsushi\" AND t1.lname = \"Ohori\""
] | How many papers have "Atsushi Ohori" published? | SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Atsushi" AND t1.lname = "Ohori" | icfp_1 |
[
"What are the names of all the institutions?",
"Which one does \"Matthias Blume\" belong to?"
] | [
"SELECT name FROM inst",
"SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Matthias\" AND t1.lname = \"Blume\""
] | What is the name of the institution that "Matthias Blume" belongs to? | SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Matthias" AND t1.lname = "Blume" | icfp_1 |
[
"What are all the institutions?",
"Which one does \"Katsuhiro Ueno\" belong to?"
] | [
"SELECT * FROM INST",
"SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Katsuhiro\" AND t1.lname = \"Ueno\""
] | Which institution does "Katsuhiro Ueno" belong to? | SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Katsuhiro" AND t1.lname = "Ueno" | icfp_1 |
[
"Show me the name of all the institutions?",
"show me the name of all the authors?",
"Give me the first names and last names of those belong to the \"University of Oxford\"."
] | [
"SELECT name FROM INST",
"SELECT fname , lname FROM authors",
"SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Oxford\""
] | Who belong to the institution "University of Oxford"? Show the first names and last names. | SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "University of Oxford" | icfp_1 |
[
"What are the name of all the institutions?",
"Who are the name of all the authors?",
"Give me those belong to \"Google\"."
] | [
"SELECT NAME FROM INST",
"SELECT fname , lname FROM authors",
"SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\""
] | Which authors belong to the institution "Google"? Show the first names and last names. | SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Google" | icfp_1 |
[
"What are the name of all the authors?",
"Who published the paper \"Binders Unbound\"?",
"Give me only the last names."
] | [
"SELECT fname , lname FROM authors",
"SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Binders Unbound\"",
"SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Binders Unbound\""
] | What are the last names of the author of the paper titled "Binders Unbound"? | SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Binders Unbound" | icfp_1 |
[
"What are all the papers?",
"What are the name of all the authors?",
"Who wrote the paper \"Nameless, Painless\"?"
] | [
"SELECT * FROM PAPERS",
"SELECT fname , lname FROM authors",
"SELECT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Nameless , Painless\""
] | Find the first and last name of the author(s) who wrote the paper "Nameless, Painless". | SELECT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Nameless , Painless" | icfp_1 |
[
"What are all the papers?",
"What are the name of all the institutions?",
"Which papers are published under \"Indiana University\"?"
] | [
"SELECT * FROM PAPERS",
"SELECT name FROM INST",
"SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Indiana University\""
] | What are the papers published under the institution "Indiana University"? | SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Indiana University" | icfp_1 |
[
"What are all the papers?",
"Give me information about the institution \"Google\".",
"Which papers did it publish?"
] | [
"SELECT * FROM PAPERS",
"SELECT * FROM INST WHERE NAME = \"Google\"",
"SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\""
] | Find all the papers published by the institution "Google". | SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Google" | icfp_1 |
[
"How many papers are there?",
"What are all the institutions?",
"How many papers are published by \"Tokohu University\"?"
] | [
"SELECT count(*) FROM PAPERS",
"SELECT * FROM INST",
"SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Tokohu University\""
] | How many papers are published by the institution "Tokohu University"? | SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Tokohu University" | icfp_1 |
[
"How many papers are there?",
"What are all the institutions?",
"Give me the number of papers published by \"\"University of Pennsylvania\"\"."
] | [
"SELECT count(*) FROM PAPERS",
"SELECT * FROM INST",
"SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Pennsylvania\""
] | Find the number of papers published by the institution "University of Pennsylvania". | SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "University of Pennsylvania" | icfp_1 |
[
"What are all the papers?",
"What are the name of all the authors?",
"Which papers did \"Olin Shivers\" write?"
] | [
"SELECT * FROM PAPERS",
"SELECT fname , lname FROM authors",
"SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Olin\" AND t1.lname = \"Shivers\""
] | Find the papers which have "Olin Shivers" as an author. | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Olin" AND t1.lname = "Shivers" | icfp_1 |
[
"What are all the papers?",
"What are all the authors?",
"Which papers did \"Stephanie Weirich\" write?"
] | [
"SELECT * FROM PAPERS",
"SELECT fname , lname FROM authors",
"SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Stephanie\" AND t1.lname = \"Weirich\""
] | Which papers have "Stephanie Weirich" as an author? | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Stephanie" AND t1.lname = "Weirich" | icfp_1 |
[
"What are all institutions in \"USA\"?",
"What papers did they publish?",
"Among those, which have \"Turon\" as its second author?"
] | [
"SELECT * FROM INST WHERE country = \"USA\"",
"SELECT distinct t3.title FROM authorship AS t2 JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"USA\"",
"SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"USA\" AND t2.authorder = 2 AND t1.lname = \"Turon\""
] | Which paper is published in an institution in "USA" and have "Turon" as its second author? | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "USA" AND t2.authorder = 2 AND t1.lname = "Turon" | icfp_1 |
[
"What are all institutions in \"Japan\"?",
"Which authors belong to them?",
"Who has last name \"Ohori\"?",
"Give me the titles of papers he wrote as the first author."
] | [
"SELECT * FROM INST WHERE country = \"Japan\"",
"SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 on t2.instid = t3.instid WHERE t3.country = \"Japan\"",
"SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 on t2.instid = t3.instid WHERE t3.country = \"Japan\" and t1.lname = \"Ohori\"",
"SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"Japan\" AND t2.authorder = 1 AND t1.lname = \"Ohori\""
] | Find the titles of papers whose first author is affiliated with an institution in the country "Japan" and has last name "Ohori"? | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "Japan" AND t2.authorder = 1 AND t1.lname = "Ohori" | icfp_1 |
[
"What are the name of all the authors?",
"How many papers did each of them publish?",
"Who published the most? Give me the last name."
] | [
"SELECT fname, lname FROM authors",
"SELECT t1.fname, t1.lname, count(*) FROM authors as t1 JOIN authorship as t2 on t1.authID = t2.authID",
"SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname , t1.lname ORDER BY count(*) DESC LIMIT 1"
] | What is the last name of the author that has published the most papers? | SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname , t1.lname ORDER BY count(*) DESC LIMIT 1 | icfp_1 |
[
"What are all the countries?",
"How many papers did each of them publish?",
"Which country published the most?"
] | [
"SELECT country FROM inst",
"SELECT country, count(*) FROM inst as t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country",
"SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1"
] | Retrieve the country that has published the most papers. | SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1 | icfp_1 |
[
"What are the name of all the organizations?",
"How many papers did each of them publish?",
"Give me the name of the one published the most."
] | [
"SELECT name FROM inst",
"SELECT t1.name, count(*) FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name",
"SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1"
] | Find the name of the organization that has published the largest number of papers. | SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1 | icfp_1 |
[
"What are all the papers?",
"Which contains the word \"ML\"? Give me the titles of them."
] | [
"SELECT * FROM papers",
"SELECT title FROM papers WHERE title LIKE \"%ML%\""
] | Find the titles of the papers that contain the word "ML". | SELECT title FROM papers WHERE title LIKE "%ML%" | icfp_1 |
[
"What are all the papers?",
"Which contains the word \"Database\"? Give me the titles of them."
] | [
"SELECT * FROM papers",
"SELECT title FROM papers WHERE title LIKE \"%Database%\""
] | Which paper's title contains the word "Database"? | SELECT title FROM papers WHERE title LIKE "%Database%" | icfp_1 |
[
"What are all the papers?",
"Give me those whose title contains \"Functional\".",
"Who wrote any of those? Give me the first names only."
] | [
"SELECT * FROM papers",
"SELECT * FROM papers WHERE title LIKE \"%Functional%\"",
"SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Functional%\""
] | Find the first names of all the authors who have written a paper with title containing the word "Functional". | SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Functional%" | icfp_1 |
[
"What are all the papers?",
"Give me those whose title contains \"Monadic\".",
"Who wrote any of those? Give me the last names only."
] | [
"SELECT * FROM papers",
"SELECT * FROM papers WHERE title LIKE \"%Monadic%\"",
"SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Monadic%\""
] | Find the last names of all the authors that have written a paper with title containing the word "Monadic". | SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Monadic%" | icfp_1 |
[
"How many custmers are there?",
"How many customers are there that have account name 162?",
"Show his first name, last name, and phone."
] | [
"SELECT COUNT(*) FROM Customers",
"SELECT COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"162\"",
"SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"162\""
] | What is the first name, last name, and phone of the customer with account name 162? | SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162" | customers_card_transactions |
[
"Show the information of the customer with first name Art and last name Turcotte.",
"Please show the account information of this customer.",
"How many accounts are there?"
] | [
"SELECT * FROM Customers WHERE customer_first_name = \"Art\" AND customer_last_name = \"Turcotte\"",
"SELECT * FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"",
"SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\""
] | How many accounts does the customer with first name Art and last name Turcotte have? | SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte" | customers_card_transactions |
[
"How many accounts are there?",
"How many accounts does each customer have?",
"Which customer has most accounts? Show its id.",
"Please also show the number of his accounts."
] | [
"SELECT COUNT(*) FROM Accounts",
"SELECT customer_id, count(*) FROM Accounts GROUP BY customer_id",
"SELECT customer_id FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1",
"SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1"
] | Show the customer id and number of accounts with most accounts. | SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1 | customers_card_transactions |
[
"How many accounts are there?",
"Which customer has least number of accounts?",
"Please also show his id."
] | [
"SELECT COUNT(*) FROM Accounts",
"SELECT T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1",
"SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1"
] | What is the customer first, last name and id with least number of accounts. | SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1 | customers_card_transactions |
[
"How many customer are there?",
"How many accounts are there?",
"So, how many customers are there that does not have an account?"
] | [
"SELECT count(*) FROM Customers",
"SELECT COUNT(*) FROM Accounts",
"SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)"
] | Show the number of all customers without an account. | SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts) | customers_card_transactions |
[
"How many customers are there?",
"Who have at least one accounts?",
"Who does not have any accounts?",
"Show his first names and last names."
] | [
"SELECT COUNT(*) FROM Customers",
"SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id",
"SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id",
"SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id"
] | Show the first names and last names of customers without any account. | SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id | customers_card_transactions |
[
"What information do you have for the customer with first name Aniyah and last name Feest?",
"Show her address please.",
"What is the phone and email for this customer?"
] | [
"SELECT * FROM Customers WHERE customer_first_name = \"Aniyah\" AND customer_last_name = \"Feest\"",
"SELECT customer_address FROM Customers WHERE customer_first_name = \"Aniyah\" AND customer_last_name = \"Feest\"",
"SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = \"Aniyah\" AND customer_last_name = \"Feest\""
] | What is the phone and email for customer with first name Aniyah and last name Feest? | SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest" | customers_card_transactions |
[
"How many cards are there?",
"Who has the card 4560596484842? Show full name.",
"Please also show his phone number."
] | [
"SELECT COUNT(*) FROM Customers_cards",
"SELECT T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = \"4560596484842\"",
"SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = \"4560596484842\""
] | What is the first name, last name, and phone of the customer with card 4560596484842. | SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = "4560596484842" | customers_card_transactions |
[
"What information can you provide for the customer Art Turcotte?",
"What is his phone number?",
"How many cards does he have?"
] | [
"SELECT * FROM Customers WHERE customer_first_name = \"Art\" AND customer_last_name = \"Turcotte\"",
"SELECT customer_phone FROM Customers WHERE customer_first_name = \"Art\" AND customer_last_name = \"Turcotte\"",
"SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\""
] | How many cards does customer Art Turcotte have? | SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte" | customers_card_transactions |
[
"List all the event ids with the type code being \"Death Proof\".",
"What about 'Marriage'?",
"What are the event details of them?"
] | [
"SELECT T1.event_id FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Death Proof'",
"SELECT T1.event_id FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage'",
"SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage'"
] | what are the event details of the services that have the type code 'Marriage'? | SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage' | local_govt_in_alabama |
[
"How many participants are there for event 3?",
"How many events have 3 participants, list the event id and details.",
"What about more than one participants?"
] | [
"SELECT count(*) FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID where T1.event_id = 3",
"SELECT T1.event_id , T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_ID HAVING count(*) = 3",
"SELECT T1.event_id , T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_ID HAVING count(*) > 1"
] | What are the ids and details of events that have more than one participants? | SELECT T1.event_id , T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_ID HAVING count(*) > 1 | local_govt_in_alabama |
[
"List all the events that participant 66 has joined.",
"How many events are there?",
"Show how many events for each participant that one has attended, keep the participant id, type and the count."
] | [
"SELECT * FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T2.PARTICIPANT_ID = 66",
"SELECT count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T2.PARTICIPANT_ID = 66",
"SELECT T1.Participant_ID , T1.Participant_Type_Code , count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID"
] | How many events have each participants attended? List the participant id, type and the number. | SELECT T1.Participant_ID , T1.Participant_Type_Code , count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID | local_govt_in_alabama |
[
"Show all the information about participants.",
"What are the participant ids, type code and details about them?"
] | [
"SELECT * FROM Participants",
"SELECT Participant_ID , Participant_Type_Code , Participant_Details FROM Participants"
] | What are all the the participant ids, type code and details? | SELECT Participant_ID , Participant_Type_Code , Participant_Details FROM Participants | local_govt_in_alabama |
[
"How many unique participant types are there?",
"How many people are with the type 'Participant'?",
"What about 'Organizer'?"
] | [
"SELECT count(distinct participant_type_code) FROM participants",
"SELECT count(*) FROM participants WHERE participant_type_code = 'Participant'",
"SELECT count(*) FROM participants WHERE participant_type_code = 'Organizer'"
] | How many participants belong to the type 'Organizer'? | SELECT count(*) FROM participants WHERE participant_type_code = 'Organizer' | local_govt_in_alabama |
[
"How many service type codes are there?",
"Order them in alphabetical order."
] | [
"SELECT count(service_type_code) FROM services",
"SELECT service_type_code FROM services ORDER BY service_type_code"
] | List the type of the services in alphabetical order. | SELECT service_type_code FROM services ORDER BY service_type_code | local_govt_in_alabama |
[
"List all the information about events.",
"Only keep service id and details."
] | [
"SELECT * FROM EVENTS",
"SELECT service_id , event_details FROM EVENTS"
] | List the service id and details for the events. | SELECT service_id , event_details FROM EVENTS | local_govt_in_alabama |
[
"How many events are there in total?",
"Among those, which of them had participants whose details had the substring 'Miss'",
"What about 'Dr.'?",
"How many are there in total?"
] | [
"SELECT count(*) FROM participants",
"SELECT * FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Miss%'",
"SELECT * FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%'",
"SELECT count(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%'"
] | How many events had participants whose details had the substring 'Dr.' | SELECT count(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%' | local_govt_in_alabama |
[
"List all the participant types.",
"How many unique participant types are there?",
"Among those which one is the most popular one?"
] | [
"SELECT participant_type_code FROM participants",
"SELECT count(DISTINCT participant_type_code) FROM participants",
"SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY count(*) DESC LIMIT 1"
] | What is the most common participant type? | SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY count(*) DESC LIMIT 1 | local_govt_in_alabama |
[
"Count the number of participants for each event.",
"Among those, which event id has the least participants?",
"What service id is it?",
"Also list the service type of it."
] | [
"SELECT event_id,count(*) FROM Participants_in_Events group by event_id",
"SELECT event_id FROM Participants_in_Events group by event_id order by count(*) asc limit 1",
"SELECT service_id FROM Events where event_id = (SELECT event_id FROM Participants_in_Events group by event_id order by count(*) asc limit 1)",
"SELECT T3.service_id , T4.Service_Type_Code FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID JOIN EVENTS AS T3 ON T2.Event_ID = T3.Event_ID JOIN services AS T4 ON T3.service_id = T4.service_id GROUP BY T3.service_id ORDER BY count(*) ASC LIMIT 1"
] | Which service id and type has the least number of participants? | SELECT T3.service_id , T4.Service_Type_Code FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID JOIN EVENTS AS T3 ON T2.Event_ID = T3.Event_ID JOIN services AS T4 ON T3.service_id = T4.service_id GROUP BY T3.service_id ORDER BY count(*) ASC LIMIT 1 | local_govt_in_alabama |
[
"Count the number of participants for each event.",
"Among those, which event id has the least participants?",
"What about the one that has the mose participants?"
] | [
"SELECT event_id,count(*) FROM Participants_in_Events group by event_id",
"SELECT event_id FROM Participants_in_Events group by event_id order by count(*) ASC limit 1",
"SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY count(*) DESC LIMIT 1"
] | What is the id of the event with the most participants? | SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY count(*) DESC LIMIT 1 | local_govt_in_alabama |
[
"How many events are there?",
"List the events that have participant details with 'Lupe Deckow'?",
"What about the ones with 'Kenyatta Kuhn'?",
"Show the id of the events where the above participants did not participate."
] | [
"SELECT count(*) FROM EVENTS",
"SELECT * FROM Participants where participant_details = 'Lupe Deckow'",
"SELECT * FROM Participants where participant_details = 'Kenyatta Kuhn'",
"SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE Participant_Details = 'Kenyatta Kuhn'"
] | Which events id does not have any participant with detail 'Kenyatta Kuhn'? | SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE Participant_Details = 'Kenyatta Kuhn' | local_govt_in_alabama |
[
"List all the service types.",
"Which service code has successful details?",
"Then which has both successful and failure event details?"
] | [
"SELECT service_type_code FROM Services",
"SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success'",
"SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail'"
] | Which services type had both successful and failure event details? | SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail' | local_govt_in_alabama |
[
"How many events are there?",
"List all the event ids.",
"Show all the event information if the event has someone participated.",
"How about nobody has participated?",
"How many are there?"
] | [
"SELECT count(*) FROM EVENTS",
"SELECT event_id FROM Participants_in_Events",
"SELECT * FROM EVENTS WHERE event_id IN (SELECT event_id FROM Participants_in_Events)",
"SELECT * FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)",
"SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)"
] | How many events did not have any participants? | SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events) | local_govt_in_alabama |
[
"Show all body builder information.",
"Then how many are there?"
] | [
"SELECT * FROM body_builder",
"SELECT count(*) FROM body_builder"
] | How many body builders are there? | SELECT count(*) FROM body_builder | body_builder |
[
"What are the total scores for each body builder?",
"How do you order them in ascending order?"
] | [
"SELECT Total FROM body_builder",
"SELECT Total FROM body_builder ORDER BY Total ASC"
] | List the total scores of body builders in ascending order. | SELECT Total FROM body_builder ORDER BY Total ASC | body_builder |
[
"What are the snatch scores of each body builder?",
"What are the snatch score and clean jerk score of each body_builder?",
"Order the results in ascending order of snatch score."
] | [
"SELECT Snatch FROM body_builder",
"SELECT Snatch , Clean_Jerk FROM body_builder",
"SELECT Snatch , Clean_Jerk FROM body_builder ORDER BY Snatch ASC"
] | List the snatch score and clean jerk score of body builders in ascending order of snatch score. | SELECT Snatch , Clean_Jerk FROM body_builder ORDER BY Snatch ASC | body_builder |
[
"What is the snatch score of each body builder?",
"What is the minimum value of the them?",
"What about the mean value?"
] | [
"SELECT Snatch FROM body_builder",
"SELECT min(Snatch) FROM body_builder",
"SELECT avg(Snatch) FROM body_builder"
] | What is the average snatch score of body builders? | SELECT avg(Snatch) FROM body_builder | body_builder |
[
"What are all the information about the body builders?",
"Which have the top three total score?",
"What about top one?",
"Show the clean and jerk score of it."
] | [
"SELECT * FROM body_builder",
"SELECT * FROM body_builder ORDER BY Total DESC LIMIT 3",
"SELECT * FROM body_builder ORDER BY Total DESC LIMIT 1",
"SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1"
] | What are the clean and jerk score of the body builder with the highest total score? | SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1 | body_builder |
[
"Show everything about the people.",
"What are the birthdays?",
"Order the results in descending order of height.",
"What about ascending order?"
] | [
"SELECT * FROM People",
"SELECT Birth_Date FROM People",
"SELECT Birth_Date FROM People ORDER BY Height DESC",
"SELECT Birth_Date FROM People ORDER BY Height ASC"
] | What are the birthdays of people in ascending order of height? | SELECT Birth_Date FROM People ORDER BY Height ASC | body_builder |
[
"What are the names of all the people?",
"How many are there?",
"Show the names of body builders."
] | [
"SELECT Name FROM people",
"SELECT count(Name) FROM people",
"SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID"
] | What are the names of body builders? | SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID | body_builder |
[
"What are the names of all the people?",
"Show the names of body builders.",
"Among those, which total score is higher than 200?",
"What about higher than 300?"
] | [
"SELECT Name FROM people",
"SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID",
"SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 200",
"SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300"
] | What are the names of body builders whose total score is higher than 300? | SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300 | body_builder |
[
"What are the names of all the people?",
"Show the names of body builders.",
"Show the names of them which has the greatest body weight."
] | [
"SELECT Name FROM people",
"SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID",
"SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1"
] | What is the name of the body builder with the greatest body weight? | SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1 | body_builder |
[
"Show the information of all the people.",
"Show the Birth Date and Birth Place about each one.",
"What about the body builders?",
"Among those, show the three which have the highest total points?",
"What about the highest total point?"
] | [
"SELECT * from people",
"SELECT Birth_Date, Birth_Place from people",
"SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID",
"SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 3",
"SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1"
] | What are the birth date and birth place of the body builder with the highest total points? | SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1 | body_builder |
[
"What are the heights of the people?",
"What is the average?",
"What are the heights of the body builders?",
"For those results, which ones have weight larger than 91.0?",
"What about the total score is smaller than 315?"
] | [
"SELECT Height FROM people",
"SELECT avg(Height) FROM people",
"SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID",
"SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Weight > 91.0",
"SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315"
] | What are the heights of body builders with total score smaller than 315? | SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315 | body_builder |
[
"What are the total scores of body builder?",
"How about the average value of those scores?",
"What are the average scores of those results where the people weight is larger than 100.0?",
"What about the people height larger than 200?"
] | [
"SELECT Total FROM body_builder",
"SELECT avg(Total) FROM body_builder",
"SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Weight > 100.0",
"SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200"
] | What is the average total score of body builders with height bigger than 200? | SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200 | body_builder |
[
"What are the names of body builders?",
"List these results in ascending order by the weight.",
"Now list them in descending order by the total score."
] | [
"SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID",
"SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight ASC",
"SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC"
] | What are the names of body builders in descending order of total scores? | SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC | body_builder |
[
"What are the birth places?",
"How many people in each birth place?"
] | [
"SELECT Birth_Place FROM people",
"SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place"
] | List each birth place along with the number of people from there. | SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place | body_builder |
[
"What are the information of all the people?",
"What are the birth places of all the people?",
"How many people in each of the birth place?",
"What are the four most popular birth places?",
"What about top one?"
] | [
"SELECT * FROM people",
"SELECT Birth_Place FROM people",
"SELECT Birth_Place, count(*) FROM people GROUP BY Birth_Place",
"SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 4",
"SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1"
] | What is the most common birth place of people? | SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1 | body_builder |
[
"What are the birth places of all the people?",
"How many people in each of the birth place?",
"Keep the birth places where the birth place is only token by one person.",
"What about at least two people?"
] | [
"SELECT Birth_Place FROM people",
"SELECT Birth_Place, count(*) FROM people GROUP BY Birth_Place",
"SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) = 1",
"SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2"
] | What are the birth places that are shared by at least two people? | SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2 | body_builder |
[
"What are the heights and weights of all the people?",
"Show those results in descending order?"
] | [
"SELECT Height , Weight FROM people",
"SELECT Height , Weight FROM people ORDER BY Height DESC"
] | List the height and weight of people in descending order of height. | SELECT Height , Weight FROM people ORDER BY Height DESC | body_builder |
[
"What information about all the body builders?"
] | [
"SELECT * FROM body_builder"
] | Show all information about each body builder. | SELECT * FROM body_builder | body_builder |
[
"Show the name and birth place about the people.",
"Show that of all the body builders",
"What are the name and birth place of people who are not body builders?"
] | [
"SELECT Name , birth_place FROM people",
"SELECT T1.Name , T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id",
"SELECT Name , birth_place FROM people EXCEPT SELECT T1.Name , T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id"
] | List the names and origins of people who are not body builders. | SELECT Name , birth_place FROM people EXCEPT SELECT T1.Name , T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id | body_builder |
[
"What are the birth places are there?",
"What are the unique birth places?",
"How many are there?"
] | [
"SELECT Birth_Place FROM people",
"SELECT DISTINCT Birth_Place FROM people",
"SELECT count(DISTINCT Birth_Place) FROM people"
] | How many distinct birth places are there? | SELECT count(DISTINCT Birth_Place) FROM people | body_builder |
[
"Show the people Id of the body builders.",
"Which people are there?",
"What about people who are not there?",
"How many such people in total?"
] | [
"SELECT People_ID FROM body_builder",
"SELECT * FROM people WHERE people_id IN (SELECT People_ID FROM body_builder)",
"SELECT * FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder)",
"SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder)"
] | How many persons are not body builders? | SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder) | body_builder |
[
"What are the weights of the body builders?",
"With those weights, keep the ones whose snatch score is higher 180.",
"What about higher than 140 or the height is greater than 200?"
] | [
"SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id",
"SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 180",
"SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200;"
] | List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200. | SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200; | body_builder |
[
"What are the total scores of the body builders",
"Among those, show the one who was born in May.",
"What about born in January?"
] | [
"SELECT total FROM body_builder",
"SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE \"%May%\";",
"SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE \"%January%\";"
] | What are the total scores of the body builders whose birthday contains the string "January" ? | SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE "%January%"; | body_builder |
[
"List all the pilots.",
"How many are there?"
] | [
"SELECT * FROM pilot",
"SELECT count(*) FROM pilot"
] | How many pilots are there? | SELECT count(*) FROM pilot | pilot_record |
[
"Show all the pilot names",
"How many in total?",
"Order them in ascending order of the rank."
] | [
"SELECT Pilot_name FROM pilot",
"SELECT count(Pilot_name) FROM pilot",
"SELECT Pilot_name FROM pilot ORDER BY Rank ASC"
] | List the names of pilots in ascending order of rank. | SELECT Pilot_name FROM pilot ORDER BY Rank ASC | pilot_record |
[
"Show all the pilot names and positions.",
"What about the pilot names and their teams?"
] | [
"SELECT Pilot_name, POSITION FROM pilot",
"SELECT POSITION , Team FROM pilot"
] | What are the positions and teams of pilots? | SELECT POSITION , Team FROM pilot | pilot_record |
[
"Show all the pilot names and positions",
"Show all the names and their age?",
"Keep those who are 37 years old.",
"Show the distinct positions of pilots older than 30."
] | [
"SELECT Pilot_name, POSITION FROM pilot",
"SELECT Pilot_name, Age FROM pilot",
"SELECT Pilot_name, Age FROM pilot WHERE Age = 37",
"SELECT DISTINCT POSITION FROM pilot WHERE Age > 30"
] | List the distinct positions of pilots older than 30. | SELECT DISTINCT POSITION FROM pilot WHERE Age > 30 | pilot_record |
[
"List all pilot names with there team name.",
"Among those, which are from the Team \"Bradley\"?",
"What about \"Eau Claire High School\"?",
"What about \"Bradley\" or \"Fordham\"?"
] | [
"SELECT Pilot_name, Team FROM pilot",
"SELECT Pilot_name FROM pilot WHERE Team = \"Bradley\"",
"SELECT Pilot_name FROM pilot WHERE Team = \"Eau Claire High School\"",
"SELECT Pilot_name FROM pilot WHERE Team = \"Bradley\" OR Team = \"Fordham\""
] | Show the names of pilots from team "Bradley" or "Fordham". | SELECT Pilot_name FROM pilot WHERE Team = "Bradley" OR Team = "Fordham" | pilot_record |
[
"Show all the pilot names and the join years.",
"How many unique years are there?",
"List the years by the pilot rank in ascending order.",
"In which join year, the pilot has the highest rank?"
] | [
"SELECT Pilot_name, Join_Year FROM pilot",
"SELECT count(Join_Year) FROM pilot",
"SELECT Join_Year FROM pilot ORDER BY Rank ASC",
"SELECT Join_Year FROM pilot ORDER BY Rank ASC LIMIT 1"
] | What is the joined year of the pilot of the highest rank? | SELECT Join_Year FROM pilot ORDER BY Rank ASC LIMIT 1 | pilot_record |
[
"Show the pilot names and their nationalities.",
"Which nationalities have the pilots whose position is \"Center Team\"?",
"Show the nationalities and the number of pilots for each."
] | [
"SELECT Pilot_name, Nationality FROM pilot",
"SELECT Nationality FROM pilot WHERE Position = \"Center Team\"",
"SELECT Nationality, count(*) FROM pilot GROUP BY Nationality"
] | What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality. | SELECT Nationality , COUNT(*) FROM pilot GROUP BY Nationality | pilot_record |
[
"Show the pilot names and their nationalities.",
"Which nationalities have the pilots who is younger than 34?",
"Show each one and the number of pilots.",
"Among those, which one is the most popular one?"
] | [
"SELECT Pilot_name, Nationality FROM pilot",
"SELECT Nationality FROM pilot WHERE Age < 34",
"SELECT Nationality, count(*) FROM pilot GROUP BY Nationality",
"SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the most common nationality of pilots. | SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | pilot_record |
[
"List all the pilot positions.",
"Keep the ones whose age is younger than 35",
"What about the join year is early than 2000?",
"What about in the range of year f2000 and 2005?"
] | [
"SELECT POSITION FROM pilot",
"SELECT POSITION FROM pilot WHERE Age < 35",
"SELECT POSITION FROM pilot WHERE Join_Year\t < 2000",
"SELECT POSITION FROM pilot WHERE Join_Year\t < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year\t > 2005"
] | Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. | SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005 | pilot_record |
[
"What are all the information about the pilots?",
"What about the fleet series?",
"How about the aircraft models?",
"Show all the flying records with the pilot names and the aircraft's models."
] | [
"SELECT * FROM pilot",
"SELECT Fleet_Series FROM aircraft",
"SELECT Model FROM aircraft",
"SELECT T3.Pilot_name , T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID"
] | Show the names of pilots and models of aircrafts they have flied with. | SELECT T3.Pilot_name , T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID | pilot_record |
[
"What are all the information about the pilots?",
"What about the fleet series?",
"Show all the flying records with the pilot names and the aircraft's sleet series.",
"Now show those results in ascending order of the pilot age.",
"What about in ascending order of the pilot rank?"
] | [
"SELECT * FROM pilot",
"SELECT Fleet_Series FROM aircraft",
"SELECT T3.Pilot_name , T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID",
"SELECT T3.Pilot_name , T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Age",
"SELECT T3.Pilot_name , T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank"
] | Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot. | SELECT T3.Pilot_name , T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank | pilot_record |
[
"Show all the fleet series?",
"Which aircrafts have been flied by pilot whose name is \"Charles Oakley\"?",
"What about the ones that have been flied by pilots younger than 34"
] | [
"SELECT Fleet_Series FROM aircraft",
"SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Pilot_name = \"Charles Oakley\"",
"SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34"
] | Show the fleet series of the aircrafts flied by pilots younger than 34 | SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34 | pilot_record |
[
"How many records in total?",
"Show the pilot names where there is at lease one record.",
"Show the names and the corresponding number of records."
] | [
"SELECT COUNT(*) FROM pilot_record",
"SELECT T2.Pilot_name FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name",
"SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name"
] | Show the names of pilots and the number of records they have. | SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name | pilot_record |
[
"How many records are there?",
"Show the pilot names where there is at lease one record.",
"Which pilot has only one record?",
"What about the ones who have more than one record?"
] | [
"SELECT COUNT(*) FROM pilot_record",
"SELECT T2.Pilot_name FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name",
"SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) = 1",
"SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1"
] | Show names of pilots that have more than one record. | SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1 | pilot_record |