query stringlengths 18 577 | question stringlengths 16 224 | table_names list | tables list | answer stringlengths 45 443k | source stringlengths 128 60.7M | target stringlengths 19 480k |
|---|---|---|---|---|---|---|
SELECT count(*) FROM head WHERE age > 56 | How many heads of the departments are older than 56 ? | [
"head"
] | [
"{\"columns\":[\"head_ID\",\"name\",\"born_state\",\"age\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"Tiger Woods\",\"Alabama\",67.0],[2,\"Sergio Garc\\u00c3\\u00ada\",\"California\",68.0],[3,\"K. J. Choi\",\"Alabama\",69.0],[4,\"Dudley Hart\",\"California\",52.0],[5,\"Jeff Maggert\",\"Delaware\",53.0],[6,\"Bi... | {"columns":["count(*)"],"index":[0],"data":[[5]]} | How many heads of the departments are older than 56 ? <table_name> : head col : head_ID | name | born_state | age row 1 : 1 | Tiger Woods | Alabama | 67 row 2 : 2 | Sergio GarcÃa | California | 68 row 3 : 3 | K. J. Choi | Alabama | 69 row 4 : 4 | Dudley Hart | California | 52 row 5 : 5 | Jeff Maggert | Delaware | 53 r... | col : count(*) row 1 : 5 |
SELECT name , born_state , age FROM head ORDER BY age | List the name, born state and age of the heads of departments ordered by age. | [
"head"
] | [
"{\"columns\":[\"head_ID\",\"name\",\"born_state\",\"age\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"Tiger Woods\",\"Alabama\",67.0],[2,\"Sergio Garc\\u00c3\\u00ada\",\"California\",68.0],[3,\"K. J. Choi\",\"Alabama\",69.0],[4,\"Dudley Hart\",\"California\",52.0],[5,\"Jeff Maggert\",\"Delaware\",53.0],[6,\"Bi... | {"columns":["name","born_state","age"],"index":[0,1,2,3,4,5,6,7,8,9],"data":[["P\u00c3\u00a1draig Harrington","Connecticut",43.0],["Stewart Cink","Florida",50.0],["Dudley Hart","California",52.0],["Jeff Maggert","Delaware",53.0],["Nick Faldo","California",56.0],["Tiger Woods","Alabama",67.0],["Franklin Langham","Connec... | List the name, born state and age of the heads of departments ordered by age. <table_name> : head col : head_ID | name | born_state | age row 1 : 1 | Tiger Woods | Alabama | 67 row 2 : 2 | Sergio GarcÃa | California | 68 row 3 : 3 | K. J. Choi | Alabama | 69 row 4 : 4 | Dudley Hart | California | 52 row 5 : 5 | Jeff M... | col : name | born_state | age row 1 : Pádraig Harrington | Connecticut | 43 row 2 : Stewart Cink | Florida | 50 row 3 : Dudley Hart | California | 52 row 4 : Jeff Maggert | Delaware | 53 row 5 : Nick Faldo | California | 56 row 6 : Tiger Woods | Alabama | 67 row 7 : Franklin Langham | Connecticut | 67 row 8 : Sergio G... |
SELECT creation , name , budget_in_billions FROM department | List the creation year, name and budget of each department. | [
"department"
] | [
"{\"columns\":[\"Department_ID\",\"Name\",\"Creation\",\"Ranking\",\"Budget_in_Billions\",\"Num_Employees\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[1,\"State\",\"1789\",1,9.96,30266.0],[2,\"Treasury\",\"1789\",2,11.1,115897.0],[3,\"Defense\",\"1947\",3,439.3,3000000.0],[4,\"Justice\",\"1870\",4,2... | {"columns":["Creation","Name","Budget_in_Billions"],"index":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"data":[["1789","State",9.96],["1789","Treasury",11.1],["1947","Defense",439.3],["1870","Justice",23.4],["1849","Interior",10.7],["1889","Agriculture",77.6],["1903","Commerce",6.2],["1913","Labor",59.7],["1953","Health and ... | List the creation year, name and budget of each department. <table_name> : department col : Department_ID | Name | Creation | Ranking | Budget_in_Billions | Num_Employees row 1 : 1 | State | 1789 | 1 | 9.96 | 30266 row 2 : 2 | Treasury | 1789 | 2 | 11.1 | 115897 row 3 : 3 | Defense | 1947 | 3 | 439.3 | 3000000 row 4 : ... | col : Creation | Name | Budget_in_Billions row 1 : 1789 | State | 9.96 row 2 : 1789 | Treasury | 11.1 row 3 : 1947 | Defense | 439.3 row 4 : 1870 | Justice | 23.4 row 5 : 1849 | Interior | 10.7 row 6 : 1889 | Agriculture | 77.6 row 7 : 1903 | Commerce | 6.2 row 8 : 1913 | Labor | 59.7 row 9 : 1953 | Health and Human Se... |
SELECT max(budget_in_billions) , min(budget_in_billions) FROM department | What are the maximum and minimum budget of the departments? | [
"department"
] | [
"{\"columns\":[\"Department_ID\",\"Name\",\"Creation\",\"Ranking\",\"Budget_in_Billions\",\"Num_Employees\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[1,\"State\",\"1789\",1,9.96,30266.0],[2,\"Treasury\",\"1789\",2,11.1,115897.0],[3,\"Defense\",\"1947\",3,439.3,3000000.0],[4,\"Justice\",\"1870\",4,2... | {"columns":["max(budget_in_billions)","min(budget_in_billions)"],"index":[0],"data":[[543.2,6.2]]} | What are the maximum and minimum budget of the departments? <table_name> : department col : Department_ID | Name | Creation | Ranking | Budget_in_Billions | Num_Employees row 1 : 1 | State | 1789 | 1 | 9.96 | 30266 row 2 : 2 | Treasury | 1789 | 2 | 11.1 | 115897 row 3 : 3 | Defense | 1947 | 3 | 439.3 | 3000000 row 4 : ... | col : max(budget_in_billions) | min(budget_in_billions) row 1 : 543.2 | 6.2 |
SELECT avg(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15 | What is the average number of employees of the departments whose rank is between 10 and 15? | [
"department"
] | [
"{\"columns\":[\"Department_ID\",\"Name\",\"Creation\",\"Ranking\",\"Budget_in_Billions\",\"Num_Employees\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[1,\"State\",\"1789\",1,9.96,30266.0],[2,\"Treasury\",\"1789\",2,11.1,115897.0],[3,\"Defense\",\"1947\",3,439.3,3000000.0],[4,\"Justice\",\"1870\",4,2... | {"columns":["avg(num_employees)"],"index":[0],"data":[[105468.1666666667]]} | What is the average number of employees of the departments whose rank is between 10 and 15? <table_name> : department col : Department_ID | Name | Creation | Ranking | Budget_in_Billions | Num_Employees row 1 : 1 | State | 1789 | 1 | 9.96 | 30266 row 2 : 2 | Treasury | 1789 | 2 | 11.1 | 115897 row 3 : 3 | Defense | 194... | col : avg(num_employees) row 1 : 105468.1666666667 |
SELECT name FROM head WHERE born_state != 'California' | What are the names of the heads who are born outside the California state? | [
"head"
] | [
"{\"columns\":[\"head_ID\",\"name\",\"born_state\",\"age\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"Tiger Woods\",\"Alabama\",67.0],[2,\"Sergio Garc\\u00c3\\u00ada\",\"California\",68.0],[3,\"K. J. Choi\",\"Alabama\",69.0],[4,\"Dudley Hart\",\"California\",52.0],[5,\"Jeff Maggert\",\"Delaware\",53.0],[6,\"Bi... | {"columns":["name"],"index":[0,1,2,3,4,5],"data":[["Tiger Woods"],["K. J. Choi"],["Jeff Maggert"],["Stewart Cink"],["P\u00c3\u00a1draig Harrington"],["Franklin Langham"]]} | What are the names of the heads who are born outside the California state? <table_name> : head col : head_ID | name | born_state | age row 1 : 1 | Tiger Woods | Alabama | 67 row 2 : 2 | Sergio GarcÃa | California | 68 row 3 : 3 | K. J. Choi | Alabama | 69 row 4 : 4 | Dudley Hart | California | 52 row 5 : 5 | Jeff Magg... | col : name row 1 : Tiger Woods row 2 : K. J. Choi row 3 : Jeff Maggert row 4 : Stewart Cink row 5 : Pádraig Harrington row 6 : Franklin Langham |
SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama' | What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'? | [
"department",
"head",
"management"
] | [
"{\"columns\":[\"Department_ID\",\"Name\",\"Creation\",\"Ranking\",\"Budget_in_Billions\",\"Num_Employees\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[1,\"State\",\"1789\",1,9.96,30266.0],[2,\"Treasury\",\"1789\",2,11.1,115897.0],[3,\"Defense\",\"1947\",3,439.3,3000000.0],[4,\"Justice\",\"1870\",4,2... | {"columns":["Creation"],"index":[0],"data":[["1903"]]} | What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'? <table_name> : department col : Department_ID | Name | Creation | Ranking | Budget_in_Billions | Num_Employees row 1 : 1 | State | 1789 | 1 | 9.96 | 30266 row 2 : 2 | Treasury | 1789 | 2 | 11.1 | 115897 row 3 : 3 | D... | col : Creation row 1 : 1903 |
SELECT born_state FROM head GROUP BY born_state HAVING count(*) >= 3 | What are the names of the states where at least 3 heads were born? | [
"head"
] | [
"{\"columns\":[\"head_ID\",\"name\",\"born_state\",\"age\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"Tiger Woods\",\"Alabama\",67.0],[2,\"Sergio Garc\\u00c3\\u00ada\",\"California\",68.0],[3,\"K. J. Choi\",\"Alabama\",69.0],[4,\"Dudley Hart\",\"California\",52.0],[5,\"Jeff Maggert\",\"Delaware\",53.0],[6,\"Bi... | {"columns":["born_state"],"index":[0],"data":[["California"]]} | What are the names of the states where at least 3 heads were born? <table_name> : head col : head_ID | name | born_state | age row 1 : 1 | Tiger Woods | Alabama | 67 row 2 : 2 | Sergio GarcÃa | California | 68 row 3 : 3 | K. J. Choi | Alabama | 69 row 4 : 4 | Dudley Hart | California | 52 row 5 : 5 | Jeff Maggert | De... | col : born_state row 1 : California |
SELECT creation FROM department GROUP BY creation ORDER BY count(*) DESC LIMIT 1 | In which year were most departments established? | [
"department"
] | [
"{\"columns\":[\"Department_ID\",\"Name\",\"Creation\",\"Ranking\",\"Budget_in_Billions\",\"Num_Employees\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[1,\"State\",\"1789\",1,9.96,30266.0],[2,\"Treasury\",\"1789\",2,11.1,115897.0],[3,\"Defense\",\"1947\",3,439.3,3000000.0],[4,\"Justice\",\"1870\",4,2... | {"columns":["Creation"],"index":[0],"data":[["1789"]]} | In which year were most departments established? <table_name> : department col : Department_ID | Name | Creation | Ranking | Budget_in_Billions | Num_Employees row 1 : 1 | State | 1789 | 1 | 9.96 | 30266 row 2 : 2 | Treasury | 1789 | 2 | 11.1 | 115897 row 3 : 3 | Defense | 1947 | 3 | 439.3 | 3000000 row 4 : 4 | Justice... | col : Creation row 1 : 1789 |
SELECT T1.name , T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes' | Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'? | [
"department",
"management"
] | [
"{\"columns\":[\"Department_ID\",\"Name\",\"Creation\",\"Ranking\",\"Budget_in_Billions\",\"Num_Employees\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[1,\"State\",\"1789\",1,9.96,30266.0],[2,\"Treasury\",\"1789\",2,11.1,115897.0],[3,\"Defense\",\"1947\",3,439.3,3000000.0],[4,\"Justice\",\"1870\",4,2... | {"columns":["Name","Num_Employees"],"index":[0,1,2],"data":[["Treasury",115897.0],["Homeland Security",208000.0],["Treasury",115897.0]]} | Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'? <table_name> : department col : Department_ID | Name | Creation | Ranking | Budget_in_Billions | Num_Employees row 1 : 1 | State | 1789 | 1 | 9.96 | 30266 row 2 : 2 | Treasury | 1789 | 2 | 11.1 | 115897 row... | col : Name | Num_Employees row 1 : Treasury | 115897 row 2 : Homeland Security | 208000 row 3 : Treasury | 115897 |
SELECT count(DISTINCT temporary_acting) FROM management | How many acting statuses are there? | [
"management"
] | [
"{\"columns\":[\"department_ID\",\"head_ID\",\"temporary_acting\"],\"index\":[0,1,2,3,4],\"data\":[[2,5,\"Yes\"],[15,4,\"Yes\"],[2,6,\"Yes\"],[7,3,\"No\"],[11,10,\"No\"]]}"
] | {"columns":["count(DISTINCT temporary_acting)"],"index":[0],"data":[[2]]} | How many acting statuses are there? <table_name> : management col : department_ID | head_ID | temporary_acting row 1 : 2 | 5 | Yes row 2 : 15 | 4 | Yes row 3 : 2 | 6 | Yes row 4 : 7 | 3 | No row 5 : 11 | 10 | No | col : count(DISTINCT temporary_acting) row 1 : 2 |
SELECT count(*) FROM department WHERE department_id NOT IN (SELECT department_id FROM management); | How many departments are led by heads who are not mentioned? | [
"department",
"management"
] | [
"{\"columns\":[\"Department_ID\",\"Name\",\"Creation\",\"Ranking\",\"Budget_in_Billions\",\"Num_Employees\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[1,\"State\",\"1789\",1,9.96,30266.0],[2,\"Treasury\",\"1789\",2,11.1,115897.0],[3,\"Defense\",\"1947\",3,439.3,3000000.0],[4,\"Justice\",\"1870\",4,2... | {"columns":["count(*)"],"index":[0],"data":[[11]]} | How many departments are led by heads who are not mentioned? <table_name> : department col : Department_ID | Name | Creation | Ranking | Budget_in_Billions | Num_Employees row 1 : 1 | State | 1789 | 1 | 9.96 | 30266 row 2 : 2 | Treasury | 1789 | 2 | 11.1 | 115897 row 3 : 3 | Defense | 1947 | 3 | 439.3 | 3000000 row 4 :... | col : count(*) row 1 : 11 |
SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes' | What are the distinct ages of the heads who are acting? | [
"head",
"management"
] | [
"{\"columns\":[\"head_ID\",\"name\",\"born_state\",\"age\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"Tiger Woods\",\"Alabama\",67.0],[2,\"Sergio Garc\\u00c3\\u00ada\",\"California\",68.0],[3,\"K. J. Choi\",\"Alabama\",69.0],[4,\"Dudley Hart\",\"California\",52.0],[5,\"Jeff Maggert\",\"Delaware\",53.0],[6,\"Bi... | {"columns":["age"],"index":[0,1,2],"data":[[53.0],[52.0],[69.0]]} | What are the distinct ages of the heads who are acting? <table_name> : head col : head_ID | name | born_state | age row 1 : 1 | Tiger Woods | Alabama | 67 row 2 : 2 | Sergio GarcÃa | California | 68 row 3 : 3 | K. J. Choi | Alabama | 69 row 4 : 4 | Dudley Hart | California | 52 row 5 : 5 | Jeff Maggert | Delaware | 53... | col : age row 1 : 53 row 2 : 52 row 3 : 69 |
SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Treasury' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.he... | List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born. | [
"department",
"head",
"management"
] | [
"{\"columns\":[\"Department_ID\",\"Name\",\"Creation\",\"Ranking\",\"Budget_in_Billions\",\"Num_Employees\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[1,\"State\",\"1789\",1,9.96,30266.0],[2,\"Treasury\",\"1789\",2,11.1,115897.0],[3,\"Defense\",\"1947\",3,439.3,3000000.0],[4,\"Justice\",\"1870\",4,2... | {"columns":["born_state"],"index":[0],"data":[["California"]]} | List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born. <table_name> : department col : Department_ID | Name | Creation | Ranking | Budget_in_Billions | Num_Employees row 1 : 1 | State | 1789 | 1 | 9.96 | 30266 row 2 : 2 | Treasury | 1789 | 2 | 11.1 | 115897... | col : born_state row 1 : California |
SELECT T1.department_id , T1.name , count(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id = T2.department_id GROUP BY T1.department_id HAVING count(*) > 1 | Which department has more than 1 head at a time? List the id, name and the number of heads. | [
"department",
"management"
] | [
"{\"columns\":[\"Department_ID\",\"Name\",\"Creation\",\"Ranking\",\"Budget_in_Billions\",\"Num_Employees\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[1,\"State\",\"1789\",1,9.96,30266.0],[2,\"Treasury\",\"1789\",2,11.1,115897.0],[3,\"Defense\",\"1947\",3,439.3,3000000.0],[4,\"Justice\",\"1870\",4,2... | {"columns":["Department_ID","Name","count(*)"],"index":[0],"data":[[2,"Treasury",2]]} | Which department has more than 1 head at a time? List the id, name and the number of heads. <table_name> : department col : Department_ID | Name | Creation | Ranking | Budget_in_Billions | Num_Employees row 1 : 1 | State | 1789 | 1 | 9.96 | 30266 row 2 : 2 | Treasury | 1789 | 2 | 11.1 | 115897 row 3 : 3 | Defense | 194... | col : Department_ID | Name | count(*) row 1 : 2 | Treasury | 2 |
SELECT head_id , name FROM head WHERE name LIKE '%Ha%' | Which head's name has the substring 'Ha'? List the id and name. | [
"head"
] | [
"{\"columns\":[\"head_ID\",\"name\",\"born_state\",\"age\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"Tiger Woods\",\"Alabama\",67.0],[2,\"Sergio Garc\\u00c3\\u00ada\",\"California\",68.0],[3,\"K. J. Choi\",\"Alabama\",69.0],[4,\"Dudley Hart\",\"California\",52.0],[5,\"Jeff Maggert\",\"Delaware\",53.0],[6,\"Bi... | {"columns":["head_ID","name"],"index":[0,1,2],"data":[[4,"Dudley Hart"],[9,"P\u00c3\u00a1draig Harrington"],[10,"Franklin Langham"]]} | Which head's name has the substring 'Ha'? List the id and name. <table_name> : head col : head_ID | name | born_state | age row 1 : 1 | Tiger Woods | Alabama | 67 row 2 : 2 | Sergio GarcÃa | California | 68 row 3 : 3 | K. J. Choi | Alabama | 69 row 4 : 4 | Dudley Hart | California | 52 row 5 : 5 | Jeff Maggert | Delaw... | col : head_ID | name row 1 : 4 | Dudley Hart row 2 : 9 | Pádraig Harrington row 3 : 10 | Franklin Langham |
SELECT count(*) FROM farm | How many farms are there? | [
"farm"
] | [
"{\"columns\":[\"Farm_ID\",\"Year\",\"Total_Horses\",\"Working_Horses\",\"Total_Cattle\",\"Oxen\",\"Bulls\",\"Cows\",\"Pigs\",\"Sheep_and_Goats\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[1,1927,5056.5,3900.1,8374.5,805.5,31.6,3852.1,4412.4,7956.3],[2,1928,5486.9,4090.5,8604.8,895.3,32.8,3987.0,6962.9,8112.2],[3,1929... | {"columns":["count(*)"],"index":[0],"data":[[8]]} | How many farms are there? <table_name> : farm col : Farm_ID | Year | Total_Horses | Working_Horses | Total_Cattle | Oxen | Bulls | Cows | Pigs | Sheep_and_Goats row 1 : 1 | 1927 | 5056.5 | 3900.1 | 8374.5 | 805.5 | 31.6 | 3852.1 | 4412.4 | 7956.3 row 2 : 2 | 1928 | 5486.9 | 4090.5 | 8604.8 | 895.3 | 32.8 | 3987.0 | 696... | col : count(*) row 1 : 8 |
SELECT count(*) FROM farm | Count the number of farms. | [
"farm"
] | [
"{\"columns\":[\"Farm_ID\",\"Year\",\"Total_Horses\",\"Working_Horses\",\"Total_Cattle\",\"Oxen\",\"Bulls\",\"Cows\",\"Pigs\",\"Sheep_and_Goats\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[1,1927,5056.5,3900.1,8374.5,805.5,31.6,3852.1,4412.4,7956.3],[2,1928,5486.9,4090.5,8604.8,895.3,32.8,3987.0,6962.9,8112.2],[3,1929... | {"columns":["count(*)"],"index":[0],"data":[[8]]} | Count the number of farms. <table_name> : farm col : Farm_ID | Year | Total_Horses | Working_Horses | Total_Cattle | Oxen | Bulls | Cows | Pigs | Sheep_and_Goats row 1 : 1 | 1927 | 5056.5 | 3900.1 | 8374.5 | 805.5 | 31.6 | 3852.1 | 4412.4 | 7956.3 row 2 : 2 | 1928 | 5486.9 | 4090.5 | 8604.8 | 895.3 | 32.8 | 3987.0 | 69... | col : count(*) row 1 : 8 |
SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC | List the total number of horses on farms in ascending order. | [
"farm"
] | [
"{\"columns\":[\"Farm_ID\",\"Year\",\"Total_Horses\",\"Working_Horses\",\"Total_Cattle\",\"Oxen\",\"Bulls\",\"Cows\",\"Pigs\",\"Sheep_and_Goats\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[1,1927,5056.5,3900.1,8374.5,805.5,31.6,3852.1,4412.4,7956.3],[2,1928,5486.9,4090.5,8604.8,895.3,32.8,3987.0,6962.9,8112.2],[3,1929... | {"columns":["Total_Horses"],"index":[0,1,2,3,4,5,6,7],"data":[[2546.9],[2604.8],[3658.9],[4781.3],[5056.5],[5308.2],[5486.9],[5607.5]]} | List the total number of horses on farms in ascending order. <table_name> : farm col : Farm_ID | Year | Total_Horses | Working_Horses | Total_Cattle | Oxen | Bulls | Cows | Pigs | Sheep_and_Goats row 1 : 1 | 1927 | 5056.5 | 3900.1 | 8374.5 | 805.5 | 31.6 | 3852.1 | 4412.4 | 7956.3 row 2 : 2 | 1928 | 5486.9 | 4090.5 | 8... | col : Total_Horses row 1 : 2546.9 row 2 : 2604.8 row 3 : 3658.9 row 4 : 4781.3 row 5 : 5056.5 row 6 : 5308.2 row 7 : 5486.9 row 8 : 5607.5 |
SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC | What is the total horses record for each farm, sorted ascending? | [
"farm"
] | [
"{\"columns\":[\"Farm_ID\",\"Year\",\"Total_Horses\",\"Working_Horses\",\"Total_Cattle\",\"Oxen\",\"Bulls\",\"Cows\",\"Pigs\",\"Sheep_and_Goats\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[1,1927,5056.5,3900.1,8374.5,805.5,31.6,3852.1,4412.4,7956.3],[2,1928,5486.9,4090.5,8604.8,895.3,32.8,3987.0,6962.9,8112.2],[3,1929... | {"columns":["Total_Horses"],"index":[0,1,2,3,4,5,6,7],"data":[[2546.9],[2604.8],[3658.9],[4781.3],[5056.5],[5308.2],[5486.9],[5607.5]]} | What is the total horses record for each farm, sorted ascending? <table_name> : farm col : Farm_ID | Year | Total_Horses | Working_Horses | Total_Cattle | Oxen | Bulls | Cows | Pigs | Sheep_and_Goats row 1 : 1 | 1927 | 5056.5 | 3900.1 | 8374.5 | 805.5 | 31.6 | 3852.1 | 4412.4 | 7956.3 row 2 : 2 | 1928 | 5486.9 | 4090.5... | col : Total_Horses row 1 : 2546.9 row 2 : 2604.8 row 3 : 3658.9 row 4 : 4781.3 row 5 : 5056.5 row 6 : 5308.2 row 7 : 5486.9 row 8 : 5607.5 |
SELECT Hosts FROM farm_competition WHERE Theme != 'Aliens' | What are the hosts of competitions whose theme is not "Aliens"? | [
"farm_competition"
] | [
"{\"columns\":[\"Competition_ID\",\"Year\",\"Theme\",\"Host_city_ID\",\"Hosts\"],\"index\":[0,1,2,3,4,5],\"data\":[[1,2013,\"Carnival M is back!\",1,\"Miley Cyrus Jared Leto and Karen Mok\"],[2,2006,\"Codehunters\",2,\"Leehom Wang and Kelly Rowland\"],[3,2005,\"MTV Asia Aid\",3,\"Alicia Keys\"],[4,2004,\"Valentine'... | {"columns":["Hosts"],"index":[0,1,2,3,4],"data":[["Miley Cyrus Jared Leto and Karen Mok"],["Leehom Wang and Kelly Rowland"],["Alicia Keys"],["Vanness Wu and Michelle Branch"],["Shaggy and Coco Lee"]]} | What are the hosts of competitions whose theme is not "Aliens"? <table_name> : farm_competition col : Competition_ID | Year | Theme | Host_city_ID | Hosts row 1 : 1 | 2013 | Carnival M is back! | 1 | Miley Cyrus Jared Leto and Karen Mok row 2 : 2 | 2006 | Codehunters | 2 | Leehom Wang and Kelly Rowland row 3 : 3 | 2005... | col : Hosts row 1 : Miley Cyrus Jared Leto and Karen Mok row 2 : Leehom Wang and Kelly Rowland row 3 : Alicia Keys row 4 : Vanness Wu and Michelle Branch row 5 : Shaggy and Coco Lee |
SELECT Hosts FROM farm_competition WHERE Theme != 'Aliens' | Return the hosts of competitions for which the theme is not Aliens? | [
"farm_competition"
] | [
"{\"columns\":[\"Competition_ID\",\"Year\",\"Theme\",\"Host_city_ID\",\"Hosts\"],\"index\":[0,1,2,3,4,5],\"data\":[[1,2013,\"Carnival M is back!\",1,\"Miley Cyrus Jared Leto and Karen Mok\"],[2,2006,\"Codehunters\",2,\"Leehom Wang and Kelly Rowland\"],[3,2005,\"MTV Asia Aid\",3,\"Alicia Keys\"],[4,2004,\"Valentine'... | {"columns":["Hosts"],"index":[0,1,2,3,4],"data":[["Miley Cyrus Jared Leto and Karen Mok"],["Leehom Wang and Kelly Rowland"],["Alicia Keys"],["Vanness Wu and Michelle Branch"],["Shaggy and Coco Lee"]]} | Return the hosts of competitions for which the theme is not Aliens? <table_name> : farm_competition col : Competition_ID | Year | Theme | Host_city_ID | Hosts row 1 : 1 | 2013 | Carnival M is back! | 1 | Miley Cyrus Jared Leto and Karen Mok row 2 : 2 | 2006 | Codehunters | 2 | Leehom Wang and Kelly Rowland row 3 : 3 | ... | col : Hosts row 1 : Miley Cyrus Jared Leto and Karen Mok row 2 : Leehom Wang and Kelly Rowland row 3 : Alicia Keys row 4 : Vanness Wu and Michelle Branch row 5 : Shaggy and Coco Lee |
SELECT Theme FROM farm_competition ORDER BY YEAR ASC | What are the themes of farm competitions sorted by year in ascending order? | [
"farm_competition"
] | [
"{\"columns\":[\"Competition_ID\",\"Year\",\"Theme\",\"Host_city_ID\",\"Hosts\"],\"index\":[0,1,2,3,4,5],\"data\":[[1,2013,\"Carnival M is back!\",1,\"Miley Cyrus Jared Leto and Karen Mok\"],[2,2006,\"Codehunters\",2,\"Leehom Wang and Kelly Rowland\"],[3,2005,\"MTV Asia Aid\",3,\"Alicia Keys\"],[4,2004,\"Valentine'... | {"columns":["Theme"],"index":[0,1,2,3,4,5],"data":[["Aliens"],["MTV Cube"],["Valentine's Day"],["MTV Asia Aid"],["Codehunters"],["Carnival M is back!"]]} | What are the themes of farm competitions sorted by year in ascending order? <table_name> : farm_competition col : Competition_ID | Year | Theme | Host_city_ID | Hosts row 1 : 1 | 2013 | Carnival M is back! | 1 | Miley Cyrus Jared Leto and Karen Mok row 2 : 2 | 2006 | Codehunters | 2 | Leehom Wang and Kelly Rowland row ... | col : Theme row 1 : Aliens row 2 : MTV Cube row 3 : Valentine's Day row 4 : MTV Asia Aid row 5 : Codehunters row 6 : Carnival M is back! |
SELECT Theme FROM farm_competition ORDER BY YEAR ASC | Return the themes of farm competitions, sorted by year ascending. | [
"farm_competition"
] | [
"{\"columns\":[\"Competition_ID\",\"Year\",\"Theme\",\"Host_city_ID\",\"Hosts\"],\"index\":[0,1,2,3,4,5],\"data\":[[1,2013,\"Carnival M is back!\",1,\"Miley Cyrus Jared Leto and Karen Mok\"],[2,2006,\"Codehunters\",2,\"Leehom Wang and Kelly Rowland\"],[3,2005,\"MTV Asia Aid\",3,\"Alicia Keys\"],[4,2004,\"Valentine'... | {"columns":["Theme"],"index":[0,1,2,3,4,5],"data":[["Aliens"],["MTV Cube"],["Valentine's Day"],["MTV Asia Aid"],["Codehunters"],["Carnival M is back!"]]} | Return the themes of farm competitions, sorted by year ascending. <table_name> : farm_competition col : Competition_ID | Year | Theme | Host_city_ID | Hosts row 1 : 1 | 2013 | Carnival M is back! | 1 | Miley Cyrus Jared Leto and Karen Mok row 2 : 2 | 2006 | Codehunters | 2 | Leehom Wang and Kelly Rowland row 3 : 3 | 20... | col : Theme row 1 : Aliens row 2 : MTV Cube row 3 : Valentine's Day row 4 : MTV Asia Aid row 5 : Codehunters row 6 : Carnival M is back! |
SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000 | What is the average number of working horses of farms with more than 5000 total number of horses? | [
"farm"
] | [
"{\"columns\":[\"Farm_ID\",\"Year\",\"Total_Horses\",\"Working_Horses\",\"Total_Cattle\",\"Oxen\",\"Bulls\",\"Cows\",\"Pigs\",\"Sheep_and_Goats\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[1,1927,5056.5,3900.1,8374.5,805.5,31.6,3852.1,4412.4,7956.3],[2,1928,5486.9,4090.5,8604.8,895.3,32.8,3987.0,6962.9,8112.2],[3,1929... | {"columns":["avg(Working_Horses)"],"index":[0],"data":[[3977.75]]} | What is the average number of working horses of farms with more than 5000 total number of horses? <table_name> : farm col : Farm_ID | Year | Total_Horses | Working_Horses | Total_Cattle | Oxen | Bulls | Cows | Pigs | Sheep_and_Goats row 1 : 1 | 1927 | 5056.5 | 3900.1 | 8374.5 | 805.5 | 31.6 | 3852.1 | 4412.4 | 7956.3 r... | col : avg(Working_Horses) row 1 : 3977.75 |
SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000 | Give the average number of working horses on farms with more than 5000 total horses. | [
"farm"
] | [
"{\"columns\":[\"Farm_ID\",\"Year\",\"Total_Horses\",\"Working_Horses\",\"Total_Cattle\",\"Oxen\",\"Bulls\",\"Cows\",\"Pigs\",\"Sheep_and_Goats\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[1,1927,5056.5,3900.1,8374.5,805.5,31.6,3852.1,4412.4,7956.3],[2,1928,5486.9,4090.5,8604.8,895.3,32.8,3987.0,6962.9,8112.2],[3,1929... | {"columns":["avg(Working_Horses)"],"index":[0],"data":[[3977.75]]} | Give the average number of working horses on farms with more than 5000 total horses. <table_name> : farm col : Farm_ID | Year | Total_Horses | Working_Horses | Total_Cattle | Oxen | Bulls | Cows | Pigs | Sheep_and_Goats row 1 : 1 | 1927 | 5056.5 | 3900.1 | 8374.5 | 805.5 | 31.6 | 3852.1 | 4412.4 | 7956.3 row 2 : 2 | 19... | col : avg(Working_Horses) row 1 : 3977.75 |
SELECT max(Cows) , min(Cows) FROM farm | What are the maximum and minimum number of cows across all farms. | [
"farm"
] | [
"{\"columns\":[\"Farm_ID\",\"Year\",\"Total_Horses\",\"Working_Horses\",\"Total_Cattle\",\"Oxen\",\"Bulls\",\"Cows\",\"Pigs\",\"Sheep_and_Goats\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[1,1927,5056.5,3900.1,8374.5,805.5,31.6,3852.1,4412.4,7956.3],[2,1928,5486.9,4090.5,8604.8,895.3,32.8,3987.0,6962.9,8112.2],[3,1929... | {"columns":["max(Cows)","min(Cows)"],"index":[0],"data":[[3987.0,2407.2]]} | What are the maximum and minimum number of cows across all farms. <table_name> : farm col : Farm_ID | Year | Total_Horses | Working_Horses | Total_Cattle | Oxen | Bulls | Cows | Pigs | Sheep_and_Goats row 1 : 1 | 1927 | 5056.5 | 3900.1 | 8374.5 | 805.5 | 31.6 | 3852.1 | 4412.4 | 7956.3 row 2 : 2 | 1928 | 5486.9 | 4090.... | col : max(Cows) | min(Cows) row 1 : 3987 | 2407.2 |
SELECT max(Cows) , min(Cows) FROM farm | Return the maximum and minimum number of cows across all farms. | [
"farm"
] | [
"{\"columns\":[\"Farm_ID\",\"Year\",\"Total_Horses\",\"Working_Horses\",\"Total_Cattle\",\"Oxen\",\"Bulls\",\"Cows\",\"Pigs\",\"Sheep_and_Goats\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[1,1927,5056.5,3900.1,8374.5,805.5,31.6,3852.1,4412.4,7956.3],[2,1928,5486.9,4090.5,8604.8,895.3,32.8,3987.0,6962.9,8112.2],[3,1929... | {"columns":["max(Cows)","min(Cows)"],"index":[0],"data":[[3987.0,2407.2]]} | Return the maximum and minimum number of cows across all farms. <table_name> : farm col : Farm_ID | Year | Total_Horses | Working_Horses | Total_Cattle | Oxen | Bulls | Cows | Pigs | Sheep_and_Goats row 1 : 1 | 1927 | 5056.5 | 3900.1 | 8374.5 | 805.5 | 31.6 | 3852.1 | 4412.4 | 7956.3 row 2 : 2 | 1928 | 5486.9 | 4090.5 ... | col : max(Cows) | min(Cows) row 1 : 3987 | 2407.2 |
SELECT count(DISTINCT Status) FROM city | How many different statuses do cities have? | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["count(DISTINCT Status)"],"index":[0],"data":[[2]]} | How many different statuses do cities have? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | Plaster Rock | Village | ... | col : count(DISTINCT Status) row 1 : 2 |
SELECT count(DISTINCT Status) FROM city | Count the number of different statuses. | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["count(DISTINCT Status)"],"index":[0],"data":[[2]]} | Count the number of different statuses. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | Plaster Rock | Village | 3.09... | col : count(DISTINCT Status) row 1 : 2 |
SELECT Official_Name FROM city ORDER BY Population DESC | List official names of cities in descending order of population. | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Official_Name"],"index":[0,1,2,3,4],"data":[["Grand Falls\/Grand-Sault"],["Perth-Andover"],["Plaster Rock"],["Drummond"],["Aroostook"]]} | List official names of cities in descending order of population. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | Plas... | col : Official_Name row 1 : Grand Falls/Grand-Sault row 2 : Perth-Andover row 3 : Plaster Rock row 4 : Drummond row 5 : Aroostook |
SELECT Official_Name FROM city ORDER BY Population DESC | What are the official names of cities, ordered descending by population? | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Official_Name"],"index":[0,1,2,3,4],"data":[["Grand Falls\/Grand-Sault"],["Perth-Andover"],["Plaster Rock"],["Drummond"],["Aroostook"]]} | What are the official names of cities, ordered descending by population? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : ... | col : Official_Name row 1 : Grand Falls/Grand-Sault row 2 : Perth-Andover row 3 : Plaster Rock row 4 : Drummond row 5 : Aroostook |
SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1 | List the official name and status of the city with the largest population. | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Official_Name","Status"],"index":[0],"data":[["Grand Falls\/Grand-Sault","Town"]]} | List the official name and status of the city with the largest population. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 ... | col : Official_Name | Status row 1 : Grand Falls/Grand-Sault | Town |
SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1 | What is the official name and status of the city with the most residents? | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Official_Name","Status"],"index":[0],"data":[["Grand Falls\/Grand-Sault","Town"]]} | What is the official name and status of the city with the most residents? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 :... | col : Official_Name | Status row 1 : Grand Falls/Grand-Sault | Town |
SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID | Show the years and the official names of the host cities of competitions. | [
"city",
"farm_competition"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Year","Official_Name"],"index":[0,1,2,3,4,5],"data":[[2013,"Grand Falls\/Grand-Sault"],[2006,"Perth-Andover"],[2005,"Plaster Rock"],[2004,"Drummond"],[2003,"Aroostook"],[2002,"Aroostook"]]} | Show the years and the official names of the host cities of competitions. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 :... | col : Year | Official_Name row 1 : 2013 | Grand Falls/Grand-Sault row 2 : 2006 | Perth-Andover row 3 : 2005 | Plaster Rock row 4 : 2004 | Drummond row 5 : 2003 | Aroostook row 6 : 2002 | Aroostook |
SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID | Give the years and official names of the cities of each competition. | [
"city",
"farm_competition"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Year","Official_Name"],"index":[0,1,2,3,4,5],"data":[[2013,"Grand Falls\/Grand-Sault"],[2006,"Perth-Andover"],[2005,"Plaster Rock"],[2004,"Drummond"],[2003,"Aroostook"],[2002,"Aroostook"]]} | Give the years and official names of the cities of each competition. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | ... | col : Year | Official_Name row 1 : 2013 | Grand Falls/Grand-Sault row 2 : 2006 | Perth-Andover row 3 : 2005 | Plaster Rock row 4 : 2004 | Drummond row 5 : 2003 | Aroostook row 6 : 2002 | Aroostook |
SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1 | Show the official names of the cities that have hosted more than one competition. | [
"city",
"farm_competition"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Official_Name"],"index":[0],"data":[["Aroostook"]]} | Show the official names of the cities that have hosted more than one competition. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008... | col : Official_Name row 1 : Aroostook |
SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1 | What are the official names of cities that have hosted more than one competition? | [
"city",
"farm_competition"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Official_Name"],"index":[0],"data":[["Aroostook"]]} | What are the official names of cities that have hosted more than one competition? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008... | col : Official_Name row 1 : Aroostook |
SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1 | Show the status of the city that has hosted the greatest number of competitions. | [
"city",
"farm_competition"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status"],"index":[0],"data":[["Village"]]} | Show the status of the city that has hosted the greatest number of competitions. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 ... | col : Status row 1 : Village |
SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1 | What is the status of the city that has hosted the most competitions? | [
"city",
"farm_competition"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status"],"index":[0],"data":[["Village"]]} | What is the status of the city that has hosted the most competitions? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 |... | col : Status row 1 : Village |
SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000 | Please show the themes of competitions with host cities having populations larger than 1000. | [
"city",
"farm_competition"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Theme"],"index":[0,1,2],"data":[["Carnival M is back!"],["Codehunters"],["MTV Asia Aid"]]} | Please show the themes of competitions with host cities having populations larger than 1000. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 14... | col : Theme row 1 : Carnival M is back! row 2 : Codehunters row 3 : MTV Asia Aid |
SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000 | What are the themes of competitions that have corresponding host cities with more than 1000 residents? | [
"city",
"farm_competition"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Theme"],"index":[0,1,2],"data":[["Carnival M is back!"],["Codehunters"],["MTV Asia Aid"]]} | What are the themes of competitions that have corresponding host cities with more than 1000 residents? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 |... | col : Theme row 1 : Carnival M is back! row 2 : Codehunters row 3 : MTV Asia Aid |
SELECT Status , avg(Population) FROM city GROUP BY Status | Please show the different statuses of cities and the average population of cities with each status. | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status","avg(Population)"],"index":[0,1],"data":[["Town",5706.0],["Village",1009.75]]} | Please show the different statuses of cities and the average population of cities with each status. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 17... | col : Status | avg(Population) row 1 : Town | 5706.0 row 2 : Village | 1009.75 |
SELECT Status , avg(Population) FROM city GROUP BY Status | What are the statuses and average populations of each city? | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status","avg(Population)"],"index":[0,1],"data":[["Town",5706.0],["Village",1009.75]]} | What are the statuses and average populations of each city? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | Plaster R... | col : Status | avg(Population) row 1 : Town | 5706.0 row 2 : Village | 1009.75 |
SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC | Please show the different statuses, ordered by the number of cities that have each. | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status"],"index":[0,1],"data":[["Town"],["Village"]]} | Please show the different statuses, ordered by the number of cities that have each. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,0... | col : Status row 1 : Town row 2 : Village |
SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC | Return the different statuses of cities, ascending by frequency. | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status"],"index":[0,1],"data":[["Town"],["Village"]]} | Return the different statuses of cities, ascending by frequency. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | Plas... | col : Status row 1 : Town row 2 : Village |
SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1 | List the most common type of Status across cities. | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status"],"index":[0],"data":[["Village"]]} | List the most common type of Status across cities. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | Plaster Rock | Vil... | col : Status row 1 : Village |
SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1 | What is the most common status across all cities? | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status"],"index":[0],"data":[["Village"]]} | What is the most common status across all cities? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | Plaster Rock | Vill... | col : Status row 1 : Village |
SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500 | Show the status shared by cities with population bigger than 1500 and smaller than 500. | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status"],"index":[0],"data":[["Village"]]} | Show the status shared by cities with population bigger than 1500 and smaller than 500. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of... | col : Status row 1 : Village |
SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500 | Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500? | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Status"],"index":[0],"data":[["Village"]]} | Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andov... | col : Status row 1 : Village |
SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500 | Find the official names of cities with population bigger than 1500 or smaller than 500. | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Official_Name"],"index":[0,1,2],"data":[["Grand Falls\/Grand-Sault"],["Perth-Andover"],["Aroostook"]]} | Find the official names of cities with population bigger than 1500 or smaller than 500. <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of... | col : Official_Name row 1 : Grand Falls/Grand-Sault row 2 : Perth-Andover row 3 : Aroostook |
SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500 | What are the official names of cities that have population over 1500 or less than 500? | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Official_Name"],"index":[0,1,2],"data":[["Grand Falls\/Grand-Sault"],["Perth-Andover"],["Aroostook"]]} | What are the official names of cities that have population over 1500 or less than 500? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of ... | col : Official_Name row 1 : Grand Falls/Grand-Sault row 2 : Perth-Andover row 3 : Aroostook |
SELECT Census_Ranking FROM city WHERE Status != "Village" | Show the census ranking of cities whose status are not "Village". | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Census_Ranking"],"index":[0],"data":[["636 of 5008"]]} | Show the census ranking of cities whose status are not "Village". <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | Pla... | col : Census_Ranking row 1 : 636 of 5008 |
SELECT Census_Ranking FROM city WHERE Status != "Village" | What are the census rankings of cities that do not have the status "Village"? | [
"city"
] | [
"{\"columns\":[\"City_ID\",\"Official_Name\",\"Status\",\"Area_km_2\",\"Population\",\"Census_Ranking\"],\"index\":[0,1,2,3,4],\"data\":[[1,\"Grand Falls\\/Grand-Sault\",\"Town\",18.06,5706.0,\"636 of 5008\"],[2,\"Perth-Andover\",\"Village\",8.89,1778.0,\"1442 of 5,008\"],[3,\"Plaster Rock\",\"Village\",3.09,1135.0... | {"columns":["Census_Ranking"],"index":[0],"data":[["636 of 5008"]]} | What are the census rankings of cities that do not have the status "Village"? <table_name> : city col : City_ID | Official_Name | Status | Area_km_2 | Population | Census_Ranking row 1 : 1 | Grand Falls/Grand-Sault | Town | 18.06 | 5706 | 636 of 5008 row 2 : 2 | Perth-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row... | col : Census_Ranking row 1 : 636 of 5008 |
SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1 | which course has most number of registered students? | [
"Courses",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index\":[0,1,2,3,4,5],\"data\":[[\"301\",\"statistics\",\"statistics\",null],[\"302\",\"English\",\"English\",null],[\"303\",\"French\",\"French\",null],[\"304\",\"database\",\"database\",null],[\"305\",\"data structure\",\"dat... | {"columns":["course_name"],"index":[0],"data":[["statistics"]]} | which course has most number of registered students? <table_name> : Courses col : course_id | course_name | course_description | other_details row 1 : 301 | statistics | statistics | row 2 : 302 | English | English | row 3 : 303 | French | French | row 4 : 304 | database | database | row 5 : 305 | data structure | ... | col : course_name row 1 : statistics |
SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1 | What is the name of the course with the most registered students? | [
"Courses",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index\":[0,1,2,3,4,5],\"data\":[[\"301\",\"statistics\",\"statistics\",null],[\"302\",\"English\",\"English\",null],[\"303\",\"French\",\"French\",null],[\"304\",\"database\",\"database\",null],[\"305\",\"data structure\",\"dat... | {"columns":["course_name"],"index":[0],"data":[["statistics"]]} | What is the name of the course with the most registered students? <table_name> : Courses col : course_id | course_name | course_description | other_details row 1 : 301 | statistics | statistics | row 2 : 302 | English | English | row 3 : 303 | French | French | row 4 : 304 | database | database | row 5 : 305 | data... | col : course_name row 1 : statistics |
SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1 | what is id of students who registered some courses but the least number of courses in these students? | [
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,8],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2008-10-04 10:35:13\"],[121,303,\"2008-11-14 10:35:13\"],[131,303,\"2008-11-05 10:35:13\"],[141,302,\"2008-11-06 10:35:13\"],[151,305,\"2008-11-07 10:35:13\"],[161,... | {"columns":["student_id"],"index":[0],"data":[[111]]} | what is id of students who registered some courses but the least number of courses in these students? <table_name> : Student_Course_Registrations col : student_id | course_id | registration_date row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2008-10-04 10:35:13 row 3 : 121 | 303 | 2008-11-14 10:35:13 row 4... | col : student_id row 1 : 111 |
SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1 | What are the ids of the students who registered for some courses but had the least number of courses for all students? | [
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,8],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2008-10-04 10:35:13\"],[121,303,\"2008-11-14 10:35:13\"],[131,303,\"2008-11-05 10:35:13\"],[141,302,\"2008-11-06 10:35:13\"],[151,305,\"2008-11-07 10:35:13\"],[161,... | {"columns":["student_id"],"index":[0],"data":[[111]]} | What are the ids of the students who registered for some courses but had the least number of courses for all students? <table_name> : Student_Course_Registrations col : student_id | course_id | registration_date row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2008-10-04 10:35:13 row 3 : 121 | 303 | 2008-11-... | col : student_id row 1 : 111 |
SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id | what are the first name and last name of all candidates? | [
"People",
"Candidates"
] | [
"{\"columns\":[\"person_id\",\"first_name\",\"middle_name\",\"last_name\",\"cell_mobile_number\",\"email_address\",\"login_name\",\"password\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Shannon\",\"Elissa\",\"Senger\",\"01955267735\",\"javier.trantow@example.net\",\"pgub\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c... | {"columns":["first_name","last_name"],"index":[0,1,2,3,4,5,6,7],"data":[["Shannon","Senger"],["Virginie","Hartmann"],["Dariana","Bednar"],["Verna","Grant"],["Hoyt","Wintheiser"],["Mayra","Hartmann"],["Lizeth","Bartoletti"],["Nova","Feest"]]} | what are the first name and last name of all candidates? <table_name> : People col : person_id | first_name | middle_name | last_name | cell_mobile_number | email_address | login_name | password row 1 : 111 | Shannon | Elissa | Senger | 01955267735 | javier.trantow@example.net | pgub | 5e4ff49a61b3544da3ad7dc7e2cf28847... | col : first_name | last_name row 1 : Shannon | Senger row 2 : Virginie | Hartmann row 3 : Dariana | Bednar row 4 : Verna | Grant row 5 : Hoyt | Wintheiser row 6 : Mayra | Hartmann row 7 : Lizeth | Bartoletti row 8 : Nova | Feest |
SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id | What are the first and last names of all the candidates? | [
"People",
"Candidates"
] | [
"{\"columns\":[\"person_id\",\"first_name\",\"middle_name\",\"last_name\",\"cell_mobile_number\",\"email_address\",\"login_name\",\"password\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Shannon\",\"Elissa\",\"Senger\",\"01955267735\",\"javier.trantow@example.net\",\"pgub\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c... | {"columns":["first_name","last_name"],"index":[0,1,2,3,4,5,6,7],"data":[["Shannon","Senger"],["Virginie","Hartmann"],["Dariana","Bednar"],["Verna","Grant"],["Hoyt","Wintheiser"],["Mayra","Hartmann"],["Lizeth","Bartoletti"],["Nova","Feest"]]} | What are the first and last names of all the candidates? <table_name> : People col : person_id | first_name | middle_name | last_name | cell_mobile_number | email_address | login_name | password row 1 : 111 | Shannon | Elissa | Senger | 01955267735 | javier.trantow@example.net | pgub | 5e4ff49a61b3544da3ad7dc7e2cf28847... | col : first_name | last_name row 1 : Shannon | Senger row 2 : Virginie | Hartmann row 3 : Dariana | Bednar row 4 : Verna | Grant row 5 : Hoyt | Wintheiser row 6 : Mayra | Hartmann row 7 : Lizeth | Bartoletti row 8 : Nova | Feest |
SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance) | List the id of students who never attends courses? | [
"Students",
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"student_id\",\"course_id\",\"date_of_attendance\"],\"index\":[0,1,2,3,4,5,6,7... | {"columns":["student_id"],"index":[0,1],"data":[[131],[181]]} | List the id of students who never attends courses? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 | Nancy <table_name> : Student_Course_Attendance col : stud... | col : student_id row 1 : 131 row 2 : 181 |
SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance) | What are the ids of every student who has never attended a course? | [
"Students",
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"student_id\",\"course_id\",\"date_of_attendance\"],\"index\":[0,1,2,3,4,5,6,7... | {"columns":["student_id"],"index":[0,1],"data":[[131],[181]]} | What are the ids of every student who has never attended a course? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 | Nancy <table_name> : Student_Course_Atte... | col : student_id row 1 : 131 row 2 : 181 |
SELECT student_id FROM student_course_attendance | List the id of students who attended some courses? | [
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"date_of_attendance\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2012-04-09 11:44:34\"],[121,303,\"2014-04-09 11:44:34\"],[141,302,\"2013-04-09 11:44:34\"],[171,301,\"2015-04-09 11:44:34\"],[161,302,\"2014-01-09 11:44:34\"],[151,3... | {"columns":["student_id"],"index":[0,1,2,3,4,5,6,7],"data":[[111],[121],[121],[141],[141],[151],[161],[171]]} | List the id of students who attended some courses? <table_name> : Student_Course_Attendance col : student_id | course_id | date_of_attendance row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2012-04-09 11:44:34 row 3 : 121 | 303 | 2014-04-09 11:44:34 row 4 : 141 | 302 | 2013-04-09 11:44:34 row 5 : 171 | 301 ... | col : student_id row 1 : 111 row 2 : 121 row 3 : 121 row 4 : 141 row 5 : 141 row 6 : 151 row 7 : 161 row 8 : 171 |
SELECT student_id FROM student_course_attendance | What are the ids of all students who have attended at least one course? | [
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"date_of_attendance\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2012-04-09 11:44:34\"],[121,303,\"2014-04-09 11:44:34\"],[141,302,\"2013-04-09 11:44:34\"],[171,301,\"2015-04-09 11:44:34\"],[161,302,\"2014-01-09 11:44:34\"],[151,3... | {"columns":["student_id"],"index":[0,1,2,3,4,5,6,7],"data":[[111],[121],[121],[141],[141],[151],[161],[171]]} | What are the ids of all students who have attended at least one course? <table_name> : Student_Course_Attendance col : student_id | course_id | date_of_attendance row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2012-04-09 11:44:34 row 3 : 121 | 303 | 2014-04-09 11:44:34 row 4 : 141 | 302 | 2013-04-09 11:44:... | col : student_id row 1 : 111 row 2 : 121 row 3 : 121 row 4 : 141 row 5 : 141 row 6 : 151 row 7 : 161 row 8 : 171 |
SELECT T1.student_id , T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id | What are the ids of all students for courses and what are the names of those courses? | [
"Courses",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index\":[0,1,2,3,4,5],\"data\":[[\"301\",\"statistics\",\"statistics\",null],[\"302\",\"English\",\"English\",null],[\"303\",\"French\",\"French\",null],[\"304\",\"database\",\"database\",null],[\"305\",\"data structure\",\"dat... | {"columns":["student_id","course_name"],"index":[0,1,2,3,4,5,6,7,8],"data":[[111,"statistics"],[121,"statistics"],[141,"statistics"],[171,"statistics"],[141,"English"],[161,"English"],[121,"French"],[131,"French"],[151,"data structure"]]} | What are the ids of all students for courses and what are the names of those courses? <table_name> : Courses col : course_id | course_name | course_description | other_details row 1 : 301 | statistics | statistics | row 2 : 302 | English | English | row 3 : 303 | French | French | row 4 : 304 | database | database |... | col : student_id | course_name row 1 : 111 | statistics row 2 : 121 | statistics row 3 : 141 | statistics row 4 : 171 | statistics row 5 : 141 | English row 6 : 161 | English row 7 : 121 | French row 8 : 131 | French row 9 : 151 | data structure |
SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1 | What is detail of the student who most recently registered course? | [
"Students",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,... | {"columns":["student_details"],"index":[0],"data":[["Martin"]]} | What is detail of the student who most recently registered course? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 | Nancy <table_name> : Student_Course_Regis... | col : student_details row 1 : Martin |
SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1 | What details do we have on the students who registered for courses most recently? | [
"Students",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,... | {"columns":["student_details"],"index":[0],"data":[["Martin"]]} | What details do we have on the students who registered for courses most recently? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 | Nancy <table_name> : Stude... | col : student_details row 1 : Martin |
SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "English" | How many students attend course English? | [
"Courses",
"Student_Course_Attendance"
] | [
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index\":[0,1,2,3,4,5],\"data\":[[\"301\",\"statistics\",\"statistics\",null],[\"302\",\"English\",\"English\",null],[\"303\",\"French\",\"French\",null],[\"304\",\"database\",\"database\",null],[\"305\",\"data structure\",\"dat... | {"columns":["count(*)"],"index":[0],"data":[[2]]} | How many students attend course English? <table_name> : Courses col : course_id | course_name | course_description | other_details row 1 : 301 | statistics | statistics | row 2 : 302 | English | English | row 3 : 303 | French | French | row 4 : 304 | database | database | row 5 : 305 | data structure | data structu... | col : count(*) row 1 : 2 |
SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "English" | How many students are attending English courses? | [
"Courses",
"Student_Course_Attendance"
] | [
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index\":[0,1,2,3,4,5],\"data\":[[\"301\",\"statistics\",\"statistics\",null],[\"302\",\"English\",\"English\",null],[\"303\",\"French\",\"French\",null],[\"304\",\"database\",\"database\",null],[\"305\",\"data structure\",\"dat... | {"columns":["count(*)"],"index":[0],"data":[[2]]} | How many students are attending English courses? <table_name> : Courses col : course_id | course_name | course_description | other_details row 1 : 301 | statistics | statistics | row 2 : 302 | English | English | row 3 : 303 | French | French | row 4 : 304 | database | database | row 5 : 305 | data structure | data... | col : count(*) row 1 : 2 |
SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171 | How many courses do the student whose id is 171 attend? | [
"Courses",
"Student_Course_Attendance"
] | [
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index\":[0,1,2,3,4,5],\"data\":[[\"301\",\"statistics\",\"statistics\",null],[\"302\",\"English\",\"English\",null],[\"303\",\"French\",\"French\",null],[\"304\",\"database\",\"database\",null],[\"305\",\"data structure\",\"dat... | {"columns":["count(*)"],"index":[0],"data":[[1]]} | How many courses do the student whose id is 171 attend? <table_name> : Courses col : course_id | course_name | course_description | other_details row 1 : 301 | statistics | statistics | row 2 : 302 | English | English | row 3 : 303 | French | French | row 4 : 304 | database | database | row 5 : 305 | data structure... | col : count(*) row 1 : 1 |
SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171 | How many courses does the student with id 171 actually attend? | [
"Courses",
"Student_Course_Attendance"
] | [
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index\":[0,1,2,3,4,5],\"data\":[[\"301\",\"statistics\",\"statistics\",null],[\"302\",\"English\",\"English\",null],[\"303\",\"French\",\"French\",null],[\"304\",\"database\",\"database\",null],[\"305\",\"data structure\",\"dat... | {"columns":["count(*)"],"index":[0],"data":[[1]]} | How many courses does the student with id 171 actually attend? <table_name> : Courses col : course_id | course_name | course_description | other_details row 1 : 301 | statistics | statistics | row 2 : 302 | English | English | row 3 : 303 | French | French | row 4 : 304 | database | database | row 5 : 305 | data st... | col : count(*) row 1 : 1 |
SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = "stanley.monahan@example.org" | Find id of the candidate whose email is stanley.monahan@example.org? | [
"People",
"Candidates"
] | [
"{\"columns\":[\"person_id\",\"first_name\",\"middle_name\",\"last_name\",\"cell_mobile_number\",\"email_address\",\"login_name\",\"password\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Shannon\",\"Elissa\",\"Senger\",\"01955267735\",\"javier.trantow@example.net\",\"pgub\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c... | {"columns":["candidate_id"],"index":[0],"data":[[151]]} | Find id of the candidate whose email is stanley.monahan@example.org? <table_name> : People col : person_id | first_name | middle_name | last_name | cell_mobile_number | email_address | login_name | password row 1 : 111 | Shannon | Elissa | Senger | 01955267735 | javier.trantow@example.net | pgub | 5e4ff49a61b3544da3ad7... | col : candidate_id row 1 : 151 |
SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = "stanley.monahan@example.org" | What is the id of the candidate whose email is stanley.monahan@example.org? | [
"People",
"Candidates"
] | [
"{\"columns\":[\"person_id\",\"first_name\",\"middle_name\",\"last_name\",\"cell_mobile_number\",\"email_address\",\"login_name\",\"password\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Shannon\",\"Elissa\",\"Senger\",\"01955267735\",\"javier.trantow@example.net\",\"pgub\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c... | {"columns":["candidate_id"],"index":[0],"data":[[151]]} | What is the id of the candidate whose email is stanley.monahan@example.org? <table_name> : People col : person_id | first_name | middle_name | last_name | cell_mobile_number | email_address | login_name | password row 1 : 111 | Shannon | Elissa | Senger | 01955267735 | javier.trantow@example.net | pgub | 5e4ff49a61b354... | col : candidate_id row 1 : 151 |
SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1 | Find id of the candidate who most recently accessed the course? | [
"Candidate_Assessments"
] | [
"{\"columns\":[\"candidate_id\",\"qualification\",\"assessment_date\",\"asessment_outcome_code\"],\"index\":[0,1,2,3,4],\"data\":[[111,\"A\",\"2010-04-07 11:44:34\",\"Pass\"],[121,\"B\",\"2010-04-17 11:44:34\",\"Pass\"],[131,\"D\",\"2010-04-05 11:44:34\",\"Fail\"],[141,\"C\",\"2010-04-06 11:44:34\",\"Pass\"],[151,\... | {"columns":["candidate_id"],"index":[0],"data":[[121]]} | Find id of the candidate who most recently accessed the course? <table_name> : Candidate_Assessments col : candidate_id | qualification | assessment_date | asessment_outcome_code row 1 : 111 | A | 2010-04-07 11:44:34 | Pass row 2 : 121 | B | 2010-04-17 11:44:34 | Pass row 3 : 131 | D | 2010-04-05 11:44:34 | Fail row 4 ... | col : candidate_id row 1 : 121 |
SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1 | What is the id of the candidate who most recently accessed the course? | [
"Candidate_Assessments"
] | [
"{\"columns\":[\"candidate_id\",\"qualification\",\"assessment_date\",\"asessment_outcome_code\"],\"index\":[0,1,2,3,4],\"data\":[[111,\"A\",\"2010-04-07 11:44:34\",\"Pass\"],[121,\"B\",\"2010-04-17 11:44:34\",\"Pass\"],[131,\"D\",\"2010-04-05 11:44:34\",\"Fail\"],[141,\"C\",\"2010-04-06 11:44:34\",\"Pass\"],[151,\... | {"columns":["candidate_id"],"index":[0],"data":[[121]]} | What is the id of the candidate who most recently accessed the course? <table_name> : Candidate_Assessments col : candidate_id | qualification | assessment_date | asessment_outcome_code row 1 : 111 | A | 2010-04-07 11:44:34 | Pass row 2 : 121 | B | 2010-04-17 11:44:34 | Pass row 3 : 131 | D | 2010-04-05 11:44:34 | Fail... | col : candidate_id row 1 : 121 |
SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1 | What is detail of the student who registered the most number of courses? | [
"Students",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,... | {"columns":["student_details"],"index":[0],"data":[["Martin"]]} | What is detail of the student who registered the most number of courses? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 | Nancy <table_name> : Student_Course... | col : student_details row 1 : Martin |
SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1 | What are the details of the student who registered for the most number of courses? | [
"Students",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,... | {"columns":["student_details"],"index":[0],"data":[["Martin"]]} | What are the details of the student who registered for the most number of courses? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 | Nancy <table_name> : Stud... | col : student_details row 1 : Martin |
SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id | List the id of students who registered some courses and the number of their registered courses? | [
"Students",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,... | {"columns":["student_id","count(*)"],"index":[0,1,2,3,4,5,6],"data":[[111,1],[121,2],[131,1],[141,2],[151,1],[161,1],[171,1]]} | List the id of students who registered some courses and the number of their registered courses? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 | Nancy <table... | col : student_id | count(*) row 1 : 111 | 1 row 2 : 121 | 2 row 3 : 131 | 1 row 4 : 141 | 2 row 5 : 151 | 1 row 6 : 161 | 1 row 7 : 171 | 1 |
SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id | For every student who is registered for some course, how many courses are they registered for? | [
"Students",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,... | {"columns":["student_id","count(*)"],"index":[0,1,2,3,4,5,6],"data":[[111,1],[121,2],[131,1],[141,2],[151,1],[161,1],[171,1]]} | For every student who is registered for some course, how many courses are they registered for? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 | Nancy <table_... | col : student_id | count(*) row 1 : 111 | 1 row 2 : 121 | 2 row 3 : 131 | 1 row 4 : 141 | 2 row 5 : 151 | 1 row 6 : 161 | 1 row 7 : 171 | 1 |
SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id | How many registed students do each course have? List course name and the number of their registered students? | [
"Students",
"Courses",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index... | {"columns":["course_name","count(*)"],"index":[0,1,2,3],"data":[["statistics",4],["English",2],["French",2],["data structure",1]]} | How many registed students do each course have? List course name and the number of their registered students? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 ... | col : course_name | count(*) row 1 : statistics | 4 row 2 : English | 2 row 3 : French | 2 row 4 : data structure | 1 |
SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id | For each course id, how many students are registered and what are the course names? | [
"Students",
"Courses",
"Student_Course_Registrations"
] | [
"{\"columns\":[\"student_id\",\"student_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Marry\"],[121,\"Martin\"],[131,\"Barry\"],[141,\"Nikhil\"],[151,\"John\"],[161,\"Sarah\"],[171,\"Joe\"],[181,\"Nancy\"]]}",
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index... | {"columns":["course_name","count(*)"],"index":[0,1,2,3],"data":[["statistics",4],["English",2],["French",2],["data structure",1]]} | For each course id, how many students are registered and what are the course names? <table_name> : Students col : student_id | student_details row 1 : 111 | Marry row 2 : 121 | Martin row 3 : 131 | Barry row 4 : 141 | Nikhil row 5 : 151 | John row 6 : 161 | Sarah row 7 : 171 | Joe row 8 : 181 | Nancy <table_name> : Cou... | col : course_name | count(*) row 1 : statistics | 4 row 2 : English | 2 row 3 : French | 2 row 4 : data structure | 1 |
SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "Pass" | Find id of candidates whose assessment code is "Pass"? | [
"Candidate_Assessments"
] | [
"{\"columns\":[\"candidate_id\",\"qualification\",\"assessment_date\",\"asessment_outcome_code\"],\"index\":[0,1,2,3,4],\"data\":[[111,\"A\",\"2010-04-07 11:44:34\",\"Pass\"],[121,\"B\",\"2010-04-17 11:44:34\",\"Pass\"],[131,\"D\",\"2010-04-05 11:44:34\",\"Fail\"],[141,\"C\",\"2010-04-06 11:44:34\",\"Pass\"],[151,\... | {"columns":["candidate_id"],"index":[0,1,2,3],"data":[[111],[121],[141],[151]]} | Find id of candidates whose assessment code is "Pass"? <table_name> : Candidate_Assessments col : candidate_id | qualification | assessment_date | asessment_outcome_code row 1 : 111 | A | 2010-04-07 11:44:34 | Pass row 2 : 121 | B | 2010-04-17 11:44:34 | Pass row 3 : 131 | D | 2010-04-05 11:44:34 | Fail row 4 : 141 | C... | col : candidate_id row 1 : 111 row 2 : 121 row 3 : 141 row 4 : 151 |
SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "Pass" | What are the ids of the candidates that have an outcome code of Pass? | [
"Candidate_Assessments"
] | [
"{\"columns\":[\"candidate_id\",\"qualification\",\"assessment_date\",\"asessment_outcome_code\"],\"index\":[0,1,2,3,4],\"data\":[[111,\"A\",\"2010-04-07 11:44:34\",\"Pass\"],[121,\"B\",\"2010-04-17 11:44:34\",\"Pass\"],[131,\"D\",\"2010-04-05 11:44:34\",\"Fail\"],[141,\"C\",\"2010-04-06 11:44:34\",\"Pass\"],[151,\... | {"columns":["candidate_id"],"index":[0,1,2,3],"data":[[111],[121],[141],[151]]} | What are the ids of the candidates that have an outcome code of Pass? <table_name> : Candidate_Assessments col : candidate_id | qualification | assessment_date | asessment_outcome_code row 1 : 111 | A | 2010-04-07 11:44:34 | Pass row 2 : 121 | B | 2010-04-17 11:44:34 | Pass row 3 : 131 | D | 2010-04-05 11:44:34 | Fail ... | col : candidate_id row 1 : 111 row 2 : 121 row 3 : 141 row 4 : 151 |
SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = "Fail" | Find the cell mobile number of the candidates whose assessment code is "Fail"? | [
"People",
"Candidates",
"Candidate_Assessments"
] | [
"{\"columns\":[\"person_id\",\"first_name\",\"middle_name\",\"last_name\",\"cell_mobile_number\",\"email_address\",\"login_name\",\"password\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Shannon\",\"Elissa\",\"Senger\",\"01955267735\",\"javier.trantow@example.net\",\"pgub\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c... | {"columns":["cell_mobile_number"],"index":[0],"data":[["(262)347-9364x516"]]} | Find the cell mobile number of the candidates whose assessment code is "Fail"? <table_name> : People col : person_id | first_name | middle_name | last_name | cell_mobile_number | email_address | login_name | password row 1 : 111 | Shannon | Elissa | Senger | 01955267735 | javier.trantow@example.net | pgub | 5e4ff49a61b... | col : cell_mobile_number row 1 : (262)347-9364x516 |
SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = "Fail" | What are the cell phone numbers of the candidates that received an assessment code of "Fail"? | [
"People",
"Candidates",
"Candidate_Assessments"
] | [
"{\"columns\":[\"person_id\",\"first_name\",\"middle_name\",\"last_name\",\"cell_mobile_number\",\"email_address\",\"login_name\",\"password\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Shannon\",\"Elissa\",\"Senger\",\"01955267735\",\"javier.trantow@example.net\",\"pgub\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c... | {"columns":["cell_mobile_number"],"index":[0],"data":[["(262)347-9364x516"]]} | What are the cell phone numbers of the candidates that received an assessment code of "Fail"? <table_name> : People col : person_id | first_name | middle_name | last_name | cell_mobile_number | email_address | login_name | password row 1 : 111 | Shannon | Elissa | Senger | 01955267735 | javier.trantow@example.net | pgu... | col : cell_mobile_number row 1 : (262)347-9364x516 |
SELECT student_id FROM student_course_attendance WHERE course_id = 301 | What are the id of students who registered course 301? | [
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"date_of_attendance\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2012-04-09 11:44:34\"],[121,303,\"2014-04-09 11:44:34\"],[141,302,\"2013-04-09 11:44:34\"],[171,301,\"2015-04-09 11:44:34\"],[161,302,\"2014-01-09 11:44:34\"],[151,3... | {"columns":["student_id"],"index":[0,1,2,3],"data":[[111],[121],[141],[171]]} | What are the id of students who registered course 301? <table_name> : Student_Course_Attendance col : student_id | course_id | date_of_attendance row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2012-04-09 11:44:34 row 3 : 121 | 303 | 2014-04-09 11:44:34 row 4 : 141 | 302 | 2013-04-09 11:44:34 row 5 : 171 | ... | col : student_id row 1 : 111 row 2 : 121 row 3 : 141 row 4 : 171 |
SELECT student_id FROM student_course_attendance WHERE course_id = 301 | What are the ids of the students who registered for course 301? | [
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"date_of_attendance\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2012-04-09 11:44:34\"],[121,303,\"2014-04-09 11:44:34\"],[141,302,\"2013-04-09 11:44:34\"],[171,301,\"2015-04-09 11:44:34\"],[161,302,\"2014-01-09 11:44:34\"],[151,3... | {"columns":["student_id"],"index":[0,1,2,3],"data":[[111],[121],[141],[171]]} | What are the ids of the students who registered for course 301? <table_name> : Student_Course_Attendance col : student_id | course_id | date_of_attendance row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2012-04-09 11:44:34 row 3 : 121 | 303 | 2014-04-09 11:44:34 row 4 : 141 | 302 | 2013-04-09 11:44:34 row 5... | col : student_id row 1 : 111 row 2 : 121 row 3 : 141 row 4 : 171 |
SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1 | What is the id of the student who most recently registered course 301? | [
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"date_of_attendance\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2012-04-09 11:44:34\"],[121,303,\"2014-04-09 11:44:34\"],[141,302,\"2013-04-09 11:44:34\"],[171,301,\"2015-04-09 11:44:34\"],[161,302,\"2014-01-09 11:44:34\"],[151,3... | {"columns":["student_id"],"index":[0],"data":[[171]]} | What is the id of the student who most recently registered course 301? <table_name> : Student_Course_Attendance col : student_id | course_id | date_of_attendance row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2012-04-09 11:44:34 row 3 : 121 | 303 | 2014-04-09 11:44:34 row 4 : 141 | 302 | 2013-04-09 11:44:3... | col : student_id row 1 : 171 |
SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1 | What are the ids of the students who registered for course 301 most recently? | [
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"date_of_attendance\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2012-04-09 11:44:34\"],[121,303,\"2014-04-09 11:44:34\"],[141,302,\"2013-04-09 11:44:34\"],[171,301,\"2015-04-09 11:44:34\"],[161,302,\"2014-01-09 11:44:34\"],[151,3... | {"columns":["student_id"],"index":[0],"data":[[171]]} | What are the ids of the students who registered for course 301 most recently? <table_name> : Student_Course_Attendance col : student_id | course_id | date_of_attendance row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2012-04-09 11:44:34 row 3 : 121 | 303 | 2014-04-09 11:44:34 row 4 : 141 | 302 | 2013-04-09 ... | col : student_id row 1 : 171 |
SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id | Find distinct cities of addresses of people? | [
"Addresses",
"People_Addresses"
] | [
"{\"columns\":[\"address_id\",\"line_1\",\"line_2\",\"city\",\"zip_postcode\",\"state_province_county\",\"country\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[5,\"0900 Roderick Oval\\nNew Albina, WA 19200-7914\",\"Suite 096\",\"Linnealand\",\"862\",\"Montana\",\"USA\"],[9,\"966 Dach Ports Apt. 322\\... | {"columns":["city"],"index":[0,1,2,3,4,5,6,7],"data":[["South Minnie"],["Linnealand"],["East Tavaresburgh"],["Terencetown"],["Lake Devon"],["O'Connellview"],["New Alta"],["South Naomibury"]]} | Find distinct cities of addresses of people? <table_name> : Addresses col : address_id | line_1 | line_2 | city | zip_postcode | state_province_county | country row 1 : 5 | 0900 Roderick Oval
New Albina, WA 19200-7914 | Suite 096 | Linnealand | 862 | Montana | USA row 2 : 9 | 966 Dach Ports Apt. 322
Lake Harmonyhaven, ... | col : city row 1 : South Minnie row 2 : Linnealand row 3 : East Tavaresburgh row 4 : Terencetown row 5 : Lake Devon row 6 : O'Connellview row 7 : New Alta row 8 : South Naomibury |
SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id | What are the different cities where people live? | [
"Addresses",
"People_Addresses"
] | [
"{\"columns\":[\"address_id\",\"line_1\",\"line_2\",\"city\",\"zip_postcode\",\"state_province_county\",\"country\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[5,\"0900 Roderick Oval\\nNew Albina, WA 19200-7914\",\"Suite 096\",\"Linnealand\",\"862\",\"Montana\",\"USA\"],[9,\"966 Dach Ports Apt. 322\\... | {"columns":["city"],"index":[0,1,2,3,4,5,6,7],"data":[["South Minnie"],["Linnealand"],["East Tavaresburgh"],["Terencetown"],["Lake Devon"],["O'Connellview"],["New Alta"],["South Naomibury"]]} | What are the different cities where people live? <table_name> : Addresses col : address_id | line_1 | line_2 | city | zip_postcode | state_province_county | country row 1 : 5 | 0900 Roderick Oval
New Albina, WA 19200-7914 | Suite 096 | Linnealand | 862 | Montana | USA row 2 : 9 | 966 Dach Ports Apt. 322
Lake Harmonyhav... | col : city row 1 : South Minnie row 2 : Linnealand row 3 : East Tavaresburgh row 4 : Terencetown row 5 : Lake Devon row 6 : O'Connellview row 7 : New Alta row 8 : South Naomibury |
SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id | Find distinct cities of address of students? | [
"Addresses",
"Students",
"People_Addresses"
] | [
"{\"columns\":[\"address_id\",\"line_1\",\"line_2\",\"city\",\"zip_postcode\",\"state_province_county\",\"country\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[5,\"0900 Roderick Oval\\nNew Albina, WA 19200-7914\",\"Suite 096\",\"Linnealand\",\"862\",\"Montana\",\"USA\"],[9,\"966 Dach Ports Apt. 322\\... | {"columns":["city"],"index":[0,1,2,3,4,5,6,7],"data":[["South Minnie"],["Linnealand"],["East Tavaresburgh"],["Terencetown"],["Lake Devon"],["O'Connellview"],["New Alta"],["South Naomibury"]]} | Find distinct cities of address of students? <table_name> : Addresses col : address_id | line_1 | line_2 | city | zip_postcode | state_province_county | country row 1 : 5 | 0900 Roderick Oval
New Albina, WA 19200-7914 | Suite 096 | Linnealand | 862 | Montana | USA row 2 : 9 | 966 Dach Ports Apt. 322
Lake Harmonyhaven, ... | col : city row 1 : South Minnie row 2 : Linnealand row 3 : East Tavaresburgh row 4 : Terencetown row 5 : Lake Devon row 6 : O'Connellview row 7 : New Alta row 8 : South Naomibury |
SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id | What are the different cities where students live? | [
"Addresses",
"Students",
"People_Addresses"
] | [
"{\"columns\":[\"address_id\",\"line_1\",\"line_2\",\"city\",\"zip_postcode\",\"state_province_county\",\"country\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],\"data\":[[5,\"0900 Roderick Oval\\nNew Albina, WA 19200-7914\",\"Suite 096\",\"Linnealand\",\"862\",\"Montana\",\"USA\"],[9,\"966 Dach Ports Apt. 322\\... | {"columns":["city"],"index":[0,1,2,3,4,5,6,7],"data":[["South Minnie"],["Linnealand"],["East Tavaresburgh"],["Terencetown"],["Lake Devon"],["O'Connellview"],["New Alta"],["South Naomibury"]]} | What are the different cities where students live? <table_name> : Addresses col : address_id | line_1 | line_2 | city | zip_postcode | state_province_county | country row 1 : 5 | 0900 Roderick Oval
New Albina, WA 19200-7914 | Suite 096 | Linnealand | 862 | Montana | USA row 2 : 9 | 966 Dach Ports Apt. 322
Lake Harmonyh... | col : city row 1 : South Minnie row 2 : Linnealand row 3 : East Tavaresburgh row 4 : Terencetown row 5 : Lake Devon row 6 : O'Connellview row 7 : New Alta row 8 : South Naomibury |
SELECT course_name FROM courses ORDER BY course_name | List the names of courses in alphabetical order? | [
"Courses"
] | [
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index\":[0,1,2,3,4,5],\"data\":[[\"301\",\"statistics\",\"statistics\",null],[\"302\",\"English\",\"English\",null],[\"303\",\"French\",\"French\",null],[\"304\",\"database\",\"database\",null],[\"305\",\"data structure\",\"dat... | {"columns":["course_name"],"index":[0,1,2,3,4,5],"data":[["Art history"],["English"],["French"],["data structure"],["database"],["statistics"]]} | List the names of courses in alphabetical order? <table_name> : Courses col : course_id | course_name | course_description | other_details row 1 : 301 | statistics | statistics | row 2 : 302 | English | English | row 3 : 303 | French | French | row 4 : 304 | database | database | row 5 : 305 | data structure | data... | col : course_name row 1 : Art history row 2 : English row 3 : French row 4 : data structure row 5 : database row 6 : statistics |
SELECT course_name FROM courses ORDER BY course_name | What are the names of the courses in alphabetical order? | [
"Courses"
] | [
"{\"columns\":[\"course_id\",\"course_name\",\"course_description\",\"other_details\"],\"index\":[0,1,2,3,4,5],\"data\":[[\"301\",\"statistics\",\"statistics\",null],[\"302\",\"English\",\"English\",null],[\"303\",\"French\",\"French\",null],[\"304\",\"database\",\"database\",null],[\"305\",\"data structure\",\"dat... | {"columns":["course_name"],"index":[0,1,2,3,4,5],"data":[["Art history"],["English"],["French"],["data structure"],["database"],["statistics"]]} | What are the names of the courses in alphabetical order? <table_name> : Courses col : course_id | course_name | course_description | other_details row 1 : 301 | statistics | statistics | row 2 : 302 | English | English | row 3 : 303 | French | French | row 4 : 304 | database | database | row 5 : 305 | data structur... | col : course_name row 1 : Art history row 2 : English row 3 : French row 4 : data structure row 5 : database row 6 : statistics |
SELECT first_name FROM people ORDER BY first_name | List the first names of people in alphabetical order? | [
"People"
] | [
"{\"columns\":[\"person_id\",\"first_name\",\"middle_name\",\"last_name\",\"cell_mobile_number\",\"email_address\",\"login_name\",\"password\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Shannon\",\"Elissa\",\"Senger\",\"01955267735\",\"javier.trantow@example.net\",\"pgub\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c... | {"columns":["first_name"],"index":[0,1,2,3,4,5,6,7],"data":[["Dariana"],["Hoyt"],["Lizeth"],["Mayra"],["Nova"],["Shannon"],["Verna"],["Virginie"]]} | List the first names of people in alphabetical order? <table_name> : People col : person_id | first_name | middle_name | last_name | cell_mobile_number | email_address | login_name | password row 1 : 111 | Shannon | Elissa | Senger | 01955267735 | javier.trantow@example.net | pgub | 5e4ff49a61b3544da3ad7dc7e2cf28847564... | col : first_name row 1 : Dariana row 2 : Hoyt row 3 : Lizeth row 4 : Mayra row 5 : Nova row 6 : Shannon row 7 : Verna row 8 : Virginie |
SELECT first_name FROM people ORDER BY first_name | What are the first names of the people in alphabetical order? | [
"People"
] | [
"{\"columns\":[\"person_id\",\"first_name\",\"middle_name\",\"last_name\",\"cell_mobile_number\",\"email_address\",\"login_name\",\"password\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Shannon\",\"Elissa\",\"Senger\",\"01955267735\",\"javier.trantow@example.net\",\"pgub\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c... | {"columns":["first_name"],"index":[0,1,2,3,4,5,6,7],"data":[["Dariana"],["Hoyt"],["Lizeth"],["Mayra"],["Nova"],["Shannon"],["Verna"],["Virginie"]]} | What are the first names of the people in alphabetical order? <table_name> : People col : person_id | first_name | middle_name | last_name | cell_mobile_number | email_address | login_name | password row 1 : 111 | Shannon | Elissa | Senger | 01955267735 | javier.trantow@example.net | pgub | 5e4ff49a61b3544da3ad7dc7e2cf... | col : first_name row 1 : Dariana row 2 : Hoyt row 3 : Lizeth row 4 : Mayra row 5 : Nova row 6 : Shannon row 7 : Verna row 8 : Virginie |
SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance | What are the id of students who registered courses or attended courses? | [
"Student_Course_Registrations",
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,8],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2008-10-04 10:35:13\"],[121,303,\"2008-11-14 10:35:13\"],[131,303,\"2008-11-05 10:35:13\"],[141,302,\"2008-11-06 10:35:13\"],[151,305,\"2008-11-07 10:35:13\"],[161,... | {"columns":["student_id"],"index":[0,1,2,3,4,5,6],"data":[[111],[121],[131],[141],[151],[161],[171]]} | What are the id of students who registered courses or attended courses? <table_name> : Student_Course_Registrations col : student_id | course_id | registration_date row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2008-10-04 10:35:13 row 3 : 121 | 303 | 2008-11-14 10:35:13 row 4 : 131 | 303 | 2008-11-05 10:3... | col : student_id row 1 : 111 row 2 : 121 row 3 : 131 row 4 : 141 row 5 : 151 row 6 : 161 row 7 : 171 |
SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance | What are the ids of the students who either registered or attended a course? | [
"Student_Course_Registrations",
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,8],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2008-10-04 10:35:13\"],[121,303,\"2008-11-14 10:35:13\"],[131,303,\"2008-11-05 10:35:13\"],[141,302,\"2008-11-06 10:35:13\"],[151,305,\"2008-11-07 10:35:13\"],[161,... | {"columns":["student_id"],"index":[0,1,2,3,4,5,6],"data":[[111],[121],[131],[141],[151],[161],[171]]} | What are the ids of the students who either registered or attended a course? <table_name> : Student_Course_Registrations col : student_id | course_id | registration_date row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2008-10-04 10:35:13 row 3 : 121 | 303 | 2008-11-14 10:35:13 row 4 : 131 | 303 | 2008-11-05... | col : student_id row 1 : 111 row 2 : 121 row 3 : 131 row 4 : 141 row 5 : 151 row 6 : 161 row 7 : 171 |
SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121 | Find the id of courses which are registered or attended by student whose id is 121? | [
"Student_Course_Registrations",
"Student_Course_Attendance"
] | [
"{\"columns\":[\"student_id\",\"course_id\",\"registration_date\"],\"index\":[0,1,2,3,4,5,6,7,8],\"data\":[[111,301,\"2008-11-04 10:35:13\"],[121,301,\"2008-10-04 10:35:13\"],[121,303,\"2008-11-14 10:35:13\"],[131,303,\"2008-11-05 10:35:13\"],[141,302,\"2008-11-06 10:35:13\"],[151,305,\"2008-11-07 10:35:13\"],[161,... | {"columns":["course_id"],"index":[0,1],"data":[[301],[303]]} | Find the id of courses which are registered or attended by student whose id is 121? <table_name> : Student_Course_Registrations col : student_id | course_id | registration_date row 1 : 111 | 301 | 2008-11-04 10:35:13 row 2 : 121 | 301 | 2008-10-04 10:35:13 row 3 : 121 | 303 | 2008-11-14 10:35:13 row 4 : 131 | 303 | 200... | col : course_id row 1 : 301 row 2 : 303 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.