vaishali/multitabqa-base-sql
Table Question Answering
•
Updated
•
9
•
4
query
stringlengths 18
577
| table_names
sequence | tables
sequence | answer
stringlengths 45
443k
| source
stringlengths 139
60.7M
| target
stringlengths 19
480k
|
---|---|---|---|---|---|
SELECT count(*) FROM head WHERE age > 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]]} | SELECT count(*) FROM head WHERE age > 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 | [
"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]]} | SELECT name , born_state , age FROM head ORDER 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 | [
"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]]} | SELECT creation , name , budget_in_billions FROM 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 | [
"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]]} | SELECT max(budget_in_billions) , min(budget_in_billions) FROM 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 : 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 | [
"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]]} | SELECT avg(num_employees) FROM department WHERE ranking 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' | [
"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"]]} | SELECT name FROM head WHERE born_state != 'California' <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' | [
"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"]]} | 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' <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 | [
"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"]]} | SELECT born_state FROM head GROUP BY born_state HAVING count(*) >= 3 <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 | [
"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"]]} | SELECT creation FROM department GROUP BY creation ORDER BY count(*) DESC LIMIT 1 <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' | [
"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]]} | 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' <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 | [
"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]]} | SELECT count(DISTINCT temporary_acting) FROM management <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); | [
"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]]} | SELECT count(*) FROM department WHERE department_id NOT IN (SELECT department_id FROM management); <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' | [
"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]]} | SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes' <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' | [
"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"]]} | 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' <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 | [
"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]]} | 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 <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%' | [
"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"]]} | SELECT head_id , name FROM head WHERE name LIKE '%Ha%' <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 | [
"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]]} | SELECT count(*) FROM farm <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 | [
"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]]} | SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC <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' | [
"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"]]} | SELECT Hosts FROM farm_competition WHERE Theme != '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 | [
"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!"]]} | SELECT Theme FROM farm_competition ORDER BY YEAR ASC <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 | [
"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]]} | SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000 <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 | [
"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]]} | SELECT max(Cows) , min(Cows) FROM farm <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 | [
"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]]} | SELECT count(DISTINCT Status) FROM 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 : count(DISTINCT Status) row 1 : 2 |
SELECT Official_Name FROM city ORDER BY Population DESC | [
"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"]]} | SELECT Official_Name FROM city ORDER BY Population DESC <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 | [
"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"]]} | SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1 <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 | [
"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"]]} | SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID <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 | [
"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"]]} | 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 <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 | [
"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"]]} | 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 <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 | [
"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"]]} | SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 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 Status , avg(Population) FROM city GROUP BY 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]]} | SELECT Status , avg(Population) FROM city GROUP BY 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 FROM city GROUP BY Status ORDER BY COUNT(*) ASC | [
"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"]]} | SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC <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 | [
"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"]]} | SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1 <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 | [
"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"]]} | SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 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 | [
"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"]]} | SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 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" | [
"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"]]} | SELECT Census_Ranking FROM city WHERE 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 | [
"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"]]} | 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 <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 | [
"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]]} | SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1 <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 | [
"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"]]} | SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id <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) | [
"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]]} | SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance) <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 | [
"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]]} | SELECT student_id FROM student_course_attendance <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 | [
"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"]]} | SELECT T1.student_id , T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id <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 | [
"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"]]} | 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 <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" | [
"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]]} | SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "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 T2.student_id = 171 | [
"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]]} | SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171 <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" | [
"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]]} | 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" <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 | [
"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]]} | SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1 <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 | [
"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"]]} | 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 <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 | [
"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]]} | 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 <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 | [
"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]]} | 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 <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" | [
"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]]} | SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "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" | [
"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"]]} | 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" <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 | [
"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]]} | SELECT student_id FROM student_course_attendance WHERE course_id = 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 | [
"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]]} | SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1 <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 | [
"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"]]} | SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id <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 | [
"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"]]} | 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 <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 | [
"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"]]} | SELECT course_name FROM courses ORDER BY course_name <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 | [
"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"]]} | SELECT first_name FROM people ORDER BY first_name <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 | [
"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]]} | SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance <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 | [
"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]]} | SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 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 |
SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance) | [
"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","course_id","registration_date"],"index":[0],"data":[[131,303,"2008-11-05 10:35:13"]]} | SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance) <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 | course_id | registration_date row 1 : 131 | 303 | 2008-11-05 10:35:13 |
SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.registration_date | [
"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"],"index":[0,1,2,3],"data":[[121],[111],[171],[141]]} | SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.registration_date <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 row 1 : 121 row 2 : 111 row 3 : 171 row 4 : 141 |
SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.date_of_attendance | [
"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":["student_id"],"index":[0,1,2,3],"data":[[111],[121],[141],[171]]} | SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.date_of_attendance <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 : student_id row 1 : 111 row 2 : 121 row 3 : 141 row 4 : 171 |
import pandas as pd
from datasets import load_dataset
spider_tableQA_pretraining = load_dataset("vaishali/spider-tableQA-pretraining")
for sample in spider_tableQA_pretraining['train']:
sql_query = sample['query']
input_table_names = sample["table_names"]
input_tables = [pd.read_json(table, orient='split') for table in sample['tables']]
answer = pd.read_json(sample['answer'], orient='split')
# flattened input/output
input_to_model = sample["source"]
target = sample["target"]
@inproceedings{pal-etal-2023-multitabqa,
title = "{M}ulti{T}ab{QA}: Generating Tabular Answers for Multi-Table Question Answering",
author = "Pal, Vaishali and
Yates, Andrew and
Kanoulas, Evangelos and
de Rijke, Maarten",
booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
month = jul,
year = "2023",
address = "Toronto, Canada",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2023.acl-long.348",
doi = "10.18653/v1/2023.acl-long.348",
pages = "6322--6334",
abstract = "Recent advances in tabular question answering (QA) with large language models are constrained in their coverage and only answer questions over a single table. However, real-world queries are complex in nature, often over multiple tables in a relational database or web page. Single table questions do not involve common table operations such as set operations, Cartesian products (joins), or nested queries. Furthermore, multi-table operations often result in a tabular output, which necessitates table generation capabilities of tabular QA models. To fill this gap, we propose a new task of answering questions over multiple tables. Our model, MultiTabQA, not only answers questions over multiple tables, but also generalizes to generate tabular answers. To enable effective training, we build a pre-training dataset comprising of 132,645 SQL queries and tabular answers. Further, we evaluate the generated tables by introducing table-specific metrics of varying strictness assessing various levels of granularity of the table structure. MultiTabQA outperforms state-of-the-art single table QA models adapted to a multi-table QA setting by finetuning on three datasets: Spider, Atis and GeoQuery.",
}