query
stringlengths
18
577
table_names
list
tables
list
answer
stringlengths
45
443k
source
stringlengths
139
60.7M
target
stringlengths
19
480k
SELECT DISTINCT publisher FROM book_club
[ "book_club" ]
[ "{\"columns\":[\"book_club_id\",\"Year\",\"Author_or_Editor\",\"Book_Title\",\"Publisher\",\"Category\",\"Result\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11],\"data\":[[1,1989,\"Michael Nava\",\"Goldenboy\",\"Alyson\",\"Gay M\\/SF\",\"Won [A ]\"],[2,1989,\"Donald Ward\",\"Death Takes the Stage\",\"St. Martin's Press\",...
{"columns":["Publisher"],"index":[0,1,2,3,4,5,6,7],"data":[["Alyson"],["St. Martin's Press"],["William Morrow"],["Mysterious Press"],["International Polygonics"],["Banned Books"],["Naiad Press"],["Crossing Press"]]}
SELECT DISTINCT publisher FROM book_club <table_name> : book_club col : book_club_id | Year | Author_or_Editor | Book_Title | Publisher | Category | Result row 1 : 1 | 1989 | Michael Nava | Goldenboy | Alyson | Gay M/SF | Won [A ] row 2 : 2 | 1989 | Donald Ward | Death Takes the Stage | St. Martin's Press | Gay M/SF | ...
col : Publisher row 1 : Alyson row 2 : St. Martin's Press row 3 : William Morrow row 4 : Mysterious Press row 5 : International Polygonics row 6 : Banned Books row 7 : Naiad Press row 8 : Crossing Press
SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC
[ "book_club" ]
[ "{\"columns\":[\"book_club_id\",\"Year\",\"Author_or_Editor\",\"Book_Title\",\"Publisher\",\"Category\",\"Result\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11],\"data\":[[1,1989,\"Michael Nava\",\"Goldenboy\",\"Alyson\",\"Gay M\\/SF\",\"Won [A ]\"],[2,1989,\"Donald Ward\",\"Death Takes the Stage\",\"St. Martin's Press\",...
{"columns":["Year","Book_Title","Publisher"],"index":[0,1,2,3,4,5,6,7,8,9,10,11],"data":[[1990,"Somewhere in the Night","Alyson"],[1990,"Walking Water \/ After All This","Banned Books"],[1989,"Goldenboy","Alyson"],[1989,"Death Takes the Stage","St. Martin's Press"],[1989,"Unicorn Mountain","William Morrow"],[1989,"Obed...
SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC <table_name> : book_club col : book_club_id | Year | Author_or_Editor | Book_Title | Publisher | Category | Result row 1 : 1 | 1989 | Michael Nava | Goldenboy | Alyson | Gay M/SF | Won [A ] row 2 : 2 | 1989 | Donald Ward | Death Takes the Stage | ...
col : Year | Book_Title | Publisher row 1 : 1990 | Somewhere in the Night | Alyson row 2 : 1990 | Walking Water / After All This | Banned Books row 3 : 1989 | Goldenboy | Alyson row 4 : 1989 | Death Takes the Stage | St. Martin's Press row 5 : 1989 | Unicorn Mountain | William Morrow row 6 : 1989 | Obedience | Mysterio...
SELECT publisher , count(*) FROM book_club GROUP BY publisher
[ "book_club" ]
[ "{\"columns\":[\"book_club_id\",\"Year\",\"Author_or_Editor\",\"Book_Title\",\"Publisher\",\"Category\",\"Result\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11],\"data\":[[1,1989,\"Michael Nava\",\"Goldenboy\",\"Alyson\",\"Gay M\\/SF\",\"Won [A ]\"],[2,1989,\"Donald Ward\",\"Death Takes the Stage\",\"St. Martin's Press\",...
{"columns":["Publisher","count(*)"],"index":[0,1,2,3,4,5,6,7],"data":[["Alyson",3],["Banned Books",2],["Crossing Press",1],["International Polygonics",1],["Mysterious Press",1],["Naiad Press",2],["St. Martin's Press",1],["William Morrow",1]]}
SELECT publisher , count(*) FROM book_club GROUP BY publisher <table_name> : book_club col : book_club_id | Year | Author_or_Editor | Book_Title | Publisher | Category | Result row 1 : 1 | 1989 | Michael Nava | Goldenboy | Alyson | Gay M/SF | Won [A ] row 2 : 2 | 1989 | Donald Ward | Death Takes the Stage | St. Martin...
col : Publisher | count(*) row 1 : Alyson | 3 row 2 : Banned Books | 2 row 3 : Crossing Press | 1 row 4 : International Polygonics | 1 row 5 : Mysterious Press | 1 row 6 : Naiad Press | 2 row 7 : St. Martin's Press | 1 row 8 : William Morrow | 1
SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1
[ "book_club" ]
[ "{\"columns\":[\"book_club_id\",\"Year\",\"Author_or_Editor\",\"Book_Title\",\"Publisher\",\"Category\",\"Result\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11],\"data\":[[1,1989,\"Michael Nava\",\"Goldenboy\",\"Alyson\",\"Gay M\\/SF\",\"Won [A ]\"],[2,1989,\"Donald Ward\",\"Death Takes the Stage\",\"St. Martin's Press\",...
{"columns":["Publisher"],"index":[0],"data":[["Alyson"]]}
SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1 <table_name> : book_club col : book_club_id | Year | Author_or_Editor | Book_Title | Publisher | Category | Result row 1 : 1 | 1989 | Michael Nava | Goldenboy | Alyson | Gay M/SF | Won [A ] row 2 : 2 | 1989 | Donald Ward | Death Takes the...
col : Publisher row 1 : Alyson
SELECT category , count(*) FROM book_club GROUP BY category
[ "book_club" ]
[ "{\"columns\":[\"book_club_id\",\"Year\",\"Author_or_Editor\",\"Book_Title\",\"Publisher\",\"Category\",\"Result\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11],\"data\":[[1,1989,\"Michael Nava\",\"Goldenboy\",\"Alyson\",\"Gay M\\/SF\",\"Won [A ]\"],[2,1989,\"Donald Ward\",\"Death Takes the Stage\",\"St. Martin's Press\",...
{"columns":["Category","count(*)"],"index":[0,1,2],"data":[["Gay M\/SF",5],["Gay SF\/F",2],["Lesb. M\/SF",5]]}
SELECT category , count(*) FROM book_club GROUP BY category <table_name> : book_club col : book_club_id | Year | Author_or_Editor | Book_Title | Publisher | Category | Result row 1 : 1 | 1989 | Michael Nava | Goldenboy | Alyson | Gay M/SF | Won [A ] row 2 : 2 | 1989 | Donald Ward | Death Takes the Stage | St. Martin's...
col : Category | count(*) row 1 : Gay M/SF | 5 row 2 : Gay SF/F | 2 row 3 : Lesb. M/SF | 5
SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2
[ "book_club" ]
[ "{\"columns\":[\"book_club_id\",\"Year\",\"Author_or_Editor\",\"Book_Title\",\"Publisher\",\"Category\",\"Result\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11],\"data\":[[1,1989,\"Michael Nava\",\"Goldenboy\",\"Alyson\",\"Gay M\\/SF\",\"Won [A ]\"],[2,1989,\"Donald Ward\",\"Death Takes the Stage\",\"St. Martin's Press\",...
{"columns":["Category"],"index":[0],"data":[["Gay SF\/F"]]}
SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2 <table_name> : book_club col : book_club_id | Year | Author_or_Editor | Book_Title | Publisher | Category | Result row 1 : 1 | 1989 | Michael Nava | Goldenboy | Alyson | Gay M/SF | Won [A ] row 2 : 2 | 1989 | Donald Ward | Death...
col : Category row 1 : Gay SF/F
SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990
[ "book_club" ]
[ "{\"columns\":[\"book_club_id\",\"Year\",\"Author_or_Editor\",\"Book_Title\",\"Publisher\",\"Category\",\"Result\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11],\"data\":[[1,1989,\"Michael Nava\",\"Goldenboy\",\"Alyson\",\"Gay M\\/SF\",\"Won [A ]\"],[2,1989,\"Donald Ward\",\"Death Takes the Stage\",\"St. Martin's Press\",...
{"columns":["Publisher"],"index":[0,1],"data":[["Alyson"],["Banned Books"]]}
SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990 <table_name> : book_club col : book_club_id | Year | Author_or_Editor | Book_Title | Publisher | Category | Result row 1 : 1 | 1989 | Michael Nava | Goldenboy | Alyson | Gay M/SF | Won [A ] row 2 : 2 | 1989...
col : Publisher row 1 : Alyson row 2 : Banned Books
SELECT title , YEAR , director FROM movie ORDER BY budget_million
[ "movie" ]
[ "{\"columns\":[\"movie_id\",\"Title\",\"Year\",\"Director\",\"Budget_million\",\"Gross_worldwide\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"The Boondock Saints\",1999,\"Troy Duffy\",6.0,30471],[2,\"The Big Kahuna\",1999,\"John Swanbeck\",7.0,3728888],[3,\"Storm Catcher\",1999,\"Anthony Hickox\",5.0,40500],[4...
{"columns":["Title","Year","Director"],"index":[0,1,2,3,4,5,6,7,8,9],"data":[["Jill Rips",2000,"Anthony Hickox"],["Storm Catcher",1999,"Anthony Hickox"],["The Boondock Saints",1999,"Troy Duffy"],["The Big Kahuna",1999,"John Swanbeck"],["The Whole Nine Yards",2000,"Jonathan Lynn"],["Battlefield Earth",2000,"Roger Christ...
SELECT title , YEAR , director FROM movie ORDER BY budget_million <table_name> : movie col : movie_id | Title | Year | Director | Budget_million | Gross_worldwide row 1 : 1 | The Boondock Saints | 1999 | Troy Duffy | 6.0 | 30471 row 2 : 2 | The Big Kahuna | 1999 | John Swanbeck | 7.0 | 3728888 row 3 : 3 | Storm Catch...
col : Title | Year | Director row 1 : Jill Rips | 2000 | Anthony Hickox row 2 : Storm Catcher | 1999 | Anthony Hickox row 3 : The Boondock Saints | 1999 | Troy Duffy row 4 : The Big Kahuna | 1999 | John Swanbeck row 5 : The Whole Nine Yards | 2000 | Jonathan Lynn row 6 : Battlefield Earth | 2000 | Roger Christian row 7...
SELECT COUNT (DISTINCT director) FROM movie
[ "movie" ]
[ "{\"columns\":[\"movie_id\",\"Title\",\"Year\",\"Director\",\"Budget_million\",\"Gross_worldwide\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"The Boondock Saints\",1999,\"Troy Duffy\",6.0,30471],[2,\"The Big Kahuna\",1999,\"John Swanbeck\",7.0,3728888],[3,\"Storm Catcher\",1999,\"Anthony Hickox\",5.0,40500],[4...
{"columns":["COUNT (DISTINCT director)"],"index":[0],"data":[[9]]}
SELECT COUNT (DISTINCT director) FROM movie <table_name> : movie col : movie_id | Title | Year | Director | Budget_million | Gross_worldwide row 1 : 1 | The Boondock Saints | 1999 | Troy Duffy | 6.0 | 30471 row 2 : 2 | The Big Kahuna | 1999 | John Swanbeck | 7.0 | 3728888 row 3 : 3 | Storm Catcher | 1999 | Anthony Hick...
col : COUNT (DISTINCT director) row 1 : 9
SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1
[ "movie" ]
[ "{\"columns\":[\"movie_id\",\"Title\",\"Year\",\"Director\",\"Budget_million\",\"Gross_worldwide\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"The Boondock Saints\",1999,\"Troy Duffy\",6.0,30471],[2,\"The Big Kahuna\",1999,\"John Swanbeck\",7.0,3728888],[3,\"Storm Catcher\",1999,\"Anthony Hickox\",5.0,40500],[4...
{"columns":["Title","Director"],"index":[0],"data":[["The Whole Nine Yards","Jonathan Lynn"]]}
SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1 <table_name> : movie col : movie_id | Title | Year | Director | Budget_million | Gross_worldwide row 1 : 1 | The Boondock Saints | 1999 | Troy Duffy | 6.0 | 30471 row 2 : 2 | The Big Kahuna | 1999 | John Swanbeck | 7.0 | 3728...
col : Title | Director row 1 : The Whole Nine Yards | Jonathan Lynn
SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999
[ "movie" ]
[ "{\"columns\":[\"movie_id\",\"Title\",\"Year\",\"Director\",\"Budget_million\",\"Gross_worldwide\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"The Boondock Saints\",1999,\"Troy Duffy\",6.0,30471],[2,\"The Big Kahuna\",1999,\"John Swanbeck\",7.0,3728888],[3,\"Storm Catcher\",1999,\"Anthony Hickox\",5.0,40500],[4...
{"columns":["Director"],"index":[0],"data":[["Anthony Hickox"]]}
SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999 <table_name> : movie col : movie_id | Title | Year | Director | Budget_million | Gross_worldwide row 1 : 1 | The Boondock Saints | 1999 | Troy Duffy | 6.0 | 30471 row 2 : 2 | The Big Kahuna | 1999 | John Swanbeck | 7...
col : Director row 1 : Anthony Hickox
SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000
[ "movie" ]
[ "{\"columns\":[\"movie_id\",\"Title\",\"Year\",\"Director\",\"Budget_million\",\"Gross_worldwide\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"The Boondock Saints\",1999,\"Troy Duffy\",6.0,30471],[2,\"The Big Kahuna\",1999,\"John Swanbeck\",7.0,3728888],[3,\"Storm Catcher\",1999,\"Anthony Hickox\",5.0,40500],[4...
{"columns":["Director"],"index":[0,1,2,3,4,5,6,7,8],"data":[["Troy Duffy"],["John Swanbeck"],["Anthony Hickox"],["Anthony Hickox"],["Jonathan Lynn"],["Roger Christian"],["Stephen Kay"],["Christian Duguay"],["Damian Lee"]]}
SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000 <table_name> : movie col : movie_id | Title | Year | Director | Budget_million | Gross_worldwide row 1 : 1 | The Boondock Saints | 1999 | Troy Duffy | 6.0 | 30471 row 2 : 2 | The Big Kahuna | 1999 | John Swanbeck | 7.0 | 3728888 row 3 : 3 | Storm Catcher |...
col : Director row 1 : Troy Duffy row 2 : John Swanbeck row 3 : Anthony Hickox row 4 : Anthony Hickox row 5 : Jonathan Lynn row 6 : Roger Christian row 7 : Stephen Kay row 8 : Christian Duguay row 9 : Damian Lee
SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000
[ "movie" ]
[ "{\"columns\":[\"movie_id\",\"Title\",\"Year\",\"Director\",\"Budget_million\",\"Gross_worldwide\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"The Boondock Saints\",1999,\"Troy Duffy\",6.0,30471],[2,\"The Big Kahuna\",1999,\"John Swanbeck\",7.0,3728888],[3,\"Storm Catcher\",1999,\"Anthony Hickox\",5.0,40500],[4...
{"columns":["avg(budget_million)","max(budget_million)","min(budget_million)"],"index":[0],"data":[[6.0,7.0,5.0]]}
SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000 <table_name> : movie col : movie_id | Title | Year | Director | Budget_million | Gross_worldwide row 1 : 1 | The Boondock Saints | 1999 | Troy Duffy | 6.0 | 30471 row 2 : 2 | The Big Kahuna | 1999 | John Swanbeck | 7...
col : avg(budget_million) | max(budget_million) | min(budget_million) row 1 : 6 | 7 | 5
SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'
[ "book_club", "culture_company" ]
[ "{\"columns\":[\"book_club_id\",\"Year\",\"Author_or_Editor\",\"Book_Title\",\"Publisher\",\"Category\",\"Result\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11],\"data\":[[1,1989,\"Michael Nava\",\"Goldenboy\",\"Alyson\",\"Gay M\\/SF\",\"Won [A ]\"],[2,1989,\"Donald Ward\",\"Death Takes the Stage\",\"St. Martin's Press\",...
{"columns":["Company_name"],"index":[0],"data":[["Culture China"]]}
SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson' <table_name> : book_club col : book_club_id | Year | Author_or_Editor | Book_Title | Publisher | Category | Result row 1 : 1 | 1989 | Michael Nava | Goldenboy | Alyson | Gay M/SF...
col : Company_name row 1 : Culture China
SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'
[ "book_club", "movie", "culture_company" ]
[ "{\"columns\":[\"book_club_id\",\"Year\",\"Author_or_Editor\",\"Book_Title\",\"Publisher\",\"Category\",\"Result\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11],\"data\":[[1,1989,\"Michael Nava\",\"Goldenboy\",\"Alyson\",\"Gay M\\/SF\",\"Won [A ]\"],[2,1989,\"Donald Ward\",\"Death Takes the Stage\",\"St. Martin's Press\",...
{"columns":["Title","Book_Title"],"index":[0,1],"data":[["The Big Kahuna","Goldenboy"],["Storm Catcher","Death Takes the Stage"]]}
SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China' <table_name> : book_club col : book_club_id | Year | Author_or_Editor | Book_Title | Publisher | Category | Result ...
col : Title | Book_Title row 1 : The Big Kahuna | Goldenboy row 2 : Storm Catcher | Death Takes the Stage
SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999
[ "movie", "culture_company" ]
[ "{\"columns\":[\"movie_id\",\"Title\",\"Year\",\"Director\",\"Budget_million\",\"Gross_worldwide\"],\"index\":[0,1,2,3,4,5,6,7,8,9],\"data\":[[1,\"The Boondock Saints\",1999,\"Troy Duffy\",6.0,30471],[2,\"The Big Kahuna\",1999,\"John Swanbeck\",7.0,3728888],[3,\"Storm Catcher\",1999,\"Anthony Hickox\",5.0,40500],[4...
{"columns":["Company_name"],"index":[0,1],"data":[["Culture China"],["Culture China Cargo"]]}
SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999 <table_name> : movie col : movie_id | Title | Year | Director | Budget_million | Gross_worldwide row 1 : 1 | The Boondock Saints | 1999 | Troy Duffy | 6.0 | 30471 row 2 : 2 | The Big Kahuna | 1999 | ...
col : Company_name row 1 : Culture China row 2 : Culture China Cargo