| [ | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT count(*) FROM book", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "book" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "book" | |
| ], | |
| "question": "How many books are there?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "books", | |
| "are", | |
| "there", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Writer FROM book ORDER BY Writer ASC", | |
| "query_toks": [ | |
| "SELECT", | |
| "Writer", | |
| "FROM", | |
| "book", | |
| "ORDER", | |
| "BY", | |
| "Writer", | |
| "ASC" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "writer", | |
| "from", | |
| "book", | |
| "order", | |
| "by", | |
| "writer", | |
| "asc" | |
| ], | |
| "question": "List the writers of the books in ascending alphabetical order.", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "writers", | |
| "of", | |
| "the", | |
| "books", | |
| "in", | |
| "ascending", | |
| "alphabetical", | |
| "order", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Title FROM book ORDER BY Issues ASC", | |
| "query_toks": [ | |
| "SELECT", | |
| "Title", | |
| "FROM", | |
| "book", | |
| "ORDER", | |
| "BY", | |
| "Issues", | |
| "ASC" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "title", | |
| "from", | |
| "book", | |
| "order", | |
| "by", | |
| "issues", | |
| "asc" | |
| ], | |
| "question": "List the titles of the books in ascending order of issues.", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "titles", | |
| "of", | |
| "the", | |
| "books", | |
| "in", | |
| "ascending", | |
| "order", | |
| "of", | |
| "issues", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Title FROM book WHERE Writer != \"Elaine Lee\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "Title", | |
| "FROM", | |
| "book", | |
| "WHERE", | |
| "Writer", | |
| "!", | |
| "=", | |
| "``", | |
| "Elaine", | |
| "Lee", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "title", | |
| "from", | |
| "book", | |
| "where", | |
| "writer", | |
| "!", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the titles of the books whose writer is not \"Elaine Lee\"?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "titles", | |
| "of", | |
| "the", | |
| "books", | |
| "whose", | |
| "writer", | |
| "is", | |
| "not", | |
| "``", | |
| "Elaine", | |
| "Lee", | |
| "''", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 7, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Elaine Lee\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Title , Issues FROM book", | |
| "query_toks": [ | |
| "SELECT", | |
| "Title", | |
| ",", | |
| "Issues", | |
| "FROM", | |
| "book" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "title", | |
| ",", | |
| "issues", | |
| "from", | |
| "book" | |
| ], | |
| "question": "What are the title and issues of the books?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "title", | |
| "and", | |
| "issues", | |
| "of", | |
| "the", | |
| "books", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Publication_Date FROM publication ORDER BY Price DESC", | |
| "query_toks": [ | |
| "SELECT", | |
| "Publication_Date", | |
| "FROM", | |
| "publication", | |
| "ORDER", | |
| "BY", | |
| "Price", | |
| "DESC" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "publication_date", | |
| "from", | |
| "publication", | |
| "order", | |
| "by", | |
| "price", | |
| "desc" | |
| ], | |
| "question": "What are the dates of publications in descending order of price?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "dates", | |
| "of", | |
| "publications", | |
| "in", | |
| "descending", | |
| "order", | |
| "of", | |
| "price", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "Publisher", | |
| "FROM", | |
| "publication", | |
| "WHERE", | |
| "Price", | |
| ">", | |
| "5000000" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "publisher", | |
| "from", | |
| "publication", | |
| "where", | |
| "price", | |
| ">", | |
| "value" | |
| ], | |
| "question": "What are the distinct publishers of publications with price higher than 5000000?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "distinct", | |
| "publishers", | |
| "of", | |
| "publications", | |
| "with", | |
| "price", | |
| "higher", | |
| "than", | |
| "5000000", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| 5000000.0, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "Publisher", | |
| "FROM", | |
| "publication", | |
| "ORDER", | |
| "BY", | |
| "Price", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "publisher", | |
| "from", | |
| "publication", | |
| "order", | |
| "by", | |
| "price", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "List the publisher of the publication with the highest price.", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "publisher", | |
| "of", | |
| "the", | |
| "publication", | |
| "with", | |
| "the", | |
| "highest", | |
| "price", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Publication_Date FROM publication ORDER BY Price ASC LIMIT 3", | |
| "query_toks": [ | |
| "SELECT", | |
| "Publication_Date", | |
| "FROM", | |
| "publication", | |
| "ORDER", | |
| "BY", | |
| "Price", | |
| "ASC", | |
| "LIMIT", | |
| "3" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "publication_date", | |
| "from", | |
| "publication", | |
| "order", | |
| "by", | |
| "price", | |
| "asc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "List the publication dates of publications with 3 lowest prices.", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "publication", | |
| "dates", | |
| "of", | |
| "publications", | |
| "with", | |
| "3", | |
| "lowest", | |
| "prices", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 3, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT T1.Title , T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.Title", | |
| ",", | |
| "T2.Publication_Date", | |
| "FROM", | |
| "book", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "publication", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.Book_ID", | |
| "=", | |
| "T2.Book_ID" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "title", | |
| ",", | |
| "t2", | |
| ".", | |
| "publication_date", | |
| "from", | |
| "book", | |
| "as", | |
| "t1", | |
| "join", | |
| "publication", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "book_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "book_id" | |
| ], | |
| "question": "Show the title and publication dates of books.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "title", | |
| "and", | |
| "publication", | |
| "dates", | |
| "of", | |
| "books", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.Writer", | |
| "FROM", | |
| "book", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "publication", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.Book_ID", | |
| "=", | |
| "T2.Book_ID", | |
| "WHERE", | |
| "T2.Price", | |
| ">", | |
| "4000000" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "writer", | |
| "from", | |
| "book", | |
| "as", | |
| "t1", | |
| "join", | |
| "publication", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "book_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "book_id", | |
| "where", | |
| "t2", | |
| ".", | |
| "price", | |
| ">", | |
| "value" | |
| ], | |
| "question": "Show writers who have published a book with price more than 4000000.", | |
| "question_toks": [ | |
| "Show", | |
| "writers", | |
| "who", | |
| "have", | |
| "published", | |
| "a", | |
| "book", | |
| "with", | |
| "price", | |
| "more", | |
| "than", | |
| "4000000", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| 4000000.0, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.Title", | |
| "FROM", | |
| "book", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "publication", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.Book_ID", | |
| "=", | |
| "T2.Book_ID", | |
| "ORDER", | |
| "BY", | |
| "T2.Price", | |
| "DESC" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "title", | |
| "from", | |
| "book", | |
| "as", | |
| "t1", | |
| "join", | |
| "publication", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "book_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "book_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "price", | |
| "desc" | |
| ], | |
| "question": "Show the titles of books in descending order of publication price.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "titles", | |
| "of", | |
| "books", | |
| "in", | |
| "descending", | |
| "order", | |
| "of", | |
| "publication", | |
| "price", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "Publisher", | |
| "FROM", | |
| "publication", | |
| "GROUP", | |
| "BY", | |
| "Publisher", | |
| "HAVING", | |
| "COUNT", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "publisher", | |
| "from", | |
| "publication", | |
| "group", | |
| "by", | |
| "publisher", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "Show publishers that have more than one publication.", | |
| "question_toks": [ | |
| "Show", | |
| "publishers", | |
| "that", | |
| "have", | |
| "more", | |
| "than", | |
| "one", | |
| "publication", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Publisher , COUNT(*) FROM publication GROUP BY Publisher", | |
| "query_toks": [ | |
| "SELECT", | |
| "Publisher", | |
| ",", | |
| "COUNT", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "publication", | |
| "GROUP", | |
| "BY", | |
| "Publisher" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "publisher", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "publication", | |
| "group", | |
| "by", | |
| "publisher" | |
| ], | |
| "question": "Show different publishers together with the number of publications they have.", | |
| "question_toks": [ | |
| "Show", | |
| "different", | |
| "publishers", | |
| "together", | |
| "with", | |
| "the", | |
| "number", | |
| "of", | |
| "publications", | |
| "they", | |
| "have", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "Publication_Date", | |
| "FROM", | |
| "publication", | |
| "GROUP", | |
| "BY", | |
| "Publication_Date", | |
| "ORDER", | |
| "BY", | |
| "COUNT", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "publication_date", | |
| "from", | |
| "publication", | |
| "group", | |
| "by", | |
| "publication_date", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Please show the most common publication date.", | |
| "question_toks": [ | |
| "Please", | |
| "show", | |
| "the", | |
| "most", | |
| "common", | |
| "publication", | |
| "date", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "Writer", | |
| "FROM", | |
| "book", | |
| "GROUP", | |
| "BY", | |
| "Writer", | |
| "HAVING", | |
| "COUNT", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "writer", | |
| "from", | |
| "book", | |
| "group", | |
| "by", | |
| "writer", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "List the writers who have written more than one book.", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "writers", | |
| "who", | |
| "have", | |
| "written", | |
| "more", | |
| "than", | |
| "one", | |
| "book", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Title FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM publication)", | |
| "query_toks": [ | |
| "SELECT", | |
| "Title", | |
| "FROM", | |
| "book", | |
| "WHERE", | |
| "Book_ID", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "Book_ID", | |
| "FROM", | |
| "publication", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "title", | |
| "from", | |
| "book", | |
| "where", | |
| "book_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "book_id", | |
| "from", | |
| "publication", | |
| ")" | |
| ], | |
| "question": "List the titles of books that are not published.", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "titles", | |
| "of", | |
| "books", | |
| "that", | |
| "are", | |
| "not", | |
| "published", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000", | |
| "query_toks": [ | |
| "SELECT", | |
| "Publisher", | |
| "FROM", | |
| "publication", | |
| "WHERE", | |
| "Price", | |
| ">", | |
| "10000000", | |
| "INTERSECT", | |
| "SELECT", | |
| "Publisher", | |
| "FROM", | |
| "publication", | |
| "WHERE", | |
| "Price", | |
| "<", | |
| "5000000" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "publisher", | |
| "from", | |
| "publication", | |
| "where", | |
| "price", | |
| ">", | |
| "value", | |
| "intersect", | |
| "select", | |
| "publisher", | |
| "from", | |
| "publication", | |
| "where", | |
| "price", | |
| "<", | |
| "value" | |
| ], | |
| "question": "Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "publishers", | |
| "that", | |
| "have", | |
| "publications", | |
| "with", | |
| "price", | |
| "higher", | |
| "than", | |
| "10000000", | |
| "and", | |
| "publications", | |
| "with", | |
| "price", | |
| "lower", | |
| "than", | |
| "5000000", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| 5000000.0, | |
| null | |
| ] | |
| ] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| 10000000.0, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT COUNT (DISTINCT Publication_Date) FROM publication", | |
| "query_toks": [ | |
| "SELECT", | |
| "COUNT", | |
| "(", | |
| "DISTINCT", | |
| "Publication_Date", | |
| ")", | |
| "FROM", | |
| "publication" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "distinct", | |
| "publication_date", | |
| ")", | |
| "from", | |
| "publication" | |
| ], | |
| "question": "What is the number of distinct publication dates?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "number", | |
| "of", | |
| "distinct", | |
| "publication", | |
| "dates", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT COUNT (DISTINCT Publication_Date) FROM publication", | |
| "query_toks": [ | |
| "SELECT", | |
| "COUNT", | |
| "(", | |
| "DISTINCT", | |
| "Publication_Date", | |
| ")", | |
| "FROM", | |
| "publication" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "distinct", | |
| "publication_date", | |
| ")", | |
| "from", | |
| "publication" | |
| ], | |
| "question": "How many distinct publication dates are there in our record?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "distinct", | |
| "publication", | |
| "dates", | |
| "are", | |
| "there", | |
| "in", | |
| "our", | |
| "record", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT Price FROM publication WHERE Publisher = \"Person\" OR Publisher = \"Wiley\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "Price", | |
| "FROM", | |
| "publication", | |
| "WHERE", | |
| "Publisher", | |
| "=", | |
| "``", | |
| "Person", | |
| "''", | |
| "OR", | |
| "Publisher", | |
| "=", | |
| "``", | |
| "Wiley", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "price", | |
| "from", | |
| "publication", | |
| "where", | |
| "publisher", | |
| "=", | |
| "value", | |
| "or", | |
| "publisher", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show the prices of publications whose publisher is either \"Person\" or \"Wiley\"", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "prices", | |
| "of", | |
| "publications", | |
| "whose", | |
| "publisher", | |
| "is", | |
| "either", | |
| "``", | |
| "Person", | |
| "''", | |
| "or", | |
| "``", | |
| "Wiley", | |
| "''" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Person\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Wiley\"", | |
| null | |
| ] | |
| ] | |
| } | |
| } | |
| ] |