query
stringlengths
18
577
question
stringlengths
16
224
table_names
sequence
tables
sequence
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,\"Billy Mayfair\",\"California\",69.0],[7,\"Stewart Cink\",\"Florida\",50.0],[8,\"Nick Faldo\",\"California\",56.0],[9,\"P\\u00c3\\u00a1draig Harrington\",\"Connecticut\",43.0],[10,\"Franklin Langham\",\"Connecticut\",67.0]]}" ]
{"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 row 6 : 6 | Billy Mayfair | California | 69 row 7 : 7 | Stewart Cink | Florida | 50 row 8 : 8 | Nick Faldo | California | 56 row 9 : 9 | Pádraig Harrington | Connecticut | 43 row 10 : 10 | Franklin Langham | Connecticut | 67
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,\"Billy Mayfair\",\"California\",69.0],[7,\"Stewart Cink\",\"Florida\",50.0],[8,\"Nick Faldo\",\"California\",56.0],[9,\"P\\u00c3\\u00a1draig Harrington\",\"Connecticut\",43.0],[10,\"Franklin Langham\",\"Connecticut\",67.0]]}" ]
{"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","Connecticut",67.0],["Sergio Garc\u00c3\u00ada","California",68.0],["K. J. Choi","Alabama",69.0],["Billy Mayfair","California",69.0]]}
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 Maggert | Delaware | 53 row 6 : 6 | Billy Mayfair | California | 69 row 7 : 7 | Stewart Cink | Florida | 50 row 8 : 8 | Nick Faldo | California | 56 row 9 : 9 | Pádraig Harrington | Connecticut | 43 row 10 : 10 | Franklin Langham | Connecticut | 67
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 García | California | 68 row 9 : K. J. Choi | Alabama | 69 row 10 : Billy Mayfair | California | 69
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,23.4,112557.0],[5,\"Interior\",\"1849\",5,10.7,71436.0],[6,\"Agriculture\",\"1889\",6,77.6,109832.0],[7,\"Commerce\",\"1903\",7,6.2,36000.0],[8,\"Labor\",\"1913\",8,59.7,17347.0],[9,\"Health and Human Services\",\"1953\",9,543.2,67000.0],[10,\"Housing and Urban Development\",\"1965\",10,46.2,10600.0],[11,\"Transportation\",\"1966\",11,58.0,58622.0],[12,\"Energy\",\"1977\",12,21.5,116100.0],[13,\"Education\",\"1979\",13,62.8,4487.0],[14,\"Veterans Affairs\",\"1989\",14,73.2,235000.0],[15,\"Homeland Security\",\"2002\",15,44.6,208000.0]]}" ]
{"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 Human Services",543.2],["1965","Housing and Urban Development",46.2],["1966","Transportation",58.0],["1977","Energy",21.5],["1979","Education",62.8],["1989","Veterans Affairs",73.2],["2002","Homeland Security",44.6]]}
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 : 4 | Justice | 1870 | 4 | 23.4 | 112557 row 5 : 5 | Interior | 1849 | 5 | 10.7 | 71436 row 6 : 6 | Agriculture | 1889 | 6 | 77.6 | 109832 row 7 : 7 | Commerce | 1903 | 7 | 6.2 | 36000 row 8 : 8 | Labor | 1913 | 8 | 59.7 | 17347 row 9 : 9 | Health and Human Services | 1953 | 9 | 543.2 | 67000 row 10 : 10 | Housing and Urban Development | 1965 | 10 | 46.2 | 10600 row 11 : 11 | Transportation | 1966 | 11 | 58.0 | 58622 row 12 : 12 | Energy | 1977 | 12 | 21.5 | 116100 row 13 : 13 | Education | 1979 | 13 | 62.8 | 4487 row 14 : 14 | Veterans Affairs | 1989 | 14 | 73.2 | 235000 row 15 : 15 | Homeland Security | 2002 | 15 | 44.6 | 208000
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 Services | 543.2 row 10 : 1965 | Housing and Urban Development | 46.2 row 11 : 1966 | Transportation | 58.0 row 12 : 1977 | Energy | 21.5 row 13 : 1979 | Education | 62.8 row 14 : 1989 | Veterans Affairs | 73.2 row 15 : 2002 | Homeland Security | 44.6
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,23.4,112557.0],[5,\"Interior\",\"1849\",5,10.7,71436.0],[6,\"Agriculture\",\"1889\",6,77.6,109832.0],[7,\"Commerce\",\"1903\",7,6.2,36000.0],[8,\"Labor\",\"1913\",8,59.7,17347.0],[9,\"Health and Human Services\",\"1953\",9,543.2,67000.0],[10,\"Housing and Urban Development\",\"1965\",10,46.2,10600.0],[11,\"Transportation\",\"1966\",11,58.0,58622.0],[12,\"Energy\",\"1977\",12,21.5,116100.0],[13,\"Education\",\"1979\",13,62.8,4487.0],[14,\"Veterans Affairs\",\"1989\",14,73.2,235000.0],[15,\"Homeland Security\",\"2002\",15,44.6,208000.0]]}" ]
{"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 : 4 | Justice | 1870 | 4 | 23.4 | 112557 row 5 : 5 | Interior | 1849 | 5 | 10.7 | 71436 row 6 : 6 | Agriculture | 1889 | 6 | 77.6 | 109832 row 7 : 7 | Commerce | 1903 | 7 | 6.2 | 36000 row 8 : 8 | Labor | 1913 | 8 | 59.7 | 17347 row 9 : 9 | Health and Human Services | 1953 | 9 | 543.2 | 67000 row 10 : 10 | Housing and Urban Development | 1965 | 10 | 46.2 | 10600 row 11 : 11 | Transportation | 1966 | 11 | 58.0 | 58622 row 12 : 12 | Energy | 1977 | 12 | 21.5 | 116100 row 13 : 13 | Education | 1979 | 13 | 62.8 | 4487 row 14 : 14 | Veterans Affairs | 1989 | 14 | 73.2 | 235000 row 15 : 15 | Homeland Security | 2002 | 15 | 44.6 | 208000
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,23.4,112557.0],[5,\"Interior\",\"1849\",5,10.7,71436.0],[6,\"Agriculture\",\"1889\",6,77.6,109832.0],[7,\"Commerce\",\"1903\",7,6.2,36000.0],[8,\"Labor\",\"1913\",8,59.7,17347.0],[9,\"Health and Human Services\",\"1953\",9,543.2,67000.0],[10,\"Housing and Urban Development\",\"1965\",10,46.2,10600.0],[11,\"Transportation\",\"1966\",11,58.0,58622.0],[12,\"Energy\",\"1977\",12,21.5,116100.0],[13,\"Education\",\"1979\",13,62.8,4487.0],[14,\"Veterans Affairs\",\"1989\",14,73.2,235000.0],[15,\"Homeland Security\",\"2002\",15,44.6,208000.0]]}" ]
{"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 | 1947 | 3 | 439.3 | 3000000 row 4 : 4 | Justice | 1870 | 4 | 23.4 | 112557 row 5 : 5 | Interior | 1849 | 5 | 10.7 | 71436 row 6 : 6 | Agriculture | 1889 | 6 | 77.6 | 109832 row 7 : 7 | Commerce | 1903 | 7 | 6.2 | 36000 row 8 : 8 | Labor | 1913 | 8 | 59.7 | 17347 row 9 : 9 | Health and Human Services | 1953 | 9 | 543.2 | 67000 row 10 : 10 | Housing and Urban Development | 1965 | 10 | 46.2 | 10600 row 11 : 11 | Transportation | 1966 | 11 | 58.0 | 58622 row 12 : 12 | Energy | 1977 | 12 | 21.5 | 116100 row 13 : 13 | Education | 1979 | 13 | 62.8 | 4487 row 14 : 14 | Veterans Affairs | 1989 | 14 | 73.2 | 235000 row 15 : 15 | Homeland Security | 2002 | 15 | 44.6 | 208000
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,\"Billy Mayfair\",\"California\",69.0],[7,\"Stewart Cink\",\"Florida\",50.0],[8,\"Nick Faldo\",\"California\",56.0],[9,\"P\\u00c3\\u00a1draig Harrington\",\"Connecticut\",43.0],[10,\"Franklin Langham\",\"Connecticut\",67.0]]}" ]
{"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 Maggert | Delaware | 53 row 6 : 6 | Billy Mayfair | California | 69 row 7 : 7 | Stewart Cink | Florida | 50 row 8 : 8 | Nick Faldo | California | 56 row 9 : 9 | Pádraig Harrington | Connecticut | 43 row 10 : 10 | Franklin Langham | Connecticut | 67
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,23.4,112557.0],[5,\"Interior\",\"1849\",5,10.7,71436.0],[6,\"Agriculture\",\"1889\",6,77.6,109832.0],[7,\"Commerce\",\"1903\",7,6.2,36000.0],[8,\"Labor\",\"1913\",8,59.7,17347.0],[9,\"Health and Human Services\",\"1953\",9,543.2,67000.0],[10,\"Housing and Urban Development\",\"1965\",10,46.2,10600.0],[11,\"Transportation\",\"1966\",11,58.0,58622.0],[12,\"Energy\",\"1977\",12,21.5,116100.0],[13,\"Education\",\"1979\",13,62.8,4487.0],[14,\"Veterans Affairs\",\"1989\",14,73.2,235000.0],[15,\"Homeland Security\",\"2002\",15,44.6,208000.0]]}", "{\"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,\"Billy Mayfair\",\"California\",69.0],[7,\"Stewart Cink\",\"Florida\",50.0],[8,\"Nick Faldo\",\"California\",56.0],[9,\"P\\u00c3\\u00a1draig Harrington\",\"Connecticut\",43.0],[10,\"Franklin Langham\",\"Connecticut\",67.0]]}", "{\"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":["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 | Defense | 1947 | 3 | 439.3 | 3000000 row 4 : 4 | Justice | 1870 | 4 | 23.4 | 112557 row 5 : 5 | Interior | 1849 | 5 | 10.7 | 71436 row 6 : 6 | Agriculture | 1889 | 6 | 77.6 | 109832 row 7 : 7 | Commerce | 1903 | 7 | 6.2 | 36000 row 8 : 8 | Labor | 1913 | 8 | 59.7 | 17347 row 9 : 9 | Health and Human Services | 1953 | 9 | 543.2 | 67000 row 10 : 10 | Housing and Urban Development | 1965 | 10 | 46.2 | 10600 row 11 : 11 | Transportation | 1966 | 11 | 58.0 | 58622 row 12 : 12 | Energy | 1977 | 12 | 21.5 | 116100 row 13 : 13 | Education | 1979 | 13 | 62.8 | 4487 row 14 : 14 | Veterans Affairs | 1989 | 14 | 73.2 | 235000 row 15 : 15 | Homeland Security | 2002 | 15 | 44.6 | 208000 <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 row 6 : 6 | Billy Mayfair | California | 69 row 7 : 7 | Stewart Cink | Florida | 50 row 8 : 8 | Nick Faldo | California | 56 row 9 : 9 | Pádraig Harrington | Connecticut | 43 row 10 : 10 | Franklin Langham | Connecticut | 67 <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 : 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,\"Billy Mayfair\",\"California\",69.0],[7,\"Stewart Cink\",\"Florida\",50.0],[8,\"Nick Faldo\",\"California\",56.0],[9,\"P\\u00c3\\u00a1draig Harrington\",\"Connecticut\",43.0],[10,\"Franklin Langham\",\"Connecticut\",67.0]]}" ]
{"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 | Delaware | 53 row 6 : 6 | Billy Mayfair | California | 69 row 7 : 7 | Stewart Cink | Florida | 50 row 8 : 8 | Nick Faldo | California | 56 row 9 : 9 | Pádraig Harrington | Connecticut | 43 row 10 : 10 | Franklin Langham | Connecticut | 67
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,23.4,112557.0],[5,\"Interior\",\"1849\",5,10.7,71436.0],[6,\"Agriculture\",\"1889\",6,77.6,109832.0],[7,\"Commerce\",\"1903\",7,6.2,36000.0],[8,\"Labor\",\"1913\",8,59.7,17347.0],[9,\"Health and Human Services\",\"1953\",9,543.2,67000.0],[10,\"Housing and Urban Development\",\"1965\",10,46.2,10600.0],[11,\"Transportation\",\"1966\",11,58.0,58622.0],[12,\"Energy\",\"1977\",12,21.5,116100.0],[13,\"Education\",\"1979\",13,62.8,4487.0],[14,\"Veterans Affairs\",\"1989\",14,73.2,235000.0],[15,\"Homeland Security\",\"2002\",15,44.6,208000.0]]}" ]
{"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 | 1870 | 4 | 23.4 | 112557 row 5 : 5 | Interior | 1849 | 5 | 10.7 | 71436 row 6 : 6 | Agriculture | 1889 | 6 | 77.6 | 109832 row 7 : 7 | Commerce | 1903 | 7 | 6.2 | 36000 row 8 : 8 | Labor | 1913 | 8 | 59.7 | 17347 row 9 : 9 | Health and Human Services | 1953 | 9 | 543.2 | 67000 row 10 : 10 | Housing and Urban Development | 1965 | 10 | 46.2 | 10600 row 11 : 11 | Transportation | 1966 | 11 | 58.0 | 58622 row 12 : 12 | Energy | 1977 | 12 | 21.5 | 116100 row 13 : 13 | Education | 1979 | 13 | 62.8 | 4487 row 14 : 14 | Veterans Affairs | 1989 | 14 | 73.2 | 235000 row 15 : 15 | Homeland Security | 2002 | 15 | 44.6 | 208000
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,23.4,112557.0],[5,\"Interior\",\"1849\",5,10.7,71436.0],[6,\"Agriculture\",\"1889\",6,77.6,109832.0],[7,\"Commerce\",\"1903\",7,6.2,36000.0],[8,\"Labor\",\"1913\",8,59.7,17347.0],[9,\"Health and Human Services\",\"1953\",9,543.2,67000.0],[10,\"Housing and Urban Development\",\"1965\",10,46.2,10600.0],[11,\"Transportation\",\"1966\",11,58.0,58622.0],[12,\"Energy\",\"1977\",12,21.5,116100.0],[13,\"Education\",\"1979\",13,62.8,4487.0],[14,\"Veterans Affairs\",\"1989\",14,73.2,235000.0],[15,\"Homeland Security\",\"2002\",15,44.6,208000.0]]}", "{\"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":["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 3 : 3 | Defense | 1947 | 3 | 439.3 | 3000000 row 4 : 4 | Justice | 1870 | 4 | 23.4 | 112557 row 5 : 5 | Interior | 1849 | 5 | 10.7 | 71436 row 6 : 6 | Agriculture | 1889 | 6 | 77.6 | 109832 row 7 : 7 | Commerce | 1903 | 7 | 6.2 | 36000 row 8 : 8 | Labor | 1913 | 8 | 59.7 | 17347 row 9 : 9 | Health and Human Services | 1953 | 9 | 543.2 | 67000 row 10 : 10 | Housing and Urban Development | 1965 | 10 | 46.2 | 10600 row 11 : 11 | Transportation | 1966 | 11 | 58.0 | 58622 row 12 : 12 | Energy | 1977 | 12 | 21.5 | 116100 row 13 : 13 | Education | 1979 | 13 | 62.8 | 4487 row 14 : 14 | Veterans Affairs | 1989 | 14 | 73.2 | 235000 row 15 : 15 | Homeland Security | 2002 | 15 | 44.6 | 208000 <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 : 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,23.4,112557.0],[5,\"Interior\",\"1849\",5,10.7,71436.0],[6,\"Agriculture\",\"1889\",6,77.6,109832.0],[7,\"Commerce\",\"1903\",7,6.2,36000.0],[8,\"Labor\",\"1913\",8,59.7,17347.0],[9,\"Health and Human Services\",\"1953\",9,543.2,67000.0],[10,\"Housing and Urban Development\",\"1965\",10,46.2,10600.0],[11,\"Transportation\",\"1966\",11,58.0,58622.0],[12,\"Energy\",\"1977\",12,21.5,116100.0],[13,\"Education\",\"1979\",13,62.8,4487.0],[14,\"Veterans Affairs\",\"1989\",14,73.2,235000.0],[15,\"Homeland Security\",\"2002\",15,44.6,208000.0]]}", "{\"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(*)"],"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 : 4 | Justice | 1870 | 4 | 23.4 | 112557 row 5 : 5 | Interior | 1849 | 5 | 10.7 | 71436 row 6 : 6 | Agriculture | 1889 | 6 | 77.6 | 109832 row 7 : 7 | Commerce | 1903 | 7 | 6.2 | 36000 row 8 : 8 | Labor | 1913 | 8 | 59.7 | 17347 row 9 : 9 | Health and Human Services | 1953 | 9 | 543.2 | 67000 row 10 : 10 | Housing and Urban Development | 1965 | 10 | 46.2 | 10600 row 11 : 11 | Transportation | 1966 | 11 | 58.0 | 58622 row 12 : 12 | Energy | 1977 | 12 | 21.5 | 116100 row 13 : 13 | Education | 1979 | 13 | 62.8 | 4487 row 14 : 14 | Veterans Affairs | 1989 | 14 | 73.2 | 235000 row 15 : 15 | Homeland Security | 2002 | 15 | 44.6 | 208000 <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(*) 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,\"Billy Mayfair\",\"California\",69.0],[7,\"Stewart Cink\",\"Florida\",50.0],[8,\"Nick Faldo\",\"California\",56.0],[9,\"P\\u00c3\\u00a1draig Harrington\",\"Connecticut\",43.0],[10,\"Franklin Langham\",\"Connecticut\",67.0]]}", "{\"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":["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 row 6 : 6 | Billy Mayfair | California | 69 row 7 : 7 | Stewart Cink | Florida | 50 row 8 : 8 | Nick Faldo | California | 56 row 9 : 9 | Pádraig Harrington | Connecticut | 43 row 10 : 10 | Franklin Langham | Connecticut | 67 <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 : 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.head_id = T3.head_id WHERE T1.name = 'Homeland Security'
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,23.4,112557.0],[5,\"Interior\",\"1849\",5,10.7,71436.0],[6,\"Agriculture\",\"1889\",6,77.6,109832.0],[7,\"Commerce\",\"1903\",7,6.2,36000.0],[8,\"Labor\",\"1913\",8,59.7,17347.0],[9,\"Health and Human Services\",\"1953\",9,543.2,67000.0],[10,\"Housing and Urban Development\",\"1965\",10,46.2,10600.0],[11,\"Transportation\",\"1966\",11,58.0,58622.0],[12,\"Energy\",\"1977\",12,21.5,116100.0],[13,\"Education\",\"1979\",13,62.8,4487.0],[14,\"Veterans Affairs\",\"1989\",14,73.2,235000.0],[15,\"Homeland Security\",\"2002\",15,44.6,208000.0]]}", "{\"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,\"Billy Mayfair\",\"California\",69.0],[7,\"Stewart Cink\",\"Florida\",50.0],[8,\"Nick Faldo\",\"California\",56.0],[9,\"P\\u00c3\\u00a1draig Harrington\",\"Connecticut\",43.0],[10,\"Franklin Langham\",\"Connecticut\",67.0]]}", "{\"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":["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 row 3 : 3 | Defense | 1947 | 3 | 439.3 | 3000000 row 4 : 4 | Justice | 1870 | 4 | 23.4 | 112557 row 5 : 5 | Interior | 1849 | 5 | 10.7 | 71436 row 6 : 6 | Agriculture | 1889 | 6 | 77.6 | 109832 row 7 : 7 | Commerce | 1903 | 7 | 6.2 | 36000 row 8 : 8 | Labor | 1913 | 8 | 59.7 | 17347 row 9 : 9 | Health and Human Services | 1953 | 9 | 543.2 | 67000 row 10 : 10 | Housing and Urban Development | 1965 | 10 | 46.2 | 10600 row 11 : 11 | Transportation | 1966 | 11 | 58.0 | 58622 row 12 : 12 | Energy | 1977 | 12 | 21.5 | 116100 row 13 : 13 | Education | 1979 | 13 | 62.8 | 4487 row 14 : 14 | Veterans Affairs | 1989 | 14 | 73.2 | 235000 row 15 : 15 | Homeland Security | 2002 | 15 | 44.6 | 208000 <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 row 6 : 6 | Billy Mayfair | California | 69 row 7 : 7 | Stewart Cink | Florida | 50 row 8 : 8 | Nick Faldo | California | 56 row 9 : 9 | Pádraig Harrington | Connecticut | 43 row 10 : 10 | Franklin Langham | Connecticut | 67 <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 : 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,23.4,112557.0],[5,\"Interior\",\"1849\",5,10.7,71436.0],[6,\"Agriculture\",\"1889\",6,77.6,109832.0],[7,\"Commerce\",\"1903\",7,6.2,36000.0],[8,\"Labor\",\"1913\",8,59.7,17347.0],[9,\"Health and Human Services\",\"1953\",9,543.2,67000.0],[10,\"Housing and Urban Development\",\"1965\",10,46.2,10600.0],[11,\"Transportation\",\"1966\",11,58.0,58622.0],[12,\"Energy\",\"1977\",12,21.5,116100.0],[13,\"Education\",\"1979\",13,62.8,4487.0],[14,\"Veterans Affairs\",\"1989\",14,73.2,235000.0],[15,\"Homeland Security\",\"2002\",15,44.6,208000.0]]}", "{\"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":["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 | 1947 | 3 | 439.3 | 3000000 row 4 : 4 | Justice | 1870 | 4 | 23.4 | 112557 row 5 : 5 | Interior | 1849 | 5 | 10.7 | 71436 row 6 : 6 | Agriculture | 1889 | 6 | 77.6 | 109832 row 7 : 7 | Commerce | 1903 | 7 | 6.2 | 36000 row 8 : 8 | Labor | 1913 | 8 | 59.7 | 17347 row 9 : 9 | Health and Human Services | 1953 | 9 | 543.2 | 67000 row 10 : 10 | Housing and Urban Development | 1965 | 10 | 46.2 | 10600 row 11 : 11 | Transportation | 1966 | 11 | 58.0 | 58622 row 12 : 12 | Energy | 1977 | 12 | 21.5 | 116100 row 13 : 13 | Education | 1979 | 13 | 62.8 | 4487 row 14 : 14 | Veterans Affairs | 1989 | 14 | 73.2 | 235000 row 15 : 15 | Homeland Security | 2002 | 15 | 44.6 | 208000 <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 : 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,\"Billy Mayfair\",\"California\",69.0],[7,\"Stewart Cink\",\"Florida\",50.0],[8,\"Nick Faldo\",\"California\",56.0],[9,\"P\\u00c3\\u00a1draig Harrington\",\"Connecticut\",43.0],[10,\"Franklin Langham\",\"Connecticut\",67.0]]}" ]
{"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 | Delaware | 53 row 6 : 6 | Billy Mayfair | California | 69 row 7 : 7 | Stewart Cink | Florida | 50 row 8 : 8 | Nick Faldo | California | 56 row 9 : 9 | Pádraig Harrington | Connecticut | 43 row 10 : 10 | Franklin Langham | Connecticut | 67
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,5607.5,4198.8,7611.0,593.7,26.9,3873.0,4161.2,7030.8],[4,1930,5308.2,3721.6,6274.1,254.8,49.6,3471.6,3171.8,4533.4],[5,1931,4781.3,3593.7,6189.5,113.8,40.0,3377.0,3373.3,3364.8],[6,1932,3658.9,3711.6,5006.7,105.2,71.6,2739.5,2623.7,2109.5],[7,1933,2604.8,3711.2,4446.3,116.9,37.6,2407.2,2089.2,2004.7],[8,1934,2546.9,2197.3,5277.5,156.5,46.7,2518.0,4236.7,2197.1]]}" ]
{"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 | 6962.9 | 8112.2 row 3 : 3 | 1929 | 5607.5 | 4198.8 | 7611.0 | 593.7 | 26.9 | 3873.0 | 4161.2 | 7030.8 row 4 : 4 | 1930 | 5308.2 | 3721.6 | 6274.1 | 254.8 | 49.6 | 3471.6 | 3171.8 | 4533.4 row 5 : 5 | 1931 | 4781.3 | 3593.7 | 6189.5 | 113.8 | 40.0 | 3377.0 | 3373.3 | 3364.8 row 6 : 6 | 1932 | 3658.9 | 3711.6 | 5006.7 | 105.2 | 71.6 | 2739.5 | 2623.7 | 2109.5 row 7 : 7 | 1933 | 2604.8 | 3711.2 | 4446.3 | 116.9 | 37.6 | 2407.2 | 2089.2 | 2004.7 row 8 : 8 | 1934 | 2546.9 | 2197.3 | 5277.5 | 156.5 | 46.7 | 2518.0 | 4236.7 | 2197.1
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,5607.5,4198.8,7611.0,593.7,26.9,3873.0,4161.2,7030.8],[4,1930,5308.2,3721.6,6274.1,254.8,49.6,3471.6,3171.8,4533.4],[5,1931,4781.3,3593.7,6189.5,113.8,40.0,3377.0,3373.3,3364.8],[6,1932,3658.9,3711.6,5006.7,105.2,71.6,2739.5,2623.7,2109.5],[7,1933,2604.8,3711.2,4446.3,116.9,37.6,2407.2,2089.2,2004.7],[8,1934,2546.9,2197.3,5277.5,156.5,46.7,2518.0,4236.7,2197.1]]}" ]
{"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 | 6962.9 | 8112.2 row 3 : 3 | 1929 | 5607.5 | 4198.8 | 7611.0 | 593.7 | 26.9 | 3873.0 | 4161.2 | 7030.8 row 4 : 4 | 1930 | 5308.2 | 3721.6 | 6274.1 | 254.8 | 49.6 | 3471.6 | 3171.8 | 4533.4 row 5 : 5 | 1931 | 4781.3 | 3593.7 | 6189.5 | 113.8 | 40.0 | 3377.0 | 3373.3 | 3364.8 row 6 : 6 | 1932 | 3658.9 | 3711.6 | 5006.7 | 105.2 | 71.6 | 2739.5 | 2623.7 | 2109.5 row 7 : 7 | 1933 | 2604.8 | 3711.2 | 4446.3 | 116.9 | 37.6 | 2407.2 | 2089.2 | 2004.7 row 8 : 8 | 1934 | 2546.9 | 2197.3 | 5277.5 | 156.5 | 46.7 | 2518.0 | 4236.7 | 2197.1
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,5607.5,4198.8,7611.0,593.7,26.9,3873.0,4161.2,7030.8],[4,1930,5308.2,3721.6,6274.1,254.8,49.6,3471.6,3171.8,4533.4],[5,1931,4781.3,3593.7,6189.5,113.8,40.0,3377.0,3373.3,3364.8],[6,1932,3658.9,3711.6,5006.7,105.2,71.6,2739.5,2623.7,2109.5],[7,1933,2604.8,3711.2,4446.3,116.9,37.6,2407.2,2089.2,2004.7],[8,1934,2546.9,2197.3,5277.5,156.5,46.7,2518.0,4236.7,2197.1]]}" ]
{"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 | 8604.8 | 895.3 | 32.8 | 3987.0 | 6962.9 | 8112.2 row 3 : 3 | 1929 | 5607.5 | 4198.8 | 7611.0 | 593.7 | 26.9 | 3873.0 | 4161.2 | 7030.8 row 4 : 4 | 1930 | 5308.2 | 3721.6 | 6274.1 | 254.8 | 49.6 | 3471.6 | 3171.8 | 4533.4 row 5 : 5 | 1931 | 4781.3 | 3593.7 | 6189.5 | 113.8 | 40.0 | 3377.0 | 3373.3 | 3364.8 row 6 : 6 | 1932 | 3658.9 | 3711.6 | 5006.7 | 105.2 | 71.6 | 2739.5 | 2623.7 | 2109.5 row 7 : 7 | 1933 | 2604.8 | 3711.2 | 4446.3 | 116.9 | 37.6 | 2407.2 | 2089.2 | 2004.7 row 8 : 8 | 1934 | 2546.9 | 2197.3 | 5277.5 | 156.5 | 46.7 | 2518.0 | 4236.7 | 2197.1
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,5607.5,4198.8,7611.0,593.7,26.9,3873.0,4161.2,7030.8],[4,1930,5308.2,3721.6,6274.1,254.8,49.6,3471.6,3171.8,4533.4],[5,1931,4781.3,3593.7,6189.5,113.8,40.0,3377.0,3373.3,3364.8],[6,1932,3658.9,3711.6,5006.7,105.2,71.6,2739.5,2623.7,2109.5],[7,1933,2604.8,3711.2,4446.3,116.9,37.6,2407.2,2089.2,2004.7],[8,1934,2546.9,2197.3,5277.5,156.5,46.7,2518.0,4236.7,2197.1]]}" ]
{"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 | 8604.8 | 895.3 | 32.8 | 3987.0 | 6962.9 | 8112.2 row 3 : 3 | 1929 | 5607.5 | 4198.8 | 7611.0 | 593.7 | 26.9 | 3873.0 | 4161.2 | 7030.8 row 4 : 4 | 1930 | 5308.2 | 3721.6 | 6274.1 | 254.8 | 49.6 | 3471.6 | 3171.8 | 4533.4 row 5 : 5 | 1931 | 4781.3 | 3593.7 | 6189.5 | 113.8 | 40.0 | 3377.0 | 3373.3 | 3364.8 row 6 : 6 | 1932 | 3658.9 | 3711.6 | 5006.7 | 105.2 | 71.6 | 2739.5 | 2623.7 | 2109.5 row 7 : 7 | 1933 | 2604.8 | 3711.2 | 4446.3 | 116.9 | 37.6 | 2407.2 | 2089.2 | 2004.7 row 8 : 8 | 1934 | 2546.9 | 2197.3 | 5277.5 | 156.5 | 46.7 | 2518.0 | 4236.7 | 2197.1
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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 | 2005 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 3 : 3 | 2005 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 | 2005 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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,5607.5,4198.8,7611.0,593.7,26.9,3873.0,4161.2,7030.8],[4,1930,5308.2,3721.6,6274.1,254.8,49.6,3471.6,3171.8,4533.4],[5,1931,4781.3,3593.7,6189.5,113.8,40.0,3377.0,3373.3,3364.8],[6,1932,3658.9,3711.6,5006.7,105.2,71.6,2739.5,2623.7,2109.5],[7,1933,2604.8,3711.2,4446.3,116.9,37.6,2407.2,2089.2,2004.7],[8,1934,2546.9,2197.3,5277.5,156.5,46.7,2518.0,4236.7,2197.1]]}" ]
{"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 row 2 : 2 | 1928 | 5486.9 | 4090.5 | 8604.8 | 895.3 | 32.8 | 3987.0 | 6962.9 | 8112.2 row 3 : 3 | 1929 | 5607.5 | 4198.8 | 7611.0 | 593.7 | 26.9 | 3873.0 | 4161.2 | 7030.8 row 4 : 4 | 1930 | 5308.2 | 3721.6 | 6274.1 | 254.8 | 49.6 | 3471.6 | 3171.8 | 4533.4 row 5 : 5 | 1931 | 4781.3 | 3593.7 | 6189.5 | 113.8 | 40.0 | 3377.0 | 3373.3 | 3364.8 row 6 : 6 | 1932 | 3658.9 | 3711.6 | 5006.7 | 105.2 | 71.6 | 2739.5 | 2623.7 | 2109.5 row 7 : 7 | 1933 | 2604.8 | 3711.2 | 4446.3 | 116.9 | 37.6 | 2407.2 | 2089.2 | 2004.7 row 8 : 8 | 1934 | 2546.9 | 2197.3 | 5277.5 | 156.5 | 46.7 | 2518.0 | 4236.7 | 2197.1
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,5607.5,4198.8,7611.0,593.7,26.9,3873.0,4161.2,7030.8],[4,1930,5308.2,3721.6,6274.1,254.8,49.6,3471.6,3171.8,4533.4],[5,1931,4781.3,3593.7,6189.5,113.8,40.0,3377.0,3373.3,3364.8],[6,1932,3658.9,3711.6,5006.7,105.2,71.6,2739.5,2623.7,2109.5],[7,1933,2604.8,3711.2,4446.3,116.9,37.6,2407.2,2089.2,2004.7],[8,1934,2546.9,2197.3,5277.5,156.5,46.7,2518.0,4236.7,2197.1]]}" ]
{"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 | 1928 | 5486.9 | 4090.5 | 8604.8 | 895.3 | 32.8 | 3987.0 | 6962.9 | 8112.2 row 3 : 3 | 1929 | 5607.5 | 4198.8 | 7611.0 | 593.7 | 26.9 | 3873.0 | 4161.2 | 7030.8 row 4 : 4 | 1930 | 5308.2 | 3721.6 | 6274.1 | 254.8 | 49.6 | 3471.6 | 3171.8 | 4533.4 row 5 : 5 | 1931 | 4781.3 | 3593.7 | 6189.5 | 113.8 | 40.0 | 3377.0 | 3373.3 | 3364.8 row 6 : 6 | 1932 | 3658.9 | 3711.6 | 5006.7 | 105.2 | 71.6 | 2739.5 | 2623.7 | 2109.5 row 7 : 7 | 1933 | 2604.8 | 3711.2 | 4446.3 | 116.9 | 37.6 | 2407.2 | 2089.2 | 2004.7 row 8 : 8 | 1934 | 2546.9 | 2197.3 | 5277.5 | 156.5 | 46.7 | 2518.0 | 4236.7 | 2197.1
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,5607.5,4198.8,7611.0,593.7,26.9,3873.0,4161.2,7030.8],[4,1930,5308.2,3721.6,6274.1,254.8,49.6,3471.6,3171.8,4533.4],[5,1931,4781.3,3593.7,6189.5,113.8,40.0,3377.0,3373.3,3364.8],[6,1932,3658.9,3711.6,5006.7,105.2,71.6,2739.5,2623.7,2109.5],[7,1933,2604.8,3711.2,4446.3,116.9,37.6,2407.2,2089.2,2004.7],[8,1934,2546.9,2197.3,5277.5,156.5,46.7,2518.0,4236.7,2197.1]]}" ]
{"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.5 | 8604.8 | 895.3 | 32.8 | 3987.0 | 6962.9 | 8112.2 row 3 : 3 | 1929 | 5607.5 | 4198.8 | 7611.0 | 593.7 | 26.9 | 3873.0 | 4161.2 | 7030.8 row 4 : 4 | 1930 | 5308.2 | 3721.6 | 6274.1 | 254.8 | 49.6 | 3471.6 | 3171.8 | 4533.4 row 5 : 5 | 1931 | 4781.3 | 3593.7 | 6189.5 | 113.8 | 40.0 | 3377.0 | 3373.3 | 3364.8 row 6 : 6 | 1932 | 3658.9 | 3711.6 | 5006.7 | 105.2 | 71.6 | 2739.5 | 2623.7 | 2109.5 row 7 : 7 | 1933 | 2604.8 | 3711.2 | 4446.3 | 116.9 | 37.6 | 2407.2 | 2089.2 | 2004.7 row 8 : 8 | 1934 | 2546.9 | 2197.3 | 5277.5 | 156.5 | 46.7 | 2518.0 | 4236.7 | 2197.1
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,5607.5,4198.8,7611.0,593.7,26.9,3873.0,4161.2,7030.8],[4,1930,5308.2,3721.6,6274.1,254.8,49.6,3471.6,3171.8,4533.4],[5,1931,4781.3,3593.7,6189.5,113.8,40.0,3377.0,3373.3,3364.8],[6,1932,3658.9,3711.6,5006.7,105.2,71.6,2739.5,2623.7,2109.5],[7,1933,2604.8,3711.2,4446.3,116.9,37.6,2407.2,2089.2,2004.7],[8,1934,2546.9,2197.3,5277.5,156.5,46.7,2518.0,4236.7,2197.1]]}" ]
{"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 | 8604.8 | 895.3 | 32.8 | 3987.0 | 6962.9 | 8112.2 row 3 : 3 | 1929 | 5607.5 | 4198.8 | 7611.0 | 593.7 | 26.9 | 3873.0 | 4161.2 | 7030.8 row 4 : 4 | 1930 | 5308.2 | 3721.6 | 6274.1 | 254.8 | 49.6 | 3471.6 | 3171.8 | 4533.4 row 5 : 5 | 1931 | 4781.3 | 3593.7 | 6189.5 | 113.8 | 40.0 | 3377.0 | 3373.3 | 3364.8 row 6 : 6 | 1932 | 3658.9 | 3711.6 | 5006.7 | 105.2 | 71.6 | 2739.5 | 2623.7 | 2109.5 row 7 : 7 | 1933 | 2604.8 | 3711.2 | 4446.3 | 116.9 | 37.6 | 2407.2 | 2089.2 | 2004.7 row 8 : 8 | 1934 | 2546.9 | 2197.3 | 5277.5 | 156.5 | 46.7 | 2518.0 | 4236.7 | 2197.1
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}", "{\"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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008 <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 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}", "{\"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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008 <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 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}", "{\"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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008 <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 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}", "{\"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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008 <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 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}", "{\"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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008 <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 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}", "{\"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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008 <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 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}", "{\"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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 | 1442 of 5,008 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008 <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 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}", "{\"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's Day\",4,\"Vanness Wu and Michelle Branch\"],[5,2003,\"MTV Cube\",5,\"Shaggy and Coco Lee\"],[6,2002,\"Aliens\",5,\"Mandy Moore and Ronan Keating\"]]}" ]
{"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 | 1778 | 1442 of 5,008 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008 <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 | MTV Asia Aid | 3 | Alicia Keys row 4 : 4 | 2004 | Valentine's Day | 4 | Vanness Wu and Michelle Branch row 5 : 5 | 2003 | MTV Cube | 5 | Shaggy and Coco Lee row 6 : 6 | 2002 | Aliens | 5 | Mandy Moore and Ronan Keating
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 | 1778 | 1442 of 5,008 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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,008 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 5,008 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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-Andover | Village | 8.89 | 1778 | 1442 of 5,008 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 5,008 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 5,008 row 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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,\"1936 of 5,008\"],[4,\"Drummond\",\"Village\",8.91,775.0,\"2418 of 5008\"],[5,\"Aroostook\",\"Village\",2.24,351.0,\"3460 of 5008\"]]}" ]
{"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 3 : 3 | Plaster Rock | Village | 3.09 | 1135 | 1936 of 5,008 row 4 : 4 | Drummond | Village | 8.91 | 775 | 2418 of 5008 row 5 : 5 | Aroostook | Village | 2.24 | 351 | 3460 of 5008
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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}", "{\"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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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 | data structure | row 6 : 306 | Art history | Art history | <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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}", "{\"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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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 structure | data structure | row 6 : 306 | Art history | Art history | <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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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 : 131 | 303 | 2008-11-05 10:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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-14 10:35:13 row 4 : 131 | 303 | 2008-11-05 10:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c64c\"],[121,\"Virginie\",\"Jasmin\",\"Hartmann\",\"(508)319-2970x043\",\"boyer.lonie@example.com\",\"bkkv\",\"b063331ea8116befaa7b84c59c6a22200f5f8caa\"],[131,\"Dariana\",\"Hayley\",\"Bednar\",\"(262)347-9364x516\",\"leila14@example.net\",\"zops\",\"b20b6a9f24aadeda70d54e410c3219f61fb063fb\"],[141,\"Verna\",\"Arielle\",\"Grant\",\"1-372-548-7538x314\",\"adele.gibson@example.net\",\"uuol\",\"7be9c03d5467d563555c51ebb3eb78e7f90832ec\"],[151,\"Hoyt\",\"Mercedes\",\"Wintheiser\",\"1-603-110-0647\",\"stanley.monahan@example.org\",\"bnto\",\"c55795df86182959094b83e27900f7cf44ced570\"],[161,\"Mayra\",\"Haley\",\"Hartmann\",\"724-681-4161x51632\",\"terry.kuhlman@example.org\",\"rzxu\",\"ecae473cb54601e01457078ac0cdf4a1ced837bb\"],[171,\"Lizeth\",\"Bell\",\"Bartoletti\",\"812.228.0645x91481\",\"celestine11@example.net\",\"mkou\",\"76a93d1d3b7becc932d203beac61d064bd54e947\"],[181,\"Nova\",\"Amiya\",\"Feest\",\"766-272-9964\",\"oreynolds@example.com\",\"qrwl\",\"7dce9b688636ee212294c257dd2f6b85c7f65f2e\"]]}", "{\"columns\":[\"candidate_id\",\"candidate_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Jane\"],[121,\"Robert\"],[131,\"Alex\"],[141,\"Tao\"],[151,\"Jack\"],[161,\"Leo\"],[171,\"Robin\"],[181,\"Cindy\"]]}" ]
{"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 | 5e4ff49a61b3544da3ad7dc7e2cf28847564c64c row 2 : 121 | Virginie | Jasmin | Hartmann | (508)319-2970x043 | boyer.lonie@example.com | bkkv | b063331ea8116befaa7b84c59c6a22200f5f8caa row 3 : 131 | Dariana | Hayley | Bednar | (262)347-9364x516 | leila14@example.net | zops | b20b6a9f24aadeda70d54e410c3219f61fb063fb row 4 : 141 | Verna | Arielle | Grant | 1-372-548-7538x314 | adele.gibson@example.net | uuol | 7be9c03d5467d563555c51ebb3eb78e7f90832ec row 5 : 151 | Hoyt | Mercedes | Wintheiser | 1-603-110-0647 | stanley.monahan@example.org | bnto | c55795df86182959094b83e27900f7cf44ced570 row 6 : 161 | Mayra | Haley | Hartmann | 724-681-4161x51632 | terry.kuhlman@example.org | rzxu | ecae473cb54601e01457078ac0cdf4a1ced837bb row 7 : 171 | Lizeth | Bell | Bartoletti | 812.228.0645x91481 | celestine11@example.net | mkou | 76a93d1d3b7becc932d203beac61d064bd54e947 row 8 : 181 | Nova | Amiya | Feest | 766-272-9964 | oreynolds@example.com | qrwl | 7dce9b688636ee212294c257dd2f6b85c7f65f2e <table_name> : Candidates col : candidate_id | candidate_details row 1 : 111 | Jane row 2 : 121 | Robert row 3 : 131 | Alex row 4 : 141 | Tao row 5 : 151 | Jack row 6 : 161 | Leo row 7 : 171 | Robin row 8 : 181 | Cindy
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\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c64c\"],[121,\"Virginie\",\"Jasmin\",\"Hartmann\",\"(508)319-2970x043\",\"boyer.lonie@example.com\",\"bkkv\",\"b063331ea8116befaa7b84c59c6a22200f5f8caa\"],[131,\"Dariana\",\"Hayley\",\"Bednar\",\"(262)347-9364x516\",\"leila14@example.net\",\"zops\",\"b20b6a9f24aadeda70d54e410c3219f61fb063fb\"],[141,\"Verna\",\"Arielle\",\"Grant\",\"1-372-548-7538x314\",\"adele.gibson@example.net\",\"uuol\",\"7be9c03d5467d563555c51ebb3eb78e7f90832ec\"],[151,\"Hoyt\",\"Mercedes\",\"Wintheiser\",\"1-603-110-0647\",\"stanley.monahan@example.org\",\"bnto\",\"c55795df86182959094b83e27900f7cf44ced570\"],[161,\"Mayra\",\"Haley\",\"Hartmann\",\"724-681-4161x51632\",\"terry.kuhlman@example.org\",\"rzxu\",\"ecae473cb54601e01457078ac0cdf4a1ced837bb\"],[171,\"Lizeth\",\"Bell\",\"Bartoletti\",\"812.228.0645x91481\",\"celestine11@example.net\",\"mkou\",\"76a93d1d3b7becc932d203beac61d064bd54e947\"],[181,\"Nova\",\"Amiya\",\"Feest\",\"766-272-9964\",\"oreynolds@example.com\",\"qrwl\",\"7dce9b688636ee212294c257dd2f6b85c7f65f2e\"]]}", "{\"columns\":[\"candidate_id\",\"candidate_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Jane\"],[121,\"Robert\"],[131,\"Alex\"],[141,\"Tao\"],[151,\"Jack\"],[161,\"Leo\"],[171,\"Robin\"],[181,\"Cindy\"]]}" ]
{"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 | 5e4ff49a61b3544da3ad7dc7e2cf28847564c64c row 2 : 121 | Virginie | Jasmin | Hartmann | (508)319-2970x043 | boyer.lonie@example.com | bkkv | b063331ea8116befaa7b84c59c6a22200f5f8caa row 3 : 131 | Dariana | Hayley | Bednar | (262)347-9364x516 | leila14@example.net | zops | b20b6a9f24aadeda70d54e410c3219f61fb063fb row 4 : 141 | Verna | Arielle | Grant | 1-372-548-7538x314 | adele.gibson@example.net | uuol | 7be9c03d5467d563555c51ebb3eb78e7f90832ec row 5 : 151 | Hoyt | Mercedes | Wintheiser | 1-603-110-0647 | stanley.monahan@example.org | bnto | c55795df86182959094b83e27900f7cf44ced570 row 6 : 161 | Mayra | Haley | Hartmann | 724-681-4161x51632 | terry.kuhlman@example.org | rzxu | ecae473cb54601e01457078ac0cdf4a1ced837bb row 7 : 171 | Lizeth | Bell | Bartoletti | 812.228.0645x91481 | celestine11@example.net | mkou | 76a93d1d3b7becc932d203beac61d064bd54e947 row 8 : 181 | Nova | Amiya | Feest | 766-272-9964 | oreynolds@example.com | qrwl | 7dce9b688636ee212294c257dd2f6b85c7f65f2e <table_name> : Candidates col : candidate_id | candidate_details row 1 : 111 | Jane row 2 : 121 | Robert row 3 : 131 | Alex row 4 : 141 | Tao row 5 : 151 | Jack row 6 : 161 | Leo row 7 : 171 | Robin row 8 : 181 | Cindy
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],\"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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 : 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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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],\"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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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_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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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:34 row 5 : 171 | 301 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}", "{\"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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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 | row 5 : 305 | data structure | data structure | row 6 : 306 | Art history | Art history | <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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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,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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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_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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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,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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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> : 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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}", "{\"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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 structure | row 6 : 306 | Art history | Art history | <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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}", "{\"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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 structure | row 6 : 306 | Art history | Art history | <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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}", "{\"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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 | data structure | row 6 : 306 | Art history | Art history | <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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}", "{\"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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 structure | data structure | row 6 : 306 | Art history | Art history | <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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c64c\"],[121,\"Virginie\",\"Jasmin\",\"Hartmann\",\"(508)319-2970x043\",\"boyer.lonie@example.com\",\"bkkv\",\"b063331ea8116befaa7b84c59c6a22200f5f8caa\"],[131,\"Dariana\",\"Hayley\",\"Bednar\",\"(262)347-9364x516\",\"leila14@example.net\",\"zops\",\"b20b6a9f24aadeda70d54e410c3219f61fb063fb\"],[141,\"Verna\",\"Arielle\",\"Grant\",\"1-372-548-7538x314\",\"adele.gibson@example.net\",\"uuol\",\"7be9c03d5467d563555c51ebb3eb78e7f90832ec\"],[151,\"Hoyt\",\"Mercedes\",\"Wintheiser\",\"1-603-110-0647\",\"stanley.monahan@example.org\",\"bnto\",\"c55795df86182959094b83e27900f7cf44ced570\"],[161,\"Mayra\",\"Haley\",\"Hartmann\",\"724-681-4161x51632\",\"terry.kuhlman@example.org\",\"rzxu\",\"ecae473cb54601e01457078ac0cdf4a1ced837bb\"],[171,\"Lizeth\",\"Bell\",\"Bartoletti\",\"812.228.0645x91481\",\"celestine11@example.net\",\"mkou\",\"76a93d1d3b7becc932d203beac61d064bd54e947\"],[181,\"Nova\",\"Amiya\",\"Feest\",\"766-272-9964\",\"oreynolds@example.com\",\"qrwl\",\"7dce9b688636ee212294c257dd2f6b85c7f65f2e\"]]}", "{\"columns\":[\"candidate_id\",\"candidate_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Jane\"],[121,\"Robert\"],[131,\"Alex\"],[141,\"Tao\"],[151,\"Jack\"],[161,\"Leo\"],[171,\"Robin\"],[181,\"Cindy\"]]}" ]
{"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 | 5e4ff49a61b3544da3ad7dc7e2cf28847564c64c row 2 : 121 | Virginie | Jasmin | Hartmann | (508)319-2970x043 | boyer.lonie@example.com | bkkv | b063331ea8116befaa7b84c59c6a22200f5f8caa row 3 : 131 | Dariana | Hayley | Bednar | (262)347-9364x516 | leila14@example.net | zops | b20b6a9f24aadeda70d54e410c3219f61fb063fb row 4 : 141 | Verna | Arielle | Grant | 1-372-548-7538x314 | adele.gibson@example.net | uuol | 7be9c03d5467d563555c51ebb3eb78e7f90832ec row 5 : 151 | Hoyt | Mercedes | Wintheiser | 1-603-110-0647 | stanley.monahan@example.org | bnto | c55795df86182959094b83e27900f7cf44ced570 row 6 : 161 | Mayra | Haley | Hartmann | 724-681-4161x51632 | terry.kuhlman@example.org | rzxu | ecae473cb54601e01457078ac0cdf4a1ced837bb row 7 : 171 | Lizeth | Bell | Bartoletti | 812.228.0645x91481 | celestine11@example.net | mkou | 76a93d1d3b7becc932d203beac61d064bd54e947 row 8 : 181 | Nova | Amiya | Feest | 766-272-9964 | oreynolds@example.com | qrwl | 7dce9b688636ee212294c257dd2f6b85c7f65f2e <table_name> : Candidates col : candidate_id | candidate_details row 1 : 111 | Jane row 2 : 121 | Robert row 3 : 131 | Alex row 4 : 141 | Tao row 5 : 151 | Jack row 6 : 161 | Leo row 7 : 171 | Robin row 8 : 181 | Cindy
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\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c64c\"],[121,\"Virginie\",\"Jasmin\",\"Hartmann\",\"(508)319-2970x043\",\"boyer.lonie@example.com\",\"bkkv\",\"b063331ea8116befaa7b84c59c6a22200f5f8caa\"],[131,\"Dariana\",\"Hayley\",\"Bednar\",\"(262)347-9364x516\",\"leila14@example.net\",\"zops\",\"b20b6a9f24aadeda70d54e410c3219f61fb063fb\"],[141,\"Verna\",\"Arielle\",\"Grant\",\"1-372-548-7538x314\",\"adele.gibson@example.net\",\"uuol\",\"7be9c03d5467d563555c51ebb3eb78e7f90832ec\"],[151,\"Hoyt\",\"Mercedes\",\"Wintheiser\",\"1-603-110-0647\",\"stanley.monahan@example.org\",\"bnto\",\"c55795df86182959094b83e27900f7cf44ced570\"],[161,\"Mayra\",\"Haley\",\"Hartmann\",\"724-681-4161x51632\",\"terry.kuhlman@example.org\",\"rzxu\",\"ecae473cb54601e01457078ac0cdf4a1ced837bb\"],[171,\"Lizeth\",\"Bell\",\"Bartoletti\",\"812.228.0645x91481\",\"celestine11@example.net\",\"mkou\",\"76a93d1d3b7becc932d203beac61d064bd54e947\"],[181,\"Nova\",\"Amiya\",\"Feest\",\"766-272-9964\",\"oreynolds@example.com\",\"qrwl\",\"7dce9b688636ee212294c257dd2f6b85c7f65f2e\"]]}", "{\"columns\":[\"candidate_id\",\"candidate_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Jane\"],[121,\"Robert\"],[131,\"Alex\"],[141,\"Tao\"],[151,\"Jack\"],[161,\"Leo\"],[171,\"Robin\"],[181,\"Cindy\"]]}" ]
{"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 | 5e4ff49a61b3544da3ad7dc7e2cf28847564c64c row 2 : 121 | Virginie | Jasmin | Hartmann | (508)319-2970x043 | boyer.lonie@example.com | bkkv | b063331ea8116befaa7b84c59c6a22200f5f8caa row 3 : 131 | Dariana | Hayley | Bednar | (262)347-9364x516 | leila14@example.net | zops | b20b6a9f24aadeda70d54e410c3219f61fb063fb row 4 : 141 | Verna | Arielle | Grant | 1-372-548-7538x314 | adele.gibson@example.net | uuol | 7be9c03d5467d563555c51ebb3eb78e7f90832ec row 5 : 151 | Hoyt | Mercedes | Wintheiser | 1-603-110-0647 | stanley.monahan@example.org | bnto | c55795df86182959094b83e27900f7cf44ced570 row 6 : 161 | Mayra | Haley | Hartmann | 724-681-4161x51632 | terry.kuhlman@example.org | rzxu | ecae473cb54601e01457078ac0cdf4a1ced837bb row 7 : 171 | Lizeth | Bell | Bartoletti | 812.228.0645x91481 | celestine11@example.net | mkou | 76a93d1d3b7becc932d203beac61d064bd54e947 row 8 : 181 | Nova | Amiya | Feest | 766-272-9964 | oreynolds@example.com | qrwl | 7dce9b688636ee212294c257dd2f6b85c7f65f2e <table_name> : Candidates col : candidate_id | candidate_details row 1 : 111 | Jane row 2 : 121 | Robert row 3 : 131 | Alex row 4 : 141 | Tao row 5 : 151 | Jack row 6 : 161 | Leo row 7 : 171 | Robin row 8 : 181 | Cindy
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,\"B\",\"2010-04-09 11:44:34\",\"Pass\"]]}" ]
{"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 : 141 | C | 2010-04-06 11:44:34 | Pass row 5 : 151 | B | 2010-04-09 11:44:34 | Pass
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,\"B\",\"2010-04-09 11:44:34\",\"Pass\"]]}" ]
{"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 row 4 : 141 | C | 2010-04-06 11:44:34 | Pass row 5 : 151 | B | 2010-04-09 11:44:34 | Pass
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,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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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_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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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,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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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> : 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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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,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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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_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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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,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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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_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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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\":[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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}", "{\"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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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 | Nancy <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 structure | row 6 : 306 | Art history | Art history | <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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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\":[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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}", "{\"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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}" ]
{"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> : 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 structure | row 6 : 306 | Art history | Art history | <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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13
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,\"B\",\"2010-04-09 11:44:34\",\"Pass\"]]}" ]
{"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 | 2010-04-06 11:44:34 | Pass row 5 : 151 | B | 2010-04-09 11:44:34 | Pass
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,\"B\",\"2010-04-09 11:44:34\",\"Pass\"]]}" ]
{"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 row 4 : 141 | C | 2010-04-06 11:44:34 | Pass row 5 : 151 | B | 2010-04-09 11:44:34 | Pass
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\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c64c\"],[121,\"Virginie\",\"Jasmin\",\"Hartmann\",\"(508)319-2970x043\",\"boyer.lonie@example.com\",\"bkkv\",\"b063331ea8116befaa7b84c59c6a22200f5f8caa\"],[131,\"Dariana\",\"Hayley\",\"Bednar\",\"(262)347-9364x516\",\"leila14@example.net\",\"zops\",\"b20b6a9f24aadeda70d54e410c3219f61fb063fb\"],[141,\"Verna\",\"Arielle\",\"Grant\",\"1-372-548-7538x314\",\"adele.gibson@example.net\",\"uuol\",\"7be9c03d5467d563555c51ebb3eb78e7f90832ec\"],[151,\"Hoyt\",\"Mercedes\",\"Wintheiser\",\"1-603-110-0647\",\"stanley.monahan@example.org\",\"bnto\",\"c55795df86182959094b83e27900f7cf44ced570\"],[161,\"Mayra\",\"Haley\",\"Hartmann\",\"724-681-4161x51632\",\"terry.kuhlman@example.org\",\"rzxu\",\"ecae473cb54601e01457078ac0cdf4a1ced837bb\"],[171,\"Lizeth\",\"Bell\",\"Bartoletti\",\"812.228.0645x91481\",\"celestine11@example.net\",\"mkou\",\"76a93d1d3b7becc932d203beac61d064bd54e947\"],[181,\"Nova\",\"Amiya\",\"Feest\",\"766-272-9964\",\"oreynolds@example.com\",\"qrwl\",\"7dce9b688636ee212294c257dd2f6b85c7f65f2e\"]]}", "{\"columns\":[\"candidate_id\",\"candidate_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Jane\"],[121,\"Robert\"],[131,\"Alex\"],[141,\"Tao\"],[151,\"Jack\"],[161,\"Leo\"],[171,\"Robin\"],[181,\"Cindy\"]]}", "{\"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,\"B\",\"2010-04-09 11:44:34\",\"Pass\"]]}" ]
{"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 | 5e4ff49a61b3544da3ad7dc7e2cf28847564c64c row 2 : 121 | Virginie | Jasmin | Hartmann | (508)319-2970x043 | boyer.lonie@example.com | bkkv | b063331ea8116befaa7b84c59c6a22200f5f8caa row 3 : 131 | Dariana | Hayley | Bednar | (262)347-9364x516 | leila14@example.net | zops | b20b6a9f24aadeda70d54e410c3219f61fb063fb row 4 : 141 | Verna | Arielle | Grant | 1-372-548-7538x314 | adele.gibson@example.net | uuol | 7be9c03d5467d563555c51ebb3eb78e7f90832ec row 5 : 151 | Hoyt | Mercedes | Wintheiser | 1-603-110-0647 | stanley.monahan@example.org | bnto | c55795df86182959094b83e27900f7cf44ced570 row 6 : 161 | Mayra | Haley | Hartmann | 724-681-4161x51632 | terry.kuhlman@example.org | rzxu | ecae473cb54601e01457078ac0cdf4a1ced837bb row 7 : 171 | Lizeth | Bell | Bartoletti | 812.228.0645x91481 | celestine11@example.net | mkou | 76a93d1d3b7becc932d203beac61d064bd54e947 row 8 : 181 | Nova | Amiya | Feest | 766-272-9964 | oreynolds@example.com | qrwl | 7dce9b688636ee212294c257dd2f6b85c7f65f2e <table_name> : Candidates col : candidate_id | candidate_details row 1 : 111 | Jane row 2 : 121 | Robert row 3 : 131 | Alex row 4 : 141 | Tao row 5 : 151 | Jack row 6 : 161 | Leo row 7 : 171 | Robin row 8 : 181 | Cindy <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 | 2010-04-06 11:44:34 | Pass row 5 : 151 | B | 2010-04-09 11:44:34 | Pass
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\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c64c\"],[121,\"Virginie\",\"Jasmin\",\"Hartmann\",\"(508)319-2970x043\",\"boyer.lonie@example.com\",\"bkkv\",\"b063331ea8116befaa7b84c59c6a22200f5f8caa\"],[131,\"Dariana\",\"Hayley\",\"Bednar\",\"(262)347-9364x516\",\"leila14@example.net\",\"zops\",\"b20b6a9f24aadeda70d54e410c3219f61fb063fb\"],[141,\"Verna\",\"Arielle\",\"Grant\",\"1-372-548-7538x314\",\"adele.gibson@example.net\",\"uuol\",\"7be9c03d5467d563555c51ebb3eb78e7f90832ec\"],[151,\"Hoyt\",\"Mercedes\",\"Wintheiser\",\"1-603-110-0647\",\"stanley.monahan@example.org\",\"bnto\",\"c55795df86182959094b83e27900f7cf44ced570\"],[161,\"Mayra\",\"Haley\",\"Hartmann\",\"724-681-4161x51632\",\"terry.kuhlman@example.org\",\"rzxu\",\"ecae473cb54601e01457078ac0cdf4a1ced837bb\"],[171,\"Lizeth\",\"Bell\",\"Bartoletti\",\"812.228.0645x91481\",\"celestine11@example.net\",\"mkou\",\"76a93d1d3b7becc932d203beac61d064bd54e947\"],[181,\"Nova\",\"Amiya\",\"Feest\",\"766-272-9964\",\"oreynolds@example.com\",\"qrwl\",\"7dce9b688636ee212294c257dd2f6b85c7f65f2e\"]]}", "{\"columns\":[\"candidate_id\",\"candidate_details\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[111,\"Jane\"],[121,\"Robert\"],[131,\"Alex\"],[141,\"Tao\"],[151,\"Jack\"],[161,\"Leo\"],[171,\"Robin\"],[181,\"Cindy\"]]}", "{\"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,\"B\",\"2010-04-09 11:44:34\",\"Pass\"]]}" ]
{"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 | pgub | 5e4ff49a61b3544da3ad7dc7e2cf28847564c64c row 2 : 121 | Virginie | Jasmin | Hartmann | (508)319-2970x043 | boyer.lonie@example.com | bkkv | b063331ea8116befaa7b84c59c6a22200f5f8caa row 3 : 131 | Dariana | Hayley | Bednar | (262)347-9364x516 | leila14@example.net | zops | b20b6a9f24aadeda70d54e410c3219f61fb063fb row 4 : 141 | Verna | Arielle | Grant | 1-372-548-7538x314 | adele.gibson@example.net | uuol | 7be9c03d5467d563555c51ebb3eb78e7f90832ec row 5 : 151 | Hoyt | Mercedes | Wintheiser | 1-603-110-0647 | stanley.monahan@example.org | bnto | c55795df86182959094b83e27900f7cf44ced570 row 6 : 161 | Mayra | Haley | Hartmann | 724-681-4161x51632 | terry.kuhlman@example.org | rzxu | ecae473cb54601e01457078ac0cdf4a1ced837bb row 7 : 171 | Lizeth | Bell | Bartoletti | 812.228.0645x91481 | celestine11@example.net | mkou | 76a93d1d3b7becc932d203beac61d064bd54e947 row 8 : 181 | Nova | Amiya | Feest | 766-272-9964 | oreynolds@example.com | qrwl | 7dce9b688636ee212294c257dd2f6b85c7f65f2e <table_name> : Candidates col : candidate_id | candidate_details row 1 : 111 | Jane row 2 : 121 | Robert row 3 : 131 | Alex row 4 : 141 | Tao row 5 : 151 | Jack row 6 : 161 | Leo row 7 : 171 | Robin row 8 : 181 | Cindy <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 | 2010-04-06 11:44:34 | Pass row 5 : 151 | B | 2010-04-09 11:44:34 | Pass
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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 | 301 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 : 171 | 301 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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:34 row 5 : 171 | 301 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 11:44:34 row 5 : 171 | 301 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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\\nLake Harmonyhaven, VA 65235\",\"Apt. 163\",\"South Minnie\",\"716\",\"Texas\",\"USA\"],[29,\"28550 Broderick Underpass Suite 667\\nZakaryhaven, WY 22945-1534\",\"Apt. 419\",\"North Trystanborough\",\"112\",\"Vermont\",\"USA\"],[30,\"83706 Ana Trafficway Apt. 992\\nWest Jarret, MI 01112\",\"Apt. 884\",\"Lake Kaley\",\"431\",\"Washington\",\"USA\"],[43,\"69165 Beatty Station\\nHaleighstad, MS 55164\",\"Suite 333\",\"Stephaniemouth\",\"559\",\"Massachusetts\",\"USA\"],[45,\"242 Pacocha Streets\\nEast Isabellashire, ND 03506\",\"Suite 370\",\"O'Connellview\",\"514\",\"NewMexico\",\"USA\"],[55,\"801 Modesto Island Suite 306\\nLacyville, VT 34059\",\"Suite 764\",\"New Alta\",\"176\",\"Mississippi\",\"USA\"],[63,\"0177 Fisher Dam\\nBerniershire, KS 00038-7574\",\"Apt. 903\",\"South Keenan\",\"613\",\"Michigan\",\"USA\"],[68,\"09471 Hickle Light\\nPort Maxime, NJ 91550-5409\",\"Suite 903\",\"Hannahside\",\"354\",\"Connecticut\",\"USA\"],[73,\"67831 Lavonne Lodge\\nOlsontown, DC 20894\",\"Apt. 756\",\"Alizeshire\",\"687\",\"NewMexico\",\"USA\"],[82,\"228 Fahey Land\\nBaileymouth, FL 06297-5606\",\"Suite 087\",\"South Naomibury\",\"079\",\"Ohio\",\"USA\"],[88,\"1770 Adriel Ramp Apt. 397\\nWest Ashlynnchester, UT 91968\",\"Apt. 617\",\"East Tavaresburgh\",\"179\",\"SouthDakota\",\"USA\"],[92,\"8760 Eldon Squares Suite 260\\nMarquisestad, GA 38537\",\"Apt. 435\",\"Lake Devon\",\"244\",\"SouthDakota\",\"USA\"],[94,\"8263 Abbott Crossing Apt. 066\\nOberbrunnerbury, LA 67451\",\"Apt. 626\",\"Boyleshire\",\"536\",\"Kansas\",\"USA\"],[99,\"521 Paucek Field\\nNorth Oscartown, WI 31527\",\"Apt. 849\",\"Terencetown\",\"979\",\"Michigan\",\"USA\"]]}", "{\"columns\":[\"person_address_id\",\"person_id\",\"address_id\",\"date_from\",\"date_to\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[122,111,9,\"2012-09-26 13:21:00\",\"2018-03-21 09:46:30\"],[257,121,5,\"2008-07-31 02:17:25\",\"2018-03-09 02:11:12\"],[269,131,88,\"2008-05-26 20:43:41\",\"2018-03-11 20:26:41\"],[276,141,99,\"2014-05-10 00:32:31\",\"2018-03-08 06:16:47\"],[281,151,92,\"2010-11-26 05:21:12\",\"2018-03-12 21:10:02\"],[340,161,45,\"2017-05-01 17:32:26\",\"2018-03-09 08:45:06\"],[363,171,55,\"2015-05-24 16:14:12\",\"2018-02-23 22:44:18\"],[396,181,82,\"2013-12-26 16:57:01\",\"2018-03-03 16:06:17\"]]}" ]
{"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, VA 65235 | Apt. 163 | South Minnie | 716 | Texas | USA row 3 : 29 | 28550 Broderick Underpass Suite 667 Zakaryhaven, WY 22945-1534 | Apt. 419 | North Trystanborough | 112 | Vermont | USA row 4 : 30 | 83706 Ana Trafficway Apt. 992 West Jarret, MI 01112 | Apt. 884 | Lake Kaley | 431 | Washington | USA row 5 : 43 | 69165 Beatty Station Haleighstad, MS 55164 | Suite 333 | Stephaniemouth | 559 | Massachusetts | USA row 6 : 45 | 242 Pacocha Streets East Isabellashire, ND 03506 | Suite 370 | O'Connellview | 514 | NewMexico | USA row 7 : 55 | 801 Modesto Island Suite 306 Lacyville, VT 34059 | Suite 764 | New Alta | 176 | Mississippi | USA row 8 : 63 | 0177 Fisher Dam Berniershire, KS 00038-7574 | Apt. 903 | South Keenan | 613 | Michigan | USA row 9 : 68 | 09471 Hickle Light Port Maxime, NJ 91550-5409 | Suite 903 | Hannahside | 354 | Connecticut | USA row 10 : 73 | 67831 Lavonne Lodge Olsontown, DC 20894 | Apt. 756 | Alizeshire | 687 | NewMexico | USA row 11 : 82 | 228 Fahey Land Baileymouth, FL 06297-5606 | Suite 087 | South Naomibury | 79 | Ohio | USA row 12 : 88 | 1770 Adriel Ramp Apt. 397 West Ashlynnchester, UT 91968 | Apt. 617 | East Tavaresburgh | 179 | SouthDakota | USA row 13 : 92 | 8760 Eldon Squares Suite 260 Marquisestad, GA 38537 | Apt. 435 | Lake Devon | 244 | SouthDakota | USA row 14 : 94 | 8263 Abbott Crossing Apt. 066 Oberbrunnerbury, LA 67451 | Apt. 626 | Boyleshire | 536 | Kansas | USA row 15 : 99 | 521 Paucek Field North Oscartown, WI 31527 | Apt. 849 | Terencetown | 979 | Michigan | USA <table_name> : People_Addresses col : person_address_id | person_id | address_id | date_from | date_to row 1 : 122 | 111 | 9 | 2012-09-26 13:21:00 | 2018-03-21 09:46:30 row 2 : 257 | 121 | 5 | 2008-07-31 02:17:25 | 2018-03-09 02:11:12 row 3 : 269 | 131 | 88 | 2008-05-26 20:43:41 | 2018-03-11 20:26:41 row 4 : 276 | 141 | 99 | 2014-05-10 00:32:31 | 2018-03-08 06:16:47 row 5 : 281 | 151 | 92 | 2010-11-26 05:21:12 | 2018-03-12 21:10:02 row 6 : 340 | 161 | 45 | 2017-05-01 17:32:26 | 2018-03-09 08:45:06 row 7 : 363 | 171 | 55 | 2015-05-24 16:14:12 | 2018-02-23 22:44:18 row 8 : 396 | 181 | 82 | 2013-12-26 16:57:01 | 2018-03-03 16:06:17
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\\nLake Harmonyhaven, VA 65235\",\"Apt. 163\",\"South Minnie\",\"716\",\"Texas\",\"USA\"],[29,\"28550 Broderick Underpass Suite 667\\nZakaryhaven, WY 22945-1534\",\"Apt. 419\",\"North Trystanborough\",\"112\",\"Vermont\",\"USA\"],[30,\"83706 Ana Trafficway Apt. 992\\nWest Jarret, MI 01112\",\"Apt. 884\",\"Lake Kaley\",\"431\",\"Washington\",\"USA\"],[43,\"69165 Beatty Station\\nHaleighstad, MS 55164\",\"Suite 333\",\"Stephaniemouth\",\"559\",\"Massachusetts\",\"USA\"],[45,\"242 Pacocha Streets\\nEast Isabellashire, ND 03506\",\"Suite 370\",\"O'Connellview\",\"514\",\"NewMexico\",\"USA\"],[55,\"801 Modesto Island Suite 306\\nLacyville, VT 34059\",\"Suite 764\",\"New Alta\",\"176\",\"Mississippi\",\"USA\"],[63,\"0177 Fisher Dam\\nBerniershire, KS 00038-7574\",\"Apt. 903\",\"South Keenan\",\"613\",\"Michigan\",\"USA\"],[68,\"09471 Hickle Light\\nPort Maxime, NJ 91550-5409\",\"Suite 903\",\"Hannahside\",\"354\",\"Connecticut\",\"USA\"],[73,\"67831 Lavonne Lodge\\nOlsontown, DC 20894\",\"Apt. 756\",\"Alizeshire\",\"687\",\"NewMexico\",\"USA\"],[82,\"228 Fahey Land\\nBaileymouth, FL 06297-5606\",\"Suite 087\",\"South Naomibury\",\"079\",\"Ohio\",\"USA\"],[88,\"1770 Adriel Ramp Apt. 397\\nWest Ashlynnchester, UT 91968\",\"Apt. 617\",\"East Tavaresburgh\",\"179\",\"SouthDakota\",\"USA\"],[92,\"8760 Eldon Squares Suite 260\\nMarquisestad, GA 38537\",\"Apt. 435\",\"Lake Devon\",\"244\",\"SouthDakota\",\"USA\"],[94,\"8263 Abbott Crossing Apt. 066\\nOberbrunnerbury, LA 67451\",\"Apt. 626\",\"Boyleshire\",\"536\",\"Kansas\",\"USA\"],[99,\"521 Paucek Field\\nNorth Oscartown, WI 31527\",\"Apt. 849\",\"Terencetown\",\"979\",\"Michigan\",\"USA\"]]}", "{\"columns\":[\"person_address_id\",\"person_id\",\"address_id\",\"date_from\",\"date_to\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[122,111,9,\"2012-09-26 13:21:00\",\"2018-03-21 09:46:30\"],[257,121,5,\"2008-07-31 02:17:25\",\"2018-03-09 02:11:12\"],[269,131,88,\"2008-05-26 20:43:41\",\"2018-03-11 20:26:41\"],[276,141,99,\"2014-05-10 00:32:31\",\"2018-03-08 06:16:47\"],[281,151,92,\"2010-11-26 05:21:12\",\"2018-03-12 21:10:02\"],[340,161,45,\"2017-05-01 17:32:26\",\"2018-03-09 08:45:06\"],[363,171,55,\"2015-05-24 16:14:12\",\"2018-02-23 22:44:18\"],[396,181,82,\"2013-12-26 16:57:01\",\"2018-03-03 16:06:17\"]]}" ]
{"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 Harmonyhaven, VA 65235 | Apt. 163 | South Minnie | 716 | Texas | USA row 3 : 29 | 28550 Broderick Underpass Suite 667 Zakaryhaven, WY 22945-1534 | Apt. 419 | North Trystanborough | 112 | Vermont | USA row 4 : 30 | 83706 Ana Trafficway Apt. 992 West Jarret, MI 01112 | Apt. 884 | Lake Kaley | 431 | Washington | USA row 5 : 43 | 69165 Beatty Station Haleighstad, MS 55164 | Suite 333 | Stephaniemouth | 559 | Massachusetts | USA row 6 : 45 | 242 Pacocha Streets East Isabellashire, ND 03506 | Suite 370 | O'Connellview | 514 | NewMexico | USA row 7 : 55 | 801 Modesto Island Suite 306 Lacyville, VT 34059 | Suite 764 | New Alta | 176 | Mississippi | USA row 8 : 63 | 0177 Fisher Dam Berniershire, KS 00038-7574 | Apt. 903 | South Keenan | 613 | Michigan | USA row 9 : 68 | 09471 Hickle Light Port Maxime, NJ 91550-5409 | Suite 903 | Hannahside | 354 | Connecticut | USA row 10 : 73 | 67831 Lavonne Lodge Olsontown, DC 20894 | Apt. 756 | Alizeshire | 687 | NewMexico | USA row 11 : 82 | 228 Fahey Land Baileymouth, FL 06297-5606 | Suite 087 | South Naomibury | 79 | Ohio | USA row 12 : 88 | 1770 Adriel Ramp Apt. 397 West Ashlynnchester, UT 91968 | Apt. 617 | East Tavaresburgh | 179 | SouthDakota | USA row 13 : 92 | 8760 Eldon Squares Suite 260 Marquisestad, GA 38537 | Apt. 435 | Lake Devon | 244 | SouthDakota | USA row 14 : 94 | 8263 Abbott Crossing Apt. 066 Oberbrunnerbury, LA 67451 | Apt. 626 | Boyleshire | 536 | Kansas | USA row 15 : 99 | 521 Paucek Field North Oscartown, WI 31527 | Apt. 849 | Terencetown | 979 | Michigan | USA <table_name> : People_Addresses col : person_address_id | person_id | address_id | date_from | date_to row 1 : 122 | 111 | 9 | 2012-09-26 13:21:00 | 2018-03-21 09:46:30 row 2 : 257 | 121 | 5 | 2008-07-31 02:17:25 | 2018-03-09 02:11:12 row 3 : 269 | 131 | 88 | 2008-05-26 20:43:41 | 2018-03-11 20:26:41 row 4 : 276 | 141 | 99 | 2014-05-10 00:32:31 | 2018-03-08 06:16:47 row 5 : 281 | 151 | 92 | 2010-11-26 05:21:12 | 2018-03-12 21:10:02 row 6 : 340 | 161 | 45 | 2017-05-01 17:32:26 | 2018-03-09 08:45:06 row 7 : 363 | 171 | 55 | 2015-05-24 16:14:12 | 2018-02-23 22:44:18 row 8 : 396 | 181 | 82 | 2013-12-26 16:57:01 | 2018-03-03 16:06:17
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\\nLake Harmonyhaven, VA 65235\",\"Apt. 163\",\"South Minnie\",\"716\",\"Texas\",\"USA\"],[29,\"28550 Broderick Underpass Suite 667\\nZakaryhaven, WY 22945-1534\",\"Apt. 419\",\"North Trystanborough\",\"112\",\"Vermont\",\"USA\"],[30,\"83706 Ana Trafficway Apt. 992\\nWest Jarret, MI 01112\",\"Apt. 884\",\"Lake Kaley\",\"431\",\"Washington\",\"USA\"],[43,\"69165 Beatty Station\\nHaleighstad, MS 55164\",\"Suite 333\",\"Stephaniemouth\",\"559\",\"Massachusetts\",\"USA\"],[45,\"242 Pacocha Streets\\nEast Isabellashire, ND 03506\",\"Suite 370\",\"O'Connellview\",\"514\",\"NewMexico\",\"USA\"],[55,\"801 Modesto Island Suite 306\\nLacyville, VT 34059\",\"Suite 764\",\"New Alta\",\"176\",\"Mississippi\",\"USA\"],[63,\"0177 Fisher Dam\\nBerniershire, KS 00038-7574\",\"Apt. 903\",\"South Keenan\",\"613\",\"Michigan\",\"USA\"],[68,\"09471 Hickle Light\\nPort Maxime, NJ 91550-5409\",\"Suite 903\",\"Hannahside\",\"354\",\"Connecticut\",\"USA\"],[73,\"67831 Lavonne Lodge\\nOlsontown, DC 20894\",\"Apt. 756\",\"Alizeshire\",\"687\",\"NewMexico\",\"USA\"],[82,\"228 Fahey Land\\nBaileymouth, FL 06297-5606\",\"Suite 087\",\"South Naomibury\",\"079\",\"Ohio\",\"USA\"],[88,\"1770 Adriel Ramp Apt. 397\\nWest Ashlynnchester, UT 91968\",\"Apt. 617\",\"East Tavaresburgh\",\"179\",\"SouthDakota\",\"USA\"],[92,\"8760 Eldon Squares Suite 260\\nMarquisestad, GA 38537\",\"Apt. 435\",\"Lake Devon\",\"244\",\"SouthDakota\",\"USA\"],[94,\"8263 Abbott Crossing Apt. 066\\nOberbrunnerbury, LA 67451\",\"Apt. 626\",\"Boyleshire\",\"536\",\"Kansas\",\"USA\"],[99,\"521 Paucek Field\\nNorth Oscartown, WI 31527\",\"Apt. 849\",\"Terencetown\",\"979\",\"Michigan\",\"USA\"]]}", "{\"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\":[\"person_address_id\",\"person_id\",\"address_id\",\"date_from\",\"date_to\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[122,111,9,\"2012-09-26 13:21:00\",\"2018-03-21 09:46:30\"],[257,121,5,\"2008-07-31 02:17:25\",\"2018-03-09 02:11:12\"],[269,131,88,\"2008-05-26 20:43:41\",\"2018-03-11 20:26:41\"],[276,141,99,\"2014-05-10 00:32:31\",\"2018-03-08 06:16:47\"],[281,151,92,\"2010-11-26 05:21:12\",\"2018-03-12 21:10:02\"],[340,161,45,\"2017-05-01 17:32:26\",\"2018-03-09 08:45:06\"],[363,171,55,\"2015-05-24 16:14:12\",\"2018-02-23 22:44:18\"],[396,181,82,\"2013-12-26 16:57:01\",\"2018-03-03 16:06:17\"]]}" ]
{"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, VA 65235 | Apt. 163 | South Minnie | 716 | Texas | USA row 3 : 29 | 28550 Broderick Underpass Suite 667 Zakaryhaven, WY 22945-1534 | Apt. 419 | North Trystanborough | 112 | Vermont | USA row 4 : 30 | 83706 Ana Trafficway Apt. 992 West Jarret, MI 01112 | Apt. 884 | Lake Kaley | 431 | Washington | USA row 5 : 43 | 69165 Beatty Station Haleighstad, MS 55164 | Suite 333 | Stephaniemouth | 559 | Massachusetts | USA row 6 : 45 | 242 Pacocha Streets East Isabellashire, ND 03506 | Suite 370 | O'Connellview | 514 | NewMexico | USA row 7 : 55 | 801 Modesto Island Suite 306 Lacyville, VT 34059 | Suite 764 | New Alta | 176 | Mississippi | USA row 8 : 63 | 0177 Fisher Dam Berniershire, KS 00038-7574 | Apt. 903 | South Keenan | 613 | Michigan | USA row 9 : 68 | 09471 Hickle Light Port Maxime, NJ 91550-5409 | Suite 903 | Hannahside | 354 | Connecticut | USA row 10 : 73 | 67831 Lavonne Lodge Olsontown, DC 20894 | Apt. 756 | Alizeshire | 687 | NewMexico | USA row 11 : 82 | 228 Fahey Land Baileymouth, FL 06297-5606 | Suite 087 | South Naomibury | 79 | Ohio | USA row 12 : 88 | 1770 Adriel Ramp Apt. 397 West Ashlynnchester, UT 91968 | Apt. 617 | East Tavaresburgh | 179 | SouthDakota | USA row 13 : 92 | 8760 Eldon Squares Suite 260 Marquisestad, GA 38537 | Apt. 435 | Lake Devon | 244 | SouthDakota | USA row 14 : 94 | 8263 Abbott Crossing Apt. 066 Oberbrunnerbury, LA 67451 | Apt. 626 | Boyleshire | 536 | Kansas | USA row 15 : 99 | 521 Paucek Field North Oscartown, WI 31527 | Apt. 849 | Terencetown | 979 | Michigan | USA <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> : People_Addresses col : person_address_id | person_id | address_id | date_from | date_to row 1 : 122 | 111 | 9 | 2012-09-26 13:21:00 | 2018-03-21 09:46:30 row 2 : 257 | 121 | 5 | 2008-07-31 02:17:25 | 2018-03-09 02:11:12 row 3 : 269 | 131 | 88 | 2008-05-26 20:43:41 | 2018-03-11 20:26:41 row 4 : 276 | 141 | 99 | 2014-05-10 00:32:31 | 2018-03-08 06:16:47 row 5 : 281 | 151 | 92 | 2010-11-26 05:21:12 | 2018-03-12 21:10:02 row 6 : 340 | 161 | 45 | 2017-05-01 17:32:26 | 2018-03-09 08:45:06 row 7 : 363 | 171 | 55 | 2015-05-24 16:14:12 | 2018-02-23 22:44:18 row 8 : 396 | 181 | 82 | 2013-12-26 16:57:01 | 2018-03-03 16:06:17
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\\nLake Harmonyhaven, VA 65235\",\"Apt. 163\",\"South Minnie\",\"716\",\"Texas\",\"USA\"],[29,\"28550 Broderick Underpass Suite 667\\nZakaryhaven, WY 22945-1534\",\"Apt. 419\",\"North Trystanborough\",\"112\",\"Vermont\",\"USA\"],[30,\"83706 Ana Trafficway Apt. 992\\nWest Jarret, MI 01112\",\"Apt. 884\",\"Lake Kaley\",\"431\",\"Washington\",\"USA\"],[43,\"69165 Beatty Station\\nHaleighstad, MS 55164\",\"Suite 333\",\"Stephaniemouth\",\"559\",\"Massachusetts\",\"USA\"],[45,\"242 Pacocha Streets\\nEast Isabellashire, ND 03506\",\"Suite 370\",\"O'Connellview\",\"514\",\"NewMexico\",\"USA\"],[55,\"801 Modesto Island Suite 306\\nLacyville, VT 34059\",\"Suite 764\",\"New Alta\",\"176\",\"Mississippi\",\"USA\"],[63,\"0177 Fisher Dam\\nBerniershire, KS 00038-7574\",\"Apt. 903\",\"South Keenan\",\"613\",\"Michigan\",\"USA\"],[68,\"09471 Hickle Light\\nPort Maxime, NJ 91550-5409\",\"Suite 903\",\"Hannahside\",\"354\",\"Connecticut\",\"USA\"],[73,\"67831 Lavonne Lodge\\nOlsontown, DC 20894\",\"Apt. 756\",\"Alizeshire\",\"687\",\"NewMexico\",\"USA\"],[82,\"228 Fahey Land\\nBaileymouth, FL 06297-5606\",\"Suite 087\",\"South Naomibury\",\"079\",\"Ohio\",\"USA\"],[88,\"1770 Adriel Ramp Apt. 397\\nWest Ashlynnchester, UT 91968\",\"Apt. 617\",\"East Tavaresburgh\",\"179\",\"SouthDakota\",\"USA\"],[92,\"8760 Eldon Squares Suite 260\\nMarquisestad, GA 38537\",\"Apt. 435\",\"Lake Devon\",\"244\",\"SouthDakota\",\"USA\"],[94,\"8263 Abbott Crossing Apt. 066\\nOberbrunnerbury, LA 67451\",\"Apt. 626\",\"Boyleshire\",\"536\",\"Kansas\",\"USA\"],[99,\"521 Paucek Field\\nNorth Oscartown, WI 31527\",\"Apt. 849\",\"Terencetown\",\"979\",\"Michigan\",\"USA\"]]}", "{\"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\":[\"person_address_id\",\"person_id\",\"address_id\",\"date_from\",\"date_to\"],\"index\":[0,1,2,3,4,5,6,7],\"data\":[[122,111,9,\"2012-09-26 13:21:00\",\"2018-03-21 09:46:30\"],[257,121,5,\"2008-07-31 02:17:25\",\"2018-03-09 02:11:12\"],[269,131,88,\"2008-05-26 20:43:41\",\"2018-03-11 20:26:41\"],[276,141,99,\"2014-05-10 00:32:31\",\"2018-03-08 06:16:47\"],[281,151,92,\"2010-11-26 05:21:12\",\"2018-03-12 21:10:02\"],[340,161,45,\"2017-05-01 17:32:26\",\"2018-03-09 08:45:06\"],[363,171,55,\"2015-05-24 16:14:12\",\"2018-02-23 22:44:18\"],[396,181,82,\"2013-12-26 16:57:01\",\"2018-03-03 16:06:17\"]]}" ]
{"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 Harmonyhaven, VA 65235 | Apt. 163 | South Minnie | 716 | Texas | USA row 3 : 29 | 28550 Broderick Underpass Suite 667 Zakaryhaven, WY 22945-1534 | Apt. 419 | North Trystanborough | 112 | Vermont | USA row 4 : 30 | 83706 Ana Trafficway Apt. 992 West Jarret, MI 01112 | Apt. 884 | Lake Kaley | 431 | Washington | USA row 5 : 43 | 69165 Beatty Station Haleighstad, MS 55164 | Suite 333 | Stephaniemouth | 559 | Massachusetts | USA row 6 : 45 | 242 Pacocha Streets East Isabellashire, ND 03506 | Suite 370 | O'Connellview | 514 | NewMexico | USA row 7 : 55 | 801 Modesto Island Suite 306 Lacyville, VT 34059 | Suite 764 | New Alta | 176 | Mississippi | USA row 8 : 63 | 0177 Fisher Dam Berniershire, KS 00038-7574 | Apt. 903 | South Keenan | 613 | Michigan | USA row 9 : 68 | 09471 Hickle Light Port Maxime, NJ 91550-5409 | Suite 903 | Hannahside | 354 | Connecticut | USA row 10 : 73 | 67831 Lavonne Lodge Olsontown, DC 20894 | Apt. 756 | Alizeshire | 687 | NewMexico | USA row 11 : 82 | 228 Fahey Land Baileymouth, FL 06297-5606 | Suite 087 | South Naomibury | 79 | Ohio | USA row 12 : 88 | 1770 Adriel Ramp Apt. 397 West Ashlynnchester, UT 91968 | Apt. 617 | East Tavaresburgh | 179 | SouthDakota | USA row 13 : 92 | 8760 Eldon Squares Suite 260 Marquisestad, GA 38537 | Apt. 435 | Lake Devon | 244 | SouthDakota | USA row 14 : 94 | 8263 Abbott Crossing Apt. 066 Oberbrunnerbury, LA 67451 | Apt. 626 | Boyleshire | 536 | Kansas | USA row 15 : 99 | 521 Paucek Field North Oscartown, WI 31527 | Apt. 849 | Terencetown | 979 | Michigan | USA <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> : People_Addresses col : person_address_id | person_id | address_id | date_from | date_to row 1 : 122 | 111 | 9 | 2012-09-26 13:21:00 | 2018-03-21 09:46:30 row 2 : 257 | 121 | 5 | 2008-07-31 02:17:25 | 2018-03-09 02:11:12 row 3 : 269 | 131 | 88 | 2008-05-26 20:43:41 | 2018-03-11 20:26:41 row 4 : 276 | 141 | 99 | 2014-05-10 00:32:31 | 2018-03-08 06:16:47 row 5 : 281 | 151 | 92 | 2010-11-26 05:21:12 | 2018-03-12 21:10:02 row 6 : 340 | 161 | 45 | 2017-05-01 17:32:26 | 2018-03-09 08:45:06 row 7 : 363 | 171 | 55 | 2015-05-24 16:14:12 | 2018-02-23 22:44:18 row 8 : 396 | 181 | 82 | 2013-12-26 16:57:01 | 2018-03-03 16:06:17
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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}" ]
{"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 structure | row 6 : 306 | Art history | Art history |
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\",\"data structure\",null],[\"306\",\"Art history\",\"Art history\",null]]}" ]
{"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 structure | data structure | row 6 : 306 | Art history | Art history |
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\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c64c\"],[121,\"Virginie\",\"Jasmin\",\"Hartmann\",\"(508)319-2970x043\",\"boyer.lonie@example.com\",\"bkkv\",\"b063331ea8116befaa7b84c59c6a22200f5f8caa\"],[131,\"Dariana\",\"Hayley\",\"Bednar\",\"(262)347-9364x516\",\"leila14@example.net\",\"zops\",\"b20b6a9f24aadeda70d54e410c3219f61fb063fb\"],[141,\"Verna\",\"Arielle\",\"Grant\",\"1-372-548-7538x314\",\"adele.gibson@example.net\",\"uuol\",\"7be9c03d5467d563555c51ebb3eb78e7f90832ec\"],[151,\"Hoyt\",\"Mercedes\",\"Wintheiser\",\"1-603-110-0647\",\"stanley.monahan@example.org\",\"bnto\",\"c55795df86182959094b83e27900f7cf44ced570\"],[161,\"Mayra\",\"Haley\",\"Hartmann\",\"724-681-4161x51632\",\"terry.kuhlman@example.org\",\"rzxu\",\"ecae473cb54601e01457078ac0cdf4a1ced837bb\"],[171,\"Lizeth\",\"Bell\",\"Bartoletti\",\"812.228.0645x91481\",\"celestine11@example.net\",\"mkou\",\"76a93d1d3b7becc932d203beac61d064bd54e947\"],[181,\"Nova\",\"Amiya\",\"Feest\",\"766-272-9964\",\"oreynolds@example.com\",\"qrwl\",\"7dce9b688636ee212294c257dd2f6b85c7f65f2e\"]]}" ]
{"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 | 5e4ff49a61b3544da3ad7dc7e2cf28847564c64c row 2 : 121 | Virginie | Jasmin | Hartmann | (508)319-2970x043 | boyer.lonie@example.com | bkkv | b063331ea8116befaa7b84c59c6a22200f5f8caa row 3 : 131 | Dariana | Hayley | Bednar | (262)347-9364x516 | leila14@example.net | zops | b20b6a9f24aadeda70d54e410c3219f61fb063fb row 4 : 141 | Verna | Arielle | Grant | 1-372-548-7538x314 | adele.gibson@example.net | uuol | 7be9c03d5467d563555c51ebb3eb78e7f90832ec row 5 : 151 | Hoyt | Mercedes | Wintheiser | 1-603-110-0647 | stanley.monahan@example.org | bnto | c55795df86182959094b83e27900f7cf44ced570 row 6 : 161 | Mayra | Haley | Hartmann | 724-681-4161x51632 | terry.kuhlman@example.org | rzxu | ecae473cb54601e01457078ac0cdf4a1ced837bb row 7 : 171 | Lizeth | Bell | Bartoletti | 812.228.0645x91481 | celestine11@example.net | mkou | 76a93d1d3b7becc932d203beac61d064bd54e947 row 8 : 181 | Nova | Amiya | Feest | 766-272-9964 | oreynolds@example.com | qrwl | 7dce9b688636ee212294c257dd2f6b85c7f65f2e
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\",\"5e4ff49a61b3544da3ad7dc7e2cf28847564c64c\"],[121,\"Virginie\",\"Jasmin\",\"Hartmann\",\"(508)319-2970x043\",\"boyer.lonie@example.com\",\"bkkv\",\"b063331ea8116befaa7b84c59c6a22200f5f8caa\"],[131,\"Dariana\",\"Hayley\",\"Bednar\",\"(262)347-9364x516\",\"leila14@example.net\",\"zops\",\"b20b6a9f24aadeda70d54e410c3219f61fb063fb\"],[141,\"Verna\",\"Arielle\",\"Grant\",\"1-372-548-7538x314\",\"adele.gibson@example.net\",\"uuol\",\"7be9c03d5467d563555c51ebb3eb78e7f90832ec\"],[151,\"Hoyt\",\"Mercedes\",\"Wintheiser\",\"1-603-110-0647\",\"stanley.monahan@example.org\",\"bnto\",\"c55795df86182959094b83e27900f7cf44ced570\"],[161,\"Mayra\",\"Haley\",\"Hartmann\",\"724-681-4161x51632\",\"terry.kuhlman@example.org\",\"rzxu\",\"ecae473cb54601e01457078ac0cdf4a1ced837bb\"],[171,\"Lizeth\",\"Bell\",\"Bartoletti\",\"812.228.0645x91481\",\"celestine11@example.net\",\"mkou\",\"76a93d1d3b7becc932d203beac61d064bd54e947\"],[181,\"Nova\",\"Amiya\",\"Feest\",\"766-272-9964\",\"oreynolds@example.com\",\"qrwl\",\"7dce9b688636ee212294c257dd2f6b85c7f65f2e\"]]}" ]
{"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 | 5e4ff49a61b3544da3ad7dc7e2cf28847564c64c row 2 : 121 | Virginie | Jasmin | Hartmann | (508)319-2970x043 | boyer.lonie@example.com | bkkv | b063331ea8116befaa7b84c59c6a22200f5f8caa row 3 : 131 | Dariana | Hayley | Bednar | (262)347-9364x516 | leila14@example.net | zops | b20b6a9f24aadeda70d54e410c3219f61fb063fb row 4 : 141 | Verna | Arielle | Grant | 1-372-548-7538x314 | adele.gibson@example.net | uuol | 7be9c03d5467d563555c51ebb3eb78e7f90832ec row 5 : 151 | Hoyt | Mercedes | Wintheiser | 1-603-110-0647 | stanley.monahan@example.org | bnto | c55795df86182959094b83e27900f7cf44ced570 row 6 : 161 | Mayra | Haley | Hartmann | 724-681-4161x51632 | terry.kuhlman@example.org | rzxu | ecae473cb54601e01457078ac0cdf4a1ced837bb row 7 : 171 | Lizeth | Bell | Bartoletti | 812.228.0645x91481 | celestine11@example.net | mkou | 76a93d1d3b7becc932d203beac61d064bd54e947 row 8 : 181 | Nova | Amiya | Feest | 766-272-9964 | oreynolds@example.com | qrwl | 7dce9b688636ee212294c257dd2f6b85c7f65f2e
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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}", "{\"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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13 <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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}", "{\"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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 10:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13 <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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
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,302,\"2008-11-07 10:35:13\"],[171,301,\"2008-11-07 10:35:13\"],[141,301,\"2008-11-08 10:35:13\"]]}", "{\"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,305,\"2012-05-09 11:44:34\"],[141,301,\"2012-09-09 11:44:34\"]]}" ]
{"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 | 2008-11-05 10:35:13 row 5 : 141 | 302 | 2008-11-06 10:35:13 row 6 : 151 | 305 | 2008-11-07 10:35:13 row 7 : 161 | 302 | 2008-11-07 10:35:13 row 8 : 171 | 301 | 2008-11-07 10:35:13 row 9 : 141 | 301 | 2008-11-08 10:35:13 <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 | 2015-04-09 11:44:34 row 6 : 161 | 302 | 2014-01-09 11:44:34 row 7 : 151 | 305 | 2012-05-09 11:44:34 row 8 : 141 | 301 | 2012-09-09 11:44:34
col : course_id row 1 : 301 row 2 : 303