| [ | |
| { | |
| "db_id": "book_2", | |
| "query": "SELECT count(*) FROM book", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "book" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "book" | |
| ], | |
| "question": "¿Cuántos libros hay?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Enumere los escritores de los libros en orden alfabético ascendente.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Enumere los títulos de los libros en orden ascendente de números.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "¿Cuáles son los títulos de los libros cuyo escritor no es \"Elaine Lee\"?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 7, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Elaine Lee\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": 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": "¿Cuáles son el título y los números de los libros?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "¿Cuáles son las fechas de las publicaciones en orden descendente de precio?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "¿Cuáles son las distintas editoriales de publicaciones con precio superior a 5000000?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| 5000000.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": 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": "Indique el editor de la publicación con el precio más alto.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Enumere las fechas de publicación de las publicaciones con los 3 precios más bajos.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 3, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Muestre el título y las fechas de publicación de los libros.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Muestre escritores que han publicado un libro con un precio superior a 4000000.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| 4000000.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": 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": "Muestre los títulos de los libros en orden descendente de precio de publicación.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Muestre a los editores que tienen más de una publicación.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Muestre las diferentes editoriales junto con el número de publicaciones que tienen.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Muestre la fecha de publicación más común.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Enumere los escritores que han escrito más de un libro.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Enumere los títulos de los libros que no están publicados.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": 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": "Muestre las editoriales que tienen publicaciones con precio superior a 10000000 y publicaciones con precio inferior a 5000000.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| 10000000.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| 5000000.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| "union": null, | |
| "except": 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": "¿Cuál es el número de fechas de publicación distintas?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": 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": "¿Cuántas fechas de publicación distintas hay en nuestro registro?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "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": "Muestre los precios de las publicaciones cuyo editor sea \"Person\" o \"Wiley\".", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Person\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Wiley\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| } | |
| ] |