[ { "db_id": "concert_singer", "query": "SELECT count(*) FROM singer", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "singer" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "singer" ], "question": "How many singers do we have?", "question_toks": [ "How", "many", "singers", "do", "we", "have", "?" ], "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": "concert_singer", "query": "SELECT count(*) FROM singer", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "singer" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "singer" ], "question": "What is the total number of singers?", "question_toks": [ "What", "is", "the", "total", "number", "of", "singers", "?" ], "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": "concert_singer", "query": "SELECT name , country , age FROM singer ORDER BY age DESC", "query_toks": [ "SELECT", "name", ",", "country", ",", "age", "FROM", "singer", "ORDER", "BY", "age", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "country", ",", "age", "from", "singer", "order", "by", "age", "desc" ], "question": "Show name, country, age for all singers ordered by age from the oldest to the youngest.", "question_toks": [ "Show", "name", ",", "country", ",", "age", "for", "all", "singers", "ordered", "by", "age", "from", "the", "oldest", "to", "the", "youngest", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , country , age FROM singer ORDER BY age DESC", "query_toks": [ "SELECT", "name", ",", "country", ",", "age", "FROM", "singer", "ORDER", "BY", "age", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "country", ",", "age", "from", "singer", "order", "by", "age", "desc" ], "question": "What are the names, countries, and ages for every singer in descending order of age?", "question_toks": [ "What", "are", "the", "names", ",", "countries", ",", "and", "ages", "for", "every", "singer", "in", "descending", "order", "of", "age", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'", "query_toks": [ "SELECT", "avg", "(", "age", ")", ",", "min", "(", "age", ")", ",", "max", "(", "age", ")", "FROM", "singer", "WHERE", "country", "=", "'France", "'" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", ",", "min", "(", "age", ")", ",", "max", "(", "age", ")", "from", "singer", "where", "country", "=", "value" ], "question": "What is the average, minimum, and maximum age of all singers from France?", "question_toks": [ "What", "is", "the", "average", ",", "minimum", ",", "and", "maximum", "age", "of", "all", "singers", "from", "France", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, false ], null ] ], [ 2, [ 0, [ 0, 13, false ], null ] ], [ 1, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"France\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'", "query_toks": [ "SELECT", "avg", "(", "age", ")", ",", "min", "(", "age", ")", ",", "max", "(", "age", ")", "FROM", "singer", "WHERE", "country", "=", "'France", "'" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", ",", "min", "(", "age", ")", ",", "max", "(", "age", ")", "from", "singer", "where", "country", "=", "value" ], "question": "What is the average, minimum, and maximum age for all French singers?", "question_toks": [ "What", "is", "the", "average", ",", "minimum", ",", "and", "maximum", "age", "for", "all", "French", "singers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, false ], null ] ], [ 2, [ 0, [ 0, 13, false ], null ] ], [ 1, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"France\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1", "query_toks": [ "SELECT", "song_name", ",", "song_release_year", "FROM", "singer", "ORDER", "BY", "age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "song_name", ",", "song_release_year", "from", "singer", "order", "by", "age", "limit", "value" ], "question": "Show the name and the release year of the song by the youngest singer.", "question_toks": [ "Show", "the", "name", "and", "the", "release", "year", "of", "the", "song", "by", "the", "youngest", "singer", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1", "query_toks": [ "SELECT", "song_name", ",", "song_release_year", "FROM", "singer", "ORDER", "BY", "age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "song_name", ",", "song_release_year", "from", "singer", "order", "by", "age", "limit", "value" ], "question": "What are the names and release years for all the songs of the youngest singer?", "question_toks": [ "What", "are", "the", "names", "and", "release", "years", "for", "all", "the", "songs", "of", "the", "youngest", "singer", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT DISTINCT country FROM singer WHERE age > 20", "query_toks": [ "SELECT", "DISTINCT", "country", "FROM", "singer", "WHERE", "age", ">", "20" ], "query_toks_no_value": [ "select", "distinct", "country", "from", "singer", "where", "age", ">", "value" ], "question": "What are all distinct countries where singers above age 20 are from?", "question_toks": [ "What", "are", "all", "distinct", "countries", "where", "singers", "above", "age", "20", "are", "from", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT DISTINCT country FROM singer WHERE age > 20", "query_toks": [ "SELECT", "DISTINCT", "country", "FROM", "singer", "WHERE", "age", ">", "20" ], "query_toks_no_value": [ "select", "distinct", "country", "from", "singer", "where", "age", ">", "value" ], "question": "What are the different countries with singers above age 20?", "question_toks": [ "What", "are", "the", "different", "countries", "with", "singers", "above", "age", "20", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT country , count(*) FROM singer GROUP BY country", "query_toks": [ "SELECT", "country", ",", "count", "(", "*", ")", "FROM", "singer", "GROUP", "BY", "country" ], "query_toks_no_value": [ "select", "country", ",", "count", "(", "*", ")", "from", "singer", "group", "by", "country" ], "question": "Show all countries and the number of singers in each country.", "question_toks": [ "Show", "all", "countries", "and", "the", "number", "of", "singers", "in", "each", "country", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT country , count(*) FROM singer GROUP BY country", "query_toks": [ "SELECT", "country", ",", "count", "(", "*", ")", "FROM", "singer", "GROUP", "BY", "country" ], "query_toks_no_value": [ "select", "country", ",", "count", "(", "*", ")", "from", "singer", "group", "by", "country" ], "question": "How many singers are from each country?", "question_toks": [ "How", "many", "singers", "are", "from", "each", "country", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", "query_toks": [ "SELECT", "song_name", "FROM", "singer", "WHERE", "age", ">", "(", "SELECT", "avg", "(", "age", ")", "FROM", "singer", ")" ], "query_toks_no_value": [ "select", "song_name", "from", "singer", "where", "age", ">", "(", "select", "avg", "(", "age", ")", "from", "singer", ")" ], "question": "List all song names by singers above the average age.", "question_toks": [ "List", "all", "song", "names", "by", "singers", "above", "the", "average", "age", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, 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": "concert_singer", "query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", "query_toks": [ "SELECT", "song_name", "FROM", "singer", "WHERE", "age", ">", "(", "SELECT", "avg", "(", "age", ")", "FROM", "singer", ")" ], "query_toks_no_value": [ "select", "song_name", "from", "singer", "where", "age", ">", "(", "select", "avg", "(", "age", ")", "from", "singer", ")" ], "question": "What are all the song names by singers who are older than average?", "question_toks": [ "What", "are", "all", "the", "song", "names", "by", "singers", "who", "are", "older", "than", "average", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, 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": "concert_singer", "query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", "query_toks": [ "SELECT", "LOCATION", ",", "name", "FROM", "stadium", "WHERE", "capacity", "BETWEEN", "5000", "AND", "10000" ], "query_toks_no_value": [ "select", "location", ",", "name", "from", "stadium", "where", "capacity", "between", "value", "and", "value" ], "question": "Show location and name for all stadiums with a capacity between 5000 and 10000.", "question_toks": [ "Show", "location", "and", "name", "for", "all", "stadiums", "with", "a", "capacity", "between", "5000", "and", "10000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 4, false ], null ], 5000.0, 10000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", "query_toks": [ "SELECT", "LOCATION", ",", "name", "FROM", "stadium", "WHERE", "capacity", "BETWEEN", "5000", "AND", "10000" ], "query_toks_no_value": [ "select", "location", ",", "name", "from", "stadium", "where", "capacity", "between", "value", "and", "value" ], "question": "What are the locations and names of all stations with capacity between 5000 and 10000?", "question_toks": [ "What", "are", "the", "locations", "and", "names", "of", "all", "stations", "with", "capacity", "between", "5000", "and", "10000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 4, false ], null ], 5000.0, 10000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select max(capacity), average from stadium", "query_toks": [ "select", "max", "(", "capacity", ")", ",", "average", "from", "stadium" ], "query_toks_no_value": [ "select", "max", "(", "capacity", ")", ",", "average", "from", "stadium" ], "question": "What is the maximum capacity and the average of all stadiums ?", "question_toks": [ "What", "is", "the", "maximum", "capacity", "and", "the", "average", "of", "all", "stadiums", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select avg(capacity) , max(capacity) from stadium", "query_toks": [ "select", "avg", "(", "capacity", ")", ",", "max", "(", "capacity", ")", "from", "stadium" ], "query_toks_no_value": [ "select", "avg", "(", "capacity", ")", ",", "max", "(", "capacity", ")", "from", "stadium" ], "question": "What is the average and maximum capacities for all stadiums ?", "question_toks": [ "What", "is", "the", "average", "and", "maximum", "capacities", "for", "all", "stadiums", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 4, false ], null ] ], [ 1, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "query_toks": [ "SELECT", "name", ",", "capacity", "FROM", "stadium", "ORDER", "BY", "average", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "capacity", "from", "stadium", "order", "by", "average", "desc", "limit", "value" ], "question": "What is the name and capacity for the stadium with highest average attendance?", "question_toks": [ "What", "is", "the", "name", "and", "capacity", "for", "the", "stadium", "with", "highest", "average", "attendance", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 7, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "query_toks": [ "SELECT", "name", ",", "capacity", "FROM", "stadium", "ORDER", "BY", "average", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "capacity", "from", "stadium", "order", "by", "average", "desc", "limit", "value" ], "question": "What is the name and capacity for the stadium with the highest average attendance?", "question_toks": [ "What", "is", "the", "name", "and", "capacity", "for", "the", "stadium", "with", "the", "highest", "average", "attendance", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 7, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "concert", "WHERE", "YEAR", "=", "2014", "OR", "YEAR", "=", "2015" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "concert", "where", "year", "=", "value", "or", "year", "=", "value" ], "question": "How many concerts are there in year 2014 or 2015?", "question_toks": [ "How", "many", "concerts", "are", "there", "in", "year", "2014", "or", "2015", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ], "or", [ false, 2, [ 0, [ 0, 19, false ], null ], 2015.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "concert", "WHERE", "YEAR", "=", "2014", "OR", "YEAR", "=", "2015" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "concert", "where", "year", "=", "value", "or", "year", "=", "value" ], "question": "How many concerts occurred in 2014 or 2015?", "question_toks": [ "How", "many", "concerts", "occurred", "in", "2014", "or", "2015", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ], "or", [ false, 2, [ 0, [ 0, 19, false ], null ], 2015.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "GROUP", "BY", "T1.stadium_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "group", "by", "t1", ".", "stadium_id" ], "question": "Show the stadium name and the number of concerts in each stadium.", "question_toks": [ "Show", "the", "stadium", "name", "and", "the", "number", "of", "concerts", "in", "each", "stadium", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "GROUP", "BY", "T1.stadium_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "group", "by", "t1", ".", "stadium_id" ], "question": "For each stadium, how many concerts play there?", "question_toks": [ "For", "each", "stadium", ",", "how", "many", "concerts", "play", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", ",", "T2.capacity", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.year", ">", "=", "2014", "GROUP", "BY", "T2.stadium_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "t2", ".", "capacity", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", ">", "=", "value", "group", "by", "t2", ".", "stadium_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Show the stadium name and capacity with most number of concerts in year 2014 or after.", "question_toks": [ "Show", "the", "stadium", "name", "and", "capacity", "with", "most", "number", "of", "concerts", "in", "year", "2014", "or", "after", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 5, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select t2.name , t2.capacity from concert as t1 join stadium as t2 on t1.stadium_id = t2.stadium_id where t1.year > 2013 group by t2.stadium_id order by count(*) desc limit 1", "query_toks": [ "select", "t2.name", ",", "t2.capacity", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1.stadium_id", "=", "t2.stadium_id", "where", "t1.year", ">", "2013", "group", "by", "t2.stadium_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "t2", ".", "capacity", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", ">", "value", "group", "by", "t2", ".", "stadium_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name and capacity of the stadium with the most concerts after 2013 ?", "question_toks": [ "What", "is", "the", "name", "and", "capacity", "of", "the", "stadium", "with", "the", "most", "concerts", "after", "2013", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 19, false ], null ], 2013.0, null ] ], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "YEAR", "FROM", "concert", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "year", "from", "concert", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which year has most number of concerts?", "question_toks": [ "Which", "year", "has", "most", "number", "of", "concerts", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "YEAR", "FROM", "concert", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "year", "from", "concert", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the year that had the most concerts?", "question_toks": [ "What", "is", "the", "year", "that", "had", "the", "most", "concerts", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)", "query_toks": [ "SELECT", "name", "FROM", "stadium", "WHERE", "stadium_id", "NOT", "IN", "(", "SELECT", "stadium_id", "FROM", "concert", ")" ], "query_toks_no_value": [ "select", "name", "from", "stadium", "where", "stadium_id", "not", "in", "(", "select", "stadium_id", "from", "concert", ")" ], "question": "Show the stadium names without any concert.", "question_toks": [ "Show", "the", "stadium", "names", "without", "any", "concert", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, 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": "concert_singer", "query": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)", "query_toks": [ "SELECT", "name", "FROM", "stadium", "WHERE", "stadium_id", "NOT", "IN", "(", "SELECT", "stadium_id", "FROM", "concert", ")" ], "query_toks_no_value": [ "select", "name", "from", "stadium", "where", "stadium_id", "not", "in", "(", "select", "stadium_id", "from", "concert", ")" ], "question": "What are the names of the stadiums without any concerts?", "question_toks": [ "What", "are", "the", "names", "of", "the", "stadiums", "without", "any", "concerts", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, 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": "concert_singer", "query": "SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30", "query_toks": [ "SELECT", "country", "FROM", "singer", "WHERE", "age", ">", "40", "INTERSECT", "SELECT", "country", "FROM", "singer", "WHERE", "age", "<", "30" ], "query_toks_no_value": [ "select", "country", "from", "singer", "where", "age", ">", "value", "intersect", "select", "country", "from", "singer", "where", "age", "<", "value" ], "question": "Show countries where a singer above age 40 and a singer below 30 are from.", "question_toks": [ "Show", "countries", "where", "a", "singer", "above", "age", "40", "and", "a", "singer", "below", "30", "are", "from", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 40.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 13, false ], null ], 30.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014", "query_toks": [ "SELECT", "name", "FROM", "stadium", "EXCEPT", "SELECT", "T2.name", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.year", "=", "2014" ], "query_toks_no_value": [ "select", "name", "from", "stadium", "except", "select", "t2", ".", "name", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value" ], "question": "Show names for all stadiums except for stadiums having a concert in year 2014.", "question_toks": [ "Show", "names", "for", "all", "stadiums", "except", "for", "stadiums", "having", "a", "concert", "in", "year", "2014", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "concert_singer", "query": "SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014", "query_toks": [ "SELECT", "name", "FROM", "stadium", "EXCEPT", "SELECT", "T2.name", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.year", "=", "2014" ], "query_toks_no_value": [ "select", "name", "from", "stadium", "except", "select", "t2", ".", "name", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value" ], "question": "What are the names of all stadiums that did not have a concert in 2014?", "question_toks": [ "What", "are", "the", "names", "of", "all", "stadiums", "that", "did", "not", "have", "a", "concert", "in", "2014", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "concert_singer", "query": "SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id", "query_toks": [ "SELECT", "T2.concert_name", ",", "T2.theme", ",", "count", "(", "*", ")", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "concert", "AS", "T2", "ON", "T1.concert_id", "=", "T2.concert_id", "GROUP", "BY", "T2.concert_id" ], "query_toks_no_value": [ "select", "t2", ".", "concert_name", ",", "t2", ".", "theme", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "concert", "as", "t2", "on", "t1", ".", "concert_id", "=", "t2", ".", "concert_id", "group", "by", "t2", ".", "concert_id" ], "question": "Show the name and theme for all concerts and the number of singers in each concert.", "question_toks": [ "Show", "the", "name", "and", "theme", "for", "all", "concerts", "and", "the", "number", "of", "singers", "in", "each", "concert", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ], [ 0, [ 0, [ 0, 17, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select t2.concert_name , t2.theme , count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id = t2.concert_id group by t2.concert_id", "query_toks": [ "select", "t2.concert_name", ",", "t2.theme", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "concert", "as", "t2", "on", "t1.concert_id", "=", "t2.concert_id", "group", "by", "t2.concert_id" ], "query_toks_no_value": [ "select", "t2", ".", "concert_name", ",", "t2", ".", "theme", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "concert", "as", "t2", "on", "t1", ".", "concert_id", "=", "t2", ".", "concert_id", "group", "by", "t2", ".", "concert_id" ], "question": "What are the names , themes , and number of singers for every concert ?", "question_toks": [ "What", "are", "the", "names", ",", "themes", ",", "and", "number", "of", "singers", "for", "every", "concert", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ], [ 0, [ 0, [ 0, 17, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "singer", "AS", "T2", "ON", "T1.singer_id", "=", "T2.singer_id", "GROUP", "BY", "T2.singer_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "singer", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t2", ".", "singer_id" ], "question": "List singer names and number of concerts for each singer.", "question_toks": [ "List", "singer", "names", "and", "number", "of", "concerts", "for", "each", "singer", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "singer", "AS", "T2", "ON", "T1.singer_id", "=", "T2.singer_id", "GROUP", "BY", "T2.singer_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "singer", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t2", ".", "singer_id" ], "question": "What are the names of the singers and number of concerts for each person?", "question_toks": [ "What", "are", "the", "names", "of", "the", "singers", "and", "number", "of", "concerts", "for", "each", "person", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014", "query_toks": [ "SELECT", "T2.name", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "singer", "AS", "T2", "ON", "T1.singer_id", "=", "T2.singer_id", "JOIN", "concert", "AS", "T3", "ON", "T1.concert_id", "=", "T3.concert_id", "WHERE", "T3.year", "=", "2014" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "singer_in_concert", "as", "t1", "join", "singer", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "join", "concert", "as", "t3", "on", "t1", ".", "concert_id", "=", "t3", ".", "concert_id", "where", "t3", ".", "year", "=", "value" ], "question": "List all singer names in concerts in year 2014.", "question_toks": [ "List", "all", "singer", "names", "in", "concerts", "in", "year", "2014", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 8, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014", "query_toks": [ "SELECT", "T2.name", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "singer", "AS", "T2", "ON", "T1.singer_id", "=", "T2.singer_id", "JOIN", "concert", "AS", "T3", "ON", "T1.concert_id", "=", "T3.concert_id", "WHERE", "T3.year", "=", "2014" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "singer_in_concert", "as", "t1", "join", "singer", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "join", "concert", "as", "t3", "on", "t1", ".", "concert_id", "=", "t3", ".", "concert_id", "where", "t3", ".", "year", "=", "value" ], "question": "What are the names of the singers who performed in a concert in 2014?", "question_toks": [ "What", "are", "the", "names", "of", "the", "singers", "who", "performed", "in", "a", "concert", "in", "2014", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 8, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", "query_toks": [ "SELECT", "name", ",", "country", "FROM", "singer", "WHERE", "song_name", "LIKE", "'", "%", "Hey", "%", "'" ], "query_toks_no_value": [ "select", "name", ",", "country", "from", "singer", "where", "song_name", "like", "value" ], "question": "what is the name and nation of the singer who have a song having 'Hey' in its name?", "question_toks": [ "what", "is", "the", "name", "and", "nation", "of", "the", "singer", "who", "have", "a", "song", "having", "'Hey", "'", "in", "its", "name", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 11, false ], null ], "\"%Hey%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", "query_toks": [ "SELECT", "name", ",", "country", "FROM", "singer", "WHERE", "song_name", "LIKE", "'", "%", "Hey", "%", "'" ], "query_toks_no_value": [ "select", "name", ",", "country", "from", "singer", "where", "song_name", "like", "value" ], "question": "What is the name and country of origin of every singer who has a song with the word 'Hey' in its title?", "question_toks": [ "What", "is", "the", "name", "and", "country", "of", "origin", "of", "every", "singer", "who", "has", "a", "song", "with", "the", "word", "'Hey", "'", "in", "its", "title", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 11, false ], null ], "\"%Hey%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015", "query_toks": [ "SELECT", "T2.name", ",", "T2.location", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.Year", "=", "2014", "INTERSECT", "SELECT", "T2.name", ",", "T2.location", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.Year", "=", "2015" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "t2", ".", "location", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value", "intersect", "select", "t2", ".", "name", ",", "t2", ".", "location", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value" ], "question": "Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.", "question_toks": [ "Find", "the", "name", "and", "location", "of", "the", "stadiums", "which", "some", "concerts", "happened", "in", "the", "years", "of", "both", "2014", "and", "2015", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2015.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015", "query_toks": [ "SELECT", "T2.name", ",", "T2.location", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.Year", "=", "2014", "INTERSECT", "SELECT", "T2.name", ",", "T2.location", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.Year", "=", "2015" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "t2", ".", "location", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value", "intersect", "select", "t2", ".", "name", ",", "t2", ".", "location", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value" ], "question": "What are the names and locations of the stadiums that had concerts that occurred in both 2014 and 2015?", "question_toks": [ "What", "are", "the", "names", "and", "locations", "of", "the", "stadiums", "that", "had", "concerts", "that", "occurred", "in", "both", "2014", "and", "2015", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2015.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)", "query_toks": [ "select", "count", "(", "*", ")", "from", "concert", "where", "stadium_id", "=", "(", "select", "stadium_id", "from", "stadium", "order", "by", "capacity", "desc", "limit", "1", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "concert", "where", "stadium_id", "=", "(", "select", "stadium_id", "from", "stadium", "order", "by", "capacity", "desc", "limit", "value", ")" ], "question": "Find the number of concerts happened in the stadium with the highest capacity .", "question_toks": [ "Find", "the", "number", "of", "concerts", "happened", "in", "the", "stadium", "with", "the", "highest", "capacity", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)", "query_toks": [ "select", "count", "(", "*", ")", "from", "concert", "where", "stadium_id", "=", "(", "select", "stadium_id", "from", "stadium", "order", "by", "capacity", "desc", "limit", "1", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "concert", "where", "stadium_id", "=", "(", "select", "stadium_id", "from", "stadium", "order", "by", "capacity", "desc", "limit", "value", ")" ], "question": "What are the number of concerts that occurred in the stadium with the largest capacity ?", "question_toks": [ "What", "are", "the", "number", "of", "concerts", "that", "occurred", "in", "the", "stadium", "with", "the", "largest", "capacity", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM pets WHERE weight > 10", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "pets", "WHERE", "weight", ">", "10" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "pets", "where", "weight", ">", "value" ], "question": "Find the number of pets whose weight is heavier than 10.", "question_toks": [ "Find", "the", "number", "of", "pets", "whose", "weight", "is", "heavier", "than", "10", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 14, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM pets WHERE weight > 10", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "pets", "WHERE", "weight", ">", "10" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "pets", "where", "weight", ">", "value" ], "question": "How many pets have a greater weight than 10?", "question_toks": [ "How", "many", "pets", "have", "a", "greater", "weight", "than", "10", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 14, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1", "query_toks": [ "SELECT", "weight", "FROM", "pets", "ORDER", "BY", "pet_age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "weight", "from", "pets", "order", "by", "pet_age", "limit", "value" ], "question": "Find the weight of the youngest dog.", "question_toks": [ "Find", "the", "weight", "of", "the", "youngest", "dog", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1", "query_toks": [ "SELECT", "weight", "FROM", "pets", "ORDER", "BY", "pet_age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "weight", "from", "pets", "order", "by", "pet_age", "limit", "value" ], "question": "How much does the youngest dog weigh?", "question_toks": [ "How", "much", "does", "the", "youngest", "dog", "weigh", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT max(weight) , petType FROM pets GROUP BY petType", "query_toks": [ "SELECT", "max", "(", "weight", ")", ",", "petType", "FROM", "pets", "GROUP", "BY", "petType" ], "query_toks_no_value": [ "select", "max", "(", "weight", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "Find the maximum weight for each type of pet. List the maximum weight and pet type.", "question_toks": [ "Find", "the", "maximum", "weight", "for", "each", "type", "of", "pet", ".", "List", "the", "maximum", "weight", "and", "pet", "type", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT max(weight) , petType FROM pets GROUP BY petType", "query_toks": [ "SELECT", "max", "(", "weight", ")", ",", "petType", "FROM", "pets", "GROUP", "BY", "petType" ], "query_toks_no_value": [ "select", "max", "(", "weight", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "List the maximum weight and type for each type of pet.", "question_toks": [ "List", "the", "maximum", "weight", "and", "type", "for", "each", "type", "of", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T1.age", ">", "20" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t1", ".", "age", ">", "value" ], "question": "Find number of pets owned by students who are older than 20.", "question_toks": [ "Find", "number", "of", "pets", "owned", "by", "students", "who", "are", "older", "than", "20", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T1.age", ">", "20" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t1", ".", "age", ">", "value" ], "question": "How many pets are owned by students that have an age greater than 20?", "question_toks": [ "How", "many", "pets", "are", "owned", "by", "students", "that", "have", "an", "age", "greater", "than", "20", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T2.petid", "=", "T3.petid", "WHERE", "T1.sex", "=", "'F", "'", "AND", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t2", ".", "petid", "=", "t3", ".", "petid", "where", "t1", ".", "sex", "=", "value", "and", "t3", ".", "pettype", "=", "value" ], "question": "Find the number of dog pets that are raised by female students (with sex F).", "question_toks": [ "Find", "the", "number", "of", "dog", "pets", "that", "are", "raised", "by", "female", "students", "(", "with", "sex", "F", ")", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"F\"", null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T2.petid", "=", "T3.petid", "WHERE", "T1.sex", "=", "'F", "'", "AND", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t2", ".", "petid", "=", "t3", ".", "petid", "where", "t1", ".", "sex", "=", "value", "and", "t3", ".", "pettype", "=", "value" ], "question": "How many dog pets are raised by female students?", "question_toks": [ "How", "many", "dog", "pets", "are", "raised", "by", "female", "students", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"F\"", null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(DISTINCT pettype) FROM pets", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "pettype", ")", "FROM", "pets" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "pettype", ")", "from", "pets" ], "question": "Find the number of distinct type of pets.", "question_toks": [ "Find", "the", "number", "of", "distinct", "type", "of", "pets", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 12, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(DISTINCT pettype) FROM pets", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "pettype", ")", "FROM", "pets" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "pettype", ")", "from", "pets" ], "question": "How many different types of pet are there?", "question_toks": [ "How", "many", "different", "types", "of", "pet", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 12, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'", "query_toks": [ "SELECT", "DISTINCT", "T1.Fname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", "OR", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "or", "t3", ".", "pettype", "=", "value" ], "question": "Find the first name of students who have cat or dog pet.", "question_toks": [ "Find", "the", "first", "name", "of", "students", "who", "have", "cat", "or", "dog", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ], "or", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'", "query_toks": [ "SELECT", "DISTINCT", "T1.Fname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", "OR", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "or", "t3", ".", "pettype", "=", "value" ], "question": "What are the first names of every student who has a cat or dog as a pet?", "question_toks": [ "What", "are", "the", "first", "names", "of", "every", "student", "who", "has", "a", "cat", "or", "dog", "as", "a", "pet", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ], "or", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'cat' intersect select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'dog'", "query_toks": [ "select", "t1.fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1.stuid", "=", "t2.stuid", "join", "pets", "as", "t3", "on", "t3.petid", "=", "t2.petid", "where", "t3.pettype", "=", "\"cat\"", "intersect", "select", "t1.fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1.stuid", "=", "t2.stuid", "join", "pets", "as", "t3", "on", "t3.petid", "=", "t2.petid", "where", "t3.pettype", "=", "\"dog\"" ], "query_toks_no_value": [ "select", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "intersect", "select", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value" ], "question": "Find the first name of students who have both cat and dog pets .", "question_toks": [ "Find", "the", "first", "name", "of", "students", "who", "have", "both", "cat", "and", "dog", "pets", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'", "query_toks": [ "SELECT", "T1.Fname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", "INTERSECT", "SELECT", "T1.Fname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "intersect", "select", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value" ], "question": "What are the students' first names who have both cats and dogs as pets?", "question_toks": [ "What", "are", "the", "students", "'", "first", "names", "who", "have", "both", "cats", "and", "dogs", "as", "pets", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "query_toks": [ "SELECT", "major", ",", "age", "FROM", "student", "WHERE", "stuid", "NOT", "IN", "(", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", ")" ], "query_toks_no_value": [ "select", "major", ",", "age", "from", "student", "where", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", ")" ], "question": "Find the major and age of students who do not have a cat pet.", "question_toks": [ "Find", "the", "major", "and", "age", "of", "students", "who", "do", "not", "have", "a", "cat", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "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": "pets_1", "query": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "query_toks": [ "SELECT", "major", ",", "age", "FROM", "student", "WHERE", "stuid", "NOT", "IN", "(", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", ")" ], "query_toks_no_value": [ "select", "major", ",", "age", "from", "student", "where", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", ")" ], "question": "What major is every student who does not own a cat as a pet, and also how old are they?", "question_toks": [ "What", "major", "is", "every", "student", "who", "does", "not", "own", "a", "cat", "as", "a", "pet", ",", "and", "also", "how", "old", "are", "they", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "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": "pets_1", "query": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "query_toks": [ "SELECT", "stuid", "FROM", "student", "EXCEPT", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "except", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value" ], "question": "Find the id of students who do not have a cat pet.", "question_toks": [ "Find", "the", "id", "of", "students", "who", "do", "not", "have", "a", "cat", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "pets_1", "query": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "query_toks": [ "SELECT", "stuid", "FROM", "student", "EXCEPT", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "except", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value" ], "question": "What are the ids of the students who do not own cats as pets?", "question_toks": [ "What", "are", "the", "ids", "of", "the", "students", "who", "do", "not", "own", "cats", "as", "pets", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "pets_1", "query": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "query_toks": [ "SELECT", "T1.fname", ",", "T1.age", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'dog", "'", "AND", "T1.stuid", "NOT", "IN", "(", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", ")" ], "query_toks_no_value": [ "select", "t1", ".", "fname", ",", "t1", ".", "age", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "and", "t1", ".", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", ")" ], "question": "Find the first name and age of students who have a dog but do not have a cat as a pet.", "question_toks": [ "Find", "the", "first", "name", "and", "age", "of", "students", "who", "have", "a", "dog", "but", "do", "not", "have", "a", "cat", "as", "a", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ], "and", [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "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": "pets_1", "query": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "query_toks": [ "SELECT", "T1.fname", ",", "T1.age", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'dog", "'", "AND", "T1.stuid", "NOT", "IN", "(", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", ")" ], "query_toks_no_value": [ "select", "t1", ".", "fname", ",", "t1", ".", "age", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "and", "t1", ".", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", ")" ], "question": "What is the first name of every student who has a dog but does not have a cat?", "question_toks": [ "What", "is", "the", "first", "name", "of", "every", "student", "who", "has", "a", "dog", "but", "does", "not", "have", "a", "cat", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ], "and", [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "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": "pets_1", "query": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", "query_toks": [ "SELECT", "pettype", ",", "weight", "FROM", "pets", "ORDER", "BY", "pet_age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "pettype", ",", "weight", "from", "pets", "order", "by", "pet_age", "limit", "value" ], "question": "Find the type and weight of the youngest pet.", "question_toks": [ "Find", "the", "type", "and", "weight", "of", "the", "youngest", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", "query_toks": [ "SELECT", "pettype", ",", "weight", "FROM", "pets", "ORDER", "BY", "pet_age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "pettype", ",", "weight", "from", "pets", "order", "by", "pet_age", "limit", "value" ], "question": "What type of pet is the youngest animal, and how much does it weigh?", "question_toks": [ "What", "type", "of", "pet", "is", "the", "youngest", "animal", ",", "and", "how", "much", "does", "it", "weigh", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT petid , weight FROM pets WHERE pet_age > 1", "query_toks": [ "SELECT", "petid", ",", "weight", "FROM", "pets", "WHERE", "pet_age", ">", "1" ], "query_toks_no_value": [ "select", "petid", ",", "weight", "from", "pets", "where", "pet_age", ">", "value" ], "question": "Find the id and weight of all pets whose age is older than 1.", "question_toks": [ "Find", "the", "id", "and", "weight", "of", "all", "pets", "whose", "age", "is", "older", "than", "1", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT petid , weight FROM pets WHERE pet_age > 1", "query_toks": [ "SELECT", "petid", ",", "weight", "FROM", "pets", "WHERE", "pet_age", ">", "1" ], "query_toks_no_value": [ "select", "petid", ",", "weight", "from", "pets", "where", "pet_age", ">", "value" ], "question": "What is the id and weight of every pet who is older than 1?", "question_toks": [ "What", "is", "the", "id", "and", "weight", "of", "every", "pet", "who", "is", "older", "than", "1", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype", "query_toks": [ "SELECT", "avg", "(", "pet_age", ")", ",", "max", "(", "pet_age", ")", ",", "pettype", "FROM", "pets", "GROUP", "BY", "pettype" ], "query_toks_no_value": [ "select", "avg", "(", "pet_age", ")", ",", "max", "(", "pet_age", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "Find the average and maximum age for each type of pet.", "question_toks": [ "Find", "the", "average", "and", "maximum", "age", "for", "each", "type", "of", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, false ], null ] ], [ 1, [ 0, [ 0, 13, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype", "query_toks": [ "SELECT", "avg", "(", "pet_age", ")", ",", "max", "(", "pet_age", ")", ",", "pettype", "FROM", "pets", "GROUP", "BY", "pettype" ], "query_toks_no_value": [ "select", "avg", "(", "pet_age", ")", ",", "max", "(", "pet_age", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "What is the average and maximum age for each pet type?", "question_toks": [ "What", "is", "the", "average", "and", "maximum", "age", "for", "each", "pet", "type", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, false ], null ] ], [ 1, [ 0, [ 0, 13, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype", "query_toks": [ "SELECT", "avg", "(", "weight", ")", ",", "pettype", "FROM", "pets", "GROUP", "BY", "pettype" ], "query_toks_no_value": [ "select", "avg", "(", "weight", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "Find the average weight for each pet type.", "question_toks": [ "Find", "the", "average", "weight", "for", "each", "pet", "type", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype", "query_toks": [ "SELECT", "avg", "(", "weight", ")", ",", "pettype", "FROM", "pets", "GROUP", "BY", "pettype" ], "query_toks_no_value": [ "select", "avg", "(", "weight", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "What is the average weight for each type of pet?", "question_toks": [ "What", "is", "the", "average", "weight", "for", "each", "type", "of", "pet", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", "query_toks": [ "SELECT", "DISTINCT", "T1.fname", ",", "T1.age", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", ",", "t1", ".", "age", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid" ], "question": "Find the first name and age of students who have a pet.", "question_toks": [ "Find", "the", "first", "name", "and", "age", "of", "students", "who", "have", "a", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", "query_toks": [ "SELECT", "DISTINCT", "T1.fname", ",", "T1.age", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", ",", "t1", ".", "age", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid" ], "question": "What are the different first names and ages of the students who do have pets?", "question_toks": [ "What", "are", "the", "different", "first", "names", "and", "ages", "of", "the", "students", "who", "do", "have", "pets", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", "query_toks": [ "SELECT", "T2.petid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T1.Lname", "=", "'Smith", "'" ], "query_toks_no_value": [ "select", "t2", ".", "petid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t1", ".", "lname", "=", "value" ], "question": "Find the id of the pet owned by student whose last name is ‘Smith’.", "question_toks": [ "Find", "the", "id", "of", "the", "pet", "owned", "by", "student", "whose", "last", "name", "is", "‘Smith’", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Smith\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", "query_toks": [ "SELECT", "T2.petid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T1.Lname", "=", "'Smith", "'" ], "query_toks_no_value": [ "select", "t2", ".", "petid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t1", ".", "lname", "=", "value" ], "question": "What is the id of the pet owned by the student whose last name is 'Smith'?", "question_toks": [ "What", "is", "the", "id", "of", "the", "pet", "owned", "by", "the", "student", "whose", "last", "name", "is", "'Smith", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Smith\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "GROUP", "BY", "T1.stuid" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "group", "by", "t1", ".", "stuid" ], "question": "Find the number of pets for each student who has any pet and student id.", "question_toks": [ "Find", "the", "number", "of", "pets", "for", "each", "student", "who", "has", "any", "pet", "and", "student", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "select count(*) , t1.stuid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid group by t1.stuid", "query_toks": [ "select", "count", "(", "*", ")", ",", "t1.stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1.stuid", "=", "t2.stuid", "group", "by", "t1.stuid" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "group", "by", "t1", ".", "stuid" ], "question": "For students who have pets , how many pets does each student have ? list their ids instead of names .", "question_toks": [ "For", "students", "who", "have", "pets", ",", "how", "many", "pets", "does", "each", "student", "have", "?", "list", "their", "ids", "instead", "of", "names", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1", "query_toks": [ "SELECT", "T1.fname", ",", "T1.sex", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "GROUP", "BY", "T1.stuid", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "fname", ",", "t1", ".", "sex", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "group", "by", "t1", ".", "stuid", "having", "count", "(", "*", ")", ">", "value" ], "question": "Find the first name and gender of student who have more than one pet.", "question_toks": [ "Find", "the", "first", "name", "and", "gender", "of", "student", "who", "have", "more", "than", "one", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1", "query_toks": [ "SELECT", "T1.fname", ",", "T1.sex", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "GROUP", "BY", "T1.stuid", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "fname", ",", "t1", ".", "sex", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "group", "by", "t1", ".", "stuid", "having", "count", "(", "*", ")", ">", "value" ], "question": "What is the first name and gender of the all the students who have more than one pet?", "question_toks": [ "What", "is", "the", "first", "name", "and", "gender", "of", "the", "all", "the", "students", "who", "have", "more", "than", "one", "pet", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "query_toks": [ "SELECT", "T1.lname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pet_age", "=", "3", "AND", "T3.pettype", "=", "'cat", "'" ], "query_toks_no_value": [ "select", "t1", ".", "lname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pet_age", "=", "value", "and", "t3", ".", "pettype", "=", "value" ], "question": "Find the last name of the student who has a cat that is age 3.", "question_toks": [ "Find", "the", "last", "name", "of", "the", "student", "who", "has", "a", "cat", "that", "is", "age", "3", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], 3.0, null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "query_toks": [ "SELECT", "T1.lname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pet_age", "=", "3", "AND", "T3.pettype", "=", "'cat", "'" ], "query_toks_no_value": [ "select", "t1", ".", "lname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pet_age", "=", "value", "and", "t3", ".", "pettype", "=", "value" ], "question": "What is the last name of the student who has a cat that is 3 years old?", "question_toks": [ "What", "is", "the", "last", "name", "of", "the", "student", "who", "has", "a", "cat", "that", "is", "3", "years", "old", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], 3.0, null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "select avg(age) from student where stuid not in (select stuid from has_pet)", "query_toks": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_pet", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_pet", ")" ], "question": "Find the average age of students who do not have any pet .", "question_toks": [ "Find", "the", "average", "age", "of", "students", "who", "do", "not", "have", "any", "pet", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "pets_1", "query": "select avg(age) from student where stuid not in (select stuid from has_pet)", "query_toks": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_pet", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_pet", ")" ], "question": "What is the average age for all students who do not own any pets ?", "question_toks": [ "What", "is", "the", "average", "age", "for", "all", "students", "who", "do", "not", "own", "any", "pets", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "car_1", "query": "SELECT count(*) FROM CONTINENTS;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CONTINENTS", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "continents" ], "question": "How many continents are there?", "question_toks": [ "How", "many", "continents", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CONTINENTS;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CONTINENTS", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "continents" ], "question": "What is the number of continents?", "question_toks": [ "What", "is", "the", "number", "of", "continents", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;", "query_toks": [ "SELECT", "T1.ContId", ",", "T1.Continent", ",", "count", "(", "*", ")", "FROM", "CONTINENTS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.ContId", "=", "T2.Continent", "GROUP", "BY", "T1.ContId", ";" ], "query_toks_no_value": [ "select", "t1", ".", "contid", ",", "t1", ".", "continent", ",", "count", "(", "*", ")", "from", "continents", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "contid", "=", "t2", ".", "continent", "group", "by", "t1", ".", "contid" ], "question": "How many countries does each continent have? List the continent id, continent name and the number of countries.", "question_toks": [ "How", "many", "countries", "does", "each", "continent", "have", "?", "List", "the", "continent", "id", ",", "continent", "name", "and", "the", "number", "of", "countries", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;", "query_toks": [ "SELECT", "T1.ContId", ",", "T1.Continent", ",", "count", "(", "*", ")", "FROM", "CONTINENTS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.ContId", "=", "T2.Continent", "GROUP", "BY", "T1.ContId", ";" ], "query_toks_no_value": [ "select", "t1", ".", "contid", ",", "t1", ".", "continent", ",", "count", "(", "*", ")", "from", "continents", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "contid", "=", "t2", ".", "continent", "group", "by", "t1", ".", "contid" ], "question": "For each continent, list its id, name, and how many countries it has?", "question_toks": [ "For", "each", "continent", ",", "list", "its", "id", ",", "name", ",", "and", "how", "many", "countries", "it", "has", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM COUNTRIES;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "COUNTRIES", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "countries" ], "question": "How many countries are listed?", "question_toks": [ "How", "many", "countries", "are", "listed", "?" ], "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": "car_1", "query": "SELECT count(*) FROM COUNTRIES;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "COUNTRIES", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "countries" ], "question": "How many countries exist?", "question_toks": [ "How", "many", "countries", "exist", "?" ], "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": "car_1", "query": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", "query_toks": [ "SELECT", "T1.FullName", ",", "T1.Id", ",", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", ";" ], "query_toks_no_value": [ "select", "t1", ".", "fullname", ",", "t1", ".", "id", ",", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id" ], "question": "How many models does each car maker produce? List maker full name, id and the number.", "question_toks": [ "How", "many", "models", "does", "each", "car", "maker", "produce", "?", "List", "maker", "full", "name", ",", "id", "and", "the", "number", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", "query_toks": [ "SELECT", "T1.FullName", ",", "T1.Id", ",", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", ";" ], "query_toks_no_value": [ "select", "t1", ".", "fullname", ",", "t1", ".", "id", ",", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id" ], "question": "What is the full name of each car maker, along with its id and how many models it produces?", "question_toks": [ "What", "is", "the", "full", "name", "of", "each", "car", "maker", ",", "along", "with", "its", "id", "and", "how", "many", "models", "it", "produces", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "ORDER", "BY", "T2.horsepower", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "order", "by", "t2", ".", "horsepower", "asc", "limit", "value" ], "question": "Which model of the car has the minimum horsepower?", "question_toks": [ "Which", "model", "of", "the", "car", "has", "the", "minimum", "horsepower", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "ORDER", "BY", "T2.horsepower", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "order", "by", "t2", ".", "horsepower", "asc", "limit", "value" ], "question": "What is the model of the car with the smallest amount of horsepower?", "question_toks": [ "What", "is", "the", "model", "of", "the", "car", "with", "the", "smallest", "amount", "of", "horsepower", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)", "query_toks": [ "SELECT", "T1.model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.Weight", "<", "(", "SELECT", "avg", "(", "Weight", ")", "FROM", "CARS_DATA", ")" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "weight", "<", "(", "select", "avg", "(", "weight", ")", "from", "cars_data", ")" ], "question": "Find the model of the car whose weight is below the average weight.", "question_toks": [ "Find", "the", "model", "of", "the", "car", "whose", "weight", "is", "below", "the", "average", "weight", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 21, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 21, 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": "car_1", "query": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)", "query_toks": [ "SELECT", "T1.model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.Weight", "<", "(", "SELECT", "avg", "(", "Weight", ")", "FROM", "CARS_DATA", ")" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "weight", "<", "(", "select", "avg", "(", "weight", ")", "from", "cars_data", ")" ], "question": "What is the model for the car with a weight smaller than the average?", "question_toks": [ "What", "is", "the", "model", "for", "the", "car", "with", "a", "weight", "smaller", "than", "the", "average", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 21, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 21, 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": "car_1", "query": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';", "query_toks": [ "SELECT", "DISTINCT", "T1.Maker", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "JOIN", "CAR_NAMES", "AS", "T3", "ON", "T2.model", "=", "T3.model", "JOIN", "CARS_DATA", "AS", "T4", "ON", "T3.MakeId", "=", "T4.id", "WHERE", "T4.year", "=", "'1970", "'", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "join", "car_names", "as", "t3", "on", "t2", ".", "model", "=", "t3", ".", "model", "join", "cars_data", "as", "t4", "on", "t3", ".", "makeid", "=", "t4", ".", "id", "where", "t4", ".", "year", "=", "value" ], "question": "Find the name of the makers that produced some cars in the year of 1970?", "question_toks": [ "Find", "the", "name", "of", "the", "makers", "that", "produced", "some", "cars", "in", "the", "year", "of", "1970", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], "\"1970\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';", "query_toks": [ "SELECT", "DISTINCT", "T1.Maker", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "JOIN", "CAR_NAMES", "AS", "T3", "ON", "T2.model", "=", "T3.model", "JOIN", "CARS_DATA", "AS", "T4", "ON", "T3.MakeId", "=", "T4.id", "WHERE", "T4.year", "=", "'1970", "'", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "join", "car_names", "as", "t3", "on", "t2", ".", "model", "=", "t3", ".", "model", "join", "cars_data", "as", "t4", "on", "t3", ".", "makeid", "=", "t4", ".", "id", "where", "t4", ".", "year", "=", "value" ], "question": "What is the name of the different car makers who produced a car in 1970?", "question_toks": [ "What", "is", "the", "name", "of", "the", "different", "car", "makers", "who", "produced", "a", "car", "in", "1970", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], "\"1970\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);", "query_toks": [ "SELECT", "T2.Make", ",", "T1.Year", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T1.Year", "=", "(", "SELECT", "min", "(", "YEAR", ")", "FROM", "CARS_DATA", ")", ";" ], "query_toks_no_value": [ "select", "t2", ".", "make", ",", "t1", ".", "year", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t1", ".", "year", "=", "(", "select", "min", "(", "year", ")", "from", "cars_data", ")" ], "question": "Find the make and production time of the cars that were produced in the earliest year?", "question_toks": [ "Find", "the", "make", "and", "production", "time", "of", "the", "cars", "that", "were", "produced", "in", "the", "earliest", "year", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 23, 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": "car_1", "query": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);", "query_toks": [ "SELECT", "T2.Make", ",", "T1.Year", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T1.Year", "=", "(", "SELECT", "min", "(", "YEAR", ")", "FROM", "CARS_DATA", ")", ";" ], "query_toks_no_value": [ "select", "t2", ".", "make", ",", "t1", ".", "year", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t1", ".", "year", "=", "(", "select", "min", "(", "year", ")", "from", "cars_data", ")" ], "question": "What is the maker of the carr produced in the earliest year and what year was it?", "question_toks": [ "What", "is", "the", "maker", "of", "the", "carr", "produced", "in", "the", "earliest", "year", "and", "what", "year", "was", "it", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 23, 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": "car_1", "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;", "query_toks": [ "SELECT", "DISTINCT", "T1.model", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.model", "=", "T2.model", "JOIN", "CARS_DATA", "AS", "T3", "ON", "T2.MakeId", "=", "T3.id", "WHERE", "T3.year", ">", "1980", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "model", "from", "model_list", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "cars_data", "as", "t3", "on", "t2", ".", "makeid", "=", "t3", ".", "id", "where", "t3", ".", "year", ">", "value" ], "question": "Which distinct car models are the produced after 1980?", "question_toks": [ "Which", "distinct", "car", "models", "are", "the", "produced", "after", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;", "query_toks": [ "SELECT", "DISTINCT", "T1.model", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.model", "=", "T2.model", "JOIN", "CARS_DATA", "AS", "T3", "ON", "T2.MakeId", "=", "T3.id", "WHERE", "T3.year", ">", "1980", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "model", "from", "model_list", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "cars_data", "as", "t3", "on", "t2", ".", "makeid", "=", "t3", ".", "id", "where", "t3", ".", "year", ">", "value" ], "question": "What are the different models for the cards produced after 1980?", "question_toks": [ "What", "are", "the", "different", "models", "for", "the", "cards", "produced", "after", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;", "query_toks": [ "SELECT", "T1.Continent", ",", "count", "(", "*", ")", "FROM", "CONTINENTS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.ContId", "=", "T2.continent", "JOIN", "car_makers", "AS", "T3", "ON", "T2.CountryId", "=", "T3.Country", "GROUP", "BY", "T1.Continent", ";" ], "query_toks_no_value": [ "select", "t1", ".", "continent", ",", "count", "(", "*", ")", "from", "continents", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "contid", "=", "t2", ".", "continent", "join", "car_makers", "as", "t3", "on", "t2", ".", "countryid", "=", "t3", ".", "country", "group", "by", "t1", ".", "continent" ], "question": "How many car makers are there in each continents? List the continent name and the count.", "question_toks": [ "How", "many", "car", "makers", "are", "there", "in", "each", "continents", "?", "List", "the", "continent", "name", "and", "the", "count", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;", "query_toks": [ "SELECT", "T1.Continent", ",", "count", "(", "*", ")", "FROM", "CONTINENTS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.ContId", "=", "T2.continent", "JOIN", "car_makers", "AS", "T3", "ON", "T2.CountryId", "=", "T3.Country", "GROUP", "BY", "T1.Continent", ";" ], "query_toks_no_value": [ "select", "t1", ".", "continent", ",", "count", "(", "*", ")", "from", "continents", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "contid", "=", "t2", ".", "continent", "join", "car_makers", "as", "t3", "on", "t2", ".", "countryid", "=", "t3", ".", "country", "group", "by", "t1", ".", "continent" ], "question": "What is the name of each continent and how many car makers are there in each one?", "question_toks": [ "What", "is", "the", "name", "of", "each", "continent", "and", "how", "many", "car", "makers", "are", "there", "in", "each", "one", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "T2.CountryName", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.Country", "=", "T2.CountryId", "GROUP", "BY", "T1.Country", "ORDER", "BY", "Count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t2", ".", "countryname", "from", "car_makers", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "country", "=", "t2", ".", "countryid", "group", "by", "t1", ".", "country", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which of the countries has the most car makers? List the country name.", "question_toks": [ "Which", "of", "the", "countries", "has", "the", "most", "car", "makers", "?", "List", "the", "country", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "T2.CountryName", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.Country", "=", "T2.CountryId", "GROUP", "BY", "T1.Country", "ORDER", "BY", "Count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t2", ".", "countryname", "from", "car_makers", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "country", "=", "t2", ".", "countryid", "group", "by", "t1", ".", "country", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name of the country with the most car makers?", "question_toks": [ "What", "is", "the", "name", "of", "the", "country", "with", "the", "most", "car", "makers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select count(*) , t2.fullname from model_list as t1 join car_makers as t2 on t1.maker = t2.id group by t2.id;", "query_toks": [ "select", "count", "(", "*", ")", ",", "t2.fullname", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.maker", "=", "t2.id", "group", "by", "t2.id", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t2", ".", "fullname", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "maker", "=", "t2", ".", "id", "group", "by", "t2", ".", "id" ], "question": "How many car models are produced by each maker ? Only list the count and the maker full name .", "question_toks": [ "How", "many", "car", "models", "are", "produced", "by", "each", "maker", "?", "Only", "list", "the", "count", "and", "the", "maker", "full", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id;", "query_toks": [ "SELECT", "Count", "(", "*", ")", ",", "T2.FullName", ",", "T2.id", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.Maker", "=", "T2.Id", "GROUP", "BY", "T2.id", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t2", ".", "fullname", ",", "t2", ".", "id", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "maker", "=", "t2", ".", "id", "group", "by", "t2", ".", "id" ], "question": "What is the number of car models that are produced by each maker and what is the id and full name of each maker?", "question_toks": [ "What", "is", "the", "number", "of", "car", "models", "that", "are", "produced", "by", "each", "maker", "and", "what", "is", "the", "id", "and", "full", "name", "of", "each", "maker", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", "query_toks": [ "SELECT", "T1.Accelerate", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T2.Make", "=", "'amc", "hornet", "sportabout", "(", "sw", ")", "'", ";" ], "query_toks_no_value": [ "select", "t1", ".", "accelerate", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t2", ".", "make", "=", "value" ], "question": "What is the accelerate of the car make amc hornet sportabout (sw)?", "question_toks": [ "What", "is", "the", "accelerate", "of", "the", "car", "make", "amc", "hornet", "sportabout", "(", "sw", ")", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 22, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"amc hornet sportabout (sw)\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", "query_toks": [ "SELECT", "T1.Accelerate", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T2.Make", "=", "'amc", "hornet", "sportabout", "(", "sw", ")", "'", ";" ], "query_toks_no_value": [ "select", "t1", ".", "accelerate", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t2", ".", "make", "=", "value" ], "question": "How much does the car accelerate that makes amc hornet sportabout (sw)?", "question_toks": [ "How", "much", "does", "the", "car", "accelerate", "that", "makes", "amc", "hornet", "sportabout", "(", "sw", ")", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 22, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"amc hornet sportabout (sw)\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.Country", "=", "T2.CountryId", "WHERE", "T2.CountryName", "=", "'france", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "country", "=", "t2", ".", "countryid", "where", "t2", ".", "countryname", "=", "value" ], "question": "How many car makers are there in france?", "question_toks": [ "How", "many", "car", "makers", "are", "there", "in", "france", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"france\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.Country", "=", "T2.CountryId", "WHERE", "T2.CountryName", "=", "'france", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "country", "=", "t2", ".", "countryid", "where", "t2", ".", "countryname", "=", "value" ], "question": "What is the number of makers of care in France?", "question_toks": [ "What", "is", "the", "number", "of", "makers", "of", "care", "in", "France", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"france\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.Maker", "=", "T2.Id", "JOIN", "COUNTRIES", "AS", "T3", "ON", "T2.Country", "=", "T3.CountryId", "WHERE", "T3.CountryName", "=", "'usa", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "maker", "=", "t2", ".", "id", "join", "countries", "as", "t3", "on", "t2", ".", "country", "=", "t3", ".", "countryid", "where", "t3", ".", "countryname", "=", "value" ], "question": "How many car models are produced in the usa?", "question_toks": [ "How", "many", "car", "models", "are", "produced", "in", "the", "usa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"usa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.Maker", "=", "T2.Id", "JOIN", "COUNTRIES", "AS", "T3", "ON", "T2.Country", "=", "T3.CountryId", "WHERE", "T3.CountryName", "=", "'usa", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "maker", "=", "t2", ".", "id", "join", "countries", "as", "t3", "on", "t2", ".", "country", "=", "t3", ".", "countryid", "where", "t3", ".", "countryname", "=", "value" ], "question": "What is the count of the car models produced in the United States?", "question_toks": [ "What", "is", "the", "count", "of", "the", "car", "models", "produced", "in", "the", "United", "States", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"usa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;", "query_toks": [ "SELECT", "avg", "(", "mpg", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", "=", "4", ";" ], "query_toks_no_value": [ "select", "avg", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "value" ], "question": "What is the average miles per gallon(mpg) of the cars with 4 cylinders?", "question_toks": [ "What", "is", "the", "average", "miles", "per", "gallon", "(", "mpg", ")", "of", "the", "cars", "with", "4", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;", "query_toks": [ "SELECT", "avg", "(", "mpg", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", "=", "4", ";" ], "query_toks_no_value": [ "select", "avg", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "value" ], "question": "What is the average miles per gallon of all the cards with 4 cylinders?", "question_toks": [ "What", "is", "the", "average", "miles", "per", "gallon", "of", "all", "the", "cards", "with", "4", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select min(weight) from cars_data where cylinders = 8 and year = 1974", "query_toks": [ "select", "min", "(", "weight", ")", "from", "cars_data", "where", "cylinders", "=", "8", "and", "year", "=", "1974" ], "query_toks_no_value": [ "select", "min", "(", "weight", ")", "from", "cars_data", "where", "cylinders", "=", "value", "and", "year", "=", "value" ], "question": "What is the smallest weight of the car produced with 8 cylinders on 1974 ?", "question_toks": [ "What", "is", "the", "smallest", "weight", "of", "the", "car", "produced", "with", "8", "cylinders", "on", "1974", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 8.0, null ], "and", [ false, 2, [ 0, [ 0, 23, false ], null ], 1974.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select min(weight) from cars_data where cylinders = 8 and year = 1974", "query_toks": [ "select", "min", "(", "weight", ")", "from", "cars_data", "where", "cylinders", "=", "8", "and", "year", "=", "1974" ], "query_toks_no_value": [ "select", "min", "(", "weight", ")", "from", "cars_data", "where", "cylinders", "=", "value", "and", "year", "=", "value" ], "question": "What is the minimum weight of the car with 8 cylinders produced in 1974 ?", "question_toks": [ "What", "is", "the", "minimum", "weight", "of", "the", "car", "with", "8", "cylinders", "produced", "in", "1974", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 8.0, null ], "and", [ false, 2, [ 0, [ 0, 23, false ], null ], 1974.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Maker , Model FROM MODEL_LIST;", "query_toks": [ "SELECT", "Maker", ",", "Model", "FROM", "MODEL_LIST", ";" ], "query_toks_no_value": [ "select", "maker", ",", "model", "from", "model_list" ], "question": "What are all the makers and models?", "question_toks": [ "What", "are", "all", "the", "makers", "and", "models", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Maker , Model FROM MODEL_LIST;", "query_toks": [ "SELECT", "Maker", ",", "Model", "FROM", "MODEL_LIST", ";" ], "query_toks_no_value": [ "select", "maker", ",", "model", "from", "model_list" ], "question": "What are the makers and models?", "question_toks": [ "What", "are", "the", "makers", "and", "models", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;", "query_toks": [ "SELECT", "T1.CountryName", ",", "T1.CountryId", "FROM", "COUNTRIES", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.CountryId", "=", "T2.Country", "GROUP", "BY", "T1.CountryId", "HAVING", "count", "(", "*", ")", ">", "=", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryname", ",", "t1", ".", "countryid", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the countries having at least one car maker? List name and id.", "question_toks": [ "What", "are", "the", "countries", "having", "at", "least", "one", "car", "maker", "?", "List", "name", "and", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;", "query_toks": [ "SELECT", "T1.CountryName", ",", "T1.CountryId", "FROM", "COUNTRIES", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.CountryId", "=", "T2.Country", "GROUP", "BY", "T1.CountryId", "HAVING", "count", "(", "*", ")", ">", "=", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryname", ",", "t1", ".", "countryid", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the names and ids of all countries with at least one car maker?", "question_toks": [ "What", "are", "the", "names", "and", "ids", "of", "all", "countries", "with", "at", "least", "one", "car", "maker", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "horsepower", ">", "150", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "horsepower", ">", "value" ], "question": "What is the number of the cars with horsepower more than 150?", "question_toks": [ "What", "is", "the", "number", "of", "the", "cars", "with", "horsepower", "more", "than", "150", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 20, false ], null ], 150.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "horsepower", ">", "150", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "horsepower", ">", "value" ], "question": "What is the number of cars with a horsepower greater than 150?", "question_toks": [ "What", "is", "the", "number", "of", "cars", "with", "a", "horsepower", "greater", "than", "150", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 20, false ], null ], 150.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;", "query_toks": [ "SELECT", "avg", "(", "Weight", ")", ",", "YEAR", "FROM", "CARS_DATA", "GROUP", "BY", "YEAR", ";" ], "query_toks_no_value": [ "select", "avg", "(", "weight", ")", ",", "year", "from", "cars_data", "group", "by", "year" ], "question": "What is the average weight of cars each year?", "question_toks": [ "What", "is", "the", "average", "weight", "of", "cars", "each", "year", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 21, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;", "query_toks": [ "SELECT", "avg", "(", "Weight", ")", ",", "YEAR", "FROM", "CARS_DATA", "GROUP", "BY", "YEAR", ";" ], "query_toks_no_value": [ "select", "avg", "(", "weight", ")", ",", "year", "from", "cars_data", "group", "by", "year" ], "question": "What is the average weight and year for each year?", "question_toks": [ "What", "is", "the", "average", "weight", "and", "year", "for", "each", "year", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 21, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;", "query_toks": [ "SELECT", "T1.CountryName", "FROM", "COUNTRIES", "AS", "T1", "JOIN", "CONTINENTS", "AS", "T2", "ON", "T1.Continent", "=", "T2.ContId", "JOIN", "CAR_MAKERS", "AS", "T3", "ON", "T1.CountryId", "=", "T3.Country", "WHERE", "T2.Continent", "=", "'europe", "'", "GROUP", "BY", "T1.CountryName", "HAVING", "count", "(", "*", ")", ">", "=", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "continents", "as", "t2", "on", "t1", ".", "continent", "=", "t2", ".", "contid", "join", "car_makers", "as", "t3", "on", "t1", ".", "countryid", "=", "t3", ".", "country", "where", "t2", ".", "continent", "=", "value", "group", "by", "t1", ".", "countryname", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Which countries in europe have at least 3 car manufacturers?", "question_toks": [ "Which", "countries", "in", "europe", "have", "at", "least", "3", "car", "manufacturers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"europe\"", null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;", "query_toks": [ "SELECT", "T1.CountryName", "FROM", "COUNTRIES", "AS", "T1", "JOIN", "CONTINENTS", "AS", "T2", "ON", "T1.Continent", "=", "T2.ContId", "JOIN", "CAR_MAKERS", "AS", "T3", "ON", "T1.CountryId", "=", "T3.Country", "WHERE", "T2.Continent", "=", "'europe", "'", "GROUP", "BY", "T1.CountryName", "HAVING", "count", "(", "*", ")", ">", "=", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "continents", "as", "t2", "on", "t1", ".", "continent", "=", "t2", ".", "contid", "join", "car_makers", "as", "t3", "on", "t1", ".", "countryid", "=", "t3", ".", "country", "where", "t2", ".", "continent", "=", "value", "group", "by", "t1", ".", "countryname", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the names of all European countries with at least 3 manufacturers?", "question_toks": [ "What", "are", "the", "names", "of", "all", "European", "countries", "with", "at", "least", "3", "manufacturers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"europe\"", null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;", "query_toks": [ "SELECT", "T2.horsepower", ",", "T1.Make", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.cylinders", "=", "3", "ORDER", "BY", "T2.horsepower", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t2", ".", "horsepower", ",", "t1", ".", "make", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "cylinders", "=", "value", "order", "by", "t2", ".", "horsepower", "desc", "limit", "value" ], "question": "What is the maximum horsepower and the make of the car models with 3 cylinders?", "question_toks": [ "What", "is", "the", "maximum", "horsepower", "and", "the", "make", "of", "the", "car", "models", "with", "3", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 3.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;", "query_toks": [ "SELECT", "T2.horsepower", ",", "T1.Make", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.cylinders", "=", "3", "ORDER", "BY", "T2.horsepower", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t2", ".", "horsepower", ",", "t1", ".", "make", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "cylinders", "=", "value", "order", "by", "t2", ".", "horsepower", "desc", "limit", "value" ], "question": "What is the largest amount of horsepower for the models with 3 cylinders and what make is it?", "question_toks": [ "What", "is", "the", "largest", "amount", "of", "horsepower", "for", "the", "models", "with", "3", "cylinders", "and", "what", "make", "is", "it", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 3.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "ORDER", "BY", "T2.mpg", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "order", "by", "t2", ".", "mpg", "desc", "limit", "value" ], "question": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon.", "question_toks": [ "Which", "model", "saves", "the", "most", "gasoline", "?", "That", "is", "to", "say", ",", "have", "the", "maximum", "miles", "per", "gallon", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 17, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select t1.model from car_names as t1 join cars_data as t2 on t1.makeid = t2.id order by t2.mpg desc limit 1;", "query_toks": [ "select", "t1.model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1.makeid", "=", "t2.id", "order", "by", "t2.mpg", "desc", "limit", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "order", "by", "t2", ".", "mpg", "desc", "limit", "value" ], "question": "What is the car model with the highest mpg ?", "question_toks": [ "What", "is", "the", "car", "model", "with", "the", "highest", "mpg", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 17, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR < 1980;", "query_toks": [ "SELECT", "avg", "(", "horsepower", ")", "FROM", "CARS_DATA", "WHERE", "YEAR", "<", "1980", ";" ], "query_toks_no_value": [ "select", "avg", "(", "horsepower", ")", "from", "cars_data", "where", "year", "<", "value" ], "question": "What is the average horsepower of the cars before 1980?", "question_toks": [ "What", "is", "the", "average", "horsepower", "of", "the", "cars", "before", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select avg(horsepower) from cars_data where year < 1980;", "query_toks": [ "select", "avg", "(", "horsepower", ")", "from", "cars_data", "where", "year", "<", "1980", ";" ], "query_toks_no_value": [ "select", "avg", "(", "horsepower", ")", "from", "cars_data", "where", "year", "<", "value" ], "question": "What is the average horsepower for all cars produced before 1980 ?", "question_toks": [ "What", "is", "the", "average", "horsepower", "for", "all", "cars", "produced", "before", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", "query_toks": [ "SELECT", "avg", "(", "T2.edispl", ")", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T1.Model", "=", "'volvo", "'", ";" ], "query_toks_no_value": [ "select", "avg", "(", "t2", ".", "edispl", ")", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t1", ".", "model", "=", "value" ], "question": "What is the average edispl of the cars of model volvo?", "question_toks": [ "What", "is", "the", "average", "edispl", "of", "the", "cars", "of", "model", "volvo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 14, false ], null ], "\"volvo\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", "query_toks": [ "SELECT", "avg", "(", "T2.edispl", ")", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T1.Model", "=", "'volvo", "'", ";" ], "query_toks_no_value": [ "select", "avg", "(", "t2", ".", "edispl", ")", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t1", ".", "model", "=", "value" ], "question": "What is the average edispl for all volvos?", "question_toks": [ "What", "is", "the", "average", "edispl", "for", "all", "volvos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 14, false ], null ], "\"volvo\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;", "query_toks": [ "SELECT", "max", "(", "Accelerate", ")", ",", "Cylinders", "FROM", "CARS_DATA", "GROUP", "BY", "Cylinders", ";" ], "query_toks_no_value": [ "select", "max", "(", "accelerate", ")", ",", "cylinders", "from", "cars_data", "group", "by", "cylinders" ], "question": "What is the maximum accelerate for different number of cylinders?", "question_toks": [ "What", "is", "the", "maximum", "accelerate", "for", "different", "number", "of", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 22, false ], null ] ], [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;", "query_toks": [ "SELECT", "max", "(", "Accelerate", ")", ",", "Cylinders", "FROM", "CARS_DATA", "GROUP", "BY", "Cylinders", ";" ], "query_toks_no_value": [ "select", "max", "(", "accelerate", ")", ",", "cylinders", "from", "cars_data", "group", "by", "cylinders" ], "question": "What is the maximum accelerate for all the different cylinders?", "question_toks": [ "What", "is", "the", "maximum", "accelerate", "for", "all", "the", "different", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 22, false ], null ] ], [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "Model", "FROM", "CAR_NAMES", "GROUP", "BY", "Model", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "model", "from", "car_names", "group", "by", "model", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which model has the most version(make) of cars?", "question_toks": [ "Which", "model", "has", "the", "most", "version", "(", "make", ")", "of", "cars", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 14, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "Model", "FROM", "CAR_NAMES", "GROUP", "BY", "Model", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "model", "from", "car_names", "group", "by", "model", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What model has the most different versions?", "question_toks": [ "What", "model", "has", "the", "most", "different", "versions", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 14, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", ">", "4", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "cylinders", ">", "value" ], "question": "How many cars have more than 4 cylinders?", "question_toks": [ "How", "many", "cars", "have", "more", "than", "4", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", ">", "4", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "cylinders", ">", "value" ], "question": "What is the number of cars with more than 4 cylinders?", "question_toks": [ "What", "is", "the", "number", "of", "cars", "with", "more", "than", "4", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE YEAR = 1980;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "YEAR", "=", "1980", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "year", "=", "value" ], "question": "how many cars were produced in 1980?", "question_toks": [ "how", "many", "cars", "were", "produced", "in", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE YEAR = 1980;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "YEAR", "=", "1980", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "year", "=", "value" ], "question": "In 1980, how many cars were made?", "question_toks": [ "In", "1980", ",", "how", "many", "cars", "were", "made", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "WHERE", "T1.FullName", "=", "'American", "Motor", "Company", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "where", "t1", ".", "fullname", "=", "value" ], "question": "How many car models were produced by the maker with full name American Motor Company?", "question_toks": [ "How", "many", "car", "models", "were", "produced", "by", "the", "maker", "with", "full", "name", "American", "Motor", "Company", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"American Motor Company\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "WHERE", "T1.FullName", "=", "'American", "Motor", "Company", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "where", "t1", ".", "fullname", "=", "value" ], "question": "What is the number of car models created by the car maker American Motor Company?", "question_toks": [ "What", "is", "the", "number", "of", "car", "models", "created", "by", "the", "car", "maker", "American", "Motor", "Company", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"American Motor Company\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;", "query_toks": [ "SELECT", "T1.FullName", ",", "T1.Id", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", "HAVING", "count", "(", "*", ")", ">", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "fullname", ",", "t1", ".", "id", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Which makers designed more than 3 car models? List full name and the id.", "question_toks": [ "Which", "makers", "designed", "more", "than", "3", "car", "models", "?", "List", "full", "name", "and", "the", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;", "query_toks": [ "SELECT", "T1.FullName", ",", "T1.Id", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", "HAVING", "count", "(", "*", ")", ">", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "fullname", ",", "t1", ".", "id", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are the names and ids of all makers with more than 3 models?", "question_toks": [ "What", "are", "the", "names", "and", "ids", "of", "all", "makers", "with", "more", "than", "3", "models", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;", "query_toks": [ "SELECT", "DISTINCT", "T2.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Model", "=", "T2.Model", "JOIN", "CAR_MAKERS", "AS", "T3", "ON", "T2.Maker", "=", "T3.Id", "JOIN", "CARS_DATA", "AS", "T4", "ON", "T1.MakeId", "=", "T4.Id", "WHERE", "T3.FullName", "=", "'General", "Motors", "'", "OR", "T4.weight", ">", "3500", ";" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "model", "from", "car_names", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "car_makers", "as", "t3", "on", "t2", ".", "maker", "=", "t3", ".", "id", "join", "cars_data", "as", "t4", "on", "t1", ".", "makeid", "=", "t4", ".", "id", "where", "t3", ".", "fullname", "=", "value", "or", "t4", ".", "weight", ">", "value" ], "question": "Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?", "question_toks": [ "Which", "distinctive", "models", "are", "produced", "by", "maker", "with", "the", "full", "name", "General", "Motors", "or", "weighing", "more", "than", "3500", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 3 ], [ "table_unit", 2 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 12, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"General Motors\"", null ], "or", [ false, 3, [ 0, [ 0, 21, false ], null ], 3500.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;", "query_toks": [ "SELECT", "DISTINCT", "T2.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Model", "=", "T2.Model", "JOIN", "CAR_MAKERS", "AS", "T3", "ON", "T2.Maker", "=", "T3.Id", "JOIN", "CARS_DATA", "AS", "T4", "ON", "T1.MakeId", "=", "T4.Id", "WHERE", "T3.FullName", "=", "'General", "Motors", "'", "OR", "T4.weight", ">", "3500", ";" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "model", "from", "car_names", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "car_makers", "as", "t3", "on", "t2", ".", "maker", "=", "t3", ".", "id", "join", "cars_data", "as", "t4", "on", "t1", ".", "makeid", "=", "t4", ".", "id", "where", "t3", ".", "fullname", "=", "value", "or", "t4", ".", "weight", ">", "value" ], "question": "What are the different models created by either the car maker General Motors or weighed more than 3500?", "question_toks": [ "What", "are", "the", "different", "models", "created", "by", "either", "the", "car", "maker", "General", "Motors", "or", "weighed", "more", "than", "3500", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 3 ], [ "table_unit", 2 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 12, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"General Motors\"", null ], "or", [ false, 3, [ 0, [ 0, 21, false ], null ], 3500.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select distinct year from cars_data where weight between 3000 and 4000;", "query_toks": [ "select", "distinct", "year", "from", "cars_data", "where", "weight", "between", "3000", "and", "4000", ";" ], "query_toks_no_value": [ "select", "distinct", "year", "from", "cars_data", "where", "weight", "between", "value", "and", "value" ], "question": "In which years cars were produced weighing no less than 3000 and no more than 4000 ?", "question_toks": [ "In", "which", "years", "cars", "were", "produced", "weighing", "no", "less", "than", "3000", "and", "no", "more", "than", "4000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 21, false ], null ], 3000.0, 4000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select distinct year from cars_data where weight between 3000 and 4000;", "query_toks": [ "select", "distinct", "year", "from", "cars_data", "where", "weight", "between", "3000", "and", "4000", ";" ], "query_toks_no_value": [ "select", "distinct", "year", "from", "cars_data", "where", "weight", "between", "value", "and", "value" ], "question": "What are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 ?", "question_toks": [ "What", "are", "the", "different", "years", "in", "which", "there", "were", "cars", "produced", "that", "weighed", "less", "than", "4000", "and", "also", "cars", "that", "weighted", "more", "than", "3000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 21, false ], null ], 3000.0, 4000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.horsepower", "FROM", "CARS_DATA", "AS", "T1", "ORDER", "BY", "T1.accelerate", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "horsepower", "from", "cars_data", "as", "t1", "order", "by", "t1", ".", "accelerate", "desc", "limit", "value" ], "question": "What is the horsepower of the car with the largest accelerate?", "question_toks": [ "What", "is", "the", "horsepower", "of", "the", "car", "with", "the", "largest", "accelerate", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 22, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.horsepower", "FROM", "CARS_DATA", "AS", "T1", "ORDER", "BY", "T1.accelerate", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "horsepower", "from", "cars_data", "as", "t1", "order", "by", "t1", ".", "accelerate", "desc", "limit", "value" ], "question": "What is the horsepower of the car with the greatest accelerate?", "question_toks": [ "What", "is", "the", "horsepower", "of", "the", "car", "with", "the", "greatest", "accelerate", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 22, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;", "query_toks": [ "SELECT", "T1.cylinders", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T2.Model", "=", "'volvo", "'", "ORDER", "BY", "T1.accelerate", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "cylinders", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t2", ".", "model", "=", "value", "order", "by", "t1", ".", "accelerate", "asc", "limit", "value" ], "question": "For model volvo, how many cylinders does the car with the least accelerate have?", "question_toks": [ "For", "model", "volvo", ",", "how", "many", "cylinders", "does", "the", "car", "with", "the", "least", "accelerate", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 14, false ], null ], "\"volvo\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 22, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;", "query_toks": [ "SELECT", "T1.cylinders", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T2.Model", "=", "'volvo", "'", "ORDER", "BY", "T1.accelerate", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "cylinders", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t2", ".", "model", "=", "value", "order", "by", "t1", ".", "accelerate", "asc", "limit", "value" ], "question": "For a volvo model, how many cylinders does the version with least accelerate have?", "question_toks": [ "For", "a", "volvo", "model", ",", "how", "many", "cylinders", "does", "the", "version", "with", "least", "accelerate", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 14, false ], null ], "\"volvo\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 22, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Accelerate", ">", "(", "SELECT", "Accelerate", "FROM", "CARS_DATA", "ORDER", "BY", "Horsepower", "DESC", "LIMIT", "1", ")", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "accelerate", ">", "(", "select", "accelerate", "from", "cars_data", "order", "by", "horsepower", "desc", "limit", "value", ")" ], "question": "How many cars have a larger accelerate than the car with the largest horsepower?", "question_toks": [ "How", "many", "cars", "have", "a", "larger", "accelerate", "than", "the", "car", "with", "the", "largest", "horsepower", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 22, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 22, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Accelerate", ">", "(", "SELECT", "Accelerate", "FROM", "CARS_DATA", "ORDER", "BY", "Horsepower", "DESC", "LIMIT", "1", ")", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "accelerate", ">", "(", "select", "accelerate", "from", "cars_data", "order", "by", "horsepower", "desc", "limit", "value", ")" ], "question": "What is the number of cars with a greater accelerate than the one with the most horsepower?", "question_toks": [ "What", "is", "the", "number", "of", "cars", "with", "a", "greater", "accelerate", "than", "the", "one", "with", "the", "most", "horsepower", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 22, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 22, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2", "query_toks": [ "select", "count", "(", "*", ")", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.countryid", "=", "t2.country", "group", "by", "t1.countryid", "having", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "value" ], "question": "How many countries has more than 2 car makers ?", "question_toks": [ "How", "many", "countries", "has", "more", "than", "2", "car", "makers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2", "query_toks": [ "select", "count", "(", "*", ")", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.countryid", "=", "t2.country", "group", "by", "t1.countryid", "having", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "value" ], "question": "What is the number of countries with more than 2 car makers ?", "question_toks": [ "What", "is", "the", "number", "of", "countries", "with", "more", "than", "2", "car", "makers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", ">", "6", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "cylinders", ">", "value" ], "question": "How many cars has over 6 cylinders?", "question_toks": [ "How", "many", "cars", "has", "over", "6", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 18, false ], null ], 6.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", ">", "6", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "cylinders", ">", "value" ], "question": "What is the number of carsw ith over 6 cylinders?", "question_toks": [ "What", "is", "the", "number", "of", "carsw", "ith", "over", "6", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 18, false ], null ], 6.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.Cylinders", "=", "4", "ORDER", "BY", "T2.horsepower", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "cylinders", "=", "value", "order", "by", "t2", ".", "horsepower", "desc", "limit", "value" ], "question": "For the cars with 4 cylinders, which model has the largest horsepower?", "question_toks": [ "For", "the", "cars", "with", "4", "cylinders", ",", "which", "model", "has", "the", "largest", "horsepower", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.Cylinders", "=", "4", "ORDER", "BY", "T2.horsepower", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "cylinders", "=", "value", "order", "by", "t2", ".", "horsepower", "desc", "limit", "value" ], "question": "For all of the 4 cylinder cars, which model has the most horsepower?", "question_toks": [ "For", "all", "of", "the", "4", "cylinder", "cars", ",", "which", "model", "has", "the", "most", "horsepower", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.MakeId , T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT min(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3;", "query_toks": [ "SELECT", "T2.MakeId", ",", "T2.Make", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T1.Horsepower", ">", "(", "SELECT", "min", "(", "Horsepower", ")", "FROM", "CARS_DATA", ")", "AND", "T1.Cylinders", "<", "=", "3", ";" ], "query_toks_no_value": [ "select", "t2", ".", "makeid", ",", "t2", ".", "make", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t1", ".", "horsepower", ">", "(", "select", "min", "(", "horsepower", ")", "from", "cars_data", ")", "and", "t1", ".", "cylinders", "<", "=", "value" ], "question": "Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.", "question_toks": [ "Among", "the", "cars", "with", "more", "than", "lowest", "horsepower", ",", "which", "ones", "do", "not", "have", "more", "than", "3", "cylinders", "?", "List", "the", "car", "makeid", "and", "make", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ], "and", [ false, 6, [ 0, [ 0, 18, false ], null ], 3.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select t2.makeid , t2.make from cars_data as t1 join car_names as t2 on t1.id = t2.makeid where t1.horsepower > (select min(horsepower) from cars_data) and t1.cylinders < 4;", "query_toks": [ "select", "t2.makeid", ",", "t2.make", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1.id", "=", "t2.makeid", "where", "t1.horsepower", ">", "(", "select", "min", "(", "horsepower", ")", "from", "cars_data", ")", "and", "t1.cylinders", "<", "4", ";" ], "query_toks_no_value": [ "select", "t2", ".", "makeid", ",", "t2", ".", "make", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t1", ".", "horsepower", ">", "(", "select", "min", "(", "horsepower", ")", "from", "cars_data", ")", "and", "t1", ".", "cylinders", "<", "value" ], "question": "Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ?", "question_toks": [ "Among", "the", "cars", "that", "do", "not", "have", "the", "minimum", "horsepower", ",", "what", "are", "the", "make", "ids", "and", "names", "of", "all", "those", "with", "less", "than", "4", "cylinders", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ], "and", [ false, 4, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select max(mpg) from cars_data where cylinders = 8 or year < 1980", "query_toks": [ "select", "max", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "8", "or", "year", "<", "1980" ], "query_toks_no_value": [ "select", "max", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "value", "or", "year", "<", "value" ], "question": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?", "question_toks": [ "What", "is", "the", "maximum", "miles", "per", "gallon", "of", "the", "car", "with", "8", "cylinders", "or", "produced", "before", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 8.0, null ], "or", [ false, 4, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select max(mpg) from cars_data where cylinders = 8 or year < 1980", "query_toks": [ "select", "max", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "8", "or", "year", "<", "1980" ], "query_toks_no_value": [ "select", "max", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "value", "or", "year", "<", "value" ], "question": "What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ?", "question_toks": [ "What", "is", "the", "maximum", "mpg", "of", "the", "cars", "that", "had", "8", "cylinders", "or", "that", "were", "produced", "before", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 8.0, null ], "or", [ false, 4, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';", "query_toks": [ "SELECT", "DISTINCT", "T1.model", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Model", "=", "T2.Model", "JOIN", "CARS_DATA", "AS", "T3", "ON", "T2.MakeId", "=", "T3.Id", "JOIN", "CAR_MAKERS", "AS", "T4", "ON", "T1.Maker", "=", "T4.Id", "WHERE", "T3.weight", "<", "3500", "AND", "T4.FullName", "!", "=", "'Ford", "Motor", "Company", "'", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "model", "from", "model_list", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "cars_data", "as", "t3", "on", "t2", ".", "makeid", "=", "t3", ".", "id", "join", "car_makers", "as", "t4", "on", "t1", ".", "maker", "=", "t4", ".", "id", "where", "t3", ".", "weight", "<", "value", "and", "t4", ".", "fullname", "!", "=", "value" ], "question": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'?", "question_toks": [ "Which", "models", "are", "lighter", "than", "3500", "but", "not", "built", "by", "the", "'Ford", "Motor", "Company", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 21, false ], null ], 3500.0, null ], "and", [ false, 7, [ 0, [ 0, 8, false ], null ], "\"Ford Motor Company\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';", "query_toks": [ "SELECT", "DISTINCT", "T1.model", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Model", "=", "T2.Model", "JOIN", "CARS_DATA", "AS", "T3", "ON", "T2.MakeId", "=", "T3.Id", "JOIN", "CAR_MAKERS", "AS", "T4", "ON", "T1.Maker", "=", "T4.Id", "WHERE", "T3.weight", "<", "3500", "AND", "T4.FullName", "!", "=", "'Ford", "Motor", "Company", "'", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "model", "from", "model_list", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "cars_data", "as", "t3", "on", "t2", ".", "makeid", "=", "t3", ".", "id", "join", "car_makers", "as", "t4", "on", "t1", ".", "maker", "=", "t4", ".", "id", "where", "t3", ".", "weight", "<", "value", "and", "t4", ".", "fullname", "!", "=", "value" ], "question": "What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company?", "question_toks": [ "What", "are", "the", "different", "models", "wthat", "are", "lighter", "than", "3500", "but", "were", "not", "built", "by", "the", "Ford", "Motor", "Company", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 21, false ], null ], 3500.0, null ], "and", [ false, 7, [ 0, [ 0, 8, false ], null ], "\"Ford Motor Company\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", "query_toks": [ "SELECT", "CountryName", "FROM", "countries", "EXCEPT", "SELECT", "T1.CountryName", "FROM", "countries", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.countryId", "=", "T2.Country", ";" ], "query_toks_no_value": [ "select", "countryname", "from", "countries", "except", "select", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country" ], "question": "What are the name of the countries where there is not a single car maker?", "question_toks": [ "What", "are", "the", "name", "of", "the", "countries", "where", "there", "is", "not", "a", "single", "car", "maker", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "car_1", "query": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", "query_toks": [ "SELECT", "CountryName", "FROM", "countries", "EXCEPT", "SELECT", "T1.CountryName", "FROM", "countries", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.countryId", "=", "T2.Country", ";" ], "query_toks_no_value": [ "select", "countryname", "from", "countries", "except", "select", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country" ], "question": "What are the names of the countries with no car makers?", "question_toks": [ "What", "are", "the", "names", "of", "the", "countries", "with", "no", "car", "makers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "car_1", "query": "select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker group by t1.id having count(*) >= 2 intersect select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker join car_names as t3 on t2.model = t3.model group by t1.id having count(*) > 3;", "query_toks": [ "select", "t1.id", ",", "t1.maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1.id", "=", "t2.maker", "group", "by", "t1.id", "having", "count", "(", "*", ")", ">=", "2", "intersect", "select", "t1.id", ",", "t1.maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1.id", "=", "t2.maker", "join", "car_names", "as", "t3", "on", "t2.model", "=", "t3.model", "group", "by", "t1.id", "having", "count", "(", "*", ")", ">", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "id", ",", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "=", "value", "intersect", "select", "t1", ".", "id", ",", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "join", "car_names", "as", "t3", "on", "t2", ".", "model", "=", "t3", ".", "model", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .", "question_toks": [ "Which", "are", "the", "car", "makers", "which", "produce", "at", "least", "2", "models", "and", "more", "than", "3", "car", "makers", "?", "List", "the", "id", "and", "the", "maker", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3;", "query_toks": [ "SELECT", "T1.Id", ",", "T1.Maker", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", "HAVING", "count", "(", "*", ")", ">", "=", "2", "INTERSECT", "SELECT", "T1.Id", ",", "T1.Maker", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "JOIN", "CAR_NAMES", "AS", "T3", "ON", "T2.model", "=", "T3.model", "GROUP", "BY", "T1.Id", "HAVING", "count", "(", "*", ")", ">", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "id", ",", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "=", "value", "intersect", "select", "t1", ".", "id", ",", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "join", "car_names", "as", "t3", "on", "t2", ".", "model", "=", "t3", ".", "model", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?", "question_toks": [ "What", "are", "the", "ids", "and", "makers", "of", "all", "car", "makers", "that", "produce", "at", "least", "2", "models", "and", "make", "more", "than", "3", "cars", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat';", "query_toks": [ "SELECT", "T1.countryId", ",", "T1.CountryName", "FROM", "Countries", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.CountryId", "=", "T2.Country", "GROUP", "BY", "T1.countryId", "HAVING", "count", "(", "*", ")", ">", "3", "UNION", "SELECT", "T1.countryId", ",", "T1.CountryName", "FROM", "Countries", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.CountryId", "=", "T2.Country", "JOIN", "MODEL_LIST", "AS", "T3", "ON", "T2.Id", "=", "T3.Maker", "WHERE", "T3.Model", "=", "'fiat", "'", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryid", ",", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "value", "union", "select", "t1", ".", "countryid", ",", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "join", "model_list", "as", "t3", "on", "t2", ".", "id", "=", "t3", ".", "maker", "where", "t3", ".", "model", "=", "value" ], "question": "What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?", "question_toks": [ "What", "are", "the", "id", "and", "names", "of", "the", "countries", "which", "have", "more", "than", "3", "car", "makers", "or", "produce", "the", "'fiat", "'", "model", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"fiat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "car_1", "query": "select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 3 union select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country join model_list as t3 on t2.id = t3.maker where t3.model = 'fiat';", "query_toks": [ "select", "t1.countryid", ",", "t1.countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.countryid", "=", "t2.country", "group", "by", "t1.countryid", "having", "count", "(", "*", ")", ">", "3", "union", "select", "t1.countryid", ",", "t1.countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.countryid", "=", "t2.country", "join", "model_list", "as", "t3", "on", "t2.id", "=", "t3.maker", "where", "t3.model", "=", "\"fiat\"", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryid", ",", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "value", "union", "select", "t1", ".", "countryid", ",", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "join", "model_list", "as", "t3", "on", "t2", ".", "id", "=", "t3", ".", "maker", "where", "t3", ".", "model", "=", "value" ], "question": "What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ?", "question_toks": [ "What", "are", "the", "ids", "and", "names", "of", "all", "countries", "that", "either", "have", "more", "than", "3", "car", "makers", "or", "produce", "fiat", "model", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"fiat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "flight_2", "query": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "Country", "FROM", "AIRLINES", "WHERE", "Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "country", "from", "airlines", "where", "airline", "=", "value" ], "question": "Which country does Airline \"JetBlue Airways\" belong to?", "question_toks": [ "Which", "country", "does", "Airline", "``", "JetBlue", "Airways", "''", "belong", "to", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "Country", "FROM", "AIRLINES", "WHERE", "Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "country", "from", "airlines", "where", "airline", "=", "value" ], "question": "What country is Jetblue Airways affiliated with?", "question_toks": [ "What", "country", "is", "Jetblue", "Airways", "affiliated", "with", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "Abbreviation", "FROM", "AIRLINES", "WHERE", "Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "abbreviation", "from", "airlines", "where", "airline", "=", "value" ], "question": "What is the abbreviation of Airline \"JetBlue Airways\"?", "question_toks": [ "What", "is", "the", "abbreviation", "of", "Airline", "``", "JetBlue", "Airways", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "Abbreviation", "FROM", "AIRLINES", "WHERE", "Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "abbreviation", "from", "airlines", "where", "airline", "=", "value" ], "question": "Which abbreviation corresponds to Jetblue Airways?", "question_toks": [ "Which", "abbreviation", "corresponds", "to", "Jetblue", "Airways", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"", "query_toks": [ "SELECT", "Airline", ",", "Abbreviation", "FROM", "AIRLINES", "WHERE", "Country", "=", "``", "USA", "''" ], "query_toks_no_value": [ "select", "airline", ",", "abbreviation", "from", "airlines", "where", "country", "=", "value" ], "question": "List all airline names and their abbreviations in \"USA\".", "question_toks": [ "List", "all", "airline", "names", "and", "their", "abbreviations", "in", "``", "USA", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"", "query_toks": [ "SELECT", "Airline", ",", "Abbreviation", "FROM", "AIRLINES", "WHERE", "Country", "=", "``", "USA", "''" ], "query_toks_no_value": [ "select", "airline", ",", "abbreviation", "from", "airlines", "where", "country", "=", "value" ], "question": "What are the airline names and abbreviations for airlines in the USA?", "question_toks": [ "What", "are", "the", "airline", "names", "and", "abbreviations", "for", "airlines", "in", "the", "USA", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"", "query_toks": [ "SELECT", "AirportCode", ",", "AirportName", "FROM", "AIRPORTS", "WHERE", "city", "=", "``", "Anthony", "''" ], "query_toks_no_value": [ "select", "airportcode", ",", "airportname", "from", "airports", "where", "city", "=", "value" ], "question": "List the airport code and name in the city of Anthony.", "question_toks": [ "List", "the", "airport", "code", "and", "name", "in", "the", "city", "of", "Anthony", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Anthony\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"", "query_toks": [ "SELECT", "AirportCode", ",", "AirportName", "FROM", "AIRPORTS", "WHERE", "city", "=", "``", "Anthony", "''" ], "query_toks_no_value": [ "select", "airportcode", ",", "airportname", "from", "airports", "where", "city", "=", "value" ], "question": "Give the airport code and airport name corresonding to the city Anthony.", "question_toks": [ "Give", "the", "airport", "code", "and", "airport", "name", "corresonding", "to", "the", "city", "Anthony", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Anthony\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines" ], "question": "How many airlines do we have?", "question_toks": [ "How", "many", "airlines", "do", "we", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines" ], "question": "What is the total number of airlines?", "question_toks": [ "What", "is", "the", "total", "number", "of", "airlines", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRPORTS", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRPORTS" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airports" ], "question": "How many airports do we have?", "question_toks": [ "How", "many", "airports", "do", "we", "have", "?" ], "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": "flight_2", "query": "SELECT count(*) FROM AIRPORTS", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRPORTS" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airports" ], "question": "Return the number of airports.", "question_toks": [ "Return", "the", "number", "of", "airports", "." ], "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": "flight_2", "query": "SELECT count(*) FROM FLIGHTS", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights" ], "question": "How many flights do we have?", "question_toks": [ "How", "many", "flights", "do", "we", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights" ], "question": "Return the number of flights.", "question_toks": [ "Return", "the", "number", "of", "flights", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"", "query_toks": [ "SELECT", "Airline", "FROM", "AIRLINES", "WHERE", "Abbreviation", "=", "``", "UAL", "''" ], "query_toks_no_value": [ "select", "airline", "from", "airlines", "where", "abbreviation", "=", "value" ], "question": "Which airline has abbreviation 'UAL'?", "question_toks": [ "Which", "airline", "has", "abbreviation", "'UAL", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], "\"UAL\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"", "query_toks": [ "SELECT", "Airline", "FROM", "AIRLINES", "WHERE", "Abbreviation", "=", "``", "UAL", "''" ], "query_toks_no_value": [ "select", "airline", "from", "airlines", "where", "abbreviation", "=", "value" ], "question": "Give the airline with abbreviation 'UAL'.", "question_toks": [ "Give", "the", "airline", "with", "abbreviation", "'UAL", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], "\"UAL\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "WHERE", "Country", "=", "``", "USA", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "where", "country", "=", "value" ], "question": "How many airlines are from USA?", "question_toks": [ "How", "many", "airlines", "are", "from", "USA", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "WHERE", "Country", "=", "``", "USA", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "where", "country", "=", "value" ], "question": "Return the number of airlines in the USA.", "question_toks": [ "Return", "the", "number", "of", "airlines", "in", "the", "USA", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "query_toks": [ "SELECT", "City", ",", "Country", "FROM", "AIRPORTS", "WHERE", "AirportName", "=", "``", "Alton", "''" ], "query_toks_no_value": [ "select", "city", ",", "country", "from", "airports", "where", "airportname", "=", "value" ], "question": "Which city and country is the Alton airport at?", "question_toks": [ "Which", "city", "and", "country", "is", "the", "Alton", "airport", "at", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"Alton\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "query_toks": [ "SELECT", "City", ",", "Country", "FROM", "AIRPORTS", "WHERE", "AirportName", "=", "``", "Alton", "''" ], "query_toks_no_value": [ "select", "city", ",", "country", "from", "airports", "where", "airportname", "=", "value" ], "question": "Give the city and country for the Alton airport.", "question_toks": [ "Give", "the", "city", "and", "country", "for", "the", "Alton", "airport", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"Alton\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", "query_toks": [ "SELECT", "AirportName", "FROM", "AIRPORTS", "WHERE", "AirportCode", "=", "``", "AKO", "''" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "airportcode", "=", "value" ], "question": "What is the airport name for airport 'AKO'?", "question_toks": [ "What", "is", "the", "airport", "name", "for", "airport", "'AKO", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"AKO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", "query_toks": [ "SELECT", "AirportName", "FROM", "AIRPORTS", "WHERE", "AirportCode", "=", "``", "AKO", "''" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "airportcode", "=", "value" ], "question": "Return the name of the airport with code 'AKO'.", "question_toks": [ "Return", "the", "name", "of", "the", "airport", "with", "code", "'AKO", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"AKO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"", "query_toks": [ "SELECT", "AirportName", "FROM", "AIRPORTS", "WHERE", "City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "city", "=", "value" ], "question": "What are airport names at City 'Aberdeen'?", "question_toks": [ "What", "are", "airport", "names", "at", "City", "'Aberdeen", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"", "query_toks": [ "SELECT", "AirportName", "FROM", "AIRPORTS", "WHERE", "City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "city", "=", "value" ], "question": "What are the names of airports in Aberdeen?", "question_toks": [ "What", "are", "the", "names", "of", "airports", "in", "Aberdeen", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "WHERE", "SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "where", "sourceairport", "=", "value" ], "question": "How many flights depart from 'APG'?", "question_toks": [ "How", "many", "flights", "depart", "from", "'APG", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "WHERE", "SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "where", "sourceairport", "=", "value" ], "question": "Count the number of flights departing from 'APG'.", "question_toks": [ "Count", "the", "number", "of", "flights", "departing", "from", "'APG", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "WHERE", "DestAirport", "=", "``", "ATO", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "where", "destairport", "=", "value" ], "question": "How many flights have destination ATO?", "question_toks": [ "How", "many", "flights", "have", "destination", "ATO", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"ATO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "WHERE", "DestAirport", "=", "``", "ATO", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "where", "destairport", "=", "value" ], "question": "Count the number of flights into ATO.", "question_toks": [ "Count", "the", "number", "of", "flights", "into", "ATO", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"ATO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.SourceAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "sourceairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "How many flights depart from City Aberdeen?", "question_toks": [ "How", "many", "flights", "depart", "from", "City", "Aberdeen", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.SourceAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "sourceairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Return the number of flights departing from Aberdeen.", "question_toks": [ "Return", "the", "number", "of", "flights", "departing", "from", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "How many flights arriving in Aberdeen city?", "question_toks": [ "How", "many", "flights", "arriving", "in", "Aberdeen", "city", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Return the number of flights arriving in Aberdeen.", "question_toks": [ "Return", "the", "number", "of", "flights", "arriving", "in", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "JOIN", "AIRPORTS", "AS", "T3", "ON", "T1.SourceAirport", "=", "T3.AirportCode", "WHERE", "T2.City", "=", "``", "Ashley", "''", "AND", "T3.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "join", "airports", "as", "t3", "on", "t1", ".", "sourceairport", "=", "t3", ".", "airportcode", "where", "t2", ".", "city", "=", "value", "and", "t3", ".", "city", "=", "value" ], "question": "How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?", "question_toks": [ "How", "many", "flights", "depart", "from", "City", "'Aberdeen", "'", "and", "have", "destination", "City", "'Ashley", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Ashley\"", null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "JOIN", "AIRPORTS", "AS", "T3", "ON", "T1.SourceAirport", "=", "T3.AirportCode", "WHERE", "T2.City", "=", "``", "Ashley", "''", "AND", "T3.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "join", "airports", "as", "t3", "on", "t1", ".", "sourceairport", "=", "t3", ".", "airportcode", "where", "t2", ".", "city", "=", "value", "and", "t3", ".", "city", "=", "value" ], "question": "How many flights fly from Aberdeen to Ashley?", "question_toks": [ "How", "many", "flights", "fly", "from", "Aberdeen", "to", "Ashley", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Ashley\"", null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRLINES", "AS", "T2", "ON", "T1.Airline", "=", "T2.uid", "WHERE", "T2.Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airlines", "as", "t2", "on", "t1", ".", "airline", "=", "t2", ".", "uid", "where", "t2", ".", "airline", "=", "value" ], "question": "How many flights does airline 'JetBlue Airways' have?", "question_toks": [ "How", "many", "flights", "does", "airline", "'JetBlue", "Airways", "'", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRLINES", "AS", "T2", "ON", "T1.Airline", "=", "T2.uid", "WHERE", "T2.Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airlines", "as", "t2", "on", "t1", ".", "airline", "=", "t2", ".", "uid", "where", "t2", ".", "airline", "=", "value" ], "question": "Give the number of Jetblue Airways flights.", "question_toks": [ "Give", "the", "number", "of", "Jetblue", "Airways", "flights", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T2.Airline", "=", "T1.uid", "WHERE", "T1.Airline", "=", "``", "United", "Airlines", "''", "AND", "T2.DestAirport", "=", "``", "ASY", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t2", ".", "airline", "=", "t1", ".", "uid", "where", "t1", ".", "airline", "=", "value", "and", "t2", ".", "destairport", "=", "value" ], "question": "How many 'United Airlines' flights go to Airport 'ASY'?", "question_toks": [ "How", "many", "'United", "Airlines", "'", "flights", "go", "to", "Airport", "'ASY", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], "\"ASY\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T2.Airline", "=", "T1.uid", "WHERE", "T1.Airline", "=", "``", "United", "Airlines", "''", "AND", "T2.DestAirport", "=", "``", "ASY", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t2", ".", "airline", "=", "t1", ".", "uid", "where", "t1", ".", "airline", "=", "value", "and", "t2", ".", "destairport", "=", "value" ], "question": "Count the number of United Airlines flights arriving in ASY Airport.", "question_toks": [ "Count", "the", "number", "of", "United", "Airlines", "flights", "arriving", "in", "ASY", "Airport", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], "\"ASY\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T2.Airline", "=", "T1.uid", "WHERE", "T1.Airline", "=", "``", "United", "Airlines", "''", "AND", "T2.SourceAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t2", ".", "airline", "=", "t1", ".", "uid", "where", "t1", ".", "airline", "=", "value", "and", "t2", ".", "sourceairport", "=", "value" ], "question": "How many 'United Airlines' flights depart from Airport 'AHD'?", "question_toks": [ "How", "many", "'United", "Airlines", "'", "flights", "depart", "from", "Airport", "'AHD", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T2.Airline", "=", "T1.uid", "WHERE", "T1.Airline", "=", "``", "United", "Airlines", "''", "AND", "T2.SourceAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t2", ".", "airline", "=", "t1", ".", "uid", "where", "t1", ".", "airline", "=", "value", "and", "t2", ".", "sourceairport", "=", "value" ], "question": "Return the number of United Airlines flights leaving from AHD Airport.", "question_toks": [ "Return", "the", "number", "of", "United", "Airlines", "flights", "leaving", "from", "AHD", "Airport", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "JOIN", "AIRLINES", "AS", "T3", "ON", "T3.uid", "=", "T1.Airline", "WHERE", "T2.City", "=", "``", "Aberdeen", "''", "AND", "T3.Airline", "=", "``", "United", "Airlines", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "join", "airlines", "as", "t3", "on", "t3", ".", "uid", "=", "t1", ".", "airline", "where", "t2", ".", "city", "=", "value", "and", "t3", ".", "airline", "=", "value" ], "question": "How many United Airlines flights go to City 'Aberdeen'?", "question_toks": [ "How", "many", "United", "Airlines", "flights", "go", "to", "City", "'Aberdeen", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ], "and", [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "JOIN", "AIRLINES", "AS", "T3", "ON", "T3.uid", "=", "T1.Airline", "WHERE", "T2.City", "=", "``", "Aberdeen", "''", "AND", "T3.Airline", "=", "``", "United", "Airlines", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "join", "airlines", "as", "t3", "on", "t3", ".", "uid", "=", "t1", ".", "airline", "where", "t2", ".", "city", "=", "value", "and", "t3", ".", "airline", "=", "value" ], "question": "Count the number of United Airlines flights that arrive in Aberdeen.", "question_toks": [ "Count", "the", "number", "of", "United", "Airlines", "flights", "that", "arrive", "in", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ], "and", [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.City", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "GROUP", "BY", "T1.City", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "city", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "group", "by", "t1", ".", "city", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which city has most number of arriving flights?", "question_toks": [ "Which", "city", "has", "most", "number", "of", "arriving", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.City", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "GROUP", "BY", "T1.City", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "city", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "group", "by", "t1", ".", "city", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which city has the most frequent destination airport?", "question_toks": [ "Which", "city", "has", "the", "most", "frequent", "destination", "airport", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.City", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.City", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "city", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "city", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which city has most number of departing flights?", "question_toks": [ "Which", "city", "has", "most", "number", "of", "departing", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 12, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.City", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.City", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "city", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "city", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which city is the most frequent source airport?", "question_toks": [ "Which", "city", "is", "the", "most", "frequent", "source", "airport", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 12, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.AirportCode", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "OR", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.AirportCode", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airportcode", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "or", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "airportcode", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the code of airport that has the highest number of flights?", "question_toks": [ "What", "is", "the", "code", "of", "airport", "that", "has", "the", "highest", "number", "of", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.AirportCode", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "OR", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.AirportCode", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airportcode", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "or", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "airportcode", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the airport code of the airport with the most flights?", "question_toks": [ "What", "is", "the", "airport", "code", "of", "the", "airport", "with", "the", "most", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1", "query_toks": [ "SELECT", "T1.AirportCode", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "OR", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.AirportCode", "ORDER", "BY", "count", "(", "*", ")", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airportcode", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "or", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "airportcode", "order", "by", "count", "(", "*", ")", "limit", "value" ], "question": "What is the code of airport that has fewest number of flights?", "question_toks": [ "What", "is", "the", "code", "of", "airport", "that", "has", "fewest", "number", "of", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1", "query_toks": [ "SELECT", "T1.AirportCode", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "OR", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.AirportCode", "ORDER", "BY", "count", "(", "*", ")", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airportcode", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "or", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "airportcode", "order", "by", "count", "(", "*", ")", "limit", "value" ], "question": "Give the code of the airport with the least flights.", "question_toks": [ "Give", "the", "code", "of", "the", "airport", "with", "the", "least", "flights", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which airline has most number of flights?", "question_toks": [ "Which", "airline", "has", "most", "number", "of", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What airline serves the most flights?", "question_toks": [ "What", "airline", "serves", "the", "most", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1", "query_toks": [ "SELECT", "T1.Abbreviation", ",", "T1.Country", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "ORDER", "BY", "count", "(", "*", ")", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "abbreviation", ",", "t1", ".", "country", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "order", "by", "count", "(", "*", ")", "limit", "value" ], "question": "Find the abbreviation and country of the airline that has fewest number of flights?", "question_toks": [ "Find", "the", "abbreviation", "and", "country", "of", "the", "airline", "that", "has", "fewest", "number", "of", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1", "query_toks": [ "SELECT", "T1.Abbreviation", ",", "T1.Country", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "ORDER", "BY", "count", "(", "*", ")", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "abbreviation", ",", "t1", ".", "country", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "order", "by", "count", "(", "*", ")", "limit", "value" ], "question": "What is the abbreviation of the airilne has the fewest flights and what country is it in?", "question_toks": [ "What", "is", "the", "abbreviation", "of", "the", "airilne", "has", "the", "fewest", "flights", "and", "what", "country", "is", "it", "in", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "What are airlines that have some flight departing from airport 'AHD'?", "question_toks": [ "What", "are", "airlines", "that", "have", "some", "flight", "departing", "from", "airport", "'AHD", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Which airlines have a flight with source airport AHD?", "question_toks": [ "Which", "airlines", "have", "a", "flight", "with", "source", "airport", "AHD", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.DestAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "destairport", "=", "value" ], "question": "What are airlines that have flights arriving at airport 'AHD'?", "question_toks": [ "What", "are", "airlines", "that", "have", "flights", "arriving", "at", "airport", "'AHD", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.DestAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "destairport", "=", "value" ], "question": "Which airlines have a flight with destination airport AHD?", "question_toks": [ "Which", "airlines", "have", "a", "flight", "with", "destination", "airport", "AHD", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "APG", "''", "INTERSECT", "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "CVO", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value", "intersect", "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Find all airlines that have flights from both airports 'APG' and 'CVO'.", "question_toks": [ "Find", "all", "airlines", "that", "have", "flights", "from", "both", "airports", "'APG", "'", "and", "'CVO", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CVO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "APG", "''", "INTERSECT", "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "CVO", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value", "intersect", "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Which airlines have departing flights from both APG and CVO airports?", "question_toks": [ "Which", "airlines", "have", "departing", "flights", "from", "both", "APG", "and", "CVO", "airports", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CVO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "CVO", "''", "EXCEPT", "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value", "except", "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Find all airlines that have flights from airport 'CVO' but not from 'APG'.", "question_toks": [ "Find", "all", "airlines", "that", "have", "flights", "from", "airport", "'CVO", "'", "but", "not", "from", "'APG", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CVO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "CVO", "''", "EXCEPT", "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value", "except", "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Which airlines have departures from CVO but not from APG airports?", "question_toks": [ "Which", "airlines", "have", "departures", "from", "CVO", "but", "not", "from", "APG", "airports", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CVO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "HAVING", "count", "(", "*", ")", ">", "10" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "having", "count", "(", "*", ")", ">", "value" ], "question": "Find all airlines that have at least 10 flights.", "question_toks": [ "Find", "all", "airlines", "that", "have", "at", "least", "10", "flights", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "HAVING", "count", "(", "*", ")", ">", "10" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "having", "count", "(", "*", ")", ">", "value" ], "question": "Which airlines have at least 10 flights?", "question_toks": [ "Which", "airlines", "have", "at", "least", "10", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "HAVING", "count", "(", "*", ")", "<", "200" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "having", "count", "(", "*", ")", "<", "value" ], "question": "Find all airlines that have fewer than 200 flights.", "question_toks": [ "Find", "all", "airlines", "that", "have", "fewer", "than", "200", "flights", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 4, [ 0, [ 3, 0, false ], null ], 200.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "HAVING", "count", "(", "*", ")", "<", "200" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "having", "count", "(", "*", ")", "<", "value" ], "question": "Which airlines have less than 200 flights?", "question_toks": [ "Which", "airlines", "have", "less", "than", "200", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 4, [ 0, [ 3, 0, false ], null ], 200.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRLINES", "AS", "T2", "ON", "T2.uid", "=", "T1.Airline", "WHERE", "T2.Airline", "=", "``", "United", "Airlines", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airlines", "as", "t2", "on", "t2", ".", "uid", "=", "t1", ".", "airline", "where", "t2", ".", "airline", "=", "value" ], "question": "What are flight numbers of Airline \"United Airlines\"?", "question_toks": [ "What", "are", "flight", "numbers", "of", "Airline", "``", "United", "Airlines", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRLINES", "AS", "T2", "ON", "T2.uid", "=", "T1.Airline", "WHERE", "T2.Airline", "=", "``", "United", "Airlines", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airlines", "as", "t2", "on", "t2", ".", "uid", "=", "t1", ".", "airline", "where", "t2", ".", "airline", "=", "value" ], "question": "Which flight numbers correspond to United Airlines flights?", "question_toks": [ "Which", "flight", "numbers", "correspond", "to", "United", "Airlines", "flights", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "query_toks": [ "SELECT", "FlightNo", "FROM", "FLIGHTS", "WHERE", "SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "flightno", "from", "flights", "where", "sourceairport", "=", "value" ], "question": "What are flight numbers of flights departing from Airport \"APG\"?", "question_toks": [ "What", "are", "flight", "numbers", "of", "flights", "departing", "from", "Airport", "``", "APG", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "query_toks": [ "SELECT", "FlightNo", "FROM", "FLIGHTS", "WHERE", "SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "flightno", "from", "flights", "where", "sourceairport", "=", "value" ], "question": "Give the flight numbers of flights leaving from APG.", "question_toks": [ "Give", "the", "flight", "numbers", "of", "flights", "leaving", "from", "APG", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", "query_toks": [ "SELECT", "FlightNo", "FROM", "FLIGHTS", "WHERE", "DestAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "flightno", "from", "flights", "where", "destairport", "=", "value" ], "question": "What are flight numbers of flights arriving at Airport \"APG\"?", "question_toks": [ "What", "are", "flight", "numbers", "of", "flights", "arriving", "at", "Airport", "``", "APG", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", "query_toks": [ "SELECT", "FlightNo", "FROM", "FLIGHTS", "WHERE", "DestAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "flightno", "from", "flights", "where", "destairport", "=", "value" ], "question": "Give the flight numbers of flights landing at APG.", "question_toks": [ "Give", "the", "flight", "numbers", "of", "flights", "landing", "at", "APG", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.SourceAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "sourceairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "What are flight numbers of flights departing from City \"Aberdeen \"?", "question_toks": [ "What", "are", "flight", "numbers", "of", "flights", "departing", "from", "City", "``", "Aberdeen", "``", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.SourceAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "sourceairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Give the flight numbers of flights leaving from Aberdeen.", "question_toks": [ "Give", "the", "flight", "numbers", "of", "flights", "leaving", "from", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "What are flight numbers of flights arriving at City \"Aberdeen\"?", "question_toks": [ "What", "are", "flight", "numbers", "of", "flights", "arriving", "at", "City", "``", "Aberdeen", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Give the flight numbers of flights arriving in Aberdeen.", "question_toks": [ "Give", "the", "flight", "numbers", "of", "flights", "arriving", "in", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Flights", "AS", "T1", "JOIN", "Airports", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.city", "=", "``", "Aberdeen", "''", "OR", "T2.city", "=", "``", "Abilene", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value", "or", "t2", ".", "city", "=", "value" ], "question": "Find the number of flights landing in the city of Aberdeen or Abilene.", "question_toks": [ "Find", "the", "number", "of", "flights", "landing", "in", "the", "city", "of", "Aberdeen", "or", "Abilene", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ], "or", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Abilene\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Flights", "AS", "T1", "JOIN", "Airports", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.city", "=", "``", "Aberdeen", "''", "OR", "T2.city", "=", "``", "Abilene", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value", "or", "t2", ".", "city", "=", "value" ], "question": "How many flights land in Aberdeen or Abilene?", "question_toks": [ "How", "many", "flights", "land", "in", "Aberdeen", "or", "Abilene", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ], "or", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Abilene\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", "query_toks": [ "SELECT", "AirportName", "FROM", "Airports", "WHERE", "AirportCode", "NOT", "IN", "(", "SELECT", "SourceAirport", "FROM", "Flights", "UNION", "SELECT", "DestAirport", "FROM", "Flights", ")" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "airportcode", "not", "in", "(", "select", "sourceairport", "from", "flights", "union", "select", "destairport", "from", "flights", ")" ], "question": "Find the name of airports which do not have any flight in and out.", "question_toks": [ "Find", "the", "name", "of", "airports", "which", "do", "not", "have", "any", "flight", "in", "and", "out", "." ], "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", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", "query_toks": [ "SELECT", "AirportName", "FROM", "Airports", "WHERE", "AirportCode", "NOT", "IN", "(", "SELECT", "SourceAirport", "FROM", "Flights", "UNION", "SELECT", "DestAirport", "FROM", "Flights", ")" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "airportcode", "not", "in", "(", "select", "sourceairport", "from", "flights", "union", "select", "destairport", "from", "flights", ")" ], "question": "Which airports do not have departing or arriving flights?", "question_toks": [ "Which", "airports", "do", "not", "have", "departing", "or", "arriving", "flights", "?" ], "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", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) FROM employee", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "employee" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "employee" ], "question": "How many employees are there?", "question_toks": [ "How", "many", "employees", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) FROM employee", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "employee" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "employee" ], "question": "Count the number of employees", "question_toks": [ "Count", "the", "number", "of", "employees" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM employee ORDER BY age", "query_toks": [ "SELECT", "name", "FROM", "employee", "ORDER", "BY", "age" ], "query_toks_no_value": [ "select", "name", "from", "employee", "order", "by", "age" ], "question": "Sort employee names by their age in ascending order.", "question_toks": [ "Sort", "employee", "names", "by", "their", "age", "in", "ascending", "order", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM employee ORDER BY age", "query_toks": [ "SELECT", "name", "FROM", "employee", "ORDER", "BY", "age" ], "query_toks_no_value": [ "select", "name", "from", "employee", "order", "by", "age" ], "question": "List the names of employees and sort in ascending order of age.", "question_toks": [ "List", "the", "names", "of", "employees", "and", "sort", "in", "ascending", "order", "of", "age", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , city FROM employee GROUP BY city", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "city", "FROM", "employee", "GROUP", "BY", "city" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "city", "from", "employee", "group", "by", "city" ], "question": "What is the number of employees from each city?", "question_toks": [ "What", "is", "the", "number", "of", "employees", "from", "each", "city", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , city FROM employee GROUP BY city", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "city", "FROM", "employee", "GROUP", "BY", "city" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "city", "from", "employee", "group", "by", "city" ], "question": "Count the number of employees for each city.", "question_toks": [ "Count", "the", "number", "of", "employees", "for", "each", "city", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1", "query_toks": [ "SELECT", "city", "FROM", "employee", "WHERE", "age", "<", "30", "GROUP", "BY", "city", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "city", "from", "employee", "where", "age", "<", "value", "group", "by", "city", "having", "count", "(", "*", ")", ">", "value" ], "question": "Which cities do more than one employee under age 30 come from?", "question_toks": [ "Which", "cities", "do", "more", "than", "one", "employee", "under", "age", "30", "come", "from", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 3, false ], null ], 30.0, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1", "query_toks": [ "SELECT", "city", "FROM", "employee", "WHERE", "age", "<", "30", "GROUP", "BY", "city", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "city", "from", "employee", "where", "age", "<", "value", "group", "by", "city", "having", "count", "(", "*", ")", ">", "value" ], "question": "Find the cities that have more than one employee under age 30.", "question_toks": [ "Find", "the", "cities", "that", "have", "more", "than", "one", "employee", "under", "age", "30", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 3, false ], null ], 30.0, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "LOCATION", "FROM", "shop", "GROUP", "BY", "LOCATION" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "location", "from", "shop", "group", "by", "location" ], "question": "Find the number of shops in each location.", "question_toks": [ "Find", "the", "number", "of", "shops", "in", "each", "location", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "LOCATION", "FROM", "shop", "GROUP", "BY", "LOCATION" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "location", "from", "shop", "group", "by", "location" ], "question": "How many shops are there in each location?", "question_toks": [ "How", "many", "shops", "are", "there", "in", "each", "location", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "query_toks": [ "SELECT", "manager_name", ",", "district", "FROM", "shop", "ORDER", "BY", "number_products", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "manager_name", ",", "district", "from", "shop", "order", "by", "number_products", "desc", "limit", "value" ], "question": "Find the manager name and district of the shop whose number of products is the largest.", "question_toks": [ "Find", "the", "manager", "name", "and", "district", "of", "the", "shop", "whose", "number", "of", "products", "is", "the", "largest", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "query_toks": [ "SELECT", "manager_name", ",", "district", "FROM", "shop", "ORDER", "BY", "number_products", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "manager_name", ",", "district", "from", "shop", "order", "by", "number_products", "desc", "limit", "value" ], "question": "What are the manager name and district of the shop that sells the largest number of products?", "question_toks": [ "What", "are", "the", "manager", "name", "and", "district", "of", "the", "shop", "that", "sells", "the", "largest", "number", "of", "products", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT min(Number_products) , max(Number_products) FROM shop", "query_toks": [ "SELECT", "min", "(", "Number_products", ")", ",", "max", "(", "Number_products", ")", "FROM", "shop" ], "query_toks_no_value": [ "select", "min", "(", "number_products", ")", ",", "max", "(", "number_products", ")", "from", "shop" ], "question": "find the minimum and maximum number of products of all stores.", "question_toks": [ "find", "the", "minimum", "and", "maximum", "number", "of", "products", "of", "all", "stores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 9, false ], null ] ], [ 1, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT min(Number_products) , max(Number_products) FROM shop", "query_toks": [ "SELECT", "min", "(", "Number_products", ")", ",", "max", "(", "Number_products", ")", "FROM", "shop" ], "query_toks_no_value": [ "select", "min", "(", "number_products", ")", ",", "max", "(", "number_products", ")", "from", "shop" ], "question": "What are the minimum and maximum number of products across all the shops?", "question_toks": [ "What", "are", "the", "minimum", "and", "maximum", "number", "of", "products", "across", "all", "the", "shops", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 9, false ], null ] ], [ 1, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC", "query_toks": [ "SELECT", "name", ",", "LOCATION", ",", "district", "FROM", "shop", "ORDER", "BY", "number_products", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "location", ",", "district", "from", "shop", "order", "by", "number_products", "desc" ], "question": "Return the name, location and district of all shops in descending order of number of products.", "question_toks": [ "Return", "the", "name", ",", "location", "and", "district", "of", "all", "shops", "in", "descending", "order", "of", "number", "of", "products", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC", "query_toks": [ "SELECT", "name", ",", "LOCATION", ",", "district", "FROM", "shop", "ORDER", "BY", "number_products", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "location", ",", "district", "from", "shop", "order", "by", "number_products", "desc" ], "question": "Sort all the shops by number products in descending order, and return the name, location and district of each shop.", "question_toks": [ "Sort", "all", "the", "shops", "by", "number", "products", "in", "descending", "order", ",", "and", "return", "the", "name", ",", "location", "and", "district", "of", "each", "shop", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", "query_toks": [ "SELECT", "name", "FROM", "shop", "WHERE", "number_products", ">", "(", "SELECT", "avg", "(", "number_products", ")", "FROM", "shop", ")" ], "query_toks_no_value": [ "select", "name", "from", "shop", "where", "number_products", ">", "(", "select", "avg", "(", "number_products", ")", "from", "shop", ")" ], "question": "Find the names of stores whose number products is more than the average number of products.", "question_toks": [ "Find", "the", "names", "of", "stores", "whose", "number", "products", "is", "more", "than", "the", "average", "number", "of", "products", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 9, 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": "employee_hire_evaluation", "query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", "query_toks": [ "SELECT", "name", "FROM", "shop", "WHERE", "number_products", ">", "(", "SELECT", "avg", "(", "number_products", ")", "FROM", "shop", ")" ], "query_toks_no_value": [ "select", "name", "from", "shop", "where", "number_products", ">", "(", "select", "avg", "(", "number_products", ")", "from", "shop", ")" ], "question": "Which shops' number products is above the average? Give me the shop names.", "question_toks": [ "Which", "shops", "'", "number", "products", "is", "above", "the", "average", "?", "Give", "me", "the", "shop", "names", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 9, 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": "employee_hire_evaluation", "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", "FROM", "employee", "AS", "t1", "JOIN", "evaluation", "AS", "t2", "ON", "t1.Employee_ID", "=", "t2.Employee_ID", "GROUP", "BY", "t2.Employee_ID", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "employee", "as", "t1", "join", "evaluation", "as", "t2", "on", "t1", ".", "employee_id", "=", "t2", ".", "employee_id", "group", "by", "t2", ".", "employee_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "find the name of employee who was awarded the most times in the evaluation.", "question_toks": [ "find", "the", "name", "of", "employee", "who", "was", "awarded", "the", "most", "times", "in", "the", "evaluation", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", "FROM", "employee", "AS", "t1", "JOIN", "evaluation", "AS", "t2", "ON", "t1.Employee_ID", "=", "t2.Employee_ID", "GROUP", "BY", "t2.Employee_ID", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "employee", "as", "t1", "join", "evaluation", "as", "t2", "on", "t1", ".", "employee_id", "=", "t2", ".", "employee_id", "group", "by", "t2", ".", "employee_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which employee received the most awards in evaluations? Give me the employee name.", "question_toks": [ "Which", "employee", "received", "the", "most", "awards", "in", "evaluations", "?", "Give", "me", "the", "employee", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", "FROM", "employee", "AS", "t1", "JOIN", "evaluation", "AS", "t2", "ON", "t1.Employee_ID", "=", "t2.Employee_ID", "ORDER", "BY", "t2.bonus", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "employee", "as", "t1", "join", "evaluation", "as", "t2", "on", "t1", ".", "employee_id", "=", "t2", ".", "employee_id", "order", "by", "t2", ".", "bonus", "desc", "limit", "value" ], "question": "Find the name of the employee who got the highest one time bonus.", "question_toks": [ "Find", "the", "name", "of", "the", "employee", "who", "got", "the", "highest", "one", "time", "bonus", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 17, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", "FROM", "employee", "AS", "t1", "JOIN", "evaluation", "AS", "t2", "ON", "t1.Employee_ID", "=", "t2.Employee_ID", "ORDER", "BY", "t2.bonus", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "employee", "as", "t1", "join", "evaluation", "as", "t2", "on", "t1", ".", "employee_id", "=", "t2", ".", "employee_id", "order", "by", "t2", ".", "bonus", "desc", "limit", "value" ], "question": "Which employee received the biggest bonus? Give me the employee name.", "question_toks": [ "Which", "employee", "received", "the", "biggest", "bonus", "?", "Give", "me", "the", "employee", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 17, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "query_toks": [ "SELECT", "name", "FROM", "employee", "WHERE", "Employee_ID", "NOT", "IN", "(", "SELECT", "Employee_ID", "FROM", "evaluation", ")" ], "query_toks_no_value": [ "select", "name", "from", "employee", "where", "employee_id", "not", "in", "(", "select", "employee_id", "from", "evaluation", ")" ], "question": "Find the names of employees who never won any award in the evaluation.", "question_toks": [ "Find", "the", "names", "of", "employees", "who", "never", "won", "any", "award", "in", "the", "evaluation", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, 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": "employee_hire_evaluation", "query": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "query_toks": [ "SELECT", "name", "FROM", "employee", "WHERE", "Employee_ID", "NOT", "IN", "(", "SELECT", "Employee_ID", "FROM", "evaluation", ")" ], "query_toks_no_value": [ "select", "name", "from", "employee", "where", "employee_id", "not", "in", "(", "select", "employee_id", "from", "evaluation", ")" ], "question": "What are the names of the employees who never received any evaluation?", "question_toks": [ "What", "are", "the", "names", "of", "the", "employees", "who", "never", "received", "any", "evaluation", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, 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": "employee_hire_evaluation", "query": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t2.name", "FROM", "hiring", "AS", "t1", "JOIN", "shop", "AS", "t2", "ON", "t1.shop_id", "=", "t2.shop_id", "GROUP", "BY", "t1.shop_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "hiring", "as", "t1", "join", "shop", "as", "t2", "on", "t1", ".", "shop_id", "=", "t2", ".", "shop_id", "group", "by", "t1", ".", "shop_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name of the shop that is hiring the largest number of employees?", "question_toks": [ "What", "is", "the", "name", "of", "the", "shop", "that", "is", "hiring", "the", "largest", "number", "of", "employees", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t2.name", "FROM", "hiring", "AS", "t1", "JOIN", "shop", "AS", "t2", "ON", "t1.shop_id", "=", "t2.shop_id", "GROUP", "BY", "t1.shop_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "hiring", "as", "t1", "join", "shop", "as", "t2", "on", "t1", ".", "shop_id", "=", "t2", ".", "shop_id", "group", "by", "t1", ".", "shop_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which shop has the most employees? Give me the shop name.", "question_toks": [ "Which", "shop", "has", "the", "most", "employees", "?", "Give", "me", "the", "shop", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)", "query_toks": [ "SELECT", "name", "FROM", "shop", "WHERE", "shop_id", "NOT", "IN", "(", "SELECT", "shop_id", "FROM", "hiring", ")" ], "query_toks_no_value": [ "select", "name", "from", "shop", "where", "shop_id", "not", "in", "(", "select", "shop_id", "from", "hiring", ")" ], "question": "Find the name of the shops that do not hire any employee.", "question_toks": [ "Find", "the", "name", "of", "the", "shops", "that", "do", "not", "hire", "any", "employee", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, 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": "employee_hire_evaluation", "query": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)", "query_toks": [ "SELECT", "name", "FROM", "shop", "WHERE", "shop_id", "NOT", "IN", "(", "SELECT", "shop_id", "FROM", "hiring", ")" ], "query_toks_no_value": [ "select", "name", "from", "shop", "where", "shop_id", "not", "in", "(", "select", "shop_id", "from", "hiring", ")" ], "question": "Which shops run with no employees? Find the shop names", "question_toks": [ "Which", "shops", "run", "with", "no", "employees", "?", "Find", "the", "shop", "names" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, 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": "employee_hire_evaluation", "query": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "t2.name", "FROM", "hiring", "AS", "t1", "JOIN", "shop", "AS", "t2", "ON", "t1.shop_id", "=", "t2.shop_id", "GROUP", "BY", "t2.name" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t2", ".", "name", "from", "hiring", "as", "t1", "join", "shop", "as", "t2", "on", "t1", ".", "shop_id", "=", "t2", ".", "shop_id", "group", "by", "t2", ".", "name" ], "question": "Find the number of employees hired in each shop; show the shop name as well.", "question_toks": [ "Find", "the", "number", "of", "employees", "hired", "in", "each", "shop", ";", "show", "the", "shop", "name", "as", "well", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "t2.name", "FROM", "hiring", "AS", "t1", "JOIN", "shop", "AS", "t2", "ON", "t1.shop_id", "=", "t2.shop_id", "GROUP", "BY", "t2.name" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t2", ".", "name", "from", "hiring", "as", "t1", "join", "shop", "as", "t2", "on", "t1", ".", "shop_id", "=", "t2", ".", "shop_id", "group", "by", "t2", ".", "name" ], "question": "For each shop, return the number of employees working there and the name of the shop.", "question_toks": [ "For", "each", "shop", ",", "return", "the", "number", "of", "employees", "working", "there", "and", "the", "name", "of", "the", "shop", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT sum(bonus) FROM evaluation", "query_toks": [ "SELECT", "sum", "(", "bonus", ")", "FROM", "evaluation" ], "query_toks_no_value": [ "select", "sum", "(", "bonus", ")", "from", "evaluation" ], "question": "What is total bonus given in all evaluations?", "question_toks": [ "What", "is", "total", "bonus", "given", "in", "all", "evaluations", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT sum(bonus) FROM evaluation", "query_toks": [ "SELECT", "sum", "(", "bonus", ")", "FROM", "evaluation" ], "query_toks_no_value": [ "select", "sum", "(", "bonus", ")", "from", "evaluation" ], "question": "Find the total amount of bonus given in all the evaluations.", "question_toks": [ "Find", "the", "total", "amount", "of", "bonus", "given", "in", "all", "the", "evaluations", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT * FROM hiring", "query_toks": [ "SELECT", "*", "FROM", "hiring" ], "query_toks_no_value": [ "select", "*", "from", "hiring" ], "question": "Give me all the information about hiring.", "question_toks": [ "Give", "me", "all", "the", "information", "about", "hiring", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT * FROM hiring", "query_toks": [ "SELECT", "*", "FROM", "hiring" ], "query_toks_no_value": [ "select", "*", "from", "hiring" ], "question": "What is all the information about hiring?", "question_toks": [ "What", "is", "all", "the", "information", "about", "hiring", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000", "query_toks": [ "SELECT", "district", "FROM", "shop", "WHERE", "Number_products", "<", "3000", "INTERSECT", "SELECT", "district", "FROM", "shop", "WHERE", "Number_products", ">", "10000" ], "query_toks_no_value": [ "select", "district", "from", "shop", "where", "number_products", "<", "value", "intersect", "select", "district", "from", "shop", "where", "number_products", ">", "value" ], "question": "Which district has both stores with less than 3000 products and stores with more than 10000 products?", "question_toks": [ "Which", "district", "has", "both", "stores", "with", "less", "than", "3000", "products", "and", "stores", "with", "more", "than", "10000", "products", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 9, false ], null ], 3000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], 10000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000", "query_toks": [ "SELECT", "district", "FROM", "shop", "WHERE", "Number_products", "<", "3000", "INTERSECT", "SELECT", "district", "FROM", "shop", "WHERE", "Number_products", ">", "10000" ], "query_toks_no_value": [ "select", "district", "from", "shop", "where", "number_products", "<", "value", "intersect", "select", "district", "from", "shop", "where", "number_products", ">", "value" ], "question": "Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.", "question_toks": [ "Find", "the", "districts", "in", "which", "there", "are", "both", "shops", "selling", "less", "than", "3000", "products", "and", "shops", "selling", "more", "than", "10000", "products", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 9, false ], null ], 3000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], 10000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(DISTINCT LOCATION) FROM shop", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "LOCATION", ")", "FROM", "shop" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "location", ")", "from", "shop" ], "question": "How many different store locations are there?", "question_toks": [ "How", "many", "different", "store", "locations", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 7, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(DISTINCT LOCATION) FROM shop", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "LOCATION", ")", "FROM", "shop" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "location", ")", "from", "shop" ], "question": "Count the number of distinct store locations.", "question_toks": [ "Count", "the", "number", "of", "distinct", "store", "locations", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 7, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Documents", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Documents" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "documents" ], "question": "How many documents do we have?", "question_toks": [ "How", "many", "documents", "do", "we", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Documents", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Documents" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "documents" ], "question": "Count the number of documents.", "question_toks": [ "Count", "the", "number", "of", "documents", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , document_name , document_description FROM Documents", "query_toks": [ "SELECT", "document_id", ",", "document_name", ",", "document_description", "FROM", "Documents" ], "query_toks_no_value": [ "select", "document_id", ",", "document_name", ",", "document_description", "from", "documents" ], "question": "List document IDs, document names, and document descriptions for all documents.", "question_toks": [ "List", "document", "IDs", ",", "document", "names", ",", "and", "document", "descriptions", "for", "all", "documents", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , document_name , document_description FROM Documents", "query_toks": [ "SELECT", "document_id", ",", "document_name", ",", "document_description", "FROM", "Documents" ], "query_toks_no_value": [ "select", "document_id", ",", "document_name", ",", "document_description", "from", "documents" ], "question": "What are the ids, names, and descriptions for all documents?", "question_toks": [ "What", "are", "the", "ids", ",", "names", ",", "and", "descriptions", "for", "all", "documents", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", "query_toks": [ "SELECT", "document_name", ",", "template_id", "FROM", "Documents", "WHERE", "Document_Description", "LIKE", "``", "%", "w", "%", "''" ], "query_toks_no_value": [ "select", "document_name", ",", "template_id", "from", "documents", "where", "document_description", "like", "value" ], "question": "What is the document name and template id for document with description with the letter 'w' in it?", "question_toks": [ "What", "is", "the", "document", "name", "and", "template", "id", "for", "document", "with", "description", "with", "the", "letter", "'w", "'", "in", "it", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 12, false ], null ], "\"%w%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", "query_toks": [ "SELECT", "document_name", ",", "template_id", "FROM", "Documents", "WHERE", "Document_Description", "LIKE", "``", "%", "w", "%", "''" ], "query_toks_no_value": [ "select", "document_name", ",", "template_id", "from", "documents", "where", "document_description", "like", "value" ], "question": "Return the names and template ids for documents that contain the letter w in their description.", "question_toks": [ "Return", "the", "names", "and", "template", "ids", "for", "documents", "that", "contain", "the", "letter", "w", "in", "their", "description", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 12, false ], null ], "\"%w%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", "query_toks": [ "SELECT", "document_id", ",", "template_id", ",", "Document_Description", "FROM", "Documents", "WHERE", "document_name", "=", "``", "Robbin", "CV", "''" ], "query_toks_no_value": [ "select", "document_id", ",", "template_id", ",", "document_description", "from", "documents", "where", "document_name", "=", "value" ], "question": "What is the document id, template id and description for document named \"Robbin CV\"?", "question_toks": [ "What", "is", "the", "document", "id", ",", "template", "id", "and", "description", "for", "document", "named", "``", "Robbin", "CV", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Robbin CV\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", "query_toks": [ "SELECT", "document_id", ",", "template_id", ",", "Document_Description", "FROM", "Documents", "WHERE", "document_name", "=", "``", "Robbin", "CV", "''" ], "query_toks_no_value": [ "select", "document_id", ",", "template_id", ",", "document_description", "from", "documents", "where", "document_name", "=", "value" ], "question": "Return the document id, template id, and description for the document with the name Robbin CV.", "question_toks": [ "Return", "the", "document", "id", ",", "template", "id", ",", "and", "description", "for", "the", "document", "with", "the", "name", "Robbin", "CV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Robbin CV\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(DISTINCT template_id) FROM Documents", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "template_id", ")", "FROM", "Documents" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "template_id", ")", "from", "documents" ], "question": "How many different templates do all document use?", "question_toks": [ "How", "many", "different", "templates", "do", "all", "document", "use", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 10, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(DISTINCT template_id) FROM Documents", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "template_id", ")", "FROM", "Documents" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "template_id", ")", "from", "documents" ], "question": "Count the number of different templates used for documents.", "question_toks": [ "Count", "the", "number", "of", "different", "templates", "used", "for", "documents", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 10, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Documents", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.Template_ID", "=", "T2.Template_ID", "WHERE", "T2.Template_Type_Code", "=", "'PPT", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "documents", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t2", ".", "template_type_code", "=", "value" ], "question": "How many documents are using the template with type code 'PPT'?", "question_toks": [ "How", "many", "documents", "are", "using", "the", "template", "with", "type", "code", "'PPT", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PPT\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Documents", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.Template_ID", "=", "T2.Template_ID", "WHERE", "T2.Template_Type_Code", "=", "'PPT", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "documents", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t2", ".", "template_type_code", "=", "value" ], "question": "Count the number of documents that use the PPT template type.", "question_toks": [ "Count", "the", "number", "of", "documents", "that", "use", "the", "PPT", "template", "type", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PPT\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id , count(*) FROM Documents GROUP BY template_id", "query_toks": [ "SELECT", "template_id", ",", "count", "(", "*", ")", "FROM", "Documents", "GROUP", "BY", "template_id" ], "query_toks_no_value": [ "select", "template_id", ",", "count", "(", "*", ")", "from", "documents", "group", "by", "template_id" ], "question": "Show all template ids and number of documents using each template.", "question_toks": [ "Show", "all", "template", "ids", "and", "number", "of", "documents", "using", "each", "template", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id , count(*) FROM Documents GROUP BY template_id", "query_toks": [ "SELECT", "template_id", ",", "count", "(", "*", ")", "FROM", "Documents", "GROUP", "BY", "template_id" ], "query_toks_no_value": [ "select", "template_id", ",", "count", "(", "*", ")", "from", "documents", "group", "by", "template_id" ], "question": "What are all different template ids used for documents, and how many times were each of them used?", "question_toks": [ "What", "are", "all", "different", "template", "ids", "used", "for", "documents", ",", "and", "how", "many", "times", "were", "each", "of", "them", "used", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.template_id", ",", "T2.Template_Type_Code", "FROM", "Documents", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "template_id", ",", "t2", ".", "template_type_code", "from", "documents", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the id and type code for the template used by the most documents?", "question_toks": [ "What", "is", "the", "id", "and", "type", "code", "for", "the", "template", "used", "by", "the", "most", "documents", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.template_id", ",", "T2.Template_Type_Code", "FROM", "Documents", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "template_id", ",", "t2", ".", "template_type_code", "from", "documents", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Return the id and type code of the template that is used for the greatest number of documents.", "question_toks": [ "Return", "the", "id", "and", "type", "code", "of", "the", "template", "that", "is", "used", "for", "the", "greatest", "number", "of", "documents", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1", "query_toks": [ "SELECT", "template_id", "FROM", "Documents", "GROUP", "BY", "template_id", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "template_id", "from", "documents", "group", "by", "template_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Show ids for all templates that are used by more than one document.", "question_toks": [ "Show", "ids", "for", "all", "templates", "that", "are", "used", "by", "more", "than", "one", "document", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1", "query_toks": [ "SELECT", "template_id", "FROM", "Documents", "GROUP", "BY", "template_id", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "template_id", "from", "documents", "group", "by", "template_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are the template ids of any templates used in more than a single document?", "question_toks": [ "What", "are", "the", "template", "ids", "of", "any", "templates", "used", "in", "more", "than", "a", "single", "document", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents", "query_toks": [ "SELECT", "template_id", "FROM", "Templates", "EXCEPT", "SELECT", "template_id", "FROM", "Documents" ], "query_toks_no_value": [ "select", "template_id", "from", "templates", "except", "select", "template_id", "from", "documents" ], "question": "Show ids for all templates not used by any document.", "question_toks": [ "Show", "ids", "for", "all", "templates", "not", "used", "by", "any", "document", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents", "query_toks": [ "SELECT", "template_id", "FROM", "Templates", "EXCEPT", "SELECT", "template_id", "FROM", "Documents" ], "query_toks_no_value": [ "select", "template_id", "from", "templates", "except", "select", "template_id", "from", "documents" ], "question": "What are the ids for templates that are not used in any documents?", "question_toks": [ "What", "are", "the", "ids", "for", "templates", "that", "are", "not", "used", "in", "any", "documents", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Templates", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Templates" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "templates" ], "question": "How many templates do we have?", "question_toks": [ "How", "many", "templates", "do", "we", "have", "?" ], "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": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Templates", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Templates" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "templates" ], "question": "Count the number of templates.", "question_toks": [ "Count", "the", "number", "of", "templates", "." ], "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": "cre_Doc_Template_Mgt", "query": "SELECT template_id , version_number , template_type_code FROM Templates", "query_toks": [ "SELECT", "template_id", ",", "version_number", ",", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "template_id", ",", "version_number", ",", "template_type_code", "from", "templates" ], "question": "Show template ids, version numbers, and template type codes for all templates.", "question_toks": [ "Show", "template", "ids", ",", "version", "numbers", ",", "and", "template", "type", "codes", "for", "all", "templates", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id , version_number , template_type_code FROM Templates", "query_toks": [ "SELECT", "template_id", ",", "version_number", ",", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "template_id", ",", "version_number", ",", "template_type_code", "from", "templates" ], "question": "What are the ids, version numbers, and type codes for each template?", "question_toks": [ "What", "are", "the", "ids", ",", "version", "numbers", ",", "and", "type", "codes", "for", "each", "template", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT DISTINCT template_type_code FROM Templates", "query_toks": [ "SELECT", "DISTINCT", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "distinct", "template_type_code", "from", "templates" ], "question": "Show all distinct template type codes for all templates.", "question_toks": [ "Show", "all", "distinct", "template", "type", "codes", "for", "all", "templates", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT DISTINCT template_type_code FROM Templates", "query_toks": [ "SELECT", "DISTINCT", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "distinct", "template_type_code", "from", "templates" ], "question": "What are the different template type codes?", "question_toks": [ "What", "are", "the", "different", "template", "type", "codes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"", "query_toks": [ "SELECT", "template_id", "FROM", "Templates", "WHERE", "template_type_code", "=", "``", "PP", "''", "OR", "template_type_code", "=", "``", "PPT", "''" ], "query_toks_no_value": [ "select", "template_id", "from", "templates", "where", "template_type_code", "=", "value", "or", "template_type_code", "=", "value" ], "question": "What are the ids of templates with template type code PP or PPT?", "question_toks": [ "What", "are", "the", "ids", "of", "templates", "with", "template", "type", "code", "PP", "or", "PPT", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PP\"", null ], "or", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PPT\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"", "query_toks": [ "SELECT", "template_id", "FROM", "Templates", "WHERE", "template_type_code", "=", "``", "PP", "''", "OR", "template_type_code", "=", "``", "PPT", "''" ], "query_toks_no_value": [ "select", "template_id", "from", "templates", "where", "template_type_code", "=", "value", "or", "template_type_code", "=", "value" ], "question": "Return the ids of templates that have the code PP or PPT.", "question_toks": [ "Return", "the", "ids", "of", "templates", "that", "have", "the", "code", "PP", "or", "PPT", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PP\"", null ], "or", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PPT\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Templates", "WHERE", "template_type_code", "=", "``", "CV", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "templates", "where", "template_type_code", "=", "value" ], "question": "How many templates have template type code CV?", "question_toks": [ "How", "many", "templates", "have", "template", "type", "code", "CV", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"CV\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Templates", "WHERE", "template_type_code", "=", "``", "CV", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "templates", "where", "template_type_code", "=", "value" ], "question": "Count the number of templates of the type CV.", "question_toks": [ "Count", "the", "number", "of", "templates", "of", "the", "type", "CV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"CV\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "query_toks": [ "SELECT", "version_number", ",", "template_type_code", "FROM", "Templates", "WHERE", "version_number", ">", "5" ], "query_toks_no_value": [ "select", "version_number", ",", "template_type_code", "from", "templates", "where", "version_number", ">", "value" ], "question": "What is the version number and template type code for the template with version number later than 5?", "question_toks": [ "What", "is", "the", "version", "number", "and", "template", "type", "code", "for", "the", "template", "with", "version", "number", "later", "than", "5", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 5.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "query_toks": [ "SELECT", "version_number", ",", "template_type_code", "FROM", "Templates", "WHERE", "version_number", ">", "5" ], "query_toks_no_value": [ "select", "version_number", ",", "template_type_code", "from", "templates", "where", "version_number", ">", "value" ], "question": "Return the version numbers and template type codes of templates with a version number greater than 5.", "question_toks": [ "Return", "the", "version", "numbers", "and", "template", "type", "codes", "of", "templates", "with", "a", "version", "number", "greater", "than", "5", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 5.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code", "query_toks": [ "SELECT", "template_type_code", ",", "count", "(", "*", ")", "FROM", "Templates", "GROUP", "BY", "template_type_code" ], "query_toks_no_value": [ "select", "template_type_code", ",", "count", "(", "*", ")", "from", "templates", "group", "by", "template_type_code" ], "question": "Show all template type codes and number of templates for each.", "question_toks": [ "Show", "all", "template", "type", "codes", "and", "number", "of", "templates", "for", "each", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code", "query_toks": [ "SELECT", "template_type_code", ",", "count", "(", "*", ")", "FROM", "Templates", "GROUP", "BY", "template_type_code" ], "query_toks_no_value": [ "select", "template_type_code", ",", "count", "(", "*", ")", "from", "templates", "group", "by", "template_type_code" ], "question": "What are the different template type codes, and how many templates correspond to each?", "question_toks": [ "What", "are", "the", "different", "template", "type", "codes", ",", "and", "how", "many", "templates", "correspond", "to", "each", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "GROUP", "BY", "template_type_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "group", "by", "template_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which template type code has most number of templates?", "question_toks": [ "Which", "template", "type", "code", "has", "most", "number", "of", "templates", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "GROUP", "BY", "template_type_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "group", "by", "template_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Return the type code of the template type that the most templates belong to.", "question_toks": [ "Return", "the", "type", "code", "of", "the", "template", "type", "that", "the", "most", "templates", "belong", "to", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "GROUP", "BY", "template_type_code", "HAVING", "count", "(", "*", ")", "<", "3" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "group", "by", "template_type_code", "having", "count", "(", "*", ")", "<", "value" ], "question": "Show all template type codes with less than three templates.", "question_toks": [ "Show", "all", "template", "type", "codes", "with", "less", "than", "three", "templates", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 4, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "GROUP", "BY", "template_type_code", "HAVING", "count", "(", "*", ")", "<", "3" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "group", "by", "template_type_code", "having", "count", "(", "*", ")", "<", "value" ], "question": "What are the codes of template types that have fewer than 3 templates?", "question_toks": [ "What", "are", "the", "codes", "of", "template", "types", "that", "have", "fewer", "than", "3", "templates", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 4, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT min(Version_Number) , template_type_code FROM Templates", "query_toks": [ "SELECT", "min", "(", "Version_Number", ")", ",", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "min", "(", "version_number", ")", ",", "template_type_code", "from", "templates" ], "question": "What the smallest version number and its template type code?", "question_toks": [ "What", "the", "smallest", "version", "number", "and", "its", "template", "type", "code", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT min(Version_Number) , template_type_code FROM Templates", "query_toks": [ "SELECT", "min", "(", "Version_Number", ")", ",", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "min", "(", "version_number", ")", ",", "template_type_code", "from", "templates" ], "question": "Return the lowest version number, along with its corresponding template type code.", "question_toks": [ "Return", "the", "lowest", "version", "number", ",", "along", "with", "its", "corresponding", "template", "type", "code", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = \"Data base\"", "query_toks": [ "SELECT", "T1.template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "WHERE", "T2.document_name", "=", "``", "Data", "base", "''" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "What is the template type code of the template used by document with the name \"Data base\"?", "question_toks": [ "What", "is", "the", "template", "type", "code", "of", "the", "template", "used", "by", "document", "with", "the", "name", "``", "Data", "base", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Data base\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = \"Data base\"", "query_toks": [ "SELECT", "T1.template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "WHERE", "T2.document_name", "=", "``", "Data", "base", "''" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Return the template type code of the template that is used by a document named Data base.", "question_toks": [ "Return", "the", "template", "type", "code", "of", "the", "template", "that", "is", "used", "by", "a", "document", "named", "Data", "base", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Data base\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = \"BK\"", "query_toks": [ "SELECT", "T2.document_name", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "WHERE", "T1.template_type_code", "=", "``", "BK", "''" ], "query_toks_no_value": [ "select", "t2", ".", "document_name", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t1", ".", "template_type_code", "=", "value" ], "question": "Show all document names using templates with template type code BK.", "question_toks": [ "Show", "all", "document", "names", "using", "templates", "with", "template", "type", "code", "BK", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"BK\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = \"BK\"", "query_toks": [ "SELECT", "T2.document_name", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "WHERE", "T1.template_type_code", "=", "``", "BK", "''" ], "query_toks_no_value": [ "select", "t2", ".", "document_name", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t1", ".", "template_type_code", "=", "value" ], "question": "What are the names of documents that use templates with the code BK?", "question_toks": [ "What", "are", "the", "names", "of", "documents", "that", "use", "templates", "with", "the", "code", "BK", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"BK\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "query_toks": [ "SELECT", "T1.template_type_code", ",", "count", "(", "*", ")", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_type_code" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", ",", "count", "(", "*", ")", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_type_code" ], "question": "Show all template type codes and the number of documents using each type.", "question_toks": [ "Show", "all", "template", "type", "codes", "and", "the", "number", "of", "documents", "using", "each", "type", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "query_toks": [ "SELECT", "T1.template_type_code", ",", "count", "(", "*", ")", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_type_code" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", ",", "count", "(", "*", ")", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_type_code" ], "question": "What are the different template type codes, and how many documents use each type?", "question_toks": [ "What", "are", "the", "different", "template", "type", "codes", ",", "and", "how", "many", "documents", "use", "each", "type", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_type_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which template type code is used by most number of documents?", "question_toks": [ "Which", "template", "type", "code", "is", "used", "by", "most", "number", "of", "documents", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_type_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Return the code of the template type that is most commonly used in documents.", "question_toks": [ "Return", "the", "code", "of", "the", "template", "type", "that", "is", "most", "commonly", "used", "in", "documents", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "EXCEPT", "SELECT", "template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "except", "select", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id" ], "question": "Show all template type codes that are not used by any document.", "question_toks": [ "Show", "all", "template", "type", "codes", "that", "are", "not", "used", "by", "any", "document", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "EXCEPT", "SELECT", "template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "except", "select", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id" ], "question": "What are the codes of template types that are not used for any document?", "question_toks": [ "What", "are", "the", "codes", "of", "template", "types", "that", "are", "not", "used", "for", "any", "document", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code , template_type_description FROM Ref_template_types", "query_toks": [ "SELECT", "template_type_code", ",", "template_type_description", "FROM", "Ref_template_types" ], "query_toks_no_value": [ "select", "template_type_code", ",", "template_type_description", "from", "ref_template_types" ], "question": "Show all template type codes and descriptions.", "question_toks": [ "Show", "all", "template", "type", "codes", "and", "descriptions", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code , template_type_description FROM Ref_template_types", "query_toks": [ "SELECT", "template_type_code", ",", "template_type_description", "FROM", "Ref_template_types" ], "query_toks_no_value": [ "select", "template_type_code", ",", "template_type_description", "from", "ref_template_types" ], "question": "What are the type codes and descriptions for all template types?", "question_toks": [ "What", "are", "the", "type", "codes", "and", "descriptions", "for", "all", "template", "types", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", "query_toks": [ "SELECT", "template_type_description", "FROM", "Ref_template_types", "WHERE", "template_type_code", "=", "``", "AD", "''" ], "query_toks_no_value": [ "select", "template_type_description", "from", "ref_template_types", "where", "template_type_code", "=", "value" ], "question": "What is the template type descriptions for template type code \"AD\".", "question_toks": [ "What", "is", "the", "template", "type", "descriptions", "for", "template", "type", "code", "``", "AD", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 1, false ], null ], "\"AD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", "query_toks": [ "SELECT", "template_type_description", "FROM", "Ref_template_types", "WHERE", "template_type_code", "=", "``", "AD", "''" ], "query_toks_no_value": [ "select", "template_type_description", "from", "ref_template_types", "where", "template_type_code", "=", "value" ], "question": "Return the template type description of the template type with the code AD.", "question_toks": [ "Return", "the", "template", "type", "description", "of", "the", "template", "type", "with", "the", "code", "AD", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 1, false ], null ], "\"AD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", "query_toks": [ "SELECT", "template_type_code", "FROM", "Ref_template_types", "WHERE", "template_type_description", "=", "``", "Book", "''" ], "query_toks_no_value": [ "select", "template_type_code", "from", "ref_template_types", "where", "template_type_description", "=", "value" ], "question": "What is the template type code for template type description \"Book\".", "question_toks": [ "What", "is", "the", "template", "type", "code", "for", "template", "type", "description", "``", "Book", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Book\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", "query_toks": [ "SELECT", "template_type_code", "FROM", "Ref_template_types", "WHERE", "template_type_description", "=", "``", "Book", "''" ], "query_toks_no_value": [ "select", "template_type_code", "from", "ref_template_types", "where", "template_type_description", "=", "value" ], "question": "Return the type code of the template type with the description \"Book\".", "question_toks": [ "Return", "the", "type", "code", "of", "the", "template", "type", "with", "the", "description", "``", "Book", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Book\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "query_toks": [ "SELECT", "DISTINCT", "T1.template_type_description", "FROM", "Ref_template_types", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_type_code", "=", "T2.template_type_code", "JOIN", "Documents", "AS", "T3", "ON", "T2.Template_ID", "=", "T3.template_ID" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "template_type_description", "from", "ref_template_types", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_type_code", "=", "t2", ".", "template_type_code", "join", "documents", "as", "t3", "on", "t2", ".", "template_id", "=", "t3", ".", "template_id" ], "question": "What are the distinct template type descriptions for the templates ever used by any document?", "question_toks": [ "What", "are", "the", "distinct", "template", "type", "descriptions", "for", "the", "templates", "ever", "used", "by", "any", "document", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "query_toks": [ "SELECT", "DISTINCT", "T1.template_type_description", "FROM", "Ref_template_types", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_type_code", "=", "T2.template_type_code", "JOIN", "Documents", "AS", "T3", "ON", "T2.Template_ID", "=", "T3.template_ID" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "template_type_description", "from", "ref_template_types", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_type_code", "=", "t2", ".", "template_type_code", "join", "documents", "as", "t3", "on", "t2", ".", "template_id", "=", "t3", ".", "template_id" ], "question": "Return the different descriptions for templates that have been used in a document.", "question_toks": [ "Return", "the", "different", "descriptions", "for", "templates", "that", "have", "been", "used", "in", "a", "document", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"", "query_toks": [ "SELECT", "T2.template_id", "FROM", "Ref_template_types", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_type_code", "=", "T2.template_type_code", "WHERE", "T1.template_type_description", "=", "``", "Presentation", "''" ], "query_toks_no_value": [ "select", "t2", ".", "template_id", "from", "ref_template_types", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_type_code", "=", "t2", ".", "template_type_code", "where", "t1", ".", "template_type_description", "=", "value" ], "question": "What are the template ids with template type description \"Presentation\".", "question_toks": [ "What", "are", "the", "template", "ids", "with", "template", "type", "description", "``", "Presentation", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Presentation\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"", "query_toks": [ "SELECT", "T2.template_id", "FROM", "Ref_template_types", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_type_code", "=", "T2.template_type_code", "WHERE", "T1.template_type_description", "=", "``", "Presentation", "''" ], "query_toks_no_value": [ "select", "t2", ".", "template_id", "from", "ref_template_types", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_type_code", "=", "t2", ".", "template_type_code", "where", "t1", ".", "template_type_description", "=", "value" ], "question": "Return the ids corresponding to templates with the description 'Presentation'.", "question_toks": [ "Return", "the", "ids", "corresponding", "to", "templates", "with", "the", "description", "'Presentation", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Presentation\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Paragraphs", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Paragraphs" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "paragraphs" ], "question": "How many paragraphs in total?", "question_toks": [ "How", "many", "paragraphs", "in", "total", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Paragraphs", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Paragraphs" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "paragraphs" ], "question": "Count the number of paragraphs.", "question_toks": [ "Count", "the", "number", "of", "paragraphs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_ID", "=", "T2.document_ID", "WHERE", "T2.document_name", "=", "'Summer", "Show", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "How many paragraphs for the document with name 'Summer Show'?", "question_toks": [ "How", "many", "paragraphs", "for", "the", "document", "with", "name", "'Summer", "Show", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Summer Show\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_ID", "=", "T2.document_ID", "WHERE", "T2.document_name", "=", "'Summer", "Show", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Count the number of paragraphs in the document named 'Summer Show'.", "question_toks": [ "Count", "the", "number", "of", "paragraphs", "in", "the", "document", "named", "'Summer", "Show", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Summer Show\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "select other_details from paragraphs where paragraph_text like 'korea'", "query_toks": [ "select", "other_details", "from", "paragraphs", "where", "paragraph_text", "like", "\"korea\"" ], "query_toks_no_value": [ "select", "other_details", "from", "paragraphs", "where", "paragraph_text", "like", "value" ], "question": "Show paragraph details for paragraph with text 'Korea ' .", "question_toks": [ "Show", "paragraph", "details", "for", "paragraph", "with", "text", "'Korea", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 16, false ], null ], "\"korea\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "select other_details from paragraphs where paragraph_text like 'korea'", "query_toks": [ "select", "other_details", "from", "paragraphs", "where", "paragraph_text", "like", "\"korea\"" ], "query_toks_no_value": [ "select", "other_details", "from", "paragraphs", "where", "paragraph_text", "like", "value" ], "question": "What are the details for the paragraph that includes the text 'Korea ' ?", "question_toks": [ "What", "are", "the", "details", "for", "the", "paragraph", "that", "includes", "the", "text", "'Korea", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 16, false ], null ], "\"korea\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "query_toks": [ "SELECT", "T1.paragraph_id", ",", "T1.paragraph_text", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "WHERE", "T2.Document_Name", "=", "'Welcome", "to", "NY", "'" ], "query_toks_no_value": [ "select", "t1", ".", "paragraph_id", ",", "t1", ".", "paragraph_text", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Show all paragraph ids and texts for the document with name 'Welcome to NY'.", "question_toks": [ "Show", "all", "paragraph", "ids", "and", "texts", "for", "the", "document", "with", "name", "'Welcome", "to", "NY", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Welcome to NY\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "query_toks": [ "SELECT", "T1.paragraph_id", ",", "T1.paragraph_text", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "WHERE", "T2.Document_Name", "=", "'Welcome", "to", "NY", "'" ], "query_toks_no_value": [ "select", "t1", ".", "paragraph_id", ",", "t1", ".", "paragraph_text", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?", "question_toks": [ "What", "are", "the", "ids", "and", "texts", "of", "paragraphs", "in", "the", "document", "titled", "'Welcome", "to", "NY", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Welcome to NY\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Customer reviews\"", "query_toks": [ "SELECT", "T1.paragraph_text", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "WHERE", "T2.document_name", "=", "``", "Customer", "reviews", "''" ], "query_toks_no_value": [ "select", "t1", ".", "paragraph_text", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Show all paragraph texts for the document \"Customer reviews\".", "question_toks": [ "Show", "all", "paragraph", "texts", "for", "the", "document", "``", "Customer", "reviews", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Customer reviews\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Customer reviews\"", "query_toks": [ "SELECT", "T1.paragraph_text", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "WHERE", "T2.document_name", "=", "``", "Customer", "reviews", "''" ], "query_toks_no_value": [ "select", "t1", ".", "paragraph_text", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "What are the paragraph texts for the document with the name 'Customer reviews'?", "question_toks": [ "What", "are", "the", "paragraph", "texts", "for", "the", "document", "with", "the", "name", "'Customer", "reviews", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Customer reviews\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "query_toks": [ "SELECT", "document_id", ",", "count", "(", "*", ")", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "ORDER", "BY", "document_id" ], "query_toks_no_value": [ "select", "document_id", ",", "count", "(", "*", ")", "from", "paragraphs", "group", "by", "document_id", "order", "by", "document_id" ], "question": "Show all document ids and the number of paragraphs in each document. Order by document id.", "question_toks": [ "Show", "all", "document", "ids", "and", "the", "number", "of", "paragraphs", "in", "each", "document", ".", "Order", "by", "document", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 15, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "query_toks": [ "SELECT", "document_id", ",", "count", "(", "*", ")", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "ORDER", "BY", "document_id" ], "query_toks_no_value": [ "select", "document_id", ",", "count", "(", "*", ")", "from", "paragraphs", "group", "by", "document_id", "order", "by", "document_id" ], "question": "Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.", "question_toks": [ "Return", "the", "different", "document", "ids", "along", "with", "the", "number", "of", "paragraphs", "corresponding", "to", "each", ",", "ordered", "by", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 15, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id", "query_toks": [ "SELECT", "T1.document_id", ",", "T2.document_name", ",", "count", "(", "*", ")", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "GROUP", "BY", "T1.document_id" ], "query_toks_no_value": [ "select", "t1", ".", "document_id", ",", "t2", ".", "document_name", ",", "count", "(", "*", ")", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "group", "by", "t1", ".", "document_id" ], "question": "Show all document ids, names and the number of paragraphs in each document.", "question_toks": [ "Show", "all", "document", "ids", ",", "names", "and", "the", "number", "of", "paragraphs", "in", "each", "document", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id", "query_toks": [ "SELECT", "T1.document_id", ",", "T2.document_name", ",", "count", "(", "*", ")", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "GROUP", "BY", "T1.document_id" ], "query_toks_no_value": [ "select", "t1", ".", "document_id", ",", "t2", ".", "document_name", ",", "count", "(", "*", ")", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "group", "by", "t1", ".", "document_id" ], "question": "What are the ids and names of each document, as well as the number of paragraphs in each?", "question_toks": [ "What", "are", "the", "ids", "and", "names", "of", "each", "document", ",", "as", "well", "as", "the", "number", "of", "paragraphs", "in", "each", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "List all document ids with at least two paragraphs.", "question_toks": [ "List", "all", "document", "ids", "with", "at", "least", "two", "paragraphs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the ids of documents that have 2 or more paragraphs?", "question_toks": [ "What", "are", "the", "ids", "of", "documents", "that", "have", "2", "or", "more", "paragraphs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.document_id", ",", "T2.document_name", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "GROUP", "BY", "T1.document_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "document_id", ",", "t2", ".", "document_name", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "group", "by", "t1", ".", "document_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the document id and name with greatest number of paragraphs?", "question_toks": [ "What", "is", "the", "document", "id", "and", "name", "with", "greatest", "number", "of", "paragraphs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.document_id", ",", "T2.document_name", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "GROUP", "BY", "T1.document_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "document_id", ",", "t2", ".", "document_name", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "group", "by", "t1", ".", "document_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Return the id and name of the document with the most paragraphs.", "question_toks": [ "Return", "the", "id", "and", "name", "of", "the", "document", "with", "the", "most", "paragraphs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "What is the document id with least number of paragraphs?", "question_toks": [ "What", "is", "the", "document", "id", "with", "least", "number", "of", "paragraphs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "Return the id of the document with the fewest paragraphs.", "question_toks": [ "Return", "the", "id", "of", "the", "document", "with", "the", "fewest", "paragraphs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "HAVING", "count", "(", "*", ")", "BETWEEN", "1", "AND", "2" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "having", "count", "(", "*", ")", "between", "value", "and", "value" ], "question": "What is the document id with 1 to 2 paragraphs?", "question_toks": [ "What", "is", "the", "document", "id", "with", "1", "to", "2", "paragraphs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [ [ false, 1, [ 0, [ 3, 0, false ], null ], 1.0, 2.0 ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "HAVING", "count", "(", "*", ")", "BETWEEN", "1", "AND", "2" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "having", "count", "(", "*", ")", "between", "value", "and", "value" ], "question": "Give the ids of documents that have between one and two paragraphs.", "question_toks": [ "Give", "the", "ids", "of", "documents", "that", "have", "between", "one", "and", "two", "paragraphs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [ [ false, 1, [ 0, [ 3, 0, false ], null ], 1.0, 2.0 ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "WHERE", "paragraph_text", "=", "'Brazil", "'", "INTERSECT", "SELECT", "document_id", "FROM", "Paragraphs", "WHERE", "paragraph_text", "=", "'Ireland", "'" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "where", "paragraph_text", "=", "value", "intersect", "select", "document_id", "from", "paragraphs", "where", "paragraph_text", "=", "value" ], "question": "Show the document id with paragraph text 'Brazil' and 'Ireland'.", "question_toks": [ "Show", "the", "document", "id", "with", "paragraph", "text", "'Brazil", "'", "and", "'Ireland", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 16, false ], null ], "\"Brazil\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 16, false ], null ], "\"Ireland\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "WHERE", "paragraph_text", "=", "'Brazil", "'", "INTERSECT", "SELECT", "document_id", "FROM", "Paragraphs", "WHERE", "paragraph_text", "=", "'Ireland", "'" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "where", "paragraph_text", "=", "value", "intersect", "select", "document_id", "from", "paragraphs", "where", "paragraph_text", "=", "value" ], "question": "What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?", "question_toks": [ "What", "are", "the", "ids", "of", "documents", "that", "contain", "the", "paragraph", "text", "'Brazil", "'", "and", "'Ireland", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 16, false ], null ], "\"Brazil\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 16, false ], null ], "\"Ireland\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT count(*) FROM teacher", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "teacher" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "teacher" ], "question": "How many teachers are there?", "question_toks": [ "How", "many", "teachers", "are", "there", "?" ], "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": "course_teach", "query": "SELECT count(*) FROM teacher", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "teacher" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "teacher" ], "question": "What is the total count of teachers?", "question_toks": [ "What", "is", "the", "total", "count", "of", "teachers", "?" ], "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": "course_teach", "query": "SELECT Name FROM teacher ORDER BY Age ASC", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "ORDER", "BY", "Age", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "order", "by", "age", "asc" ], "question": "List the names of teachers in ascending order of age.", "question_toks": [ "List", "the", "names", "of", "teachers", "in", "ascending", "order", "of", "age", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Name FROM teacher ORDER BY Age ASC", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "ORDER", "BY", "Age", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "order", "by", "age", "asc" ], "question": "What are the names of the teachers ordered by ascending age?", "question_toks": [ "What", "are", "the", "names", "of", "the", "teachers", "ordered", "by", "ascending", "age", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Age , Hometown FROM teacher", "query_toks": [ "SELECT", "Age", ",", "Hometown", "FROM", "teacher" ], "query_toks_no_value": [ "select", "age", ",", "hometown", "from", "teacher" ], "question": "What are the age and hometown of teachers?", "question_toks": [ "What", "are", "the", "age", "and", "hometown", "of", "teachers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Age , Hometown FROM teacher", "query_toks": [ "SELECT", "Age", ",", "Hometown", "FROM", "teacher" ], "query_toks_no_value": [ "select", "age", ",", "hometown", "from", "teacher" ], "question": "What is the age and hometown of every teacher?", "question_toks": [ "What", "is", "the", "age", "and", "hometown", "of", "every", "teacher", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "select name from teacher where hometown != \"little lever urban district\"", "query_toks": [ "select", "name", "from", "teacher", "where", "hometown", "!=", "\"little lever urban district\"" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "hometown", "!", "=", "value" ], "question": "List the name of teachers whose hometown is not `` Little Lever Urban District '' .", "question_toks": [ "List", "the", "name", "of", "teachers", "whose", "hometown", "is", "not", "``", "Little", "Lever", "Urban", "District", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 7, false ], null ], "\"little lever urban district\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "select name from teacher where hometown != \"little lever urban district\"", "query_toks": [ "select", "name", "from", "teacher", "where", "hometown", "!=", "\"little lever urban district\"" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "hometown", "!", "=", "value" ], "question": "What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ?", "question_toks": [ "What", "are", "the", "names", "of", "the", "teachers", "whose", "hometown", "is", "not", "``", "Little", "Lever", "Urban", "District", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 7, false ], null ], "\"little lever urban district\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "WHERE", "Age", "=", "32", "OR", "Age", "=", "33" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "age", "=", "value", "or", "age", "=", "value" ], "question": "Show the name of teachers aged either 32 or 33?", "question_toks": [ "Show", "the", "name", "of", "teachers", "aged", "either", "32", "or", "33", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], 32.0, null ], "or", [ false, 2, [ 0, [ 0, 6, false ], null ], 33.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "WHERE", "Age", "=", "32", "OR", "Age", "=", "33" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "age", "=", "value", "or", "age", "=", "value" ], "question": "What are the names of the teachers who are aged either 32 or 33?", "question_toks": [ "What", "are", "the", "names", "of", "the", "teachers", "who", "are", "aged", "either", "32", "or", "33", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], 32.0, null ], "or", [ false, 2, [ 0, [ 0, 6, false ], null ], 33.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "ORDER", "BY", "Age", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "order", "by", "age", "asc", "limit", "value" ], "question": "What is the hometown of the youngest teacher?", "question_toks": [ "What", "is", "the", "hometown", "of", "the", "youngest", "teacher", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "ORDER", "BY", "Age", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "order", "by", "age", "asc", "limit", "value" ], "question": "Where is the youngest teacher from?", "question_toks": [ "Where", "is", "the", "youngest", "teacher", "from", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown", "query_toks": [ "SELECT", "Hometown", ",", "COUNT", "(", "*", ")", "FROM", "teacher", "GROUP", "BY", "Hometown" ], "query_toks_no_value": [ "select", "hometown", ",", "count", "(", "*", ")", "from", "teacher", "group", "by", "hometown" ], "question": "Show different hometown of teachers and the number of teachers from each hometown.", "question_toks": [ "Show", "different", "hometown", "of", "teachers", "and", "the", "number", "of", "teachers", "from", "each", "hometown", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown", "query_toks": [ "SELECT", "Hometown", ",", "COUNT", "(", "*", ")", "FROM", "teacher", "GROUP", "BY", "Hometown" ], "query_toks_no_value": [ "select", "hometown", ",", "count", "(", "*", ")", "from", "teacher", "group", "by", "hometown" ], "question": "For each hometown, how many teachers are there?", "question_toks": [ "For", "each", "hometown", ",", "how", "many", "teachers", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "GROUP", "BY", "Hometown", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "group", "by", "hometown", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "List the most common hometown of teachers.", "question_toks": [ "List", "the", "most", "common", "hometown", "of", "teachers", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "GROUP", "BY", "Hometown", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "group", "by", "hometown", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the most commmon hometowns for teachers?", "question_toks": [ "What", "is", "the", "most", "commmon", "hometowns", "for", "teachers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "GROUP", "BY", "Hometown", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "group", "by", "hometown", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Show the hometowns shared by at least two teachers.", "question_toks": [ "Show", "the", "hometowns", "shared", "by", "at", "least", "two", "teachers", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "GROUP", "BY", "Hometown", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "group", "by", "hometown", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the towns from which at least two teachers come from?", "question_toks": [ "What", "are", "the", "towns", "from", "which", "at", "least", "two", "teachers", "come", "from", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID", "query_toks": [ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID" ], "query_toks_no_value": [ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id" ], "question": "Show names of teachers and the courses they are arranged to teach.", "question_toks": [ "Show", "names", "of", "teachers", "and", "the", "courses", "they", "are", "arranged", "to", "teach", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID", "query_toks": [ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID" ], "query_toks_no_value": [ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id" ], "question": "What is the name of each teacher and what course they teach?", "question_toks": [ "What", "is", "the", "name", "of", "each", "teacher", "and", "what", "course", "they", "teach", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name", "query_toks": [ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "ORDER", "BY", "T3.Name" ], "query_toks_no_value": [ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "order", "by", "t3", ".", "name" ], "question": "Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.", "question_toks": [ "Show", "names", "of", "teachers", "and", "the", "courses", "they", "are", "arranged", "to", "teach", "in", "ascending", "alphabetical", "order", "of", "the", "teacher", "'s", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name", "query_toks": [ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "ORDER", "BY", "T3.Name" ], "query_toks_no_value": [ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "order", "by", "t3", ".", "name" ], "question": "What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher?", "question_toks": [ "What", "are", "the", "names", "of", "the", "teachers", "and", "the", "courses", "they", "teach", "in", "ascending", "alphabetical", "order", "by", "the", "name", "of", "the", "teacher", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = \"Math\"", "query_toks": [ "SELECT", "T3.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "WHERE", "T2.Course", "=", "``", "Math", "''" ], "query_toks_no_value": [ "select", "t3", ".", "name", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "where", "t2", ".", "course", "=", "value" ], "question": "Show the name of the teacher for the math course.", "question_toks": [ "Show", "the", "name", "of", "the", "teacher", "for", "the", "math", "course", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], "\"Math\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = \"Math\"", "query_toks": [ "SELECT", "T3.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "WHERE", "T2.Course", "=", "``", "Math", "''" ], "query_toks_no_value": [ "select", "t3", ".", "name", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "where", "t2", ".", "course", "=", "value" ], "question": "What are the names of the people who teach math courses?", "question_toks": [ "What", "are", "the", "names", "of", "the", "people", "who", "teach", "math", "courses", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], "\"Math\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "query_toks": [ "SELECT", "T2.Name", ",", "COUNT", "(", "*", ")", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name" ], "question": "Show names of teachers and the number of courses they teach.", "question_toks": [ "Show", "names", "of", "teachers", "and", "the", "number", "of", "courses", "they", "teach", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "query_toks": [ "SELECT", "T2.Name", ",", "COUNT", "(", "*", ")", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name" ], "question": "What are the names of the teachers and how many courses do they teach?", "question_toks": [ "What", "are", "the", "names", "of", "the", "teachers", "and", "how", "many", "courses", "do", "they", "teach", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "T2.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Show names of teachers that teach at least two courses.", "question_toks": [ "Show", "names", "of", "teachers", "that", "teach", "at", "least", "two", "courses", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "T2.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the names of the teachers who teach at least two courses?", "question_toks": [ "What", "are", "the", "names", "of", "the", "teachers", "who", "teach", "at", "least", "two", "courses", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "WHERE", "Teacher_id", "NOT", "IN", "(", "SELECT", "Teacher_id", "FROM", "course_arrange", ")" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "teacher_id", "not", "in", "(", "select", "teacher_id", "from", "course_arrange", ")" ], "question": "List the names of teachers who have not been arranged to teach courses.", "question_toks": [ "List", "the", "names", "of", "teachers", "who", "have", "not", "been", "arranged", "to", "teach", "courses", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 4, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "course_teach", "query": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "WHERE", "Teacher_id", "NOT", "IN", "(", "SELECT", "Teacher_id", "FROM", "course_arrange", ")" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "teacher_id", "not", "in", "(", "select", "teacher_id", "from", "course_arrange", ")" ], "question": "What are the names of the teachers whose courses have not been arranged?", "question_toks": [ "What", "are", "the", "names", "of", "the", "teachers", "whose", "courses", "have", "not", "been", "arranged", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 4, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "museum_visit", "query": "SELECT count(*) FROM visitor WHERE age < 30", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "visitor", "WHERE", "age", "<", "30" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "visitor", "where", "age", "<", "value" ], "question": "How many visitors below age 30 are there?", "question_toks": [ "How", "many", "visitors", "below", "age", "30", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 8, false ], null ], 30.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC", "query_toks": [ "SELECT", "name", "FROM", "visitor", "WHERE", "Level_of_membership", ">", "4", "ORDER", "BY", "Level_of_membership", "DESC" ], "query_toks_no_value": [ "select", "name", "from", "visitor", "where", "level_of_membership", ">", "value", "order", "by", "level_of_membership", "desc" ], "question": "Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.", "question_toks": [ "Find", "the", "names", "of", "the", "visitors", "whose", "membership", "level", "is", "higher", "than", "4", ",", "and", "order", "the", "results", "by", "the", "level", "from", "high", "to", "low", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 7, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 7, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT avg(age) FROM visitor WHERE Level_of_membership <= 4", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "visitor", "WHERE", "Level_of_membership", "<", "=", "4" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "visitor", "where", "level_of_membership", "<", "=", "value" ], "question": "What is the average age of the visitors whose membership level is not higher than 4?", "question_toks": [ "What", "is", "the", "average", "age", "of", "the", "visitors", "whose", "membership", "level", "is", "not", "higher", "than", "4", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 6, [ 0, [ 0, 7, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC", "query_toks": [ "SELECT", "name", ",", "Level_of_membership", "FROM", "visitor", "WHERE", "Level_of_membership", ">", "4", "ORDER", "BY", "age", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "level_of_membership", "from", "visitor", "where", "level_of_membership", ">", "value", "order", "by", "age", "desc" ], "question": "Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young.", "question_toks": [ "Find", "the", "name", "and", "membership", "level", "of", "the", "visitors", "whose", "membership", "level", "is", "higher", "than", "4", ",", "and", "sort", "by", "their", "age", "from", "old", "to", "young", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 7, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 8, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1", "query_toks": [ "SELECT", "museum_id", ",", "name", "FROM", "museum", "ORDER", "BY", "num_of_staff", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "museum_id", ",", "name", "from", "museum", "order", "by", "num_of_staff", "desc", "limit", "value" ], "question": "Find the id and name of the museum that has the most staff members?", "question_toks": [ "Find", "the", "id", "and", "name", "of", "the", "museum", "that", "has", "the", "most", "staff", "members", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT avg(num_of_staff) FROM museum WHERE open_year < 2009", "query_toks": [ "SELECT", "avg", "(", "num_of_staff", ")", "FROM", "museum", "WHERE", "open_year", "<", "2009" ], "query_toks_no_value": [ "select", "avg", "(", "num_of_staff", ")", "from", "museum", "where", "open_year", "<", "value" ], "question": "Find the average number of staff working for the museums that were open before 2009.", "question_toks": [ "Find", "the", "average", "number", "of", "staff", "working", "for", "the", "museums", "that", "were", "open", "before", "2009", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 4, false ], null ], 2009.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT Num_of_Staff , Open_Year FROM museum WHERE name = 'Plaza Museum'", "query_toks": [ "SELECT", "Num_of_Staff", ",", "Open_Year", "FROM", "museum", "WHERE", "name", "=", "'Plaza", "Museum", "'" ], "query_toks_no_value": [ "select", "num_of_staff", ",", "open_year", "from", "museum", "where", "name", "=", "value" ], "question": "What are the opening year and staff number of the museum named Plaza Museum?", "question_toks": [ "What", "are", "the", "opening", "year", "and", "staff", "number", "of", "the", "museum", "named", "Plaza", "Museum", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Plaza Museum\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)", "query_toks": [ "SELECT", "name", "FROM", "museum", "WHERE", "num_of_staff", ">", "(", "SELECT", "min", "(", "num_of_staff", ")", "FROM", "museum", "WHERE", "open_year", ">", "2010", ")" ], "query_toks_no_value": [ "select", "name", "from", "museum", "where", "num_of_staff", ">", "(", "select", "min", "(", "num_of_staff", ")", "from", "museum", "where", "open_year", ">", "value", ")" ], "question": "find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.", "question_toks": [ "find", "the", "names", "of", "museums", "which", "have", "more", "staff", "than", "the", "minimum", "staff", "number", "of", "all", "museums", "opened", "after", "2010", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 2010.0, null ] ], "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": "museum_visit", "query": "SELECT t1.id , t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING count(*) > 1", "query_toks": [ "SELECT", "t1.id", ",", "t1.name", ",", "t1.age", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "GROUP", "BY", "t1.id", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "id", ",", "t1", ".", "name", ",", "t1", ".", "age", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "find the id, name and age for visitors who visited some museums more than once.", "question_toks": [ "find", "the", "id", ",", "name", "and", "age", "for", "visitors", "who", "visited", "some", "museums", "more", "than", "once", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT t2.visitor_id , t1.name , t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1", "query_toks": [ "SELECT", "t2.visitor_id", ",", "t1.name", ",", "t1.Level_of_membership", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "GROUP", "BY", "t2.visitor_id", "ORDER", "BY", "sum", "(", "t2.Total_spent", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "visitor_id", ",", "t1", ".", "name", ",", "t1", ".", "level_of_membership", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "group", "by", "t2", ".", "visitor_id", "order", "by", "sum", "(", "t2", ".", "total_spent", ")", "desc", "limit", "value" ], "question": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?", "question_toks": [ "What", "are", "the", "id", ",", "name", "and", "membership", "level", "of", "visitors", "who", "have", "spent", "the", "largest", "amount", "of", "money", "in", "total", "in", "all", "museum", "tickets", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 4, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT t2.Museum_ID , t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t2.Museum_ID", ",", "t1.name", "FROM", "museum", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.Museum_ID", "=", "t2.Museum_ID", "GROUP", "BY", "t2.Museum_ID", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "museum_id", ",", "t1", ".", "name", "from", "museum", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "museum_id", "=", "t2", ".", "museum_id", "group", "by", "t2", ".", "museum_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What are the id and name of the museum visited most times?", "question_toks": [ "What", "are", "the", "id", "and", "name", "of", "the", "museum", "visited", "most", "times", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)", "query_toks": [ "SELECT", "name", "FROM", "museum", "WHERE", "Museum_ID", "NOT", "IN", "(", "SELECT", "museum_id", "FROM", "visit", ")" ], "query_toks_no_value": [ "select", "name", "from", "museum", "where", "museum_id", "not", "in", "(", "select", "museum_id", "from", "visit", ")" ], "question": "What is the name of the museum that had no visitor yet?", "question_toks": [ "What", "is", "the", "name", "of", "the", "museum", "that", "had", "no", "visitor", "yet", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "museum_visit", "query": "SELECT t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", ",", "t1.age", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "ORDER", "BY", "t2.num_of_ticket", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t1", ".", "age", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "order", "by", "t2", ".", "num_of_ticket", "desc", "limit", "value" ], "question": "Find the name and age of the visitor who bought the most tickets at once.", "question_toks": [ "Find", "the", "name", "and", "age", "of", "the", "visitor", "who", "bought", "the", "most", "tickets", "at", "once", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 11, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit", "query_toks": [ "SELECT", "avg", "(", "num_of_ticket", ")", ",", "max", "(", "num_of_ticket", ")", "FROM", "visit" ], "query_toks_no_value": [ "select", "avg", "(", "num_of_ticket", ")", ",", "max", "(", "num_of_ticket", ")", "from", "visit" ], "question": "What are the average and maximum number of tickets bought in all visits?", "question_toks": [ "What", "are", "the", "average", "and", "maximum", "number", "of", "tickets", "bought", "in", "all", "visits", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 11, false ], null ] ], [ 1, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT sum(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1", "query_toks": [ "SELECT", "sum", "(", "t2.Total_spent", ")", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "WHERE", "t1.Level_of_membership", "=", "1" ], "query_toks_no_value": [ "select", "sum", "(", "t2", ".", "total_spent", ")", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "where", "t1", ".", "level_of_membership", "=", "value" ], "question": "What is the total ticket expense of the visitors whose membership level is 1?", "question_toks": [ "What", "is", "the", "total", "ticket", "expense", "of", "the", "visitors", "whose", "membership", "level", "is", "1", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011", "query_toks": [ "SELECT", "t1.name", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "JOIN", "museum", "AS", "t3", "ON", "t3.Museum_ID", "=", "t2.Museum_ID", "WHERE", "t3.open_year", "<", "2009", "INTERSECT", "SELECT", "t1.name", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "JOIN", "museum", "AS", "t3", "ON", "t3.Museum_ID", "=", "t2.Museum_ID", "WHERE", "t3.open_year", ">", "2011" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "join", "museum", "as", "t3", "on", "t3", ".", "museum_id", "=", "t2", ".", "museum_id", "where", "t3", ".", "open_year", "<", "value", "intersect", "select", "t1", ".", "name", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "join", "museum", "as", "t3", "on", "t3", ".", "museum_id", "=", "t2", ".", "museum_id", "where", "t3", ".", "open_year", ">", "value" ], "question": "What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?", "question_toks": [ "What", "is", "the", "name", "of", "the", "visitor", "who", "visited", "both", "a", "museum", "opened", "before", "2009", "and", "a", "museum", "opened", "after", "2011", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ], "and", [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 4, false ], null ], 2009.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ], "and", [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 2011.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010)", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "visitor", "WHERE", "id", "NOT", "IN", "(", "SELECT", "t2.visitor_id", "FROM", "museum", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.Museum_ID", "=", "t2.Museum_ID", "WHERE", "t1.open_year", ">", "2010", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "visitor", "where", "id", "not", "in", "(", "select", "t2", ".", "visitor_id", "from", "museum", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "museum_id", "=", "t2", ".", "museum_id", "where", "t1", ".", "open_year", ">", "value", ")" ], "question": "Find the number of visitors who did not visit any museum opened after 2010.", "question_toks": [ "Find", "the", "number", "of", "visitors", "who", "did", "not", "visit", "any", "museum", "opened", "after", "2010", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 2010.0, null ] ], "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": "museum_visit", "query": "SELECT count(*) FROM museum WHERE open_year > 2013 OR open_year < 2008", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "museum", "WHERE", "open_year", ">", "2013", "OR", "open_year", "<", "2008" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "museum", "where", "open_year", ">", "value", "or", "open_year", "<", "value" ], "question": "How many museums were opened after 2013 or before 2008?", "question_toks": [ "How", "many", "museums", "were", "opened", "after", "2013", "or", "before", "2008", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 2013.0, null ], "or", [ false, 4, [ 0, [ 0, 4, false ], null ], 2008.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM players", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "players" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "players" ], "question": "Find the total number of players.", "question_toks": [ "Find", "the", "total", "number", "of", "players", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM players", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "players" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "players" ], "question": "How many players are there?", "question_toks": [ "How", "many", "players", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM matches", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "matches" ], "question": "Find the total number of matches.", "question_toks": [ "Find", "the", "total", "number", "of", "matches", "." ], "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": "wta_1", "query": "SELECT count(*) FROM matches", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "matches" ], "question": "Count the number of matches.", "question_toks": [ "Count", "the", "number", "of", "matches", "." ], "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": "wta_1", "query": "SELECT first_name , birth_date FROM players WHERE country_code = 'USA'", "query_toks": [ "SELECT", "first_name", ",", "birth_date", "FROM", "players", "WHERE", "country_code", "=", "'USA", "'" ], "query_toks_no_value": [ "select", "first_name", ",", "birth_date", "from", "players", "where", "country_code", "=", "value" ], "question": "List the first name and birth date of all players from the country with code USA.", "question_toks": [ "List", "the", "first", "name", "and", "birth", "date", "of", "all", "players", "from", "the", "country", "with", "code", "USA", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , birth_date FROM players WHERE country_code = 'USA'", "query_toks": [ "SELECT", "first_name", ",", "birth_date", "FROM", "players", "WHERE", "country_code", "=", "'USA", "'" ], "query_toks_no_value": [ "select", "first_name", ",", "birth_date", "from", "players", "where", "country_code", "=", "value" ], "question": "What are the first names and birth dates of players from the USA?", "question_toks": [ "What", "are", "the", "first", "names", "and", "birth", "dates", "of", "players", "from", "the", "USA", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "query_toks": [ "SELECT", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "from", "matches" ], "question": "Find the average age of losers and winners of all matches.", "question_toks": [ "Find", "the", "average", "age", "of", "losers", "and", "winners", "of", "all", "matches", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 9, false ], null ] ], [ 5, [ 0, [ 0, 28, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "query_toks": [ "SELECT", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "from", "matches" ], "question": "What are the average ages of losers and winners across matches?", "question_toks": [ "What", "are", "the", "average", "ages", "of", "losers", "and", "winners", "across", "matches", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 9, false ], null ] ], [ 5, [ 0, [ 0, 28, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(winner_rank) FROM matches", "query_toks": [ "SELECT", "avg", "(", "winner_rank", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "avg", "(", "winner_rank", ")", "from", "matches" ], "question": "Find the average rank of winners in all matches.", "question_toks": [ "Find", "the", "average", "rank", "of", "winners", "in", "all", "matches", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(winner_rank) FROM matches", "query_toks": [ "SELECT", "avg", "(", "winner_rank", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "avg", "(", "winner_rank", ")", "from", "matches" ], "question": "What is the average rank for winners in all matches?", "question_toks": [ "What", "is", "the", "average", "rank", "for", "winners", "in", "all", "matches", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT min(loser_rank) FROM matches", "query_toks": [ "SELECT", "min", "(", "loser_rank", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "min", "(", "loser_rank", ")", "from", "matches" ], "question": "Find the highest rank of losers in all matches.", "question_toks": [ "Find", "the", "highest", "rank", "of", "losers", "in", "all", "matches", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT min(loser_rank) FROM matches", "query_toks": [ "SELECT", "min", "(", "loser_rank", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "min", "(", "loser_rank", ")", "from", "matches" ], "question": "What is the best rank of losers across all matches?", "question_toks": [ "What", "is", "the", "best", "rank", "of", "losers", "across", "all", "matches", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT country_code) FROM players", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "country_code", ")", "FROM", "players" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "country_code", ")", "from", "players" ], "question": "find the number of distinct country codes of all players.", "question_toks": [ "find", "the", "number", "of", "distinct", "country", "codes", "of", "all", "players", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 6, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT country_code) FROM players", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "country_code", ")", "FROM", "players" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "country_code", ")", "from", "players" ], "question": "How many distinct countries do players come from?", "question_toks": [ "How", "many", "distinct", "countries", "do", "players", "come", "from", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 6, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT loser_name) FROM matches", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "loser_name", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "loser_name", ")", "from", "matches" ], "question": "Find the number of distinct name of losers.", "question_toks": [ "Find", "the", "number", "of", "distinct", "name", "of", "losers", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 15, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT loser_name) FROM matches", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "loser_name", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "loser_name", ")", "from", "matches" ], "question": "How many different loser names are there?", "question_toks": [ "How", "many", "different", "loser", "names", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 15, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10", "query_toks": [ "SELECT", "tourney_name", "FROM", "matches", "GROUP", "BY", "tourney_name", "HAVING", "count", "(", "*", ")", ">", "10" ], "query_toks_no_value": [ "select", "tourney_name", "from", "matches", "group", "by", "tourney_name", "having", "count", "(", "*", ")", ">", "value" ], "question": "Find the name of tourney that has more than 10 matches.", "question_toks": [ "Find", "the", "name", "of", "tourney", "that", "has", "more", "than", "10", "matches", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 27, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 27, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10", "query_toks": [ "SELECT", "tourney_name", "FROM", "matches", "GROUP", "BY", "tourney_name", "HAVING", "count", "(", "*", ")", ">", "10" ], "query_toks_no_value": [ "select", "tourney_name", "from", "matches", "group", "by", "tourney_name", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are the names of tournaments that have more than 10 matches?", "question_toks": [ "What", "are", "the", "names", "of", "tournaments", "that", "have", "more", "than", "10", "matches", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 27, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 27, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "query_toks": [ "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "INTERSECT", "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2016" ], "query_toks_no_value": [ "select", "winner_name", "from", "matches", "where", "year", "=", "value", "intersect", "select", "winner_name", "from", "matches", "where", "year", "=", "value" ], "question": "List the names of all winners who played in both 2013 and 2016.", "question_toks": [ "List", "the", "names", "of", "all", "winners", "who", "played", "in", "both", "2013", "and", "2016", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2013.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2016.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "query_toks": [ "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "INTERSECT", "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2016" ], "query_toks_no_value": [ "select", "winner_name", "from", "matches", "where", "year", "=", "value", "intersect", "select", "winner_name", "from", "matches", "where", "year", "=", "value" ], "question": "What are the names of players who won in both 2013 and 2016?", "question_toks": [ "What", "are", "the", "names", "of", "players", "who", "won", "in", "both", "2013", "and", "2016", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2013.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2016.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "OR", "YEAR", "=", "2016" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "matches", "where", "year", "=", "value", "or", "year", "=", "value" ], "question": "List the number of all matches who played in years of 2013 or 2016.", "question_toks": [ "List", "the", "number", "of", "all", "matches", "who", "played", "in", "years", "of", "2013", "or", "2016", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2013.0, null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], 2016.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "OR", "YEAR", "=", "2016" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "matches", "where", "year", "=", "value", "or", "year", "=", "value" ], "question": "How many matches were played in 2013 or 2016?", "question_toks": [ "How", "many", "matches", "were", "played", "in", "2013", "or", "2016", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2013.0, null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], 2016.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "query_toks": [ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'WTA", "Championships", "'", "INTERSECT", "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'Australian", "Open", "'" ], "query_toks_no_value": [ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value", "intersect", "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value" ], "question": "What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?", "question_toks": [ "What", "are", "the", "country", "code", "and", "first", "name", "of", "the", "players", "who", "won", "in", "both", "tourney", "WTA", "Championships", "and", "Australian", "Open", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"WTA Championships\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"Australian Open\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "query_toks": [ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'WTA", "Championships", "'", "INTERSECT", "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'Australian", "Open", "'" ], "query_toks_no_value": [ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value", "intersect", "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value" ], "question": "What are the first names and country codes for players who won both the WTA Championships and the Australian Open?", "question_toks": [ "What", "are", "the", "first", "names", "and", "country", "codes", "for", "players", "who", "won", "both", "the", "WTA", "Championships", "and", "the", "Australian", "Open", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"WTA Championships\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"Australian Open\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "country_code", "FROM", "players", "ORDER", "BY", "birth_date", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "country_code", "from", "players", "order", "by", "birth_date", "limit", "value" ], "question": "Find the first name and country code of the oldest player.", "question_toks": [ "Find", "the", "first", "name", "and", "country", "code", "of", "the", "oldest", "player", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "country_code", "FROM", "players", "ORDER", "BY", "birth_date", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "country_code", "from", "players", "order", "by", "birth_date", "limit", "value" ], "question": "What is the first name and country code of the oldest player?", "question_toks": [ "What", "is", "the", "first", "name", "and", "country", "code", "of", "the", "oldest", "player", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , last_name FROM players ORDER BY birth_date", "query_toks": [ "SELECT", "first_name", ",", "last_name", "FROM", "players", "ORDER", "BY", "birth_date" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", "from", "players", "order", "by", "birth_date" ], "question": "List the first and last name of all players in the order of birth date.", "question_toks": [ "List", "the", "first", "and", "last", "name", "of", "all", "players", "in", "the", "order", "of", "birth", "date", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , last_name FROM players ORDER BY birth_date", "query_toks": [ "SELECT", "first_name", ",", "last_name", "FROM", "players", "ORDER", "BY", "birth_date" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", "from", "players", "order", "by", "birth_date" ], "question": "What are the full names of all players, sorted by birth date?", "question_toks": [ "What", "are", "the", "full", "names", "of", "all", "players", ",", "sorted", "by", "birth", "date", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "query_toks": [ "SELECT", "first_name", ",", "last_name", "FROM", "players", "WHERE", "hand", "=", "'L", "'", "ORDER", "BY", "birth_date" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", "from", "players", "where", "hand", "=", "value", "order", "by", "birth_date" ], "question": "List the first and last name of all players who are left / L hand in the order of birth date.", "question_toks": [ "List", "the", "first", "and", "last", "name", "of", "all", "players", "who", "are", "left", "/", "L", "hand", "in", "the", "order", "of", "birth", "date", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"L\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "query_toks": [ "SELECT", "first_name", ",", "last_name", "FROM", "players", "WHERE", "hand", "=", "'L", "'", "ORDER", "BY", "birth_date" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", "from", "players", "where", "hand", "=", "value", "order", "by", "birth_date" ], "question": "What are the full names of all left handed players, in order of birth date?", "question_toks": [ "What", "are", "the", "full", "names", "of", "all", "left", "handed", "players", ",", "in", "order", "of", "birth", "date", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"L\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "query_toks": [ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "ORDER", "BY", "T2.tours", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "order", "by", "t2", ".", "tours", "desc", "limit", "value" ], "question": "Find the first name and country code of the player who did the most number of tours.", "question_toks": [ "Find", "the", "first", "name", "and", "country", "code", "of", "the", "player", "who", "did", "the", "most", "number", "of", "tours", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 43, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "query_toks": [ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "ORDER", "BY", "T2.tours", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "order", "by", "t2", ".", "tours", "desc", "limit", "value" ], "question": "What is the first name and country code of the player with the most tours?", "question_toks": [ "What", "is", "the", "first", "name", "and", "country", "code", "of", "the", "player", "with", "the", "most", "tours", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 43, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "year", "from", "matches", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Find the year that has the most number of matches.", "question_toks": [ "Find", "the", "year", "that", "has", "the", "most", "number", "of", "matches", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 38, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "year", "from", "matches", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which year had the most matches?", "question_toks": [ "Which", "year", "had", "the", "most", "matches", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 38, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", ",", "winner_rank_points", "FROM", "matches", "GROUP", "BY", "winner_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", ",", "winner_rank_points", "from", "matches", "group", "by", "winner_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Find the name and rank points of the winner who won the most times.", "question_toks": [ "Find", "the", "name", "and", "rank", "points", "of", "the", "winner", "who", "won", "the", "most", "times", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 34, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", ",", "winner_rank_points", "FROM", "matches", "GROUP", "BY", "winner_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", ",", "winner_rank_points", "from", "matches", "group", "by", "winner_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name of the winner who has won the most matches, and how many rank points does this player have?", "question_toks": [ "What", "is", "the", "name", "of", "the", "winner", "who", "has", "won", "the", "most", "matches", ",", "and", "how", "many", "rank", "points", "does", "this", "player", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 34, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", "FROM", "matches", "WHERE", "tourney_name", "=", "'Australian", "Open", "'", "ORDER", "BY", "winner_rank_points", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", "from", "matches", "where", "tourney_name", "=", "value", "order", "by", "winner_rank_points", "desc", "limit", "value" ], "question": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.", "question_toks": [ "Find", "the", "name", "of", "the", "winner", "who", "has", "the", "highest", "rank", "points", "and", "participated", "in", "the", "Australian", "Open", "tourney", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"Australian Open\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 36, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", "FROM", "matches", "WHERE", "tourney_name", "=", "'Australian", "Open", "'", "ORDER", "BY", "winner_rank_points", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", "from", "matches", "where", "tourney_name", "=", "value", "order", "by", "winner_rank_points", "desc", "limit", "value" ], "question": "What is the name of the winner with the most rank points who participated in the Australian Open tournament?", "question_toks": [ "What", "is", "the", "name", "of", "the", "winner", "with", "the", "most", "rank", "points", "who", "participated", "in", "the", "Australian", "Open", "tournament", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"Australian Open\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 36, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", ",", "loser_name", "FROM", "matches", "ORDER", "BY", "minutes", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", ",", "loser_name", "from", "matches", "order", "by", "minutes", "desc", "limit", "value" ], "question": "find the names of loser and winner who played in the match with greatest number of minutes.", "question_toks": [ "find", "the", "names", "of", "loser", "and", "winner", "who", "played", "in", "the", "match", "with", "greatest", "number", "of", "minutes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", ",", "loser_name", "FROM", "matches", "ORDER", "BY", "minutes", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", ",", "loser_name", "from", "matches", "order", "by", "minutes", "desc", "limit", "value" ], "question": "What are the names of the winner and loser who played in the longest match?", "question_toks": [ "What", "are", "the", "names", "of", "the", "winner", "and", "loser", "who", "played", "in", "the", "longest", "match", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "query_toks": [ "SELECT", "avg", "(", "ranking", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ], "query_toks_no_value": [ "select", "avg", "(", "ranking", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ], "question": "Find the average ranking for each player and their first name.", "question_toks": [ "Find", "the", "average", "ranking", "for", "each", "player", "and", "their", "first", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "query_toks": [ "SELECT", "avg", "(", "ranking", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ], "query_toks_no_value": [ "select", "avg", "(", "ranking", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ], "question": "What are the first names of all players, and their average rankings?", "question_toks": [ "What", "are", "the", "first", "names", "of", "all", "players", ",", "and", "their", "average", "rankings", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "query_toks": [ "SELECT", "sum", "(", "ranking_points", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ], "query_toks_no_value": [ "select", "sum", "(", "ranking_points", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ], "question": "Find the total ranking points for each player and their first name.", "question_toks": [ "Find", "the", "total", "ranking", "points", "for", "each", "player", "and", "their", "first", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 4, [ 0, [ 0, 42, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "query_toks": [ "SELECT", "sum", "(", "ranking_points", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ], "query_toks_no_value": [ "select", "sum", "(", "ranking_points", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ], "question": "What are the first names of all players, and their total ranking points?", "question_toks": [ "What", "are", "the", "first", "names", "of", "all", "players", ",", "and", "their", "total", "ranking", "points", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 4, [ 0, [ 0, 42, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , country_code FROM players GROUP BY country_code", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "country_code", "FROM", "players", "GROUP", "BY", "country_code" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "country_code", "from", "players", "group", "by", "country_code" ], "question": "find the number of players for each country.", "question_toks": [ "find", "the", "number", "of", "players", "for", "each", "country", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , country_code FROM players GROUP BY country_code", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "country_code", "FROM", "players", "GROUP", "BY", "country_code" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "country_code", "from", "players", "group", "by", "country_code" ], "question": "How many players are from each country?", "question_toks": [ "How", "many", "players", "are", "from", "each", "country", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "country_code", "from", "players", "group", "by", "country_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "find the code of the country where has the greatest number of players.", "question_toks": [ "find", "the", "code", "of", "the", "country", "where", "has", "the", "greatest", "number", "of", "players", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "country_code", "from", "players", "group", "by", "country_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the code of the country with the most players?", "question_toks": [ "What", "is", "the", "code", "of", "the", "country", "with", "the", "most", "players", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", "query_toks": [ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "HAVING", "count", "(", "*", ")", ">", "50" ], "query_toks_no_value": [ "select", "country_code", "from", "players", "group", "by", "country_code", "having", "count", "(", "*", ")", ">", "value" ], "question": "Find the codes of countries that have more than 50 players.", "question_toks": [ "Find", "the", "codes", "of", "countries", "that", "have", "more", "than", "50", "players", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 50.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", "query_toks": [ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "HAVING", "count", "(", "*", ")", ">", "50" ], "query_toks_no_value": [ "select", "country_code", "from", "players", "group", "by", "country_code", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are the codes of countries with more than 50 players?", "question_toks": [ "What", "are", "the", "codes", "of", "countries", "with", "more", "than", "50", "players", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 50.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "query_toks": [ "SELECT", "sum", "(", "tours", ")", ",", "ranking_date", "FROM", "rankings", "GROUP", "BY", "ranking_date" ], "query_toks_no_value": [ "select", "sum", "(", "tours", ")", ",", "ranking_date", "from", "rankings", "group", "by", "ranking_date" ], "question": "Find the total number of tours for each ranking date.", "question_toks": [ "Find", "the", "total", "number", "of", "tours", "for", "each", "ranking", "date", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 43, false ], null ] ], [ 0, [ 0, [ 0, 39, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 39, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "query_toks": [ "SELECT", "sum", "(", "tours", ")", ",", "ranking_date", "FROM", "rankings", "GROUP", "BY", "ranking_date" ], "query_toks_no_value": [ "select", "sum", "(", "tours", ")", ",", "ranking_date", "from", "rankings", "group", "by", "ranking_date" ], "question": "How many total tours were there for each ranking date?", "question_toks": [ "How", "many", "total", "tours", "were", "there", "for", "each", "ranking", "date", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 43, false ], null ] ], [ 0, [ 0, [ 0, 39, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 39, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , YEAR FROM matches GROUP BY YEAR", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "year", "from", "matches", "group", "by", "year" ], "question": "Find the number of matches happened in each year.", "question_toks": [ "Find", "the", "number", "of", "matches", "happened", "in", "each", "year", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 38, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , YEAR FROM matches GROUP BY YEAR", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "year", "from", "matches", "group", "by", "year" ], "question": "How many matches were played in each year?", "question_toks": [ "How", "many", "matches", "were", "played", "in", "each", "year", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 38, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "query_toks": [ "SELECT", "DISTINCT", "winner_name", ",", "winner_rank", "FROM", "matches", "ORDER", "BY", "winner_age", "LIMIT", "3" ], "query_toks_no_value": [ "select", "distinct", "winner_name", ",", "winner_rank", "from", "matches", "order", "by", "winner_age", "limit", "value" ], "question": "Find the name and rank of the 3 youngest winners across all matches.", "question_toks": [ "Find", "the", "name", "and", "rank", "of", "the", "3", "youngest", "winners", "across", "all", "matches", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 28, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "query_toks": [ "SELECT", "DISTINCT", "winner_name", ",", "winner_rank", "FROM", "matches", "ORDER", "BY", "winner_age", "LIMIT", "3" ], "query_toks_no_value": [ "select", "distinct", "winner_name", ",", "winner_rank", "from", "matches", "order", "by", "winner_age", "limit", "value" ], "question": "What are the names and ranks of the three youngest winners across all matches?", "question_toks": [ "What", "are", "the", "names", "and", "ranks", "of", "the", "three", "youngest", "winners", "across", "all", "matches", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 28, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "winner_name", ")", "FROM", "matches", "WHERE", "tourney_name", "=", "'WTA", "Championships", "'", "AND", "winner_hand", "=", "'L", "'" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "winner_name", ")", "from", "matches", "where", "tourney_name", "=", "value", "and", "winner_hand", "=", "value" ], "question": "How many different winners both participated in the WTA Championships and were left handed?", "question_toks": [ "How", "many", "different", "winners", "both", "participated", "in", "the", "WTA", "Championships", "and", "were", "left", "handed", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 34, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"WTA Championships\"", null ], "and", [ false, 2, [ 0, [ 0, 30, false ], null ], "\"L\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "winner_name", ")", "FROM", "matches", "WHERE", "tourney_name", "=", "'WTA", "Championships", "'", "AND", "winner_hand", "=", "'L", "'" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "winner_name", ")", "from", "matches", "where", "tourney_name", "=", "value", "and", "winner_hand", "=", "value" ], "question": "Find the number of left handed winners who participated in the WTA Championships.", "question_toks": [ "Find", "the", "number", "of", "left", "handed", "winners", "who", "participated", "in", "the", "WTA", "Championships", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 34, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"WTA Championships\"", null ], "and", [ false, 2, [ 0, [ 0, 30, false ], null ], "\"L\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.country_code", ",", "T1.birth_date", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "ORDER", "BY", "T2.winner_rank_points", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "country_code", ",", "t1", ".", "birth_date", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "order", "by", "t2", ".", "winner_rank_points", "desc", "limit", "value" ], "question": "Find the first name, country code and birth date of the winner who has the highest rank points in all matches.", "question_toks": [ "Find", "the", "first", "name", ",", "country", "code", "and", "birth", "date", "of", "the", "winner", "who", "has", "the", "highest", "rank", "points", "in", "all", "matches", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 36, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.country_code", ",", "T1.birth_date", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "ORDER", "BY", "T2.winner_rank_points", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "country_code", ",", "t1", ".", "birth_date", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "order", "by", "t2", ".", "winner_rank_points", "desc", "limit", "value" ], "question": "What is the first name, country code, and birth date of the player with the most winner rank points across all matches?", "question_toks": [ "What", "is", "the", "first", "name", ",", "country", "code", ",", "and", "birth", "date", "of", "the", "player", "with", "the", "most", "winner", "rank", "points", "across", "all", "matches", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 36, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , hand FROM players GROUP BY hand", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "hand", "FROM", "players", "GROUP", "BY", "hand" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "hand", "from", "players", "group", "by", "hand" ], "question": "Find the number of players for each hand type.", "question_toks": [ "Find", "the", "number", "of", "players", "for", "each", "hand", "type", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , hand FROM players GROUP BY hand", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "hand", "FROM", "players", "GROUP", "BY", "hand" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "hand", "from", "players", "group", "by", "hand" ], "question": "How many players are there for each hand type?", "question_toks": [ "How", "many", "players", "are", "there", "for", "each", "hand", "type", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT count(*) FROM ship WHERE disposition_of_ship = 'Captured'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "ship", "WHERE", "disposition_of_ship", "=", "'Captured", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "ship", "where", "disposition_of_ship", "=", "value" ], "question": "How many ships ended up being 'Captured'?", "question_toks": [ "How", "many", "ships", "ended", "up", "being", "'Captured", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"Captured\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name , tonnage FROM ship ORDER BY name DESC", "query_toks": [ "SELECT", "name", ",", "tonnage", "FROM", "ship", "ORDER", "BY", "name", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "tonnage", "from", "ship", "order", "by", "name", "desc" ], "question": "List the name and tonnage ordered by in descending alphaetical order for the names.", "question_toks": [ "List", "the", "name", "and", "tonnage", "ordered", "by", "in", "descending", "alphaetical", "order", "for", "the", "names", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name , date FROM battle", "query_toks": [ "SELECT", "name", ",", "date", "FROM", "battle" ], "query_toks_no_value": [ "select", "name", ",", "date", "from", "battle" ], "question": "List the name, date and result of each battle.", "question_toks": [ "List", "the", "name", ",", "date", "and", "result", "of", "each", "battle", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT max(killed) , min(killed) FROM death", "query_toks": [ "SELECT", "max", "(", "killed", ")", ",", "min", "(", "killed", ")", "FROM", "death" ], "query_toks_no_value": [ "select", "max", "(", "killed", ")", ",", "min", "(", "killed", ")", "from", "death" ], "question": "What is maximum and minimum death toll caused each time?", "question_toks": [ "What", "is", "maximum", "and", "minimum", "death", "toll", "caused", "each", "time", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 17, false ], null ] ], [ 2, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT avg(injured) FROM death", "query_toks": [ "SELECT", "avg", "(", "injured", ")", "FROM", "death" ], "query_toks_no_value": [ "select", "avg", "(", "injured", ")", "from", "death" ], "question": "What is the average number of injuries caused each time?", "question_toks": [ "What", "is", "the", "average", "number", "of", "injuries", "caused", "each", "time", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT T1.killed , T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'", "query_toks": [ "SELECT", "T1.killed", ",", "T1.injured", "FROM", "death", "AS", "T1", "JOIN", "ship", "AS", "t2", "ON", "T1.caused_by_ship_id", "=", "T2.id", "WHERE", "T2.tonnage", "=", "'t", "'" ], "query_toks_no_value": [ "select", "t1", ".", "killed", ",", "t1", ".", "injured", "from", "death", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "caused_by_ship_id", "=", "t2", ".", "id", "where", "t2", ".", "tonnage", "=", "value" ], "question": "What are the death and injury situations caused by the ship with tonnage 't'?", "question_toks": [ "What", "are", "the", "death", "and", "injury", "situations", "caused", "by", "the", "ship", "with", "tonnage", "'t", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ], [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"t\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name , RESULT FROM battle WHERE bulgarian_commander != 'Boril'", "query_toks": [ "SELECT", "name", ",", "RESULT", "FROM", "battle", "WHERE", "bulgarian_commander", "!", "=", "'Boril", "'" ], "query_toks_no_value": [ "select", "name", ",", "result", "from", "battle", "where", "bulgarian_commander", "!", "=", "value" ], "question": "What are the name and results of the battles when the bulgarian commander is not 'Boril'", "question_toks": [ "What", "are", "the", "name", "and", "results", "of", "the", "battles", "when", "the", "bulgarian", "commander", "is", "not", "'Boril", "'" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"Boril\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT DISTINCT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'", "query_toks": [ "SELECT", "DISTINCT", "T1.id", ",", "T1.name", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "WHERE", "T2.ship_type", "=", "'Brig", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "id", ",", "t1", ".", "name", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "where", "t2", ".", "ship_type", "=", "value" ], "question": "What are the different ids and names of the battles that lost any 'Brig' type shipes?", "question_toks": [ "What", "are", "the", "different", "ids", "and", "names", "of", "the", "battles", "that", "lost", "any", "'Brig", "'", "type", "shipes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Brig\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed) > 10", "query_toks": [ "SELECT", "T1.id", ",", "T1.name", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "JOIN", "death", "AS", "T3", "ON", "T2.id", "=", "T3.caused_by_ship_id", "GROUP", "BY", "T1.id", "HAVING", "sum", "(", "T3.killed", ")", ">", "10" ], "query_toks_no_value": [ "select", "t1", ".", "id", ",", "t1", ".", "name", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "join", "death", "as", "t3", "on", "t2", ".", "id", "=", "t3", ".", "caused_by_ship_id", "group", "by", "t1", ".", "id", "having", "sum", "(", "t3", ".", "killed", ")", ">", "value" ], "question": "What are the ids and names of the battles that led to more than 10 people killed in total.", "question_toks": [ "What", "are", "the", "ids", "and", "names", "of", "the", "battles", "that", "led", "to", "more", "than", "10", "people", "killed", "in", "total", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ], "and", [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [ [ false, 3, [ 0, [ 4, 17, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.id", ",", "T2.name", "FROM", "death", "AS", "T1", "JOIN", "ship", "AS", "t2", "ON", "T1.caused_by_ship_id", "=", "T2.id", "GROUP", "BY", "T2.id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "id", ",", "t2", ".", "name", "from", "death", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "caused_by_ship_id", "=", "t2", ".", "id", "group", "by", "t2", ".", "id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the ship id and name that caused most total injuries?", "question_toks": [ "What", "is", "the", "ship", "id", "and", "name", "that", "caused", "most", "total", "injuries", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'", "query_toks": [ "SELECT", "name", "FROM", "battle", "WHERE", "bulgarian_commander", "=", "'Kaloyan", "'", "AND", "latin_commander", "=", "'Baldwin", "I", "'" ], "query_toks_no_value": [ "select", "name", "from", "battle", "where", "bulgarian_commander", "=", "value", "and", "latin_commander", "=", "value" ], "question": "What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?", "question_toks": [ "What", "are", "the", "distinct", "battle", "names", "which", "are", "between", "bulgarian", "commander", "'Kaloyan", "'", "and", "latin", "commander", "'Baldwin", "I", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Kaloyan\"", null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Baldwin I\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT count(DISTINCT RESULT) FROM battle", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "RESULT", ")", "FROM", "battle" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "result", ")", "from", "battle" ], "question": "How many different results are there for the battles?", "question_toks": [ "How", "many", "different", "results", "are", "there", "for", "the", "battles", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 6, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "battle", "WHERE", "id", "NOT", "IN", "(", "SELECT", "lost_in_battle", "FROM", "ship", "WHERE", "tonnage", "=", "'225", "'", ")", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "battle", "where", "id", "not", "in", "(", "select", "lost_in_battle", "from", "ship", "where", "tonnage", "=", "value", ")" ], "question": "How many battles did not lose any ship with tonnage '225'?", "question_toks": [ "How", "many", "battles", "did", "not", "lose", "any", "ship", "with", "tonnage", "'225", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"225\"", null ] ], "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": "battle_death", "query": "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'", "query_toks": [ "SELECT", "T1.name", ",", "T1.date", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "WHERE", "T2.name", "=", "'Lettice", "'", "INTERSECT", "SELECT", "T1.name", ",", "T1.date", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "WHERE", "T2.name", "=", "'HMS", "Atalanta", "'" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t1", ".", "date", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "where", "t2", ".", "name", "=", "value", "intersect", "select", "t1", ".", "name", ",", "t1", ".", "date", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "where", "t2", ".", "name", "=", "value" ], "question": "List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'", "question_toks": [ "List", "the", "name", "and", "date", "the", "battle", "that", "has", "lost", "the", "ship", "named", "'Lettice", "'", "and", "the", "ship", "named", "'HMS", "Atalanta", "'" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Lettice\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"HMS Atalanta\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name , RESULT , bulgarian_commander FROM battle EXCEPT SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'", "query_toks": [ "SELECT", "name", ",", "RESULT", ",", "bulgarian_commander", "FROM", "battle", "EXCEPT", "SELECT", "T1.name", ",", "T1.result", ",", "T1.bulgarian_commander", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "WHERE", "T2.location", "=", "'English", "Channel", "'" ], "query_toks_no_value": [ "select", "name", ",", "result", ",", "bulgarian_commander", "from", "battle", "except", "select", "t1", ".", "name", ",", "t1", ".", "result", ",", "t1", ".", "bulgarian_commander", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "where", "t2", ".", "location", "=", "value" ], "question": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.", "question_toks": [ "Show", "names", ",", "results", "and", "bulgarian", "commanders", "of", "the", "battles", "with", "no", "ships", "lost", "in", "the", "'English", "Channel", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"English Channel\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "battle_death", "query": "SELECT note FROM death WHERE note LIKE '%East%'", "query_toks": [ "SELECT", "note", "FROM", "death", "WHERE", "note", "LIKE", "'", "%", "East", "%", "'" ], "query_toks_no_value": [ "select", "note", "from", "death", "where", "note", "like", "value" ], "question": "What are the notes of the death events which has substring 'East'?", "question_toks": [ "What", "are", "the", "notes", "of", "the", "death", "events", "which", "has", "substring", "'East", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 16, false ], null ], "\"%East%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT line_1 , line_2 FROM addresses", "query_toks": [ "SELECT", "line_1", ",", "line_2", "FROM", "addresses" ], "query_toks_no_value": [ "select", "line_1", ",", "line_2", "from", "addresses" ], "question": "what are all the addresses including line 1 and line 2?", "question_toks": [ "what", "are", "all", "the", "addresses", "including", "line", "1", "and", "line", "2", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT line_1 , line_2 FROM addresses", "query_toks": [ "SELECT", "line_1", ",", "line_2", "FROM", "addresses" ], "query_toks_no_value": [ "select", "line_1", ",", "line_2", "from", "addresses" ], "question": "What is the first and second line for all addresses?", "question_toks": [ "What", "is", "the", "first", "and", "second", "line", "for", "all", "addresses", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Courses", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Courses" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "courses" ], "question": "How many courses in total are listed?", "question_toks": [ "How", "many", "courses", "in", "total", "are", "listed", "?" ], "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": "student_transcripts_tracking", "query": "SELECT count(*) FROM Courses", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Courses" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "courses" ], "question": "How many courses are there?", "question_toks": [ "How", "many", "courses", "are", "there", "?" ], "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": "student_transcripts_tracking", "query": "SELECT course_description FROM Courses WHERE course_name = 'math'", "query_toks": [ "SELECT", "course_description", "FROM", "Courses", "WHERE", "course_name", "=", "'math", "'" ], "query_toks_no_value": [ "select", "course_description", "from", "courses", "where", "course_name", "=", "value" ], "question": "How is the math course described?", "question_toks": [ "How", "is", "the", "math", "course", "described", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"math\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT course_description FROM Courses WHERE course_name = 'math'", "query_toks": [ "SELECT", "course_description", "FROM", "Courses", "WHERE", "course_name", "=", "'math", "'" ], "query_toks_no_value": [ "select", "course_description", "from", "courses", "where", "course_name", "=", "value" ], "question": "What are the descriptions for all the math courses?", "question_toks": [ "What", "are", "the", "descriptions", "for", "all", "the", "math", "courses", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"math\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'", "query_toks": [ "SELECT", "zip_postcode", "FROM", "Addresses", "WHERE", "city", "=", "'Port", "Chelsea", "'" ], "query_toks_no_value": [ "select", "zip_postcode", "from", "addresses", "where", "city", "=", "value" ], "question": "What is the zip code of the address in the city Port Chelsea?", "question_toks": [ "What", "is", "the", "zip", "code", "of", "the", "address", "in", "the", "city", "Port", "Chelsea", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Port Chelsea\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'", "query_toks": [ "SELECT", "zip_postcode", "FROM", "Addresses", "WHERE", "city", "=", "'Port", "Chelsea", "'" ], "query_toks_no_value": [ "select", "zip_postcode", "from", "addresses", "where", "city", "=", "value" ], "question": "What is the zip code for Port Chelsea?", "question_toks": [ "What", "is", "the", "zip", "code", "for", "Port", "Chelsea", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Port Chelsea\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.department_name", ",", "T1.department_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Departments", "AS", "T2", "ON", "T1.department_id", "=", "T2.department_id", "GROUP", "BY", "T1.department_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "department_name", ",", "t1", ".", "department_id", "from", "degree_programs", "as", "t1", "join", "departments", "as", "t2", "on", "t1", ".", "department_id", "=", "t2", ".", "department_id", "group", "by", "t1", ".", "department_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which department offers the most number of degrees? List department name and id.", "question_toks": [ "Which", "department", "offers", "the", "most", "number", "of", "degrees", "?", "List", "department", "name", "and", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 19, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "select t2.department_name , t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id = t2.department_id group by t1.department_id order by count(*) desc limit 1", "query_toks": [ "select", "t2.department_name", ",", "t1.department_id", "from", "degree_programs", "as", "t1", "join", "departments", "as", "t2", "on", "t1.department_id", "=", "t2.department_id", "group", "by", "t1.department_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "t2", ".", "department_name", ",", "t1", ".", "department_id", "from", "degree_programs", "as", "t1", "join", "departments", "as", "t2", "on", "t1", ".", "department_id", "=", "t2", ".", "department_id", "group", "by", "t1", ".", "department_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name and id of the department with the most number of degrees ?", "question_toks": [ "What", "is", "the", "name", "and", "id", "of", "the", "department", "with", "the", "most", "number", "of", "degrees", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 19, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT department_id) FROM Degree_Programs", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "department_id", ")", "FROM", "Degree_Programs" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "department_id", ")", "from", "degree_programs" ], "question": "How many departments offer any degree?", "question_toks": [ "How", "many", "departments", "offer", "any", "degree", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 19, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT department_id) FROM Degree_Programs", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "department_id", ")", "FROM", "Degree_Programs" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "department_id", ")", "from", "degree_programs" ], "question": "How many different departments offer degrees?", "question_toks": [ "How", "many", "different", "departments", "offer", "degrees", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 19, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "degree_summary_name", ")", "FROM", "Degree_Programs" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "degree_summary_name", ")", "from", "degree_programs" ], "question": "How many different degree names are offered?", "question_toks": [ "How", "many", "different", "degree", "names", "are", "offered", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 20, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "degree_summary_name", ")", "FROM", "Degree_Programs" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "degree_summary_name", ")", "from", "degree_programs" ], "question": "How many different degrees are offered?", "question_toks": [ "How", "many", "different", "degrees", "are", "offered", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 20, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Departments", "AS", "T1", "JOIN", "Degree_Programs", "AS", "T2", "ON", "T1.department_id", "=", "T2.department_id", "WHERE", "T1.department_name", "=", "'engineer", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "departments", "as", "t1", "join", "degree_programs", "as", "t2", "on", "t1", ".", "department_id", "=", "t2", ".", "department_id", "where", "t1", ".", "department_name", "=", "value" ], "question": "How many degrees does the engineering department offer?", "question_toks": [ "How", "many", "degrees", "does", "the", "engineering", "department", "offer", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 19, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"engineer\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Departments", "AS", "T1", "JOIN", "Degree_Programs", "AS", "T2", "ON", "T1.department_id", "=", "T2.department_id", "WHERE", "T1.department_name", "=", "'engineer", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "departments", "as", "t1", "join", "degree_programs", "as", "t2", "on", "t1", ".", "department_id", "=", "t2", ".", "department_id", "where", "t1", ".", "department_name", "=", "value" ], "question": "How many degrees does the engineering department have?", "question_toks": [ "How", "many", "degrees", "does", "the", "engineering", "department", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 19, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"engineer\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_name , section_description FROM Sections", "query_toks": [ "SELECT", "section_name", ",", "section_description", "FROM", "Sections" ], "query_toks_no_value": [ "select", "section_name", ",", "section_description", "from", "sections" ], "question": "What are the names and descriptions of all the sections?", "question_toks": [ "What", "are", "the", "names", "and", "descriptions", "of", "all", "the", "sections", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_name , section_description FROM Sections", "query_toks": [ "SELECT", "section_name", ",", "section_description", "FROM", "Sections" ], "query_toks_no_value": [ "select", "section_name", ",", "section_description", "from", "sections" ], "question": "What are the names and descriptions for all the sections?", "question_toks": [ "What", "are", "the", "names", "and", "descriptions", "for", "all", "the", "sections", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "query_toks": [ "SELECT", "T1.course_name", ",", "T1.course_id", "FROM", "Courses", "AS", "T1", "JOIN", "Sections", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_id", "HAVING", "count", "(", "*", ")", "<", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "course_name", ",", "t1", ".", "course_id", "from", "courses", "as", "t1", "join", "sections", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_id", "having", "count", "(", "*", ")", "<", "=", "value" ], "question": "What are the names and id of courses having at most 2 sections?", "question_toks": [ "What", "are", "the", "names", "and", "id", "of", "courses", "having", "at", "most", "2", "sections", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 24, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 6, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "query_toks": [ "SELECT", "T1.course_name", ",", "T1.course_id", "FROM", "Courses", "AS", "T1", "JOIN", "Sections", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_id", "HAVING", "count", "(", "*", ")", "<", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "course_name", ",", "t1", ".", "course_id", "from", "courses", "as", "t1", "join", "sections", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_id", "having", "count", "(", "*", ")", "<", "=", "value" ], "question": "What are the names and ids of every course with less than 2 sections?", "question_toks": [ "What", "are", "the", "names", "and", "ids", "of", "every", "course", "with", "less", "than", "2", "sections", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 24, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 6, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_name FROM Sections ORDER BY section_name DESC", "query_toks": [ "SELECT", "section_name", "FROM", "Sections", "ORDER", "BY", "section_name", "DESC" ], "query_toks_no_value": [ "select", "section_name", "from", "sections", "order", "by", "section_name", "desc" ], "question": "List the section_name in reversed lexicographical order.", "question_toks": [ "List", "the", "section_name", "in", "reversed", "lexicographical", "order", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 25, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_name FROM Sections ORDER BY section_name DESC", "query_toks": [ "SELECT", "section_name", "FROM", "Sections", "ORDER", "BY", "section_name", "DESC" ], "query_toks_no_value": [ "select", "section_name", "from", "sections", "order", "by", "section_name", "desc" ], "question": "What are the names of the sections in reverse alphabetical order?", "question_toks": [ "What", "are", "the", "names", "of", "the", "sections", "in", "reverse", "alphabetical", "order", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 25, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.semester_name", ",", "T1.semester_id", "FROM", "Semesters", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.semester_id", "=", "T2.semester_id", "GROUP", "BY", "T1.semester_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "semester_name", ",", "t1", ".", "semester_id", "from", "semesters", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "semester_id", "=", "t2", ".", "semester_id", "group", "by", "t1", ".", "semester_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the semester which most student registered in? Show both the name and the id.", "question_toks": [ "What", "is", "the", "semester", "which", "most", "student", "registered", "in", "?", "Show", "both", "the", "name", "and", "the", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 28, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 29, false ], null ] ], [ 0, [ 0, [ 0, 28, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 28, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.semester_name", ",", "T1.semester_id", "FROM", "Semesters", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.semester_id", "=", "T2.semester_id", "GROUP", "BY", "T1.semester_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "semester_name", ",", "t1", ".", "semester_id", "from", "semesters", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "semester_id", "=", "t2", ".", "semester_id", "group", "by", "t1", ".", "semester_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "For each semester, what is the name and id of the one with the most students registered?", "question_toks": [ "For", "each", "semester", ",", "what", "is", "the", "name", "and", "id", "of", "the", "one", "with", "the", "most", "students", "registered", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 28, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 29, false ], null ] ], [ 0, [ 0, [ 0, 28, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 28, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'", "query_toks": [ "SELECT", "department_description", "FROM", "Departments", "WHERE", "department_name", "LIKE", "'", "%", "computer", "%", "'" ], "query_toks_no_value": [ "select", "department_description", "from", "departments", "where", "department_name", "like", "value" ], "question": "What is the description of the department whose name has the substring the computer?", "question_toks": [ "What", "is", "the", "description", "of", "the", "department", "whose", "name", "has", "the", "substring", "the", "computer", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 15, false ], null ], "\"%computer%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'", "query_toks": [ "SELECT", "department_description", "FROM", "Departments", "WHERE", "department_name", "LIKE", "'", "%", "computer", "%", "'" ], "query_toks_no_value": [ "select", "department_description", "from", "departments", "where", "department_name", "like", "value" ], "question": "What is the department description for the one whose name has the word computer?", "question_toks": [ "What", "is", "the", "department", "description", "for", "the", "one", "whose", "name", "has", "the", "word", "computer", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 15, false ], null ], "\"%computer%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", ",", "T1.student_id", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", ",", "t1", ".", "student_id", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", "=", "value" ], "question": "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.", "question_toks": [ "Who", "are", "enrolled", "in", "2", "degree", "programs", "in", "one", "semester", "?", "List", "the", "first", "name", ",", "middle", "name", "and", "last", "name", "and", "the", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 32, false ] ], "having": [ [ false, 2, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", ",", "T1.student_id", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", ",", "t1", ".", "student_id", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", "=", "value" ], "question": "What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?", "question_toks": [ "What", "are", "the", "first", ",", "middle", ",", "and", "last", "names", ",", "along", "with", "the", "ids", ",", "of", "all", "students", "who", "enrolled", "in", "2", "degree", "programs", "in", "one", "semester", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 32, false ] ], "having": [ [ false, 2, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "JOIN", "Degree_Programs", "AS", "T3", "ON", "T2.degree_program_id", "=", "T3.degree_program_id", "WHERE", "T3.degree_summary_name", "=", "'Bachelor", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "join", "degree_programs", "as", "t3", "on", "t2", ".", "degree_program_id", "=", "t3", ".", "degree_program_id", "where", "t3", ".", "degree_summary_name", "=", "value" ], "question": "Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.", "question_toks": [ "Who", "is", "enrolled", "in", "a", "Bachelor", "degree", "program", "?", "List", "the", "first", "name", ",", "middle", "name", ",", "last", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ], "and", [ false, 2, [ 0, [ 0, 45, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Bachelor\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "JOIN", "Degree_Programs", "AS", "T3", "ON", "T2.degree_program_id", "=", "T3.degree_program_id", "WHERE", "T3.degree_summary_name", "=", "'Bachelor", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "join", "degree_programs", "as", "t3", "on", "t2", ".", "degree_program_id", "=", "t3", ".", "degree_program_id", "where", "t3", ".", "degree_summary_name", "=", "value" ], "question": "What are the first, middle, and last names for everybody enrolled in a Bachelors program?", "question_toks": [ "What", "are", "the", "first", ",", "middle", ",", "and", "last", "names", "for", "everybody", "enrolled", "in", "a", "Bachelors", "program", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ], "and", [ false, 2, [ 0, [ 0, 45, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Bachelor\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.degree_summary_name", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "GROUP", "BY", "T1.degree_summary_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "degree_summary_name", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "group", "by", "t1", ".", "degree_summary_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Find the kind of program which most number of students are enrolled in?", "question_toks": [ "Find", "the", "kind", "of", "program", "which", "most", "number", "of", "students", "are", "enrolled", "in", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 20, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.degree_summary_name", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "GROUP", "BY", "T1.degree_summary_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "degree_summary_name", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "group", "by", "t1", ".", "degree_summary_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the degree summary name that has the most number of students enrolled?", "question_toks": [ "What", "is", "the", "degree", "summary", "name", "that", "has", "the", "most", "number", "of", "students", "enrolled", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 20, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.degree_program_id", ",", "T1.degree_summary_name", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "GROUP", "BY", "T1.degree_program_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "degree_program_id", ",", "t1", ".", "degree_summary_name", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "group", "by", "t1", ".", "degree_program_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Find the program which most number of students are enrolled in. List both the id and the summary.", "question_toks": [ "Find", "the", "program", "which", "most", "number", "of", "students", "are", "enrolled", "in", ".", "List", "both", "the", "id", "and", "the", "summary", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, false ], null ] ], [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.degree_program_id", ",", "T1.degree_summary_name", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "GROUP", "BY", "T1.degree_program_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "degree_program_id", ",", "t1", ".", "degree_summary_name", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "group", "by", "t1", ".", "degree_program_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the program id and the summary of the degree that has the most students enrolled?", "question_toks": [ "What", "is", "the", "program", "id", "and", "the", "summary", "of", "the", "degree", "that", "has", "the", "most", "students", "enrolled", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, false ], null ] ], [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.student_id", ",", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", ",", "count", "(", "*", ")", ",", "T1.student_id", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "student_id", ",", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", ",", "count", "(", "*", ")", ",", "t1", ".", "student_id", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id.", "question_toks": [ "Which", "student", "has", "enrolled", "for", "the", "most", "times", "in", "any", "program", "?", "List", "the", "id", ",", "first", "name", ",", "middle", "name", ",", "last", "name", ",", "the", "number", "of", "enrollments", "and", "student", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 32, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 32, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.student_id", ",", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", ",", "count", "(", "*", ")", ",", "T1.student_id", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "student_id", ",", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", ",", "count", "(", "*", ")", ",", "t1", ".", "student_id", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program?", "question_toks": [ "What", "is", "the", "first", ",", "middle", ",", "and", "last", "name", ",", "along", "with", "the", "id", "and", "number", "of", "enrollments", ",", "for", "the", "student", "who", "enrolled", "the", "most", "in", "any", "program", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 32, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 32, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "query_toks": [ "SELECT", "semester_name", "FROM", "Semesters", "WHERE", "semester_id", "NOT", "IN", "(", "SELECT", "semester_id", "FROM", "Student_Enrolment", ")" ], "query_toks_no_value": [ "select", "semester_name", "from", "semesters", "where", "semester_id", "not", "in", "(", "select", "semester_id", "from", "student_enrolment", ")" ], "question": "Which semesters do not have any student enrolled? List the semester name.", "question_toks": [ "Which", "semesters", "do", "not", "have", "any", "student", "enrolled", "?", "List", "the", "semester", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 29, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 28, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 46, 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": "student_transcripts_tracking", "query": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "query_toks": [ "SELECT", "semester_name", "FROM", "Semesters", "WHERE", "semester_id", "NOT", "IN", "(", "SELECT", "semester_id", "FROM", "Student_Enrolment", ")" ], "query_toks_no_value": [ "select", "semester_name", "from", "semesters", "where", "semester_id", "not", "in", "(", "select", "semester_id", "from", "student_enrolment", ")" ], "question": "What is the name of the semester with no students enrolled?", "question_toks": [ "What", "is", "the", "name", "of", "the", "semester", "with", "no", "students", "enrolled", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 29, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 28, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 46, 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": "student_transcripts_tracking", "query": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "query_toks": [ "SELECT", "DISTINCT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Enrolment_Courses", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_enrolment_courses", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id" ], "question": "What are all the course names of the courses which ever have students enrolled in?", "question_toks": [ "What", "are", "all", "the", "course", "names", "of", "the", "courses", "which", "ever", "have", "students", "enrolled", "in", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 8 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 50, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "query_toks": [ "SELECT", "DISTINCT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Enrolment_Courses", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_enrolment_courses", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id" ], "question": "What are the names of all courses that have some students enrolled?", "question_toks": [ "What", "are", "the", "names", "of", "all", "courses", "that", "have", "some", "students", "enrolled", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 8 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 50, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Enrolment_Courses", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_enrolment_courses", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What's the name of the course with most number of enrollments?", "question_toks": [ "What", "'s", "the", "name", "of", "the", "course", "with", "most", "number", "of", "enrollments", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 8 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 50, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Enrolment_Courses", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_enrolment_courses", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name of the course with the most students enrolled?", "question_toks": [ "What", "is", "the", "name", "of", "the", "course", "with", "the", "most", "students", "enrolled", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 8 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 50, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id", "query_toks": [ "SELECT", "T1.last_name", "FROM", "Students", "AS", "T1", "JOIN", "Addresses", "AS", "T2", "ON", "T1.current_address_id", "=", "T2.address_id", "WHERE", "T2.state_province_county", "=", "'NorthCarolina", "'", "EXCEPT", "SELECT", "DISTINCT", "T3.last_name", "FROM", "Students", "AS", "T3", "JOIN", "Student_Enrolment", "AS", "T4", "ON", "T3.student_id", "=", "T4.student_id" ], "query_toks_no_value": [ "select", "t1", ".", "last_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1", ".", "current_address_id", "=", "t2", ".", "address_id", "where", "t2", ".", "state_province_county", "=", "value", "except", "select", "distinct", "t3", ".", "last_name", "from", "students", "as", "t3", "join", "student_enrolment", "as", "t4", "on", "t3", ".", "student_id", "=", "t4", ".", "student_id" ], "question": "Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.", "question_toks": [ "Find", "the", "last", "name", "of", "the", "students", "who", "currently", "live", "in", "the", "state", "of", "North", "Carolina", "but", "have", "not", "registered", "in", "any", "degree", "program", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"NorthCarolina\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id", "query_toks": [ "SELECT", "T1.last_name", "FROM", "Students", "AS", "T1", "JOIN", "Addresses", "AS", "T2", "ON", "T1.current_address_id", "=", "T2.address_id", "WHERE", "T2.state_province_county", "=", "'NorthCarolina", "'", "EXCEPT", "SELECT", "DISTINCT", "T3.last_name", "FROM", "Students", "AS", "T3", "JOIN", "Student_Enrolment", "AS", "T4", "ON", "T3.student_id", "=", "T4.student_id" ], "query_toks_no_value": [ "select", "t1", ".", "last_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1", ".", "current_address_id", "=", "t2", ".", "address_id", "where", "t2", ".", "state_province_county", "=", "value", "except", "select", "distinct", "t3", ".", "last_name", "from", "students", "as", "t3", "join", "student_enrolment", "as", "t4", "on", "t3", ".", "student_id", "=", "t4", ".", "student_id" ], "question": "What are the last name of the students who live in North Carolina but have not registered in any degree programs?", "question_toks": [ "What", "are", "the", "last", "name", "of", "the", "students", "who", "live", "in", "North", "Carolina", "but", "have", "not", "registered", "in", "any", "degree", "programs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"NorthCarolina\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.transcript_date", ",", "T1.transcript_id", "FROM", "Transcript_Contents", "AS", "T1", "JOIN", "Transcripts", "AS", "T2", "ON", "T1.transcript_id", "=", "T2.transcript_id", "GROUP", "BY", "T1.transcript_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "transcript_date", ",", "t1", ".", "transcript_id", "from", "transcript_contents", "as", "t1", "join", "transcripts", "as", "t2", "on", "t1", ".", "transcript_id", "=", "t2", ".", "transcript_id", "group", "by", "t1", ".", "transcript_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Show the date and id of the transcript with at least 2 course results.", "question_toks": [ "Show", "the", "date", "and", "id", "of", "the", "transcript", "with", "at", "least", "2", "course", "results", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ], [ "table_unit", 9 ] ], "conds": [ [ false, 2, [ 0, [ 0, 56, false ], null ], [ 0, 52, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 56, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 56, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.transcript_date", ",", "T1.transcript_id", "FROM", "Transcript_Contents", "AS", "T1", "JOIN", "Transcripts", "AS", "T2", "ON", "T1.transcript_id", "=", "T2.transcript_id", "GROUP", "BY", "T1.transcript_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "transcript_date", ",", "t1", ".", "transcript_id", "from", "transcript_contents", "as", "t1", "join", "transcripts", "as", "t2", "on", "t1", ".", "transcript_id", "=", "t2", ".", "transcript_id", "group", "by", "t1", ".", "transcript_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What is the date and id of the transcript with at least 2 courses listed?", "question_toks": [ "What", "is", "the", "date", "and", "id", "of", "the", "transcript", "with", "at", "least", "2", "courses", "listed", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ], [ "table_unit", 9 ] ], "conds": [ [ false, 2, [ 0, [ 0, 56, false ], null ], [ 0, 52, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 56, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 56, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'", "query_toks": [ "SELECT", "cell_mobile_number", "FROM", "Students", "WHERE", "first_name", "=", "'Timmothy", "'", "AND", "last_name", "=", "'Ward", "'" ], "query_toks_no_value": [ "select", "cell_mobile_number", "from", "students", "where", "first_name", "=", "value", "and", "last_name", "=", "value" ], "question": "What is the phone number of the man with the first name Timmothy and the last name Ward?", "question_toks": [ "What", "is", "the", "phone", "number", "of", "the", "man", "with", "the", "first", "name", "Timmothy", "and", "the", "last", "name", "Ward", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 35, false ], null ], "\"Timmothy\"", null ], "and", [ false, 2, [ 0, [ 0, 37, false ], null ], "\"Ward\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "select cell_mobile_number from students where first_name = 'timmothy' and last_name = 'ward'", "query_toks": [ "select", "cell_mobile_number", "from", "students", "where", "first_name", "=", "\"timmothy\"", "and", "last_name", "=", "\"ward\"" ], "query_toks_no_value": [ "select", "cell_mobile_number", "from", "students", "where", "first_name", "=", "value", "and", "last_name", "=", "value" ], "question": "What is the mobile phone number of the student named Timmothy Ward ?", "question_toks": [ "What", "is", "the", "mobile", "phone", "number", "of", "the", "student", "named", "Timmothy", "Ward", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 35, false ], null ], "\"timmothy\"", null ], "and", [ false, 2, [ 0, [ 0, 37, false ], null ], "\"ward\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "middle_name", ",", "last_name", "FROM", "Students", "ORDER", "BY", "date_first_registered", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "middle_name", ",", "last_name", "from", "students", "order", "by", "date_first_registered", "asc", "limit", "value" ], "question": "Who is the first student to register? List the first name, middle name and last name.", "question_toks": [ "Who", "is", "the", "first", "student", "to", "register", "?", "List", "the", "first", "name", ",", "middle", "name", "and", "last", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 41, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "middle_name", ",", "last_name", "FROM", "Students", "ORDER", "BY", "date_first_registered", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "middle_name", ",", "last_name", "from", "students", "order", "by", "date_first_registered", "asc", "limit", "value" ], "question": "What is the first, middle, and last name of the first student to register?", "question_toks": [ "What", "is", "the", "first", ",", "middle", ",", "and", "last", "name", "of", "the", "first", "student", "to", "register", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 41, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "middle_name", ",", "last_name", "FROM", "Students", "ORDER", "BY", "date_left", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "middle_name", ",", "last_name", "from", "students", "order", "by", "date_left", "asc", "limit", "value" ], "question": "Who is the earliest graduate of the school? List the first name, middle name and last name.", "question_toks": [ "Who", "is", "the", "earliest", "graduate", "of", "the", "school", "?", "List", "the", "first", "name", ",", "middle", "name", "and", "last", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 42, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "middle_name", ",", "last_name", "FROM", "Students", "ORDER", "BY", "date_left", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "middle_name", ",", "last_name", "from", "students", "order", "by", "date_left", "asc", "limit", "value" ], "question": "What is the first, middle, and last name of the earliest school graduate?", "question_toks": [ "What", "is", "the", "first", ",", "middle", ",", "and", "last", "name", "of", "the", "earliest", "school", "graduate", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 42, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "query_toks": [ "SELECT", "first_name", "FROM", "Students", "WHERE", "current_address_id", "!", "=", "permanent_address_id" ], "query_toks_no_value": [ "select", "first_name", "from", "students", "where", "current_address_id", "!", "=", "permanent_address_id" ], "question": "Whose permanent address is different from his or her current address? List his or her first name.", "question_toks": [ "Whose", "permanent", "address", "is", "different", "from", "his", "or", "her", "current", "address", "?", "List", "his", "or", "her", "first", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 33, false ], null ], [ 0, 34, false ], null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "query_toks": [ "SELECT", "first_name", "FROM", "Students", "WHERE", "current_address_id", "!", "=", "permanent_address_id" ], "query_toks_no_value": [ "select", "first_name", "from", "students", "where", "current_address_id", "!", "=", "permanent_address_id" ], "question": "What is the first name of the student whose permanent address is different from his or her current one?", "question_toks": [ "What", "is", "the", "first", "name", "of", "the", "student", "whose", "permanent", "address", "is", "different", "from", "his", "or", "her", "current", "one", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 33, false ], null ], [ 0, 34, false ], null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.address_id", ",", "T1.line_1", ",", "T1.line_2", "FROM", "Addresses", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.address_id", "=", "T2.current_address_id", "GROUP", "BY", "T1.address_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "address_id", ",", "t1", ".", "line_1", ",", "t1", ".", "line_2", "from", "addresses", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "address_id", "=", "t2", ".", "current_address_id", "group", "by", "t1", ".", "address_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which address holds the most number of students currently? List the address id and all lines.", "question_toks": [ "Which", "address", "holds", "the", "most", "number", "of", "students", "currently", "?", "List", "the", "address", "id", "and", "all", "lines", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 6 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 33, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.address_id", ",", "T1.line_1", ",", "T1.line_2", "FROM", "Addresses", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.address_id", "=", "T2.current_address_id", "GROUP", "BY", "T1.address_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "address_id", ",", "t1", ".", "line_1", ",", "t1", ".", "line_2", "from", "addresses", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "address_id", "=", "t2", ".", "current_address_id", "group", "by", "t1", ".", "address_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the id, line 1, and line 2 of the address with the most students?", "question_toks": [ "What", "is", "the", "id", ",", "line", "1", ",", "and", "line", "2", "of", "the", "address", "with", "the", "most", "students", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 6 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 33, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT avg(transcript_date) FROM Transcripts", "query_toks": [ "SELECT", "avg", "(", "transcript_date", ")", "FROM", "Transcripts" ], "query_toks_no_value": [ "select", "avg", "(", "transcript_date", ")", "from", "transcripts" ], "question": "On average, when were the transcripts printed?", "question_toks": [ "On", "average", ",", "when", "were", "the", "transcripts", "printed", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 53, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT avg(transcript_date) FROM Transcripts", "query_toks": [ "SELECT", "avg", "(", "transcript_date", ")", "FROM", "Transcripts" ], "query_toks_no_value": [ "select", "avg", "(", "transcript_date", ")", "from", "transcripts" ], "question": "What is the average transcript date?", "question_toks": [ "What", "is", "the", "average", "transcript", "date", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 53, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", "query_toks": [ "SELECT", "transcript_date", ",", "other_details", "FROM", "Transcripts", "ORDER", "BY", "transcript_date", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "transcript_date", ",", "other_details", "from", "transcripts", "order", "by", "transcript_date", "asc", "limit", "value" ], "question": "When is the first transcript released? List the date and details.", "question_toks": [ "When", "is", "the", "first", "transcript", "released", "?", "List", "the", "date", "and", "details", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 54, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 53, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", "query_toks": [ "SELECT", "transcript_date", ",", "other_details", "FROM", "Transcripts", "ORDER", "BY", "transcript_date", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "transcript_date", ",", "other_details", "from", "transcripts", "order", "by", "transcript_date", "asc", "limit", "value" ], "question": "What is the earliest date of a transcript release, and what details can you tell me?", "question_toks": [ "What", "is", "the", "earliest", "date", "of", "a", "transcript", "release", ",", "and", "what", "details", "can", "you", "tell", "me", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 54, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 53, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Transcripts", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Transcripts" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "transcripts" ], "question": "How many transcripts are released?", "question_toks": [ "How", "many", "transcripts", "are", "released", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Transcripts", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Transcripts" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "transcripts" ], "question": "How many transcripts are listed?", "question_toks": [ "How", "many", "transcripts", "are", "listed", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1", "query_toks": [ "SELECT", "transcript_date", "FROM", "Transcripts", "ORDER", "BY", "transcript_date", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "transcript_date", "from", "transcripts", "order", "by", "transcript_date", "desc", "limit", "value" ], "question": "What is the last transcript release date?", "question_toks": [ "What", "is", "the", "last", "transcript", "release", "date", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 53, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1", "query_toks": [ "SELECT", "transcript_date", "FROM", "Transcripts", "ORDER", "BY", "transcript_date", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "transcript_date", "from", "transcripts", "order", "by", "transcript_date", "desc", "limit", "value" ], "question": "When was the last transcript released?", "question_toks": [ "When", "was", "the", "last", "transcript", "released", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 53, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "student_course_id", "FROM", "Transcript_Contents", "GROUP", "BY", "student_course_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "student_course_id", "from", "transcript_contents", "group", "by", "student_course_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.", "question_toks": [ "How", "many", "times", "at", "most", "can", "a", "course", "enrollment", "result", "show", "in", "different", "transcripts", "?", "Also", "show", "the", "course", "enrollment", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 55, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 55, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "student_course_id", "FROM", "Transcript_Contents", "GROUP", "BY", "student_course_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "student_course_id", "from", "transcript_contents", "group", "by", "student_course_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?", "question_toks": [ "What", "is", "the", "maximum", "number", "of", "times", "that", "a", "course", "shows", "up", "in", "different", "transcripts", "and", "what", "is", "that", "course", "'s", "enrollment", "id", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 55, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 55, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "T2.transcript_date", ",", "T1.transcript_id", "FROM", "Transcript_Contents", "AS", "T1", "JOIN", "Transcripts", "AS", "T2", "ON", "T1.transcript_id", "=", "T2.transcript_id", "GROUP", "BY", "T1.transcript_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "transcript_date", ",", "t1", ".", "transcript_id", "from", "transcript_contents", "as", "t1", "join", "transcripts", "as", "t2", "on", "t1", ".", "transcript_id", "=", "t2", ".", "transcript_id", "group", "by", "t1", ".", "transcript_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "Show the date of the transcript which shows the least number of results, also list the id.", "question_toks": [ "Show", "the", "date", "of", "the", "transcript", "which", "shows", "the", "least", "number", "of", "results", ",", "also", "list", "the", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ], [ "table_unit", 9 ] ], "conds": [ [ false, 2, [ 0, [ 0, 56, false ], null ], [ 0, 52, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 56, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 56, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "T2.transcript_date", ",", "T1.transcript_id", "FROM", "Transcript_Contents", "AS", "T1", "JOIN", "Transcripts", "AS", "T2", "ON", "T1.transcript_id", "=", "T2.transcript_id", "GROUP", "BY", "T1.transcript_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "transcript_date", ",", "t1", ".", "transcript_id", "from", "transcript_contents", "as", "t1", "join", "transcripts", "as", "t2", "on", "t1", ".", "transcript_id", "=", "t2", ".", "transcript_id", "group", "by", "t1", ".", "transcript_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "What is the date and id of the transcript with the least number of results?", "question_toks": [ "What", "is", "the", "date", "and", "id", "of", "the", "transcript", "with", "the", "least", "number", "of", "results", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ], [ "table_unit", 9 ] ], "conds": [ [ false, 2, [ 0, [ 0, 56, false ], null ], [ 0, 52, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 56, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 56, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "query_toks": [ "SELECT", "DISTINCT", "T2.semester_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "WHERE", "degree_summary_name", "=", "'Master", "'", "INTERSECT", "SELECT", "DISTINCT", "T2.semester_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "WHERE", "degree_summary_name", "=", "'Bachelor", "'" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "semester_id", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "where", "degree_summary_name", "=", "value", "intersect", "select", "distinct", "t2", ".", "semester_id", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "where", "degree_summary_name", "=", "value" ], "question": "Find the semester when both Master students and Bachelor students got enrolled in.", "question_toks": [ "Find", "the", "semester", "when", "both", "Master", "students", "and", "Bachelor", "students", "got", "enrolled", "in", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 46, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Master\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 46, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Bachelor\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "query_toks": [ "SELECT", "DISTINCT", "T2.semester_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "WHERE", "degree_summary_name", "=", "'Master", "'", "INTERSECT", "SELECT", "DISTINCT", "T2.semester_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "WHERE", "degree_summary_name", "=", "'Bachelor", "'" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "semester_id", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "where", "degree_summary_name", "=", "value", "intersect", "select", "distinct", "t2", ".", "semester_id", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "where", "degree_summary_name", "=", "value" ], "question": "What is the id of the semester that had both Masters and Bachelors students enrolled?", "question_toks": [ "What", "is", "the", "id", "of", "the", "semester", "that", "had", "both", "Masters", "and", "Bachelors", "students", "enrolled", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 46, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Master\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 46, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Bachelor\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT current_address_id) FROM Students", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "current_address_id", ")", "FROM", "Students" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "current_address_id", ")", "from", "students" ], "question": "How many different addresses do the students currently live?", "question_toks": [ "How", "many", "different", "addresses", "do", "the", "students", "currently", "live", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 33, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT current_address_id) FROM Students", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "current_address_id", ")", "FROM", "Students" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "current_address_id", ")", "from", "students" ], "question": "What are the different addresses that have students living there?", "question_toks": [ "What", "are", "the", "different", "addresses", "that", "have", "students", "living", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 33, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "query_toks": [ "SELECT", "other_student_details", "FROM", "Students", "ORDER", "BY", "other_student_details", "DESC" ], "query_toks_no_value": [ "select", "other_student_details", "from", "students", "order", "by", "other_student_details", "desc" ], "question": "List all the student details in reversed lexicographical order.", "question_toks": [ "List", "all", "the", "student", "details", "in", "reversed", "lexicographical", "order", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 43, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "query_toks": [ "SELECT", "other_student_details", "FROM", "Students", "ORDER", "BY", "other_student_details", "DESC" ], "query_toks_no_value": [ "select", "other_student_details", "from", "students", "order", "by", "other_student_details", "desc" ], "question": "What other details can you tell me about students in reverse alphabetical order?", "question_toks": [ "What", "other", "details", "can", "you", "tell", "me", "about", "students", "in", "reverse", "alphabetical", "order", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 43, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_description FROM Sections WHERE section_name = 'h'", "query_toks": [ "SELECT", "section_description", "FROM", "Sections", "WHERE", "section_name", "=", "'h", "'" ], "query_toks_no_value": [ "select", "section_description", "from", "sections", "where", "section_name", "=", "value" ], "question": "Describe the section h.", "question_toks": [ "Describe", "the", "section", "h", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"h\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_description FROM Sections WHERE section_name = 'h'", "query_toks": [ "SELECT", "section_description", "FROM", "Sections", "WHERE", "section_name", "=", "'h", "'" ], "query_toks_no_value": [ "select", "section_description", "from", "sections", "where", "section_name", "=", "value" ], "question": "What is the description for the section named h?", "question_toks": [ "What", "is", "the", "description", "for", "the", "section", "named", "h", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"h\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'", "query_toks": [ "select", "t1.first_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1.permanent_address_id", "=", "t2.address_id", "where", "t2.country", "=", "\"haiti\"", "or", "t1.cell_mobile_number", "=", "\"09700166582\"" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1", ".", "permanent_address_id", "=", "t2", ".", "address_id", "where", "t2", ".", "country", "=", "value", "or", "t1", ".", "cell_mobile_number", "=", "value" ], "question": "Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .", "question_toks": [ "Find", "the", "first", "name", "of", "the", "students", "who", "permanently", "live", "in", "the", "country", "Haiti", "or", "have", "the", "cell", "phone", "number", "09700166582", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 34, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"haiti\"", null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], "\"09700166582\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'", "query_toks": [ "select", "t1.first_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1.permanent_address_id", "=", "t2.address_id", "where", "t2.country", "=", "\"haiti\"", "or", "t1.cell_mobile_number", "=", "\"09700166582\"" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1", ".", "permanent_address_id", "=", "t2", ".", "address_id", "where", "t2", ".", "country", "=", "value", "or", "t1", ".", "cell_mobile_number", "=", "value" ], "question": "What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582 ?", "question_toks": [ "What", "are", "the", "first", "names", "of", "the", "students", "who", "live", "in", "Haiti", "permanently", "or", "have", "the", "cell", "phone", "number", "09700166582", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 34, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"haiti\"", null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], "\"09700166582\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon ORDER BY title", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "ORDER", "BY", "title" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "order", "by", "title" ], "question": "List the title of all cartoons in alphabetical order.", "question_toks": [ "List", "the", "title", "of", "all", "cartoons", "in", "alphabetical", "order", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon ORDER BY title", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "ORDER", "BY", "title" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "order", "by", "title" ], "question": "What are the titles of the cartoons sorted alphabetically?", "question_toks": [ "What", "are", "the", "titles", "of", "the", "cartoons", "sorted", "alphabetically", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\";", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "WHERE", "Directed_by", "=", "``", "Ben", "Jones", "''", ";" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "where", "directed_by", "=", "value" ], "question": "List all cartoon directed by \"Ben Jones\".", "question_toks": [ "List", "all", "cartoon", "directed", "by", "``", "Ben", "Jones", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\";", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "WHERE", "Directed_by", "=", "``", "Ben", "Jones", "''", ";" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "where", "directed_by", "=", "value" ], "question": "What are the names of all cartoons directed by Ben Jones?", "question_toks": [ "What", "are", "the", "names", "of", "all", "cartoons", "directed", "by", "Ben", "Jones", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\";", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Cartoon", "WHERE", "Written_by", "=", "``", "Joseph", "Kuhr", "''", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cartoon", "where", "written_by", "=", "value" ], "question": "How many cartoons were written by \"Joseph Kuhr\"?", "question_toks": [ "How", "many", "cartoons", "were", "written", "by", "``", "Joseph", "Kuhr", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Joseph Kuhr\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\";", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Cartoon", "WHERE", "Written_by", "=", "``", "Joseph", "Kuhr", "''", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cartoon", "where", "written_by", "=", "value" ], "question": "What is the number of cartoones written by Joseph Kuhr?", "question_toks": [ "What", "is", "the", "number", "of", "cartoones", "written", "by", "Joseph", "Kuhr", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Joseph Kuhr\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date", "query_toks": [ "SELECT", "title", ",", "Directed_by", "FROM", "Cartoon", "ORDER", "BY", "Original_air_date" ], "query_toks_no_value": [ "select", "title", ",", "directed_by", "from", "cartoon", "order", "by", "original_air_date" ], "question": "list all cartoon titles and their directors ordered by their air date", "question_toks": [ "list", "all", "cartoon", "titles", "and", "their", "directors", "ordered", "by", "their", "air", "date" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ], [ 0, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 23, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date", "query_toks": [ "SELECT", "title", ",", "Directed_by", "FROM", "Cartoon", "ORDER", "BY", "Original_air_date" ], "query_toks_no_value": [ "select", "title", ",", "directed_by", "from", "cartoon", "order", "by", "original_air_date" ], "question": "What is the name and directors of all the cartoons that are ordered by air date?", "question_toks": [ "What", "is", "the", "name", "and", "directors", "of", "all", "the", "cartoons", "that", "are", "ordered", "by", "air", "date", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ], [ 0, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 23, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "WHERE", "Directed_by", "=", "``", "Ben", "Jones", "''", "OR", "Directed_by", "=", "``", "Brandon", "Vietti", "''", ";" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "where", "directed_by", "=", "value", "or", "directed_by", "=", "value" ], "question": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\".", "question_toks": [ "List", "the", "title", "of", "all", "cartoon", "directed", "by", "``", "Ben", "Jones", "''", "or", "``", "Brandon", "Vietti", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ], "or", [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Brandon Vietti\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "WHERE", "Directed_by", "=", "``", "Ben", "Jones", "''", "OR", "Directed_by", "=", "``", "Brandon", "Vietti", "''", ";" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "where", "directed_by", "=", "value", "or", "directed_by", "=", "value" ], "question": "What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?", "question_toks": [ "What", "are", "the", "titles", "of", "all", "cartoons", "directed", "by", "Ben", "Jones", "or", "Brandon", "Vietti", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ], "or", [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Brandon Vietti\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "Country", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "Country", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "country", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "country", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which country has the most of TV Channels? List the country and number of TV Channels it has.", "question_toks": [ "Which", "country", "has", "the", "most", "of", "TV", "Channels", "?", "List", "the", "country", "and", "number", "of", "TV", "Channels", "it", "has", "." ], "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": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "Country", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "Country", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "country", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "country", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the country with the most number of TV Channels and how many does it have?", "question_toks": [ "What", "is", "the", "country", "with", "the", "most", "number", "of", "TV", "Channels", "and", "how", "many", "does", "it", "have", "?" ], "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": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "series_name", ")", ",", "count", "(", "DISTINCT", "content", ")", "FROM", "TV_Channel", ";" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "series_name", ")", ",", "count", "(", "distinct", "content", ")", "from", "tv_channel" ], "question": "List the number of different series names and contents in the TV Channel table.", "question_toks": [ "List", "the", "number", "of", "different", "series", "names", "and", "contents", "in", "the", "TV", "Channel", "table", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 2, true ], null ] ], [ 3, [ 0, [ 0, 5, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "series_name", ")", ",", "count", "(", "DISTINCT", "content", ")", "FROM", "TV_Channel", ";" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "series_name", ")", ",", "count", "(", "distinct", "content", ")", "from", "tv_channel" ], "question": "How many different series and contents are listed in the TV Channel table?", "question_toks": [ "How", "many", "different", "series", "and", "contents", "are", "listed", "in", "the", "TV", "Channel", "table", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 2, true ], null ] ], [ 3, [ 0, [ 0, 5, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "Content", "FROM", "TV_Channel", "WHERE", "series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "content", "from", "tv_channel", "where", "series_name", "=", "value" ], "question": "What is the content of TV Channel with serial name \"Sky Radio\"?", "question_toks": [ "What", "is", "the", "content", "of", "TV", "Channel", "with", "serial", "name", "``", "Sky", "Radio", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "Content", "FROM", "TV_Channel", "WHERE", "series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "content", "from", "tv_channel", "where", "series_name", "=", "value" ], "question": "What is the content of the series Sky Radio?", "question_toks": [ "What", "is", "the", "content", "of", "the", "series", "Sky", "Radio", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "Package_Option", "FROM", "TV_Channel", "WHERE", "series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "package_option", "from", "tv_channel", "where", "series_name", "=", "value" ], "question": "What is the Package Option of TV Channel with serial name \"Sky Radio\"?", "question_toks": [ "What", "is", "the", "Package", "Option", "of", "TV", "Channel", "with", "serial", "name", "``", "Sky", "Radio", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "Package_Option", "FROM", "TV_Channel", "WHERE", "series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "package_option", "from", "tv_channel", "where", "series_name", "=", "value" ], "question": "What are the Package Options of the TV Channels whose series names are Sky Radio?", "question_toks": [ "What", "are", "the", "Package", "Options", "of", "the", "TV", "Channels", "whose", "series", "names", "are", "Sky", "Radio", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) FROM TV_Channel WHERE LANGUAGE = \"English\";", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "TV_Channel", "WHERE", "LANGUAGE", "=", "``", "English", "''", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "tv_channel", "where", "language", "=", "value" ], "question": "How many TV Channel using language English?", "question_toks": [ "How", "many", "TV", "Channel", "using", "language", "English", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) FROM TV_Channel WHERE LANGUAGE = \"English\";", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "TV_Channel", "WHERE", "LANGUAGE", "=", "``", "English", "''", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "tv_channel", "where", "language", "=", "value" ], "question": "How many TV Channels use the English language?", "question_toks": [ "How", "many", "TV", "Channels", "use", "the", "English", "language", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;", "query_toks": [ "SELECT", "LANGUAGE", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "LANGUAGE", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "language", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "language", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "List the language used least number of TV Channel. List language and number of TV Channel.", "question_toks": [ "List", "the", "language", "used", "least", "number", "of", "TV", "Channel", ".", "List", "language", "and", "number", "of", "TV", "Channel", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;", "query_toks": [ "SELECT", "LANGUAGE", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "LANGUAGE", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "language", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "language", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "What are the languages used by the least number of TV Channels and how many channels use it?", "question_toks": [ "What", "are", "the", "languages", "used", "by", "the", "least", "number", "of", "TV", "Channels", "and", "how", "many", "channels", "use", "it", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE", "query_toks": [ "SELECT", "LANGUAGE", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "LANGUAGE" ], "query_toks_no_value": [ "select", "language", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "language" ], "question": "List each language and the number of TV Channels using it.", "question_toks": [ "List", "each", "language", "and", "the", "number", "of", "TV", "Channels", "using", "it", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE", "query_toks": [ "SELECT", "LANGUAGE", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "LANGUAGE" ], "query_toks_no_value": [ "select", "language", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "language" ], "question": "For each language, list the number of TV Channels that use it.", "question_toks": [ "For", "each", "language", ",", "list", "the", "number", "of", "TV", "Channels", "that", "use", "it", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = \"The Rise of the Blue Beetle!\";", "query_toks": [ "SELECT", "T1.series_name", "FROM", "TV_Channel", "AS", "T1", "JOIN", "Cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.Title", "=", "``", "The", "Rise", "of", "the", "Blue", "Beetle", "!", "``", ";" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "title", "=", "value" ], "question": "What is the TV Channel that shows the cartoon \"The Rise of the Blue Beetle!\"? List the TV Channel's series name.", "question_toks": [ "What", "is", "the", "TV", "Channel", "that", "shows", "the", "cartoon", "``", "The", "Rise", "of", "the", "Blue", "Beetle", "!", "''", "?", "List", "the", "TV", "Channel", "'s", "series", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"The Rise of the Blue Beetle!\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = \"The Rise of the Blue Beetle!\";", "query_toks": [ "SELECT", "T1.series_name", "FROM", "TV_Channel", "AS", "T1", "JOIN", "Cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.Title", "=", "``", "The", "Rise", "of", "the", "Blue", "Beetle", "!", "``", ";" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "title", "=", "value" ], "question": "What is the series name of the TV Channel that shows the cartoon \"The Rise of the Blue Beetle\"?", "question_toks": [ "What", "is", "the", "series", "name", "of", "the", "TV", "Channel", "that", "shows", "the", "cartoon", "``", "The", "Rise", "of", "the", "Blue", "Beetle", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"The Rise of the Blue Beetle!\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "T2.Title", "FROM", "TV_Channel", "AS", "T1", "JOIN", "Cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T1.series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "t2", ".", "title", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t1", ".", "series_name", "=", "value" ], "question": "List the title of all Cartoons showed on TV Channel with series name \"Sky Radio\".", "question_toks": [ "List", "the", "title", "of", "all", "Cartoons", "showed", "on", "TV", "Channel", "with", "series", "name", "``", "Sky", "Radio", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "T2.Title", "FROM", "TV_Channel", "AS", "T1", "JOIN", "Cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T1.series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "t2", ".", "title", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t1", ".", "series_name", "=", "value" ], "question": "What is the title of all the cartools that are on the TV Channel with the series name \"Sky Radio\"?", "question_toks": [ "What", "is", "the", "title", "of", "all", "the", "cartools", "that", "are", "on", "the", "TV", "Channel", "with", "the", "series", "name", "``", "Sky", "Radio", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Episode FROM TV_series ORDER BY rating", "query_toks": [ "SELECT", "Episode", "FROM", "TV_series", "ORDER", "BY", "rating" ], "query_toks_no_value": [ "select", "episode", "from", "tv_series", "order", "by", "rating" ], "question": "List the Episode of all TV series sorted by rating.", "question_toks": [ "List", "the", "Episode", "of", "all", "TV", "series", "sorted", "by", "rating", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Episode FROM TV_series ORDER BY rating", "query_toks": [ "SELECT", "Episode", "FROM", "TV_series", "ORDER", "BY", "rating" ], "query_toks_no_value": [ "select", "episode", "from", "tv_series", "order", "by", "rating" ], "question": "What are all of the episodes ordered by ratings?", "question_toks": [ "What", "are", "all", "of", "the", "episodes", "ordered", "by", "ratings", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;", "query_toks": [ "SELECT", "Episode", ",", "Rating", "FROM", "TV_series", "ORDER", "BY", "Rating", "DESC", "LIMIT", "3", ";" ], "query_toks_no_value": [ "select", "episode", ",", "rating", "from", "tv_series", "order", "by", "rating", "desc", "limit", "value" ], "question": "List top 3 highest Rating TV series. List the TV series's Episode and Rating.", "question_toks": [ "List", "top", "3", "highest", "Rating", "TV", "series", ".", "List", "the", "TV", "series", "'s", "Episode", "and", "Rating", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;", "query_toks": [ "SELECT", "Episode", ",", "Rating", "FROM", "TV_series", "ORDER", "BY", "Rating", "DESC", "LIMIT", "3", ";" ], "query_toks_no_value": [ "select", "episode", ",", "rating", "from", "tv_series", "order", "by", "rating", "desc", "limit", "value" ], "question": "What are 3 most highly rated episodes in the TV series table and what were those ratings?", "question_toks": [ "What", "are", "3", "most", "highly", "rated", "episodes", "in", "the", "TV", "series", "table", "and", "what", "were", "those", "ratings", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT max(SHARE) , min(SHARE) FROM TV_series;", "query_toks": [ "SELECT", "max", "(", "SHARE", ")", ",", "min", "(", "SHARE", ")", "FROM", "TV_series", ";" ], "query_toks_no_value": [ "select", "max", "(", "share", ")", ",", "min", "(", "share", ")", "from", "tv_series" ], "question": "What is minimum and maximum share of TV series?", "question_toks": [ "What", "is", "minimum", "and", "maximum", "share", "of", "TV", "series", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ], [ 2, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT max(SHARE) , min(SHARE) FROM TV_series;", "query_toks": [ "SELECT", "max", "(", "SHARE", ")", ",", "min", "(", "SHARE", ")", "FROM", "TV_series", ";" ], "query_toks_no_value": [ "select", "max", "(", "share", ")", ",", "min", "(", "share", ")", "from", "tv_series" ], "question": "What is the maximum and minimum share for the TV series?", "question_toks": [ "What", "is", "the", "maximum", "and", "minimum", "share", "for", "the", "TV", "series", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ], [ 2, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "Air_Date", "FROM", "TV_series", "WHERE", "Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "air_date", "from", "tv_series", "where", "episode", "=", "value" ], "question": "What is the air date of TV series with Episode \"A Love of a Lifetime\"?", "question_toks": [ "What", "is", "the", "air", "date", "of", "TV", "series", "with", "Episode", "``", "A", "Love", "of", "a", "Lifetime", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "Air_Date", "FROM", "TV_series", "WHERE", "Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "air_date", "from", "tv_series", "where", "episode", "=", "value" ], "question": "When did the episode \"A Love of a Lifetime\" air?", "question_toks": [ "When", "did", "the", "episode", "``", "A", "Love", "of", "a", "Lifetime", "''", "air", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "Weekly_Rank", "FROM", "TV_series", "WHERE", "Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "weekly_rank", "from", "tv_series", "where", "episode", "=", "value" ], "question": "What is Weekly Rank of TV series with Episode \"A Love of a Lifetime\"?", "question_toks": [ "What", "is", "Weekly", "Rank", "of", "TV", "series", "with", "Episode", "``", "A", "Love", "of", "a", "Lifetime", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "Weekly_Rank", "FROM", "TV_series", "WHERE", "Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "weekly_rank", "from", "tv_series", "where", "episode", "=", "value" ], "question": "What is the weekly rank for the episode \"A Love of a Lifetime\"?", "question_toks": [ "What", "is", "the", "weekly", "rank", "for", "the", "episode", "``", "A", "Love", "of", "a", "Lifetime", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "T1.series_name", "FROM", "TV_Channel", "AS", "T1", "JOIN", "TV_series", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", "from", "tv_channel", "as", "t1", "join", "tv_series", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "episode", "=", "value" ], "question": "What is the TV Channel of TV series with Episode \"A Love of a Lifetime\"? List the TV Channel's series name.", "question_toks": [ "What", "is", "the", "TV", "Channel", "of", "TV", "series", "with", "Episode", "``", "A", "Love", "of", "a", "Lifetime", "''", "?", "List", "the", "TV", "Channel", "'s", "series", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "T1.series_name", "FROM", "TV_Channel", "AS", "T1", "JOIN", "TV_series", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", "from", "tv_channel", "as", "t1", "join", "tv_series", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "episode", "=", "value" ], "question": "What is the name of the series that has the episode \"A Love of a Lifetime\"?", "question_toks": [ "What", "is", "the", "name", "of", "the", "series", "that", "has", "the", "episode", "``", "A", "Love", "of", "a", "Lifetime", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "T2.Episode", "FROM", "TV_Channel", "AS", "T1", "JOIN", "TV_series", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T1.series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "t2", ".", "episode", "from", "tv_channel", "as", "t1", "join", "tv_series", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t1", ".", "series_name", "=", "value" ], "question": "List the Episode of all TV series showed on TV Channel with series name \"Sky Radio\".", "question_toks": [ "List", "the", "Episode", "of", "all", "TV", "series", "showed", "on", "TV", "Channel", "with", "series", "name", "``", "Sky", "Radio", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "T2.Episode", "FROM", "TV_Channel", "AS", "T1", "JOIN", "TV_series", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T1.series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "t2", ".", "episode", "from", "tv_channel", "as", "t1", "join", "tv_series", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t1", ".", "series_name", "=", "value" ], "question": "What is the episode for the TV series named \"Sky Radio\"?", "question_toks": [ "What", "is", "the", "episode", "for", "the", "TV", "series", "named", "``", "Sky", "Radio", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "Directed_by", "FROM", "cartoon", "GROUP", "BY", "Directed_by" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "directed_by", "from", "cartoon", "group", "by", "directed_by" ], "question": "Find the number of cartoons directed by each of the listed directors.", "question_toks": [ "Find", "the", "number", "of", "cartoons", "directed", "by", "each", "of", "the", "listed", "directors", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 21, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "Directed_by", "FROM", "cartoon", "GROUP", "BY", "Directed_by" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "directed_by", "from", "cartoon", "group", "by", "directed_by" ], "question": "How many cartoons did each director create?", "question_toks": [ "How", "many", "cartoons", "did", "each", "director", "create", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 21, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "select production_code , channel from cartoon order by original_air_date desc limit 1", "query_toks": [ "select", "production_code", ",", "channel", "from", "cartoon", "order", "by", "original_air_date", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "production_code", ",", "channel", "from", "cartoon", "order", "by", "original_air_date", "desc", "limit", "value" ], "question": "Find the production code and channel of the most recently aired cartoon .", "question_toks": [ "Find", "the", "production", "code", "and", "channel", "of", "the", "most", "recently", "aired", "cartoon", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 23, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "select production_code , channel from cartoon order by original_air_date desc limit 1", "query_toks": [ "select", "production_code", ",", "channel", "from", "cartoon", "order", "by", "original_air_date", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "production_code", ",", "channel", "from", "cartoon", "order", "by", "original_air_date", "desc", "limit", "value" ], "question": "What is the produdction code and channel of the most recent cartoon ?", "question_toks": [ "What", "is", "the", "produdction", "code", "and", "channel", "of", "the", "most", "recent", "cartoon", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 23, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = \"yes\"", "query_toks": [ "SELECT", "package_option", ",", "series_name", "FROM", "TV_Channel", "WHERE", "hight_definition_TV", "=", "``", "yes", "''" ], "query_toks_no_value": [ "select", "package_option", ",", "series_name", "from", "tv_channel", "where", "hight_definition_tv", "=", "value" ], "question": "Find the package choice and series name of the TV channel that has high definition TV.", "question_toks": [ "Find", "the", "package", "choice", "and", "series", "name", "of", "the", "TV", "channel", "that", "has", "high", "definition", "TV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"yes\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = \"yes\"", "query_toks": [ "SELECT", "package_option", ",", "series_name", "FROM", "TV_Channel", "WHERE", "hight_definition_TV", "=", "``", "yes", "''" ], "query_toks_no_value": [ "select", "package_option", ",", "series_name", "from", "tv_channel", "where", "hight_definition_tv", "=", "value" ], "question": "What are the package options and the name of the series for the TV Channel that supports high definition TV?", "question_toks": [ "What", "are", "the", "package", "options", "and", "the", "name", "of", "the", "series", "for", "the", "TV", "Channel", "that", "supports", "high", "definition", "TV", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"yes\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "query_toks": [ "SELECT", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.written_by", "=", "'Todd", "Casey", "'" ], "query_toks_no_value": [ "select", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "written_by", "=", "value" ], "question": "which countries' tv channels are playing some cartoon written by Todd Casey?", "question_toks": [ "which", "countries", "'", "tv", "channels", "are", "playing", "some", "cartoon", "written", "by", "Todd", "Casey", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Todd Casey\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "query_toks": [ "SELECT", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.written_by", "=", "'Todd", "Casey", "'" ], "query_toks_no_value": [ "select", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "written_by", "=", "value" ], "question": "What are the countries that have cartoons on TV that were written by Todd Casey?", "question_toks": [ "What", "are", "the", "countries", "that", "have", "cartoons", "on", "TV", "that", "were", "written", "by", "Todd", "Casey", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Todd Casey\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "query_toks": [ "SELECT", "country", "FROM", "TV_Channel", "EXCEPT", "SELECT", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.written_by", "=", "'Todd", "Casey", "'" ], "query_toks_no_value": [ "select", "country", "from", "tv_channel", "except", "select", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "written_by", "=", "value" ], "question": "which countries' tv channels are not playing any cartoon written by Todd Casey?", "question_toks": [ "which", "countries", "'", "tv", "channels", "are", "not", "playing", "any", "cartoon", "written", "by", "Todd", "Casey", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Todd Casey\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "tvshow", "query": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "query_toks": [ "SELECT", "country", "FROM", "TV_Channel", "EXCEPT", "SELECT", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.written_by", "=", "'Todd", "Casey", "'" ], "query_toks_no_value": [ "select", "country", "from", "tv_channel", "except", "select", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "written_by", "=", "value" ], "question": "What are the countries that are not playing cartoons written by Todd Casey?", "question_toks": [ "What", "are", "the", "countries", "that", "are", "not", "playing", "cartoons", "written", "by", "Todd", "Casey", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Todd Casey\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "tvshow", "query": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "query_toks": [ "SELECT", "T1.series_name", ",", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.directed_by", "=", "'Michael", "Chang", "'", "INTERSECT", "SELECT", "T1.series_name", ",", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.directed_by", "=", "'Ben", "Jones", "'" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", ",", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "directed_by", "=", "value", "intersect", "select", "t1", ".", "series_name", ",", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "directed_by", "=", "value" ], "question": "Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?", "question_toks": [ "Find", "the", "series", "name", "and", "country", "of", "the", "tv", "channel", "that", "is", "playing", "some", "cartoons", "directed", "by", "Ben", "Jones", "and", "Michael", "Chang", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Michael Chang\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "query_toks": [ "SELECT", "T1.series_name", ",", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.directed_by", "=", "'Michael", "Chang", "'", "INTERSECT", "SELECT", "T1.series_name", ",", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.directed_by", "=", "'Ben", "Jones", "'" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", ",", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "directed_by", "=", "value", "intersect", "select", "t1", ".", "series_name", ",", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "directed_by", "=", "value" ], "question": "What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang?", "question_toks": [ "What", "is", "the", "series", "name", "and", "country", "of", "all", "TV", "channels", "that", "are", "playing", "cartoons", "directed", "by", "Ben", "Jones", "and", "cartoons", "directed", "by", "Michael", "Chang", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Michael Chang\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "query_toks": [ "SELECT", "Pixel_aspect_ratio_PAR", ",", "country", "FROM", "tv_channel", "WHERE", "LANGUAGE", "!", "=", "'English", "'" ], "query_toks_no_value": [ "select", "pixel_aspect_ratio_par", ",", "country", "from", "tv_channel", "where", "language", "!", "=", "value" ], "question": "find the pixel aspect ratio and nation of the tv channels that do not use English.", "question_toks": [ "find", "the", "pixel", "aspect", "ratio", "and", "nation", "of", "the", "tv", "channels", "that", "do", "not", "use", "English", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "query_toks": [ "SELECT", "Pixel_aspect_ratio_PAR", ",", "country", "FROM", "tv_channel", "WHERE", "LANGUAGE", "!", "=", "'English", "'" ], "query_toks_no_value": [ "select", "pixel_aspect_ratio_par", ",", "country", "from", "tv_channel", "where", "language", "!", "=", "value" ], "question": "What is the pixel aspect ratio and country of origin for all TV channels that do not use English?", "question_toks": [ "What", "is", "the", "pixel", "aspect", "ratio", "and", "country", "of", "origin", "for", "all", "TV", "channels", "that", "do", "not", "use", "English", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "query_toks": [ "SELECT", "id", "FROM", "tv_channel", "GROUP", "BY", "country", "HAVING", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "id", "from", "tv_channel", "group", "by", "country", "having", "count", "(", "*", ")", ">", "value" ], "question": "find id of the tv channels that from the countries where have more than two tv channels.", "question_toks": [ "find", "id", "of", "the", "tv", "channels", "that", "from", "the", "countries", "where", "have", "more", "than", "two", "tv", "channels", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "query_toks": [ "SELECT", "id", "FROM", "tv_channel", "GROUP", "BY", "country", "HAVING", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "id", "from", "tv_channel", "group", "by", "country", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are the ids of all tv channels that have more than 2 TV channels?", "question_toks": [ "What", "are", "the", "ids", "of", "all", "tv", "channels", "that", "have", "more", "than", "2", "TV", "channels", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "query_toks": [ "SELECT", "id", "FROM", "TV_Channel", "EXCEPT", "SELECT", "channel", "FROM", "cartoon", "WHERE", "directed_by", "=", "'Ben", "Jones", "'" ], "query_toks_no_value": [ "select", "id", "from", "tv_channel", "except", "select", "channel", "from", "cartoon", "where", "directed_by", "=", "value" ], "question": "find the id of tv channels that do not play any cartoon directed by Ben Jones.", "question_toks": [ "find", "the", "id", "of", "tv", "channels", "that", "do", "not", "play", "any", "cartoon", "directed", "by", "Ben", "Jones", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "tvshow", "query": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "query_toks": [ "SELECT", "id", "FROM", "TV_Channel", "EXCEPT", "SELECT", "channel", "FROM", "cartoon", "WHERE", "directed_by", "=", "'Ben", "Jones", "'" ], "query_toks_no_value": [ "select", "id", "from", "tv_channel", "except", "select", "channel", "from", "cartoon", "where", "directed_by", "=", "value" ], "question": "What are the ids of the TV channels that do not have any cartoons directed by Ben Jones?", "question_toks": [ "What", "are", "the", "ids", "of", "the", "TV", "channels", "that", "do", "not", "have", "any", "cartoons", "directed", "by", "Ben", "Jones", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "tvshow", "query": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "query_toks": [ "SELECT", "package_option", "FROM", "TV_Channel", "WHERE", "id", "NOT", "IN", "(", "SELECT", "channel", "FROM", "cartoon", "WHERE", "directed_by", "=", "'Ben", "Jones", "'", ")" ], "query_toks_no_value": [ "select", "package_option", "from", "tv_channel", "where", "id", "not", "in", "(", "select", "channel", "from", "cartoon", "where", "directed_by", "=", "value", ")" ], "question": "find the package option of the tv channel that do not have any cartoon directed by Ben Jones.", "question_toks": [ "find", "the", "package", "option", "of", "the", "tv", "channel", "that", "do", "not", "have", "any", "cartoon", "directed", "by", "Ben", "Jones", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "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": "tvshow", "query": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "query_toks": [ "SELECT", "package_option", "FROM", "TV_Channel", "WHERE", "id", "NOT", "IN", "(", "SELECT", "channel", "FROM", "cartoon", "WHERE", "directed_by", "=", "'Ben", "Jones", "'", ")" ], "query_toks_no_value": [ "select", "package_option", "from", "tv_channel", "where", "id", "not", "in", "(", "select", "channel", "from", "cartoon", "where", "directed_by", "=", "value", ")" ], "question": "What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones?", "question_toks": [ "What", "are", "the", "package", "options", "of", "all", "tv", "channels", "that", "are", "not", "playing", "any", "cartoons", "directed", "by", "Ben", "Jones", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "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": "poker_player", "query": "SELECT count(*) FROM poker_player", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "poker_player" ], "question": "How many poker players are there?", "question_toks": [ "How", "many", "poker", "players", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT count(*) FROM poker_player", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "poker_player" ], "question": "Count the number of poker players.", "question_toks": [ "Count", "the", "number", "of", "poker", "players", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC", "query_toks": [ "SELECT", "Earnings", "FROM", "poker_player", "ORDER", "BY", "Earnings", "DESC" ], "query_toks_no_value": [ "select", "earnings", "from", "poker_player", "order", "by", "earnings", "desc" ], "question": "List the earnings of poker players in descending order.", "question_toks": [ "List", "the", "earnings", "of", "poker", "players", "in", "descending", "order", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC", "query_toks": [ "SELECT", "Earnings", "FROM", "poker_player", "ORDER", "BY", "Earnings", "DESC" ], "query_toks_no_value": [ "select", "earnings", "from", "poker_player", "order", "by", "earnings", "desc" ], "question": "What are the earnings of poker players, ordered descending by value?", "question_toks": [ "What", "are", "the", "earnings", "of", "poker", "players", ",", "ordered", "descending", "by", "value", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Final_Table_Made , Best_Finish FROM poker_player", "query_toks": [ "SELECT", "Final_Table_Made", ",", "Best_Finish", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "final_table_made", ",", "best_finish", "from", "poker_player" ], "question": "List the final tables made and the best finishes of poker players.", "question_toks": [ "List", "the", "final", "tables", "made", "and", "the", "best", "finishes", "of", "poker", "players", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Final_Table_Made , Best_Finish FROM poker_player", "query_toks": [ "SELECT", "Final_Table_Made", ",", "Best_Finish", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "final_table_made", ",", "best_finish", "from", "poker_player" ], "question": "What are the final tables made and best finishes for all poker players?", "question_toks": [ "What", "are", "the", "final", "tables", "made", "and", "best", "finishes", "for", "all", "poker", "players", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT avg(Earnings) FROM poker_player", "query_toks": [ "SELECT", "avg", "(", "Earnings", ")", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "avg", "(", "earnings", ")", "from", "poker_player" ], "question": "What is the average earnings of poker players?", "question_toks": [ "What", "is", "the", "average", "earnings", "of", "poker", "players", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT avg(Earnings) FROM poker_player", "query_toks": [ "SELECT", "avg", "(", "Earnings", ")", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "avg", "(", "earnings", ")", "from", "poker_player" ], "question": "Return the average earnings across all poker players.", "question_toks": [ "Return", "the", "average", "earnings", "across", "all", "poker", "players", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1", "query_toks": [ "SELECT", "Money_Rank", "FROM", "poker_player", "ORDER", "BY", "Earnings", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "money_rank", "from", "poker_player", "order", "by", "earnings", "desc", "limit", "value" ], "question": "What is the money rank of the poker player with the highest earnings?", "question_toks": [ "What", "is", "the", "money", "rank", "of", "the", "poker", "player", "with", "the", "highest", "earnings", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1", "query_toks": [ "SELECT", "Money_Rank", "FROM", "poker_player", "ORDER", "BY", "Earnings", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "money_rank", "from", "poker_player", "order", "by", "earnings", "desc", "limit", "value" ], "question": "Return the money rank of the player with the greatest earnings.", "question_toks": [ "Return", "the", "money", "rank", "of", "the", "player", "with", "the", "greatest", "earnings", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000", "query_toks": [ "SELECT", "max", "(", "Final_Table_Made", ")", "FROM", "poker_player", "WHERE", "Earnings", "<", "200000" ], "query_toks_no_value": [ "select", "max", "(", "final_table_made", ")", "from", "poker_player", "where", "earnings", "<", "value" ], "question": "What is the maximum number of final tables made among poker players with earnings less than 200000?", "question_toks": [ "What", "is", "the", "maximum", "number", "of", "final", "tables", "made", "among", "poker", "players", "with", "earnings", "less", "than", "200000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 6, false ], null ], 200000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000", "query_toks": [ "SELECT", "max", "(", "Final_Table_Made", ")", "FROM", "poker_player", "WHERE", "Earnings", "<", "200000" ], "query_toks_no_value": [ "select", "max", "(", "final_table_made", ")", "from", "poker_player", "where", "earnings", "<", "value" ], "question": "Return the maximum final tables made across all poker players who have earnings below 200000.", "question_toks": [ "Return", "the", "maximum", "final", "tables", "made", "across", "all", "poker", "players", "who", "have", "earnings", "below", "200000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 6, false ], null ], 200000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id" ], "question": "What are the names of poker players?", "question_toks": [ "What", "are", "the", "names", "of", "poker", "players", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id" ], "question": "Return the names of all the poker players.", "question_toks": [ "Return", "the", "names", "of", "all", "the", "poker", "players", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T2.Earnings", ">", "300000" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t2", ".", "earnings", ">", "value" ], "question": "What are the names of poker players whose earnings is higher than 300000?", "question_toks": [ "What", "are", "the", "names", "of", "poker", "players", "whose", "earnings", "is", "higher", "than", "300000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 6, false ], null ], 300000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T2.Earnings", ">", "300000" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t2", ".", "earnings", ">", "value" ], "question": "Give the names of poker players who have earnings above 300000.", "question_toks": [ "Give", "the", "names", "of", "poker", "players", "who", "have", "earnings", "above", "300000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 6, false ], null ], 300000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Final_Table_Made" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "final_table_made" ], "question": "List the names of poker players ordered by the final tables made in ascending order.", "question_toks": [ "List", "the", "names", "of", "poker", "players", "ordered", "by", "the", "final", "tables", "made", "in", "ascending", "order", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Final_Table_Made" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "final_table_made" ], "question": "What are the names of poker players, ordered ascending by the number of final tables they have made?", "question_toks": [ "What", "are", "the", "names", "of", "poker", "players", ",", "ordered", "ascending", "by", "the", "number", "of", "final", "tables", "they", "have", "made", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1", "query_toks": [ "SELECT", "T1.Birth_Date", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Earnings", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "birth_date", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "earnings", "asc", "limit", "value" ], "question": "What is the birth date of the poker player with the lowest earnings?", "question_toks": [ "What", "is", "the", "birth", "date", "of", "the", "poker", "player", "with", "the", "lowest", "earnings", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1", "query_toks": [ "SELECT", "T1.Birth_Date", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Earnings", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "birth_date", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "earnings", "asc", "limit", "value" ], "question": "Return the birth date of the poker player with the lowest earnings.", "question_toks": [ "Return", "the", "birth", "date", "of", "the", "poker", "player", "with", "the", "lowest", "earnings", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Money_Rank", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Height", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "money_rank", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "height", "desc", "limit", "value" ], "question": "What is the money rank of the tallest poker player?", "question_toks": [ "What", "is", "the", "money", "rank", "of", "the", "tallest", "poker", "player", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 11, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Money_Rank", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Height", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "money_rank", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "height", "desc", "limit", "value" ], "question": "Return the money rank of the poker player with the greatest height.", "question_toks": [ "Return", "the", "money", "rank", "of", "the", "poker", "player", "with", "the", "greatest", "height", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 11, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200", "query_toks": [ "SELECT", "avg", "(", "T2.Earnings", ")", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T1.Height", ">", "200" ], "query_toks_no_value": [ "select", "avg", "(", "t2", ".", "earnings", ")", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t1", ".", "height", ">", "value" ], "question": "What is the average earnings of poker players with height higher than 200?", "question_toks": [ "What", "is", "the", "average", "earnings", "of", "poker", "players", "with", "height", "higher", "than", "200", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 11, false ], null ], 200.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200", "query_toks": [ "SELECT", "avg", "(", "T2.Earnings", ")", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T1.Height", ">", "200" ], "query_toks_no_value": [ "select", "avg", "(", "t2", ".", "earnings", ")", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t1", ".", "height", ">", "value" ], "question": "Give average earnings of poker players who are taller than 200.", "question_toks": [ "Give", "average", "earnings", "of", "poker", "players", "who", "are", "taller", "than", "200", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 11, false ], null ], 200.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Earnings", "DESC" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "earnings", "desc" ], "question": "What are the names of poker players in descending order of earnings?", "question_toks": [ "What", "are", "the", "names", "of", "poker", "players", "in", "descending", "order", "of", "earnings", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Earnings", "DESC" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "earnings", "desc" ], "question": "Return the names of poker players sorted by their earnings descending.", "question_toks": [ "Return", "the", "names", "of", "poker", "players", "sorted", "by", "their", "earnings", "descending", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality", "query_toks": [ "SELECT", "Nationality", ",", "COUNT", "(", "*", ")", "FROM", "people", "GROUP", "BY", "Nationality" ], "query_toks_no_value": [ "select", "nationality", ",", "count", "(", "*", ")", "from", "people", "group", "by", "nationality" ], "question": "What are different nationalities of people and the corresponding number of people from each nation?", "question_toks": [ "What", "are", "different", "nationalities", "of", "people", "and", "the", "corresponding", "number", "of", "people", "from", "each", "nation", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality", "query_toks": [ "SELECT", "Nationality", ",", "COUNT", "(", "*", ")", "FROM", "people", "GROUP", "BY", "Nationality" ], "query_toks_no_value": [ "select", "nationality", ",", "count", "(", "*", ")", "from", "people", "group", "by", "nationality" ], "question": "How many people are there of each nationality?", "question_toks": [ "How", "many", "people", "are", "there", "of", "each", "nationality", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Nationality", "FROM", "people", "GROUP", "BY", "Nationality", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "nationality", "from", "people", "group", "by", "nationality", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the most common nationality of people?", "question_toks": [ "What", "is", "the", "most", "common", "nationality", "of", "people", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Nationality", "FROM", "people", "GROUP", "BY", "Nationality", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "nationality", "from", "people", "group", "by", "nationality", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Give the nationality that is most common across all people.", "question_toks": [ "Give", "the", "nationality", "that", "is", "most", "common", "across", "all", "people", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "Nationality", "FROM", "people", "GROUP", "BY", "Nationality", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "nationality", "from", "people", "group", "by", "nationality", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the nationalities that are shared by at least two people?", "question_toks": [ "What", "are", "the", "nationalities", "that", "are", "shared", "by", "at", "least", "two", "people", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "Nationality", "FROM", "people", "GROUP", "BY", "Nationality", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "nationality", "from", "people", "group", "by", "nationality", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Return the nationalities for which there are two or more people.", "question_toks": [ "Return", "the", "nationalities", "for", "which", "there", "are", "two", "or", "more", "people", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC", "query_toks": [ "SELECT", "Name", ",", "Birth_Date", "FROM", "people", "ORDER", "BY", "Name", "ASC" ], "query_toks_no_value": [ "select", "name", ",", "birth_date", "from", "people", "order", "by", "name", "asc" ], "question": "List the names and birth dates of people in ascending alphabetical order of name.", "question_toks": [ "List", "the", "names", "and", "birth", "dates", "of", "people", "in", "ascending", "alphabetical", "order", "of", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC", "query_toks": [ "SELECT", "Name", ",", "Birth_Date", "FROM", "people", "ORDER", "BY", "Name", "ASC" ], "query_toks_no_value": [ "select", "name", ",", "birth_date", "from", "people", "order", "by", "name", "asc" ], "question": "What are the names and birth dates of people, ordered by their names in alphabetical order?", "question_toks": [ "What", "are", "the", "names", "and", "birth", "dates", "of", "people", ",", "ordered", "by", "their", "names", "in", "alphabetical", "order", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name FROM people WHERE Nationality != \"Russia\"", "query_toks": [ "SELECT", "Name", "FROM", "people", "WHERE", "Nationality", "!", "=", "``", "Russia", "''" ], "query_toks_no_value": [ "select", "name", "from", "people", "where", "nationality", "!", "=", "value" ], "question": "Show names of people whose nationality is not \"Russia\".", "question_toks": [ "Show", "names", "of", "people", "whose", "nationality", "is", "not", "``", "Russia", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 8, false ], null ], "\"Russia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name FROM people WHERE Nationality != \"Russia\"", "query_toks": [ "SELECT", "Name", "FROM", "people", "WHERE", "Nationality", "!", "=", "``", "Russia", "''" ], "query_toks_no_value": [ "select", "name", "from", "people", "where", "nationality", "!", "=", "value" ], "question": "What are the names of people who are not from Russia?", "question_toks": [ "What", "are", "the", "names", "of", "people", "who", "are", "not", "from", "Russia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 8, false ], null ], "\"Russia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", "query_toks": [ "SELECT", "Name", "FROM", "people", "WHERE", "People_ID", "NOT", "IN", "(", "SELECT", "People_ID", "FROM", "poker_player", ")" ], "query_toks_no_value": [ "select", "name", "from", "people", "where", "people_id", "not", "in", "(", "select", "people_id", "from", "poker_player", ")" ], "question": "List the names of people that are not poker players.", "question_toks": [ "List", "the", "names", "of", "people", "that", "are", "not", "poker", "players", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 7, 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": "poker_player", "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", "query_toks": [ "SELECT", "Name", "FROM", "people", "WHERE", "People_ID", "NOT", "IN", "(", "SELECT", "People_ID", "FROM", "poker_player", ")" ], "query_toks_no_value": [ "select", "name", "from", "people", "where", "people_id", "not", "in", "(", "select", "people_id", "from", "poker_player", ")" ], "question": "What are the names of people who do not play poker?", "question_toks": [ "What", "are", "the", "names", "of", "people", "who", "do", "not", "play", "poker", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 7, 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": "poker_player", "query": "SELECT count(DISTINCT Nationality) FROM people", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "Nationality", ")", "FROM", "people" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "nationality", ")", "from", "people" ], "question": "How many distinct nationalities are there?", "question_toks": [ "How", "many", "distinct", "nationalities", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 8, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT count(DISTINCT Nationality) FROM people", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "Nationality", ")", "FROM", "people" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "nationality", ")", "from", "people" ], "question": "Count the number of different nationalities.", "question_toks": [ "Count", "the", "number", "of", "different", "nationalities", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 8, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT count(*) FROM area_code_state", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "area_code_state" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "area_code_state" ], "question": "How many states are there?", "question_toks": [ "How", "many", "states", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC", "query_toks": [ "SELECT", "contestant_number", ",", "contestant_name", "FROM", "contestants", "ORDER", "BY", "contestant_name", "DESC" ], "query_toks_no_value": [ "select", "contestant_number", ",", "contestant_name", "from", "contestants", "order", "by", "contestant_name", "desc" ], "question": "List the contestant numbers and names, ordered by contestant name descending.", "question_toks": [ "List", "the", "contestant", "numbers", "and", "names", ",", "ordered", "by", "contestant", "name", "descending", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT vote_id , phone_number , state FROM votes", "query_toks": [ "SELECT", "vote_id", ",", "phone_number", ",", "state", "FROM", "votes" ], "query_toks_no_value": [ "select", "vote_id", ",", "phone_number", ",", "state", "from", "votes" ], "question": "List the vote ids, phone numbers and states of all votes.", "question_toks": [ "List", "the", "vote", "ids", ",", "phone", "numbers", "and", "states", "of", "all", "votes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT max(area_code) , min(area_code) FROM area_code_state", "query_toks": [ "SELECT", "max", "(", "area_code", ")", ",", "min", "(", "area_code", ")", "FROM", "area_code_state" ], "query_toks_no_value": [ "select", "max", "(", "area_code", ")", ",", "min", "(", "area_code", ")", "from", "area_code_state" ], "question": "What are the maximum and minimum values of area codes?", "question_toks": [ "What", "are", "the", "maximum", "and", "minimum", "values", "of", "area", "codes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 1, false ], null ] ], [ 2, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT max(created) FROM votes WHERE state = 'CA'", "query_toks": [ "SELECT", "max", "(", "created", ")", "FROM", "votes", "WHERE", "state", "=", "'CA", "'" ], "query_toks_no_value": [ "select", "max", "(", "created", ")", "from", "votes", "where", "state", "=", "value" ], "question": "What is last date created of votes from the state 'CA'?", "question_toks": [ "What", "is", "last", "date", "created", "of", "votes", "from", "the", "state", "'CA", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"CA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'", "query_toks": [ "SELECT", "contestant_name", "FROM", "contestants", "WHERE", "contestant_name", "!", "=", "'Jessie", "Alloway", "'" ], "query_toks_no_value": [ "select", "contestant_name", "from", "contestants", "where", "contestant_name", "!", "=", "value" ], "question": "What are the names of the contestants whose names are not 'Jessie Alloway'", "question_toks": [ "What", "are", "the", "names", "of", "the", "contestants", "whose", "names", "are", "not", "'Jessie", "Alloway", "'" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"Jessie Alloway\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT DISTINCT state , created FROM votes", "query_toks": [ "SELECT", "DISTINCT", "state", ",", "created", "FROM", "votes" ], "query_toks_no_value": [ "select", "distinct", "state", ",", "created", "from", "votes" ], "question": "What are the distinct states and create time of all votes?", "question_toks": [ "What", "are", "the", "distinct", "states", "and", "create", "time", "of", "all", "votes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.contestant_number", ",", "T1.contestant_name", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "GROUP", "BY", "T1.contestant_number", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "contestant_number", ",", "t1", ".", "contestant_name", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "group", "by", "t1", ".", "contestant_number", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the contestant numbers and names of the contestants who had at least two votes?", "question_toks": [ "What", "are", "the", "contestant", "numbers", "and", "names", "of", "the", "contestants", "who", "had", "at", "least", "two", "votes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "T1.contestant_number", ",", "T1.contestant_name", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "GROUP", "BY", "T1.contestant_number", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "contestant_number", ",", "t1", ".", "contestant_name", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "group", "by", "t1", ".", "contestant_number", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?", "question_toks": [ "Of", "all", "the", "contestants", "who", "got", "voted", ",", "what", "is", "the", "contestant", "number", "and", "name", "of", "the", "contestant", "who", "got", "least", "votes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "votes", "WHERE", "state", "=", "'NY", "'", "OR", "state", "=", "'CA", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "votes", "where", "state", "=", "value", "or", "state", "=", "value" ], "question": "What are the number of votes from state 'NY' or 'CA'?", "question_toks": [ "What", "are", "the", "number", "of", "votes", "from", "state", "'NY", "'", "or", "'CA", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"NY\"", null ], "or", [ false, 2, [ 0, [ 0, 7, false ], null ], "\"CA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "contestants", "WHERE", "contestant_number", "NOT", "IN", "(", "SELECT", "contestant_number", "FROM", "votes", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "contestants", "where", "contestant_number", "not", "in", "(", "select", "contestant_number", "from", "votes", ")" ], "question": "How many contestants did not get voted?", "question_toks": [ "How", "many", "contestants", "did", "not", "get", "voted", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 3, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, 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": "voter_1", "query": "SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.area_code", "FROM", "area_code_state", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.state", "=", "T2.state", "GROUP", "BY", "T1.area_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "area_code", "from", "area_code_state", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "state", "=", "t2", ".", "state", "group", "by", "t1", ".", "area_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the area code in which the most voters voted?", "question_toks": [ "What", "is", "the", "area", "code", "in", "which", "the", "most", "voters", "voted", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 2, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT T2.created , T2.state , T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'", "query_toks": [ "SELECT", "T2.created", ",", "T2.state", ",", "T2.phone_number", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "WHERE", "T1.contestant_name", "=", "'Tabatha", "Gehling", "'" ], "query_toks_no_value": [ "select", "t2", ".", "created", ",", "t2", ".", "state", ",", "t2", ".", "phone_number", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "where", "t1", ".", "contestant_name", "=", "value" ], "question": "What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?", "question_toks": [ "What", "are", "the", "create", "dates", ",", "states", ",", "and", "phone", "numbers", "of", "the", "votes", "that", "were", "for", "the", "contestant", "named", "'Tabatha", "Gehling", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Tabatha Gehling\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss'", "query_toks": [ "SELECT", "T3.area_code", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "JOIN", "area_code_state", "AS", "T3", "ON", "T2.state", "=", "T3.state", "WHERE", "T1.contestant_name", "=", "'Tabatha", "Gehling", "'", "INTERSECT", "SELECT", "T3.area_code", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "JOIN", "area_code_state", "AS", "T3", "ON", "T2.state", "=", "T3.state", "WHERE", "T1.contestant_name", "=", "'Kelly", "Clauss", "'" ], "query_toks_no_value": [ "select", "t3", ".", "area_code", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "join", "area_code_state", "as", "t3", "on", "t2", ".", "state", "=", "t3", ".", "state", "where", "t1", ".", "contestant_name", "=", "value", "intersect", "select", "t3", ".", "area_code", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "join", "area_code_state", "as", "t3", "on", "t2", ".", "state", "=", "t3", ".", "state", "where", "t1", ".", "contestant_name", "=", "value" ], "question": "List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.", "question_toks": [ "List", "the", "area", "codes", "in", "which", "voters", "voted", "both", "for", "the", "contestant", "'Tabatha", "Gehling", "'", "and", "the", "contestant", "'Kelly", "Clauss", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ], "and", [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Tabatha Gehling\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ], "and", [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Kelly Clauss\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "voter_1", "query": "select contestant_name from contestants where contestant_name like \"%al%\"", "query_toks": [ "select", "contestant_name", "from", "contestants", "where", "contestant_name", "like", "\"%al%\"" ], "query_toks_no_value": [ "select", "contestant_name", "from", "contestants", "where", "contestant_name", "like", "value" ], "question": "Return the names of the contestants whose names contain the substring 'Al' .", "question_toks": [ "Return", "the", "names", "of", "the", "contestants", "whose", "names", "contain", "the", "substring", "'Al'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 4, false ], null ], "\"%al%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE IndepYear > 1950", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "IndepYear", ">", "1950" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "indepyear", ">", "value" ], "question": "What are the names of all the countries that became independent after 1950?", "question_toks": [ "What", "are", "the", "names", "of", "all", "the", "countries", "that", "became", "independent", "after", "1950", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 1950.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE IndepYear > 1950", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "IndepYear", ">", "1950" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "indepyear", ">", "value" ], "question": "Give the names of the nations that were founded after 1950.", "question_toks": [ "Give", "the", "names", "of", "the", "nations", "that", "were", "founded", "after", "1950", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 1950.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "country", "WHERE", "GovernmentForm", "=", "``", "Republic", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "where", "governmentform", "=", "value" ], "question": "How many countries have a republic as their form of government?", "question_toks": [ "How", "many", "countries", "have", "a", "republic", "as", "their", "form", "of", "government", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "country", "WHERE", "GovernmentForm", "=", "``", "Republic", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "where", "governmentform", "=", "value" ], "question": "How many countries have governments that are republics?", "question_toks": [ "How", "many", "countries", "have", "governments", "that", "are", "republics", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", "query_toks": [ "SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Region", "=", "``", "Caribbean", "''" ], "query_toks_no_value": [ "select", "sum", "(", "surfacearea", ")", "from", "country", "where", "region", "=", "value" ], "question": "What is the total surface area of the countries in the Caribbean region?", "question_toks": [ "What", "is", "the", "total", "surface", "area", "of", "the", "countries", "in", "the", "Caribbean", "region", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Caribbean\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", "query_toks": [ "SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Region", "=", "``", "Caribbean", "''" ], "query_toks_no_value": [ "select", "sum", "(", "surfacearea", ")", "from", "country", "where", "region", "=", "value" ], "question": "How much surface area do the countires in the Carribean cover together?", "question_toks": [ "How", "much", "surface", "area", "do", "the", "countires", "in", "the", "Carribean", "cover", "together", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Caribbean\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "query_toks": [ "SELECT", "Continent", "FROM", "country", "WHERE", "Name", "=", "``", "Anguilla", "''" ], "query_toks_no_value": [ "select", "continent", "from", "country", "where", "name", "=", "value" ], "question": "Which continent is Anguilla in?", "question_toks": [ "Which", "continent", "is", "Anguilla", "in", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Anguilla\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "query_toks": [ "SELECT", "Continent", "FROM", "country", "WHERE", "Name", "=", "``", "Anguilla", "''" ], "query_toks_no_value": [ "select", "continent", "from", "country", "where", "name", "=", "value" ], "question": "What is the continent name which Anguilla belongs to?", "question_toks": [ "What", "is", "the", "continent", "name", "which", "Anguilla", "belongs", "to", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Anguilla\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "query_toks": [ "SELECT", "Region", "FROM", "country", "AS", "T1", "JOIN", "city", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Name", "=", "``", "Kabul", "''" ], "query_toks_no_value": [ "select", "region", "from", "country", "as", "t1", "join", "city", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "name", "=", "value" ], "question": "Which region is the city Kabul located in?", "question_toks": [ "Which", "region", "is", "the", "city", "Kabul", "located", "in", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kabul\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "query_toks": [ "SELECT", "Region", "FROM", "country", "AS", "T1", "JOIN", "city", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Name", "=", "``", "Kabul", "''" ], "query_toks_no_value": [ "select", "region", "from", "country", "as", "t1", "join", "city", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "name", "=", "value" ], "question": "What region is Kabul in?", "question_toks": [ "What", "region", "is", "Kabul", "in", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kabul\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Aruba", "''", "ORDER", "BY", "Percentage", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value", "order", "by", "percentage", "desc", "limit", "value" ], "question": "Which language is the most popular in Aruba?", "question_toks": [ "Which", "language", "is", "the", "most", "popular", "in", "Aruba", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Aruba\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 26, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Aruba", "''", "ORDER", "BY", "Percentage", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value", "order", "by", "percentage", "desc", "limit", "value" ], "question": "What language is predominantly spoken in Aruba?", "question_toks": [ "What", "language", "is", "predominantly", "spoken", "in", "Aruba", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Aruba\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 26, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", "query_toks": [ "SELECT", "Population", ",", "LifeExpectancy", "FROM", "country", "WHERE", "Name", "=", "``", "Brazil", "''" ], "query_toks_no_value": [ "select", "population", ",", "lifeexpectancy", "from", "country", "where", "name", "=", "value" ], "question": "What are the population and life expectancies in Brazil?", "question_toks": [ "What", "are", "the", "population", "and", "life", "expectancies", "in", "Brazil", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Brazil\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", "query_toks": [ "SELECT", "Population", ",", "LifeExpectancy", "FROM", "country", "WHERE", "Name", "=", "``", "Brazil", "''" ], "query_toks_no_value": [ "select", "population", ",", "lifeexpectancy", "from", "country", "where", "name", "=", "value" ], "question": "Give me Brazil’s population and life expectancies.", "question_toks": [ "Give", "me", "Brazil’s", "population", "and", "life", "expectancies", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Brazil\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "query_toks": [ "SELECT", "Population", ",", "Region", "FROM", "country", "WHERE", "Name", "=", "``", "Angola", "''" ], "query_toks_no_value": [ "select", "population", ",", "region", "from", "country", "where", "name", "=", "value" ], "question": "What are the region and population of Angola?", "question_toks": [ "What", "are", "the", "region", "and", "population", "of", "Angola", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Angola\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "query_toks": [ "SELECT", "Population", ",", "Region", "FROM", "country", "WHERE", "Name", "=", "``", "Angola", "''" ], "query_toks_no_value": [ "select", "population", ",", "region", "from", "country", "where", "name", "=", "value" ], "question": "What region does Angola belong to and what is its population?", "question_toks": [ "What", "region", "does", "Angola", "belong", "to", "and", "what", "is", "its", "population", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Angola\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Region", "=", "``", "Central", "Africa", "''" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "region", "=", "value" ], "question": "What is the average expected life expectancy for countries in the region of Central Africa?", "question_toks": [ "What", "is", "the", "average", "expected", "life", "expectancy", "for", "countries", "in", "the", "region", "of", "Central", "Africa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Central Africa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Region", "=", "``", "Central", "Africa", "''" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "region", "=", "value" ], "question": "How long is the people’s average life expectancy in Central Africa?", "question_toks": [ "How", "long", "is", "the", "people’s", "average", "life", "expectancy", "in", "Central", "Africa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Central Africa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "ORDER", "BY", "LifeExpectancy", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "order", "by", "lifeexpectancy", "limit", "value" ], "question": "What is the name of country that has the shortest life expectancy in Asia?", "question_toks": [ "What", "is", "the", "name", "of", "country", "that", "has", "the", "shortest", "life", "expectancy", "in", "Asia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 15, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "ORDER", "BY", "LifeExpectancy", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "order", "by", "lifeexpectancy", "limit", "value" ], "question": "Give the name of the country in Asia with the lowest life expectancy.", "question_toks": [ "Give", "the", "name", "of", "the", "country", "in", "Asia", "with", "the", "lowest", "life", "expectancy", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 15, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "max", "(", "GNP", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "max", "(", "gnp", ")", "from", "country", "where", "continent", "=", "value" ], "question": "What is the total population and maximum GNP in Asia?", "question_toks": [ "What", "is", "the", "total", "population", "and", "maximum", "GNP", "in", "Asia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 1, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "max", "(", "GNP", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "max", "(", "gnp", ")", "from", "country", "where", "continent", "=", "value" ], "question": "How many people live in Asia, and what is the largest GNP among them?", "question_toks": [ "How", "many", "people", "live", "in", "Asia", ",", "and", "what", "is", "the", "largest", "GNP", "among", "them", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 1, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", "AND", "GovernmentForm", "=", "``", "Republic", "''" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "continent", "=", "value", "and", "governmentform", "=", "value" ], "question": "What is the average life expectancy in African countries that are republics?", "question_toks": [ "What", "is", "the", "average", "life", "expectancy", "in", "African", "countries", "that", "are", "republics", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ], "and", [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", "AND", "GovernmentForm", "=", "``", "Republic", "''" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "continent", "=", "value", "and", "governmentform", "=", "value" ], "question": "Give the average life expectancy for countries in Africa which are republics?", "question_toks": [ "Give", "the", "average", "life", "expectancy", "for", "countries", "in", "Africa", "which", "are", "republics", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ], "and", [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", "query_toks": [ "SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "OR", "Continent", "=", "``", "Europe", "''" ], "query_toks_no_value": [ "select", "sum", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "or", "continent", "=", "value" ], "question": "What is the total surface area of the continents Asia and Europe?", "question_toks": [ "What", "is", "the", "total", "surface", "area", "of", "the", "continents", "Asia", "and", "Europe", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ], "or", [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", "query_toks": [ "SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "OR", "Continent", "=", "``", "Europe", "''" ], "query_toks_no_value": [ "select", "sum", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "or", "continent", "=", "value" ], "question": "Give the total surface area covered by countries in Asia or Europe.", "question_toks": [ "Give", "the", "total", "surface", "area", "covered", "by", "countries", "in", "Asia", "or", "Europe", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ], "or", [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", "query_toks": [ "SELECT", "sum", "(", "Population", ")", "FROM", "city", "WHERE", "District", "=", "``", "Gelderland", "''" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", "from", "city", "where", "district", "=", "value" ], "question": "How many people live in Gelderland district?", "question_toks": [ "How", "many", "people", "live", "in", "Gelderland", "district", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Gelderland\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", "query_toks": [ "SELECT", "sum", "(", "Population", ")", "FROM", "city", "WHERE", "District", "=", "``", "Gelderland", "''" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", "from", "city", "where", "district", "=", "value" ], "question": "What is the total population of Gelderland district?", "question_toks": [ "What", "is", "the", "total", "population", "of", "Gelderland", "district", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Gelderland\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "query_toks": [ "SELECT", "avg", "(", "GNP", ")", ",", "sum", "(", "population", ")", "FROM", "country", "WHERE", "GovernmentForm", "=", "``", "US", "Territory", "''" ], "query_toks_no_value": [ "select", "avg", "(", "gnp", ")", ",", "sum", "(", "population", ")", "from", "country", "where", "governmentform", "=", "value" ], "question": "What is the average GNP and total population in all nations whose government is US territory?", "question_toks": [ "What", "is", "the", "average", "GNP", "and", "total", "population", "in", "all", "nations", "whose", "government", "is", "US", "territory", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 16, false ], null ] ], [ 4, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"US Territory\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "query_toks": [ "SELECT", "avg", "(", "GNP", ")", ",", "sum", "(", "population", ")", "FROM", "country", "WHERE", "GovernmentForm", "=", "``", "US", "Territory", "''" ], "query_toks_no_value": [ "select", "avg", "(", "gnp", ")", ",", "sum", "(", "population", ")", "from", "country", "where", "governmentform", "=", "value" ], "question": "Give the mean GNP and total population of nations which are considered US territory.", "question_toks": [ "Give", "the", "mean", "GNP", "and", "total", "population", "of", "nations", "which", "are", "considered", "US", "territory", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 16, false ], null ] ], [ 4, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"US Territory\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "LANGUAGE", ")", "FROM", "countrylanguage" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "language", ")", "from", "countrylanguage" ], "question": "How many unique languages are spoken in the world?", "question_toks": [ "How", "many", "unique", "languages", "are", "spoken", "in", "the", "world", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "LANGUAGE", ")", "FROM", "countrylanguage" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "language", ")", "from", "countrylanguage" ], "question": "What is the number of distinct languages used around the world?", "question_toks": [ "What", "is", "the", "number", "of", "distinct", "languages", "used", "around", "the", "world", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "GovernmentForm", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "governmentform", ")", "from", "country", "where", "continent", "=", "value" ], "question": "How many type of governments are in Africa?", "question_toks": [ "How", "many", "type", "of", "governments", "are", "in", "Africa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 19, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "GovernmentForm", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "governmentform", ")", "from", "country", "where", "continent", "=", "value" ], "question": "How many different forms of governments are there in Africa?", "question_toks": [ "How", "many", "different", "forms", "of", "governments", "are", "there", "in", "Africa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 19, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", "query_toks": [ "SELECT", "COUNT", "(", "T2.Language", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Aruba", "''" ], "query_toks_no_value": [ "select", "count", "(", "t2", ".", "language", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value" ], "question": "What is the total number of languages used in Aruba?", "question_toks": [ "What", "is", "the", "total", "number", "of", "languages", "used", "in", "Aruba", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Aruba\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", "query_toks": [ "SELECT", "COUNT", "(", "T2.Language", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Aruba", "''" ], "query_toks_no_value": [ "select", "count", "(", "t2", ".", "language", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value" ], "question": "How many languages are spoken in Aruba?", "question_toks": [ "How", "many", "languages", "are", "spoken", "in", "Aruba", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Aruba\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Afghanistan", "''", "AND", "IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value", "and", "isofficial", "=", "value" ], "question": "How many official languages does Afghanistan have?", "question_toks": [ "How", "many", "official", "languages", "does", "Afghanistan", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Afghanistan\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Afghanistan", "''", "AND", "IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value", "and", "isofficial", "=", "value" ], "question": "How many official languages are spoken in Afghanistan?", "question_toks": [ "How", "many", "official", "languages", "are", "spoken", "in", "Afghanistan", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Afghanistan\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Name", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is name of the country that speaks the largest number of languages?", "question_toks": [ "What", "is", "name", "of", "the", "country", "that", "speaks", "the", "largest", "number", "of", "languages", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Name", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Give the name of the nation that uses the greatest amount of languages.", "question_toks": [ "Give", "the", "name", "of", "the", "nation", "that", "uses", "the", "greatest", "amount", "of", "languages", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Continent", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Continent", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "continent", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "continent", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which continent has the most diverse languages?", "question_toks": [ "Which", "continent", "has", "the", "most", "diverse", "languages", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Continent", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Continent", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "continent", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "continent", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which continent speaks the most languages?", "question_toks": [ "Which", "continent", "speaks", "the", "most", "languages", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Dutch", "''", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", ")" ], "question": "How many countries speak both English and Dutch?", "question_toks": [ "How", "many", "countries", "speak", "both", "English", "and", "Dutch", "?" ], "sql": { "from": { "table_units": [ [ "sql", { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Dutch", "''", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", ")" ], "question": "What is the number of nations that use English and Dutch?", "question_toks": [ "What", "is", "the", "number", "of", "nations", "that", "use", "English", "and", "Dutch", "?" ], "sql": { "from": { "table_units": [ [ "sql", { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "French", "''" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value" ], "question": "What are the names of nations speak both English and French?", "question_toks": [ "What", "are", "the", "names", "of", "nations", "speak", "both", "English", "and", "French", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"French\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "French", "''" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value" ], "question": "Give the names of nations that speak both English and French.", "question_toks": [ "Give", "the", "names", "of", "nations", "that", "speak", "both", "English", "and", "French", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"French\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "French", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "What are the names of nations where both English and French are official languages?", "question_toks": [ "What", "are", "the", "names", "of", "nations", "where", "both", "English", "and", "French", "are", "official", "languages", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"French\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "French", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "Give the names of countries with English and French as official languages.", "question_toks": [ "Give", "the", "names", "of", "countries", "with", "English", "and", "French", "as", "official", "languages", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"French\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "query_toks": [ "SELECT", "COUNT", "(", "DISTINCT", "Continent", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Chinese", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "continent", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value" ], "question": "What is the number of distinct continents where Chinese is spoken?", "question_toks": [ "What", "is", "the", "number", "of", "distinct", "continents", "where", "Chinese", "is", "spoken", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 10, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Chinese\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "query_toks": [ "SELECT", "COUNT", "(", "DISTINCT", "Continent", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Chinese", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "continent", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value" ], "question": "How many continents speak Chinese?", "question_toks": [ "How", "many", "continents", "speak", "Chinese", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 10, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Chinese\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "query_toks": [ "SELECT", "DISTINCT", "T1.Region", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "OR", "T2.Language", "=", "``", "Dutch", "''" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "region", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "or", "t2", ".", "language", "=", "value" ], "question": "What are the regions that use English or Dutch?", "question_toks": [ "What", "are", "the", "regions", "that", "use", "English", "or", "Dutch", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "or", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "query_toks": [ "SELECT", "DISTINCT", "T1.Region", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "OR", "T2.Language", "=", "``", "Dutch", "''" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "region", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "or", "t2", ".", "language", "=", "value" ], "question": "Which regions speak Dutch or English?", "question_toks": [ "Which", "regions", "speak", "Dutch", "or", "English", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "or", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = \"english\" and isofficial = \"t\" union select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = \"dutch\" and isofficial = \"t\"", "query_toks": [ "select", "t1.name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1.code", "=", "t2.countrycode", "where", "t2.language", "=", "\"english\"", "and", "isofficial", "=", "\"t\"", "union", "select", "t1.name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1.code", "=", "t2.countrycode", "where", "t2.language", "=", "\"dutch\"", "and", "isofficial", "=", "\"t\"" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "isofficial", "=", "value", "union", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "isofficial", "=", "value" ], "question": "What are the countries where either English or Dutch is the official language ?", "question_toks": [ "What", "are", "the", "countries", "where", "either", "English", "or", "Dutch", "is", "the", "official", "language", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"english\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"t\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"dutch\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"t\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "world_1", "query": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND IsOfficial = \"T\" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\" AND IsOfficial = \"T\"", "query_toks": [ "SELECT", "*", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "IsOfficial", "=", "``", "T", "''", "UNION", "SELECT", "*", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Dutch", "''", "AND", "IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "*", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "isofficial", "=", "value", "union", "select", "*", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "isofficial", "=", "value" ], "question": "Which countries have either English or Dutch as an official language?", "question_toks": [ "Which", "countries", "have", "either", "English", "or", "Dutch", "as", "an", "official", "language", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Continent", "=", "``", "Asia", "''", "GROUP", "BY", "T2.Language", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "continent", "=", "value", "group", "by", "t2", ".", "language", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which language is the most popular on the Asian continent?", "question_toks": [ "Which", "language", "is", "the", "most", "popular", "on", "the", "Asian", "continent", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [ [ 0, 24, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Continent", "=", "``", "Asia", "''", "GROUP", "BY", "T2.Language", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "continent", "=", "value", "group", "by", "t2", ".", "language", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the language that is used by the largest number of Asian nations?", "question_toks": [ "What", "is", "the", "language", "that", "is", "used", "by", "the", "largest", "number", "of", "Asian", "nations", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [ [ 0, 24, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = \"Republic\" GROUP BY T2.Language HAVING COUNT(*) = 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.GovernmentForm", "=", "``", "Republic", "''", "GROUP", "BY", "T2.Language", "HAVING", "COUNT", "(", "*", ")", "=", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "governmentform", "=", "value", "group", "by", "t2", ".", "language", "having", "count", "(", "*", ")", "=", "value" ], "question": "Which languages are spoken by only one country in republic governments?", "question_toks": [ "Which", "languages", "are", "spoken", "by", "only", "one", "country", "in", "republic", "governments", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [ [ 0, 24, false ] ], "having": [ [ false, 2, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = \"Republic\" GROUP BY T2.Language HAVING COUNT(*) = 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.GovernmentForm", "=", "``", "Republic", "''", "GROUP", "BY", "T2.Language", "HAVING", "COUNT", "(", "*", ")", "=", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "governmentform", "=", "value", "group", "by", "t2", ".", "language", "having", "count", "(", "*", ")", "=", "value" ], "question": "What languages are only used by a single country with a republic government?", "question_toks": [ "What", "languages", "are", "only", "used", "by", "a", "single", "country", "with", "a", "republic", "government", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [ [ 0, 24, false ] ], "having": [ [ false, 2, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", ",", "T1.Population", "FROM", "city", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.CountryCode", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "ORDER", "BY", "T1.Population", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t1", ".", "population", "from", "city", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "countrycode", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "order", "by", "t1", ".", "population", "desc", "limit", "value" ], "question": "Find the city with the largest population that uses English.", "question_toks": [ "Find", "the", "city", "with", "the", "largest", "population", "that", "uses", "English", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", ",", "T1.Population", "FROM", "city", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.CountryCode", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "ORDER", "BY", "T1.Population", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t1", ".", "population", "from", "city", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "countrycode", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "order", "by", "t1", ".", "population", "desc", "limit", "value" ], "question": "What is the most populace city that speaks English?", "question_toks": [ "What", "is", "the", "most", "populace", "city", "that", "speaks", "English", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "Population", ",", "LifeExpectancy", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "population", ",", "lifeexpectancy", "from", "country", "where", "continent", "=", "value", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "Find the name, population and expected life length of asian country with the largest area?", "question_toks": [ "Find", "the", "name", ",", "population", "and", "expected", "life", "length", "of", "asian", "country", "with", "the", "largest", "area", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "Population", ",", "LifeExpectancy", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "population", ",", "lifeexpectancy", "from", "country", "where", "continent", "=", "value", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "What are the name, population, and life expectancy of the largest Asian country by land?", "question_toks": [ "What", "are", "the", "name", ",", "population", ",", "and", "life", "expectancy", "of", "the", "largest", "Asian", "country", "by", "land", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Name", "NOT", "IN", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''", ")" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "name", "not", "in", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value", ")" ], "question": "What is average life expectancy in the countries where English is not the official language?", "question_toks": [ "What", "is", "average", "life", "expectancy", "in", "the", "countries", "where", "English", "is", "not", "the", "official", "language", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "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": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Name", "NOT", "IN", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''", ")" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "name", "not", "in", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value", ")" ], "question": "Give the mean life expectancy of countries in which English is not the official language.", "question_toks": [ "Give", "the", "mean", "life", "expectancy", "of", "countries", "in", "which", "English", "is", "not", "the", "official", "language", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "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": "world_1", "query": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "query_toks": [ "SELECT", "sum", "(", "Population", ")", "FROM", "country", "WHERE", "Name", "NOT", "IN", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", ")" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", "from", "country", "where", "name", "not", "in", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", ")" ], "question": "What is the total number of people living in the nations that do not use English?", "question_toks": [ "What", "is", "the", "total", "number", "of", "people", "living", "in", "the", "nations", "that", "do", "not", "use", "English", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "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": "world_1", "query": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "query_toks": [ "SELECT", "sum", "(", "Population", ")", "FROM", "country", "WHERE", "Name", "NOT", "IN", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", ")" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", "from", "country", "where", "name", "not", "in", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", ")" ], "question": "How many people live in countries that do not speak English?", "question_toks": [ "How", "many", "people", "live", "in", "countries", "that", "do", "not", "speak", "English", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "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": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.HeadOfState", "=", "``", "Beatrix", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "headofstate", "=", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "What is the official language spoken in the country whose head of state is Beatrix?", "question_toks": [ "What", "is", "the", "official", "language", "spoken", "in", "the", "country", "whose", "head", "of", "state", "is", "Beatrix", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Beatrix\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.HeadOfState", "=", "``", "Beatrix", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "headofstate", "=", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "What is the official language used in the country the name of whose head of state is Beatrix.", "question_toks": [ "What", "is", "the", "official", "language", "used", "in", "the", "country", "the", "name", "of", "whose", "head", "of", "state", "is", "Beatrix", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Beatrix\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "T2.Language", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "IndepYear", "<", "1930", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "t2", ".", "language", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "indepyear", "<", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "What is the total number of unique official languages spoken in the countries that are founded before 1930?", "question_toks": [ "What", "is", "the", "total", "number", "of", "unique", "official", "languages", "spoken", "in", "the", "countries", "that", "are", "founded", "before", "1930", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, true ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 13, false ], null ], 1930.0, null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "T2.Language", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "IndepYear", "<", "1930", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "t2", ".", "language", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "indepyear", "<", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "For the countries founded before 1930, what is the total number of distinct official languages?", "question_toks": [ "For", "the", "countries", "founded", "before", "1930", ",", "what", "is", "the", "total", "number", "of", "distinct", "official", "languages", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, true ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 13, false ], null ], 1930.0, null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "SurfaceArea", ">", "(", "SELECT", "min", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Europe", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "surfacearea", ">", "(", "select", "min", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "What are the countries that have greater surface area than any country in Europe?", "question_toks": [ "What", "are", "the", "countries", "that", "have", "greater", "surface", "area", "than", "any", "country", "in", "Europe", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 12, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "SurfaceArea", ">", "(", "SELECT", "min", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Europe", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "surfacearea", ">", "(", "select", "min", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "Which countries have greater area than that of any country in Europe?", "question_toks": [ "Which", "countries", "have", "greater", "area", "than", "that", "of", "any", "country", "in", "Europe", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 12, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT max(population) FROM country WHERE Continent = \"Asia\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", "AND", "population", "<", "(", "SELECT", "max", "(", "population", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", "<", "(", "select", "max", "(", "population", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "What are the African countries that have a population less than any country in Asia?", "question_toks": [ "What", "are", "the", "African", "countries", "that", "have", "a", "population", "less", "than", "any", "country", "in", "Asia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ], "and", [ false, 4, [ 0, [ 0, 14, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT min(population) FROM country WHERE Continent = \"Asia\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", "AND", "population", "<", "(", "SELECT", "min", "(", "population", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", "<", "(", "select", "min", "(", "population", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "Which African countries have a smaller population than that of any country in Asia?", "question_toks": [ "Which", "African", "countries", "have", "a", "smaller", "population", "than", "that", "of", "any", "country", "in", "Asia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ], "and", [ false, 4, [ 0, [ 0, 14, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT max(population) FROM country WHERE Continent = \"Africa\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "AND", "population", ">", "(", "SELECT", "max", "(", "population", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", ">", "(", "select", "max", "(", "population", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "Which Asian countries have a population that is larger than any country in Africa?", "question_toks": [ "Which", "Asian", "countries", "have", "a", "population", "that", "is", "larger", "than", "any", "country", "in", "Africa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ], "and", [ false, 3, [ 0, [ 0, 14, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT min(population) FROM country WHERE Continent = \"Africa\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "AND", "population", ">", "(", "SELECT", "min", "(", "population", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", ">", "(", "select", "min", "(", "population", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "What are the Asian countries which have a population larger than that of any country in Africa?", "question_toks": [ "What", "are", "the", "Asian", "countries", "which", "have", "a", "population", "larger", "than", "that", "of", "any", "country", "in", "Africa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ], "and", [ false, 3, [ 0, [ 0, 14, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ] ], "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": "world_1", "query": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "query_toks": [ "SELECT", "CountryCode", "FROM", "countrylanguage", "EXCEPT", "SELECT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "countrycode", "from", "countrylanguage", "except", "select", "countrycode", "from", "countrylanguage", "where", "language", "=", "value" ], "question": "What are the country codes for countries that do not speak English?", "question_toks": [ "What", "are", "the", "country", "codes", "for", "countries", "that", "do", "not", "speak", "English", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "world_1", "query": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "query_toks": [ "SELECT", "CountryCode", "FROM", "countrylanguage", "EXCEPT", "SELECT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "countrycode", "from", "countrylanguage", "except", "select", "countrycode", "from", "countrylanguage", "where", "language", "=", "value" ], "question": "Return the country codes for countries that do not speak English.", "question_toks": [ "Return", "the", "country", "codes", "for", "countries", "that", "do", "not", "speak", "English", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "world_1", "query": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"", "query_toks": [ "SELECT", "DISTINCT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "!", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "distinct", "countrycode", "from", "countrylanguage", "where", "language", "!", "=", "value" ], "question": "What are the country codes of countries where people use languages other than English?", "question_toks": [ "What", "are", "the", "country", "codes", "of", "countries", "where", "people", "use", "languages", "other", "than", "English", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"", "query_toks": [ "SELECT", "DISTINCT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "!", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "distinct", "countrycode", "from", "countrylanguage", "where", "language", "!", "=", "value" ], "question": "Give the country codes for countries in which people speak langauges that are not English.", "question_toks": [ "Give", "the", "country", "codes", "for", "countries", "in", "which", "people", "speak", "langauges", "that", "are", "not", "English", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "query_toks": [ "SELECT", "Code", "FROM", "country", "WHERE", "GovernmentForm", "!", "=", "``", "Republic", "''", "EXCEPT", "SELECT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "code", "from", "country", "where", "governmentform", "!", "=", "value", "except", "select", "countrycode", "from", "countrylanguage", "where", "language", "=", "value" ], "question": "What are the codes of the countries that do not speak English and whose government forms are not Republic?", "question_toks": [ "What", "are", "the", "codes", "of", "the", "countries", "that", "do", "not", "speak", "English", "and", "whose", "government", "forms", "are", "not", "Republic", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "world_1", "query": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "query_toks": [ "SELECT", "Code", "FROM", "country", "WHERE", "GovernmentForm", "!", "=", "``", "Republic", "''", "EXCEPT", "SELECT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "code", "from", "country", "where", "governmentform", "!", "=", "value", "except", "select", "countrycode", "from", "countrylanguage", "where", "language", "=", "value" ], "question": "Return the codes of countries that do not speak English and do not have Republics for governments.", "question_toks": [ "Return", "the", "codes", "of", "countries", "that", "do", "not", "speak", "English", "and", "do", "not", "have", "Republics", "for", "governments", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "world_1", "query": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "query_toks": [ "SELECT", "DISTINCT", "T2.Name", "FROM", "country", "AS", "T1", "JOIN", "city", "AS", "T2", "ON", "T2.CountryCode", "=", "T1.Code", "WHERE", "T1.Continent", "=", "'Europe", "'", "AND", "T1.Name", "NOT", "IN", "(", "SELECT", "T3.Name", "FROM", "country", "AS", "T3", "JOIN", "countrylanguage", "AS", "T4", "ON", "T3.Code", "=", "T4.CountryCode", "WHERE", "T4.IsOfficial", "=", "'T", "'", "AND", "T4.Language", "=", "'English", "'", ")" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "name", "from", "country", "as", "t1", "join", "city", "as", "t2", "on", "t2", ".", "countrycode", "=", "t1", ".", "code", "where", "t1", ".", "continent", "=", "value", "and", "t1", ".", "name", "not", "in", "(", "select", "t3", ".", "name", "from", "country", "as", "t3", "join", "countrylanguage", "as", "t4", "on", "t3", ".", "code", "=", "t4", ".", "countrycode", "where", "t4", ".", "isofficial", "=", "value", "and", "t4", ".", "language", "=", "value", ")" ], "question": "Which cities are in European countries where English is not the official language?", "question_toks": [ "Which", "cities", "are", "in", "European", "countries", "where", "English", "is", "not", "the", "official", "language", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ], "and", [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ], "and", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "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": "world_1", "query": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "query_toks": [ "SELECT", "DISTINCT", "T2.Name", "FROM", "country", "AS", "T1", "JOIN", "city", "AS", "T2", "ON", "T2.CountryCode", "=", "T1.Code", "WHERE", "T1.Continent", "=", "'Europe", "'", "AND", "T1.Name", "NOT", "IN", "(", "SELECT", "T3.Name", "FROM", "country", "AS", "T3", "JOIN", "countrylanguage", "AS", "T4", "ON", "T3.Code", "=", "T4.CountryCode", "WHERE", "T4.IsOfficial", "=", "'T", "'", "AND", "T4.Language", "=", "'English", "'", ")" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "name", "from", "country", "as", "t1", "join", "city", "as", "t2", "on", "t2", ".", "countrycode", "=", "t1", ".", "code", "where", "t1", ".", "continent", "=", "value", "and", "t1", ".", "name", "not", "in", "(", "select", "t3", ".", "name", "from", "country", "as", "t3", "join", "countrylanguage", "as", "t4", "on", "t3", ".", "code", "=", "t4", ".", "countrycode", "where", "t4", ".", "isofficial", "=", "value", "and", "t4", ".", "language", "=", "value", ")" ], "question": "What are the names of cities in Europe for which English is not the official language?", "question_toks": [ "What", "are", "the", "names", "of", "cities", "in", "Europe", "for", "which", "English", "is", "not", "the", "official", "language", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ], "and", [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ], "and", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "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": "world_1", "query": "select distinct t3.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode join city as t3 on t1.code = t3.countrycode where t2.isofficial = 't' and t2.language = 'chinese' and t1.continent = \"asia\"", "query_toks": [ "select", "distinct", "t3.name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1.code", "=", "t2.countrycode", "join", "city", "as", "t3", "on", "t1.code", "=", "t3.countrycode", "where", "t2.isofficial", "=", "\"t\"", "and", "t2.language", "=", "\"chinese\"", "and", "t1.continent", "=", "\"asia\"" ], "query_toks_no_value": [ "select", "distinct", "t3", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "join", "city", "as", "t3", "on", "t1", ".", "code", "=", "t3", ".", "countrycode", "where", "t2", ".", "isofficial", "=", "value", "and", "t2", ".", "language", "=", "value", "and", "t1", ".", "continent", "=", "value" ], "question": "Which unique cities are in Asian countries where Chinese is the official language ?", "question_toks": [ "Which", "unique", "cities", "are", "in", "Asian", "countries", "where", "Chinese", "is", "the", "official", "language", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ], "and", [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"t\"", null ], "and", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"chinese\"", null ], "and", [ false, 2, [ 0, [ 0, 10, false ], null ], "\"asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", "query_toks": [ "SELECT", "DISTINCT", "T3.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "JOIN", "city", "AS", "T3", "ON", "T1.Code", "=", "T3.CountryCode", "WHERE", "T2.IsOfficial", "=", "'T", "'", "AND", "T2.Language", "=", "'Chinese", "'", "AND", "T1.Continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "distinct", "t3", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "join", "city", "as", "t3", "on", "t1", ".", "code", "=", "t3", ".", "countrycode", "where", "t2", ".", "isofficial", "=", "value", "and", "t2", ".", "language", "=", "value", "and", "t1", ".", "continent", "=", "value" ], "question": "Return the different names of cities that are in Asia and for which Chinese is the official language.", "question_toks": [ "Return", "the", "different", "names", "of", "cities", "that", "are", "in", "Asia", "and", "for", "which", "Chinese", "is", "the", "official", "language", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ], "and", [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ], "and", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Chinese\"", null ], "and", [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "SurfaceArea", ",", "IndepYear", "FROM", "country", "ORDER", "BY", "Population", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "surfacearea", ",", "indepyear", "from", "country", "order", "by", "population", "limit", "value" ], "question": "What are the name, independence year, and surface area of the country with the smallest population?", "question_toks": [ "What", "are", "the", "name", ",", "independence", "year", ",", "and", "surface", "area", "of", "the", "country", "with", "the", "smallest", "population", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "SurfaceArea", ",", "IndepYear", "FROM", "country", "ORDER", "BY", "Population", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "surfacearea", ",", "indepyear", "from", "country", "order", "by", "population", "limit", "value" ], "question": "Give the name, year of independence, and surface area of the country that has the lowest population.", "question_toks": [ "Give", "the", "name", ",", "year", "of", "independence", ",", "and", "surface", "area", "of", "the", "country", "that", "has", "the", "lowest", "population", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "population", ",", "HeadOfState", "FROM", "country", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "population", ",", "headofstate", "from", "country", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "What are the population, name and leader of the country with the largest area?", "question_toks": [ "What", "are", "the", "population", ",", "name", "and", "leader", "of", "the", "country", "with", "the", "largest", "area", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "population", ",", "HeadOfState", "FROM", "country", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "population", ",", "headofstate", "from", "country", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "Give the name, population, and head of state for the country that has the largest area.", "question_toks": [ "Give", "the", "name", ",", "population", ",", "and", "head", "of", "state", "for", "the", "country", "that", "has", "the", "largest", "area", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2", "query_toks": [ "SELECT", "COUNT", "(", "T2.Language", ")", ",", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Name", "HAVING", "COUNT", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "count", "(", "t2", ".", "language", ")", ",", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "name", "having", "count", "(", "*", ")", ">", "value" ], "question": "Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages.", "question_toks": [ "Return", "the", "country", "name", "and", "the", "numbers", "of", "languages", "spoken", "for", "each", "country", "that", "speaks", "at", "least", "3", "languages", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2", "query_toks": [ "SELECT", "COUNT", "(", "T2.Language", ")", ",", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Name", "HAVING", "COUNT", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "count", "(", "t2", ".", "language", ")", ",", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "name", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are the names of countries that speak more than 2 languages, as well as how many languages they speak?", "question_toks": [ "What", "are", "the", "names", "of", "countries", "that", "speak", "more", "than", "2", "languages", ",", "as", "well", "as", "how", "many", "languages", "they", "speak", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "District", "FROM", "city", "WHERE", "Population", ">", "(", "SELECT", "avg", "(", "Population", ")", "FROM", "city", ")", "GROUP", "BY", "District" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "district", "from", "city", "where", "population", ">", "(", "select", "avg", "(", "population", ")", "from", "city", ")", "group", "by", "district" ], "question": "Find the number of cities in each district whose population is greater than the average population of cities?", "question_toks": [ "Find", "the", "number", "of", "cities", "in", "each", "district", "whose", "population", "is", "greater", "than", "the", "average", "population", "of", "cities", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "District", "FROM", "city", "WHERE", "Population", ">", "(", "SELECT", "avg", "(", "Population", ")", "FROM", "city", ")", "GROUP", "BY", "District" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "district", "from", "city", "where", "population", ">", "(", "select", "avg", "(", "population", ")", "from", "city", ")", "group", "by", "district" ], "question": "How many cities in each district have a population that is above the average population across all cities?", "question_toks": [ "How", "many", "cities", "in", "each", "district", "have", "a", "population", "that", "is", "above", "the", "average", "population", "across", "all", "cities", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "GovernmentForm", "FROM", "country", "GROUP", "BY", "GovernmentForm", "HAVING", "avg", "(", "LifeExpectancy", ")", ">", "72" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "governmentform", "from", "country", "group", "by", "governmentform", "having", "avg", "(", "lifeexpectancy", ")", ">", "value" ], "question": "Find the government form name and total population for each government form whose average life expectancy is longer than 72.", "question_toks": [ "Find", "the", "government", "form", "name", "and", "total", "population", "for", "each", "government", "form", "whose", "average", "life", "expectancy", "is", "longer", "than", "72", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [ [ false, 3, [ 0, [ 5, 15, false ], null ], 72.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "GovernmentForm", "FROM", "country", "GROUP", "BY", "GovernmentForm", "HAVING", "avg", "(", "LifeExpectancy", ")", ">", "72" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "governmentform", "from", "country", "group", "by", "governmentform", "having", "avg", "(", "lifeexpectancy", ")", ">", "value" ], "question": "What are the different government forms and what is the total population of each for government forms that have an average life expectancy greater than 72?", "question_toks": [ "What", "are", "the", "different", "government", "forms", "and", "what", "is", "the", "total", "population", "of", "each", "for", "government", "forms", "that", "have", "an", "average", "life", "expectancy", "greater", "than", "72", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [ [ false, 3, [ 0, [ 5, 15, false ], null ], 72.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "avg", "(", "LifeExpectancy", ")", ",", "Continent", "FROM", "country", "GROUP", "BY", "Continent", "HAVING", "avg", "(", "LifeExpectancy", ")", "<", "72" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "lifeexpectancy", ")", ",", "continent", "from", "country", "group", "by", "continent", "having", "avg", "(", "lifeexpectancy", ")", "<", "value" ], "question": "Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?", "question_toks": [ "Find", "the", "average", "life", "expectancy", "and", "total", "population", "for", "each", "continent", "where", "the", "average", "life", "expectancy", "is", "shorter", "than", "72", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 5, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 4, [ 0, [ 5, 15, false ], null ], 72.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "avg", "(", "LifeExpectancy", ")", ",", "Continent", "FROM", "country", "GROUP", "BY", "Continent", "HAVING", "avg", "(", "LifeExpectancy", ")", "<", "72" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "lifeexpectancy", ")", ",", "continent", "from", "country", "group", "by", "continent", "having", "avg", "(", "lifeexpectancy", ")", "<", "value" ], "question": "What are the different continents and the total popuation and average life expectancy corresponding to each, for continents that have an average life expectancy less than 72?", "question_toks": [ "What", "are", "the", "different", "continents", "and", "the", "total", "popuation", "and", "average", "life", "expectancy", "corresponding", "to", "each", ",", "for", "continents", "that", "have", "an", "average", "life", "expectancy", "less", "than", "72", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 5, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 4, [ 0, [ 5, 15, false ], null ], 72.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", "query_toks": [ "SELECT", "Name", ",", "SurfaceArea", "FROM", "country", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "5" ], "query_toks_no_value": [ "select", "name", ",", "surfacearea", "from", "country", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "What are the names and areas of countries with the top 5 largest area?", "question_toks": [ "What", "are", "the", "names", "and", "areas", "of", "countries", "with", "the", "top", "5", "largest", "area", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 5, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", "query_toks": [ "SELECT", "Name", ",", "SurfaceArea", "FROM", "country", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "5" ], "query_toks_no_value": [ "select", "name", ",", "surfacearea", "from", "country", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "Return the names and surface areas of the 5 largest countries.", "question_toks": [ "Return", "the", "names", "and", "surface", "areas", "of", "the", "5", "largest", "countries", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 5, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", "query_toks": [ "SELECT", "Name", "FROM", "country", "ORDER", "BY", "Population", "DESC", "LIMIT", "3" ], "query_toks_no_value": [ "select", "name", "from", "country", "order", "by", "population", "desc", "limit", "value" ], "question": "What are names of countries with the top 3 largest population?", "question_toks": [ "What", "are", "names", "of", "countries", "with", "the", "top", "3", "largest", "population", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", "query_toks": [ "SELECT", "Name", "FROM", "country", "ORDER", "BY", "Population", "DESC", "LIMIT", "3" ], "query_toks_no_value": [ "select", "name", "from", "country", "order", "by", "population", "desc", "limit", "value" ], "question": "Return the names of the 3 most populated countries.", "question_toks": [ "Return", "the", "names", "of", "the", "3", "most", "populated", "countries", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", "query_toks": [ "SELECT", "Name", "FROM", "country", "ORDER", "BY", "Population", "ASC", "LIMIT", "3" ], "query_toks_no_value": [ "select", "name", "from", "country", "order", "by", "population", "asc", "limit", "value" ], "question": "What are the names of the nations with the 3 lowest populations?", "question_toks": [ "What", "are", "the", "names", "of", "the", "nations", "with", "the", "3", "lowest", "populations", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", "query_toks": [ "SELECT", "Name", "FROM", "country", "ORDER", "BY", "Population", "ASC", "LIMIT", "3" ], "query_toks_no_value": [ "select", "name", "from", "country", "order", "by", "population", "asc", "limit", "value" ], "question": "Return the names of the 3 countries with the fewest people.", "question_toks": [ "Return", "the", "names", "of", "the", "3", "countries", "with", "the", "fewest", "people", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) FROM country WHERE continent = \"Asia\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "country", "WHERE", "continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "where", "continent", "=", "value" ], "question": "how many countries are in Asia?", "question_toks": [ "how", "many", "countries", "are", "in", "Asia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) FROM country WHERE continent = \"Asia\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "country", "WHERE", "continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "where", "continent", "=", "value" ], "question": "Count the number of countries in Asia.", "question_toks": [ "Count", "the", "number", "of", "countries", "in", "Asia", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "continent", "=", "``", "Europe", "''", "AND", "Population", "=", "``", "80000", "''" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", "=", "value" ], "question": "What are the names of the countries that are in the continent of Europe and have a population of 80000?", "question_toks": [ "What", "are", "the", "names", "of", "the", "countries", "that", "are", "in", "the", "continent", "of", "Europe", "and", "have", "a", "population", "of", "80000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ], "and", [ false, 2, [ 0, [ 0, 14, false ], null ], "\"80000\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "continent", "=", "``", "Europe", "''", "AND", "Population", "=", "``", "80000", "''" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", "=", "value" ], "question": "Give the names of countries that are in Europe and have a population equal to 80000.", "question_toks": [ "Give", "the", "names", "of", "countries", "that", "are", "in", "Europe", "and", "have", "a", "population", "equal", "to", "80000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ], "and", [ false, 2, [ 0, [ 0, 14, false ], null ], "\"80000\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "select sum(population) , avg(surfacearea) from country where continent = \"north america\" and surfacearea > 3000", "query_toks": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "\"north america\"", "and", "surfacearea", ">", "3000" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "and", "surfacearea", ">", "value" ], "question": "What is the total population and average area of countries in the continent of North America whose area is bigger than 3000 ?", "question_toks": [ "What", "is", "the", "total", "population", "and", "average", "area", "of", "countries", "in", "the", "continent", "of", "North", "America", "whose", "area", "is", "bigger", "than", "3000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 5, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"north america\"", null ], "and", [ false, 3, [ 0, [ 0, 12, false ], null ], 3000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "select sum(population) , avg(surfacearea) from country where continent = \"north america\" and surfacearea > 3000", "query_toks": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "\"north america\"", "and", "surfacearea", ">", "3000" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "and", "surfacearea", ">", "value" ], "question": "Give the total population and average surface area corresponding to countries in North America that have a surface area greater than 3000 .", "question_toks": [ "Give", "the", "total", "population", "and", "average", "surface", "area", "corresponding", "to", "countries", "in", "North", "America", "that", "have", "a", "surface", "area", "greater", "than", "3000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 5, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"north america\"", null ], "and", [ false, 3, [ 0, [ 0, 12, false ], null ], 3000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT name FROM city WHERE Population BETWEEN 160000 AND 900000", "query_toks": [ "SELECT", "name", "FROM", "city", "WHERE", "Population", "BETWEEN", "160000", "AND", "900000" ], "query_toks_no_value": [ "select", "name", "from", "city", "where", "population", "between", "value", "and", "value" ], "question": "What are the cities whose population is between 160000 and 900000?", "question_toks": [ "What", "are", "the", "cities", "whose", "population", "is", "between", "160000", "and", "900000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 5, false ], null ], 160000.0, 900000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "select name from city where population between 160000 and 900000", "query_toks": [ "select", "name", "from", "city", "where", "population", "between", "160000", "and", "900000" ], "query_toks_no_value": [ "select", "name", "from", "city", "where", "population", "between", "value", "and", "value" ], "question": "Return the names of cities that have a population between 160000 and 900000 .", "question_toks": [ "Return", "the", "names", "of", "cities", "that", "have", "a", "population", "between", "160000", "and", "900000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 5, false ], null ], 160000.0, 900000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "LANGUAGE", "FROM", "countrylanguage", "GROUP", "BY", "LANGUAGE", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "language", "from", "countrylanguage", "group", "by", "language", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which language is spoken by the largest number of countries?", "question_toks": [ "Which", "language", "is", "spoken", "by", "the", "largest", "number", "of", "countries", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 24, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "LANGUAGE", "FROM", "countrylanguage", "GROUP", "BY", "LANGUAGE", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "language", "from", "countrylanguage", "group", "by", "language", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Give the language that is spoken in the most countries.", "question_toks": [ "Give", "the", "language", "that", "is", "spoken", "in", "the", "most", "countries", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 24, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode", "query_toks": [ "SELECT", "LANGUAGE", ",", "CountryCode", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "language", ",", "countrycode", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "group", "by", "countrycode" ], "question": "What is the language spoken by the largest percentage of people in each country?", "question_toks": [ "What", "is", "the", "language", "spoken", "by", "the", "largest", "percentage", "of", "people", "in", "each", "country", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode", "query_toks": [ "SELECT", "LANGUAGE", ",", "CountryCode", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "language", ",", "countrycode", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "group", "by", "countrycode" ], "question": "What are the country codes of the different countries, and what are the languages spoken by the greatest percentage of people for each?", "question_toks": [ "What", "are", "the", "country", "codes", "of", "the", "different", "countries", ",", "and", "what", "are", "the", "languages", "spoken", "by", "the", "greatest", "percentage", "of", "people", "for", "each", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "Spanish", "''", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "where", "language", "=", "value", "group", "by", "countrycode" ], "question": "What is the total number of countries where Spanish is spoken by the largest percentage of people?", "question_toks": [ "What", "is", "the", "total", "number", "of", "countries", "where", "Spanish", "is", "spoken", "by", "the", "largest", "percentage", "of", "people", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Spanish\"", null ] ], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "Spanish", "''", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "where", "language", "=", "value", "group", "by", "countrycode" ], "question": "Count the number of countries for which Spanish is the predominantly spoken language.", "question_toks": [ "Count", "the", "number", "of", "countries", "for", "which", "Spanish", "is", "the", "predominantly", "spoken", "language", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Spanish\"", null ] ], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "query_toks": [ "SELECT", "CountryCode", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "Spanish", "''", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "countrycode", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "where", "language", "=", "value", "group", "by", "countrycode" ], "question": "What are the codes of countries where Spanish is spoken by the largest percentage of people?", "question_toks": [ "What", "are", "the", "codes", "of", "countries", "where", "Spanish", "is", "spoken", "by", "the", "largest", "percentage", "of", "people", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Spanish\"", null ] ], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "query_toks": [ "SELECT", "CountryCode", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "Spanish", "''", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "countrycode", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "where", "language", "=", "value", "group", "by", "countrycode" ], "question": "Return the codes of countries for which Spanish is the predominantly spoken language.", "question_toks": [ "Return", "the", "codes", "of", "countries", "for", "which", "Spanish", "is", "the", "predominantly", "spoken", "language", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Spanish\"", null ] ], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT count(*) FROM conductor", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "conductor" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "conductor" ], "question": "How many conductors are there?", "question_toks": [ "How", "many", "conductors", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT count(*) FROM conductor", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "conductor" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "conductor" ], "question": "Count the number of conductors.", "question_toks": [ "Count", "the", "number", "of", "conductors", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Age ASC", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Age", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "age", "asc" ], "question": "List the names of conductors in ascending order of age.", "question_toks": [ "List", "the", "names", "of", "conductors", "in", "ascending", "order", "of", "age", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Age ASC", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Age", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "age", "asc" ], "question": "What are the names of conductors, ordered by age?", "question_toks": [ "What", "are", "the", "names", "of", "conductors", ",", "ordered", "by", "age", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor WHERE Nationality != 'USA'", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "WHERE", "Nationality", "!", "=", "'USA", "'" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "where", "nationality", "!", "=", "value" ], "question": "What are the names of conductors whose nationalities are not \"USA\"?", "question_toks": [ "What", "are", "the", "names", "of", "conductors", "whose", "nationalities", "are", "not", "``", "USA", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor WHERE Nationality != 'USA'", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "WHERE", "Nationality", "!", "=", "'USA", "'" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "where", "nationality", "!", "=", "value" ], "question": "Return the names of conductors that do not have the nationality \"USA\".", "question_toks": [ "Return", "the", "names", "of", "conductors", "that", "do", "not", "have", "the", "nationality", "``", "USA", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "ORDER", "BY", "Year_of_Founded", "DESC" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "order", "by", "year_of_founded", "desc" ], "question": "What are the record companies of orchestras in descending order of years in which they were founded?", "question_toks": [ "What", "are", "the", "record", "companies", "of", "orchestras", "in", "descending", "order", "of", "years", "in", "which", "they", "were", "founded", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 10, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "ORDER", "BY", "Year_of_Founded", "DESC" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "order", "by", "year_of_founded", "desc" ], "question": "Return the record companies of orchestras, sorted descending by the years in which they were founded.", "question_toks": [ "Return", "the", "record", "companies", "of", "orchestras", ",", "sorted", "descending", "by", "the", "years", "in", "which", "they", "were", "founded", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 10, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT avg(Attendance) FROM SHOW", "query_toks": [ "SELECT", "avg", "(", "Attendance", ")", "FROM", "SHOW" ], "query_toks_no_value": [ "select", "avg", "(", "attendance", ")", "from", "show" ], "question": "What is the average attendance of shows?", "question_toks": [ "What", "is", "the", "average", "attendance", "of", "shows", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT avg(Attendance) FROM SHOW", "query_toks": [ "SELECT", "avg", "(", "Attendance", ")", "FROM", "SHOW" ], "query_toks_no_value": [ "select", "avg", "(", "attendance", ")", "from", "show" ], "question": "Return the average attendance across all shows.", "question_toks": [ "Return", "the", "average", "attendance", "across", "all", "shows", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"", "query_toks": [ "SELECT", "max", "(", "SHARE", ")", ",", "min", "(", "SHARE", ")", "FROM", "performance", "WHERE", "TYPE", "!", "=", "``", "Live", "final", "''" ], "query_toks_no_value": [ "select", "max", "(", "share", ")", ",", "min", "(", "share", ")", "from", "performance", "where", "type", "!", "=", "value" ], "question": "What are the maximum and minimum share of performances whose type is not \"Live final\".", "question_toks": [ "What", "are", "the", "maximum", "and", "minimum", "share", "of", "performances", "whose", "type", "is", "not", "``", "Live", "final", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 18, false ], null ] ], [ 2, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 14, false ], null ], "\"Live final\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"", "query_toks": [ "SELECT", "max", "(", "SHARE", ")", ",", "min", "(", "SHARE", ")", "FROM", "performance", "WHERE", "TYPE", "!", "=", "``", "Live", "final", "''" ], "query_toks_no_value": [ "select", "max", "(", "share", ")", ",", "min", "(", "share", ")", "from", "performance", "where", "type", "!", "=", "value" ], "question": "Return the maximum and minimum shares for performances that do not have the type \"Live final\".", "question_toks": [ "Return", "the", "maximum", "and", "minimum", "shares", "for", "performances", "that", "do", "not", "have", "the", "type", "``", "Live", "final", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 18, false ], null ] ], [ 2, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 14, false ], null ], "\"Live final\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT count(DISTINCT Nationality) FROM conductor", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "Nationality", ")", "FROM", "conductor" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "nationality", ")", "from", "conductor" ], "question": "How many different nationalities do conductors have?", "question_toks": [ "How", "many", "different", "nationalities", "do", "conductors", "have", "?" ], "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": "orchestra", "query": "SELECT count(DISTINCT Nationality) FROM conductor", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "Nationality", ")", "FROM", "conductor" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "nationality", ")", "from", "conductor" ], "question": "Count the number of different nationalities of conductors.", "question_toks": [ "Count", "the", "number", "of", "different", "nationalities", "of", "conductors", "." ], "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": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Year_of_Work", "DESC" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "year_of_work", "desc" ], "question": "List names of conductors in descending order of years of work.", "question_toks": [ "List", "names", "of", "conductors", "in", "descending", "order", "of", "years", "of", "work", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Year_of_Work", "DESC" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "year_of_work", "desc" ], "question": "What are the names of conductors, sorted descending by the number of years they have worked?", "question_toks": [ "What", "are", "the", "names", "of", "conductors", ",", "sorted", "descending", "by", "the", "number", "of", "years", "they", "have", "worked", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Year_of_Work", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "year_of_work", "desc", "limit", "value" ], "question": "List the name of the conductor with the most years of work.", "question_toks": [ "List", "the", "name", "of", "the", "conductor", "with", "the", "most", "years", "of", "work", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Year_of_Work", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "year_of_work", "desc", "limit", "value" ], "question": "What is the name of the conductor who has worked the greatest number of years?", "question_toks": [ "What", "is", "the", "name", "of", "the", "conductor", "who", "has", "worked", "the", "greatest", "number", "of", "years", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "query_toks": [ "SELECT", "T1.Name", ",", "T2.Orchestra", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t2", ".", "orchestra", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id" ], "question": "Show the names of conductors and the orchestras they have conducted.", "question_toks": [ "Show", "the", "names", "of", "conductors", "and", "the", "orchestras", "they", "have", "conducted", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "query_toks": [ "SELECT", "T1.Name", ",", "T2.Orchestra", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t2", ".", "orchestra", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id" ], "question": "What are the names of conductors as well as the corresonding orchestras that they have conducted?", "question_toks": [ "What", "are", "the", "names", "of", "conductors", "as", "well", "as", "the", "corresonding", "orchestras", "that", "they", "have", "conducted", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "GROUP", "BY", "T2.Conductor_ID", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "group", "by", "t2", ".", "conductor_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Show the names of conductors that have conducted more than one orchestras.", "question_toks": [ "Show", "the", "names", "of", "conductors", "that", "have", "conducted", "more", "than", "one", "orchestras", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "GROUP", "BY", "T2.Conductor_ID", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "group", "by", "t2", ".", "conductor_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are the names of conductors who have conducted at more than one orchestra?", "question_toks": [ "What", "are", "the", "names", "of", "conductors", "who", "have", "conducted", "at", "more", "than", "one", "orchestra", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "GROUP", "BY", "T2.Conductor_ID", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "group", "by", "t2", ".", "conductor_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Show the name of the conductor that has conducted the most number of orchestras.", "question_toks": [ "Show", "the", "name", "of", "the", "conductor", "that", "has", "conducted", "the", "most", "number", "of", "orchestras", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "GROUP", "BY", "T2.Conductor_ID", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "group", "by", "t2", ".", "conductor_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name of the conductor who has conducted the most orchestras?", "question_toks": [ "What", "is", "the", "name", "of", "the", "conductor", "who", "has", "conducted", "the", "most", "orchestras", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "WHERE", "Year_of_Founded", ">", "2008" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "where", "year_of_founded", ">", "value" ], "question": "Please show the name of the conductor that has conducted orchestras founded after 2008.", "question_toks": [ "Please", "show", "the", "name", "of", "the", "conductor", "that", "has", "conducted", "orchestras", "founded", "after", "2008", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 10, false ], null ], 2008.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "WHERE", "Year_of_Founded", ">", "2008" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "where", "year_of_founded", ">", "value" ], "question": "What are the names of conductors who have conducted orchestras founded after the year 2008?", "question_toks": [ "What", "are", "the", "names", "of", "conductors", "who", "have", "conducted", "orchestras", "founded", "after", "the", "year", "2008", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 10, false ], null ], 2008.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", "query_toks": [ "SELECT", "Record_Company", ",", "COUNT", "(", "*", ")", "FROM", "orchestra", "GROUP", "BY", "Record_Company" ], "query_toks_no_value": [ "select", "record_company", ",", "count", "(", "*", ")", "from", "orchestra", "group", "by", "record_company" ], "question": "Please show the different record companies and the corresponding number of orchestras.", "question_toks": [ "Please", "show", "the", "different", "record", "companies", "and", "the", "corresponding", "number", "of", "orchestras", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", "query_toks": [ "SELECT", "Record_Company", ",", "COUNT", "(", "*", ")", "FROM", "orchestra", "GROUP", "BY", "Record_Company" ], "query_toks_no_value": [ "select", "record_company", ",", "count", "(", "*", ")", "from", "orchestra", "group", "by", "record_company" ], "question": "How many orchestras does each record company manage?", "question_toks": [ "How", "many", "orchestras", "does", "each", "record", "company", "manage", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "query_toks": [ "SELECT", "Major_Record_Format", "FROM", "orchestra", "GROUP", "BY", "Major_Record_Format", "ORDER", "BY", "COUNT", "(", "*", ")", "ASC" ], "query_toks_no_value": [ "select", "major_record_format", "from", "orchestra", "group", "by", "major_record_format", "order", "by", "count", "(", "*", ")", "asc" ], "question": "Please show the record formats of orchestras in ascending order of count.", "question_toks": [ "Please", "show", "the", "record", "formats", "of", "orchestras", "in", "ascending", "order", "of", "count", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "query_toks": [ "SELECT", "Major_Record_Format", "FROM", "orchestra", "GROUP", "BY", "Major_Record_Format", "ORDER", "BY", "COUNT", "(", "*", ")", "ASC" ], "query_toks_no_value": [ "select", "major_record_format", "from", "orchestra", "group", "by", "major_record_format", "order", "by", "count", "(", "*", ")", "asc" ], "question": "What are the major record formats of orchestras, sorted by their frequency?", "question_toks": [ "What", "are", "the", "major", "record", "formats", "of", "orchestras", ",", "sorted", "by", "their", "frequency", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "GROUP", "BY", "Record_Company", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "group", "by", "record_company", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "List the record company shared by the most number of orchestras.", "question_toks": [ "List", "the", "record", "company", "shared", "by", "the", "most", "number", "of", "orchestras", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "GROUP", "BY", "Record_Company", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "group", "by", "record_company", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the record company used by the greatest number of orchestras?", "question_toks": [ "What", "is", "the", "record", "company", "used", "by", "the", "greatest", "number", "of", "orchestras", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)", "query_toks": [ "SELECT", "Orchestra", "FROM", "orchestra", "WHERE", "Orchestra_ID", "NOT", "IN", "(", "SELECT", "Orchestra_ID", "FROM", "performance", ")" ], "query_toks_no_value": [ "select", "orchestra", "from", "orchestra", "where", "orchestra_id", "not", "in", "(", "select", "orchestra_id", "from", "performance", ")" ], "question": "List the names of orchestras that have no performance.", "question_toks": [ "List", "the", "names", "of", "orchestras", "that", "have", "no", "performance", "." ], "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", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, 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": "orchestra", "query": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)", "query_toks": [ "SELECT", "Orchestra", "FROM", "orchestra", "WHERE", "Orchestra_ID", "NOT", "IN", "(", "SELECT", "Orchestra_ID", "FROM", "performance", ")" ], "query_toks_no_value": [ "select", "orchestra", "from", "orchestra", "where", "orchestra_id", "not", "in", "(", "select", "orchestra_id", "from", "performance", ")" ], "question": "What are the orchestras that do not have any performances?", "question_toks": [ "What", "are", "the", "orchestras", "that", "do", "not", "have", "any", "performances", "?" ], "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", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, 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": "orchestra", "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "WHERE", "Year_of_Founded", "<", "2003", "INTERSECT", "SELECT", "Record_Company", "FROM", "orchestra", "WHERE", "Year_of_Founded", ">", "2003" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "where", "year_of_founded", "<", "value", "intersect", "select", "record_company", "from", "orchestra", "where", "year_of_founded", ">", "value" ], "question": "Show the record companies shared by orchestras founded before 2003 and after 2003.", "question_toks": [ "Show", "the", "record", "companies", "shared", "by", "orchestras", "founded", "before", "2003", "and", "after", "2003", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 10, false ], null ], 2003.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 10, false ], null ], 2003.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "WHERE", "Year_of_Founded", "<", "2003", "INTERSECT", "SELECT", "Record_Company", "FROM", "orchestra", "WHERE", "Year_of_Founded", ">", "2003" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "where", "year_of_founded", "<", "value", "intersect", "select", "record_company", "from", "orchestra", "where", "year_of_founded", ">", "value" ], "question": "What are the record companies that are used by both orchestras founded before 2003 and those founded after 2003?", "question_toks": [ "What", "are", "the", "record", "companies", "that", "are", "used", "by", "both", "orchestras", "founded", "before", "2003", "and", "those", "founded", "after", "2003", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 10, false ], null ], 2003.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 10, false ], null ], 2003.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "orchestra", "WHERE", "Major_Record_Format", "=", "``", "CD", "''", "OR", "Major_Record_Format", "=", "``", "DVD", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "orchestra", "where", "major_record_format", "=", "value", "or", "major_record_format", "=", "value" ], "question": "Find the number of orchestras whose record format is \"CD\" or \"DVD\".", "question_toks": [ "Find", "the", "number", "of", "orchestras", "whose", "record", "format", "is", "``", "CD", "''", "or", "``", "DVD", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"CD\"", null ], "or", [ false, 2, [ 0, [ 0, 11, false ], null ], "\"DVD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "orchestra", "WHERE", "Major_Record_Format", "=", "``", "CD", "''", "OR", "Major_Record_Format", "=", "``", "DVD", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "orchestra", "where", "major_record_format", "=", "value", "or", "major_record_format", "=", "value" ], "question": "Count the number of orchestras that have CD or DVD as their record format.", "question_toks": [ "Count", "the", "number", "of", "orchestras", "that", "have", "CD", "or", "DVD", "as", "their", "record", "format", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"CD\"", null ], "or", [ false, 2, [ 0, [ 0, 11, false ], null ], "\"DVD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "Year_of_Founded", "FROM", "orchestra", "AS", "T1", "JOIN", "performance", "AS", "T2", "ON", "T1.Orchestra_ID", "=", "T2.Orchestra_ID", "GROUP", "BY", "T2.Orchestra_ID", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "year_of_founded", "from", "orchestra", "as", "t1", "join", "performance", "as", "t2", "on", "t1", ".", "orchestra_id", "=", "t2", ".", "orchestra_id", "group", "by", "t2", ".", "orchestra_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Show the years in which orchestras that have given more than one performance are founded.", "question_toks": [ "Show", "the", "years", "in", "which", "orchestras", "that", "have", "given", "more", "than", "one", "performance", "are", "founded", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 13, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "Year_of_Founded", "FROM", "orchestra", "AS", "T1", "JOIN", "performance", "AS", "T2", "ON", "T1.Orchestra_ID", "=", "T2.Orchestra_ID", "GROUP", "BY", "T2.Orchestra_ID", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "year_of_founded", "from", "orchestra", "as", "t1", "join", "performance", "as", "t2", "on", "t1", ".", "orchestra_id", "=", "t2", ".", "orchestra_id", "group", "by", "t2", ".", "orchestra_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are years of founding for orchestras that have had more than a single performance?", "question_toks": [ "What", "are", "years", "of", "founding", "for", "orchestras", "that", "have", "had", "more", "than", "a", "single", "performance", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 13, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Highschooler", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "highschooler" ], "question": "How many high schoolers are there?", "question_toks": [ "How", "many", "high", "schoolers", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Highschooler", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "highschooler" ], "question": "Count the number of high schoolers.", "question_toks": [ "Count", "the", "number", "of", "high", "schoolers", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT name , grade FROM Highschooler", "query_toks": [ "SELECT", "name", ",", "grade", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "name", ",", "grade", "from", "highschooler" ], "question": "Show the names and grades of each high schooler.", "question_toks": [ "Show", "the", "names", "and", "grades", "of", "each", "high", "schooler", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT name , grade FROM Highschooler", "query_toks": [ "SELECT", "name", ",", "grade", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "name", ",", "grade", "from", "highschooler" ], "question": "What are the names and grades for each high schooler?", "question_toks": [ "What", "are", "the", "names", "and", "grades", "for", "each", "high", "schooler", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler" ], "question": "Show all the grades of the high schoolers.", "question_toks": [ "Show", "all", "the", "grades", "of", "the", "high", "schoolers", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler" ], "question": "What is the grade of each high schooler?", "question_toks": [ "What", "is", "the", "grade", "of", "each", "high", "schooler", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler WHERE name = \"Kyle\"", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "WHERE", "name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "where", "name", "=", "value" ], "question": "What grade is Kyle in?", "question_toks": [ "What", "grade", "is", "Kyle", "in", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler WHERE name = \"Kyle\"", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "WHERE", "name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "where", "name", "=", "value" ], "question": "Return the grade for the high schooler named Kyle.", "question_toks": [ "Return", "the", "grade", "for", "the", "high", "schooler", "named", "Kyle", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT name FROM Highschooler WHERE grade = 10", "query_toks": [ "SELECT", "name", "FROM", "Highschooler", "WHERE", "grade", "=", "10" ], "query_toks_no_value": [ "select", "name", "from", "highschooler", "where", "grade", "=", "value" ], "question": "Show the names of all high schoolers in grade 10.", "question_toks": [ "Show", "the", "names", "of", "all", "high", "schoolers", "in", "grade", "10", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT name FROM Highschooler WHERE grade = 10", "query_toks": [ "SELECT", "name", "FROM", "Highschooler", "WHERE", "grade", "=", "10" ], "query_toks_no_value": [ "select", "name", "from", "highschooler", "where", "grade", "=", "value" ], "question": "What are the names of all high schoolers in grade 10?", "question_toks": [ "What", "are", "the", "names", "of", "all", "high", "schoolers", "in", "grade", "10", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"", "query_toks": [ "SELECT", "ID", "FROM", "Highschooler", "WHERE", "name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "id", "from", "highschooler", "where", "name", "=", "value" ], "question": "Show the ID of the high schooler named Kyle.", "question_toks": [ "Show", "the", "ID", "of", "the", "high", "schooler", "named", "Kyle", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"", "query_toks": [ "SELECT", "ID", "FROM", "Highschooler", "WHERE", "name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "id", "from", "highschooler", "where", "name", "=", "value" ], "question": "What is Kyle's id?", "question_toks": [ "What", "is", "Kyle", "'s", "id", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Highschooler", "WHERE", "grade", "=", "9", "OR", "grade", "=", "10" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "highschooler", "where", "grade", "=", "value", "or", "grade", "=", "value" ], "question": "How many high schoolers are there in grade 9 or 10?", "question_toks": [ "How", "many", "high", "schoolers", "are", "there", "in", "grade", "9", "or", "10", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 9.0, null ], "or", [ false, 2, [ 0, [ 0, 3, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Highschooler", "WHERE", "grade", "=", "9", "OR", "grade", "=", "10" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "highschooler", "where", "grade", "=", "value", "or", "grade", "=", "value" ], "question": "Count the number of high schoolers in grades 9 or 10.", "question_toks": [ "Count", "the", "number", "of", "high", "schoolers", "in", "grades", "9", "or", "10", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 9.0, null ], "or", [ false, 2, [ 0, [ 0, 3, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade , count(*) FROM Highschooler GROUP BY grade", "query_toks": [ "SELECT", "grade", ",", "count", "(", "*", ")", "FROM", "Highschooler", "GROUP", "BY", "grade" ], "query_toks_no_value": [ "select", "grade", ",", "count", "(", "*", ")", "from", "highschooler", "group", "by", "grade" ], "question": "Show the number of high schoolers for each grade.", "question_toks": [ "Show", "the", "number", "of", "high", "schoolers", "for", "each", "grade", "." ], "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": "network_1", "query": "SELECT grade , count(*) FROM Highschooler GROUP BY grade", "query_toks": [ "SELECT", "grade", ",", "count", "(", "*", ")", "FROM", "Highschooler", "GROUP", "BY", "grade" ], "query_toks_no_value": [ "select", "grade", ",", "count", "(", "*", ")", "from", "highschooler", "group", "by", "grade" ], "question": "How many high schoolers are in each grade?", "question_toks": [ "How", "many", "high", "schoolers", "are", "in", "each", "grade", "?" ], "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": "network_1", "query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "GROUP", "BY", "grade", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "group", "by", "grade", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which grade has the most high schoolers?", "question_toks": [ "Which", "grade", "has", "the", "most", "high", "schoolers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "GROUP", "BY", "grade", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "group", "by", "grade", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Return the grade that has the greatest number of high schoolers.", "question_toks": [ "Return", "the", "grade", "that", "has", "the", "greatest", "number", "of", "high", "schoolers", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "GROUP", "BY", "grade", "HAVING", "count", "(", "*", ")", ">", "=", "4" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "group", "by", "grade", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Show me all grades that have at least 4 students.", "question_toks": [ "Show", "me", "all", "grades", "that", "have", "at", "least", "4", "students", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 4.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "GROUP", "BY", "grade", "HAVING", "count", "(", "*", ")", ">", "=", "4" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "group", "by", "grade", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Which grades have 4 or more high schoolers?", "question_toks": [ "Which", "grades", "have", "4", "or", "more", "high", "schoolers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 4.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id , count(*) FROM Friend GROUP BY student_id", "query_toks": [ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Friend", "GROUP", "BY", "student_id" ], "query_toks_no_value": [ "select", "student_id", ",", "count", "(", "*", ")", "from", "friend", "group", "by", "student_id" ], "question": "Show the student IDs and numbers of friends corresponding to each.", "question_toks": [ "Show", "the", "student", "IDs", "and", "numbers", "of", "friends", "corresponding", "to", "each", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id , count(*) FROM Friend GROUP BY student_id", "query_toks": [ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Friend", "GROUP", "BY", "student_id" ], "query_toks_no_value": [ "select", "student_id", ",", "count", "(", "*", ")", "from", "friend", "group", "by", "student_id" ], "question": "How many friends does each student have?", "question_toks": [ "How", "many", "friends", "does", "each", "student", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ], "question": "Show the names of high school students and their corresponding number of friends.", "question_toks": [ "Show", "the", "names", "of", "high", "school", "students", "and", "their", "corresponding", "number", "of", "friends", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ], "question": "What are the names of the high schoolers and how many friends does each have?", "question_toks": [ "What", "are", "the", "names", "of", "the", "high", "schoolers", "and", "how", "many", "friends", "does", "each", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name of the high schooler who has the greatest number of friends?", "question_toks": [ "What", "is", "the", "name", "of", "the", "high", "schooler", "who", "has", "the", "greatest", "number", "of", "friends", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, 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": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Return the name of the high school student with the most friends.", "question_toks": [ "Return", "the", "name", "of", "the", "high", "school", "student", "with", "the", "most", "friends", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, 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": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "3" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Show the names of high schoolers who have at least 3 friends.", "question_toks": [ "Show", "the", "names", "of", "high", "schoolers", "who", "have", "at", "least", "3", "friends", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "3" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the names of high schoolers who have 3 or more friends?", "question_toks": [ "What", "are", "the", "names", "of", "high", "schoolers", "who", "have", "3", "or", "more", "friends", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "T3.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "JOIN", "Highschooler", "AS", "T3", "ON", "T1.friend_id", "=", "T3.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "t3", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "join", "highschooler", "as", "t3", "on", "t1", ".", "friend_id", "=", "t3", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Show the names of all of the high schooler Kyle's friends.", "question_toks": [ "Show", "the", "names", "of", "all", "of", "the", "high", "schooler", "Kyle", "'s", "friends", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "T3.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "JOIN", "Highschooler", "AS", "T3", "ON", "T1.friend_id", "=", "T3.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "t3", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "join", "highschooler", "as", "t3", "on", "t1", ".", "friend_id", "=", "t3", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Return the names of friends of the high school student Kyle.", "question_toks": [ "Return", "the", "names", "of", "friends", "of", "the", "high", "school", "student", "Kyle", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "How many friends does the high school student Kyle have?", "question_toks": [ "How", "many", "friends", "does", "the", "high", "school", "student", "Kyle", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Count the number of friends Kyle has.", "question_toks": [ "Count", "the", "number", "of", "friends", "Kyle", "has", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", "query_toks": [ "SELECT", "id", "FROM", "Highschooler", "EXCEPT", "SELECT", "student_id", "FROM", "Friend" ], "query_toks_no_value": [ "select", "id", "from", "highschooler", "except", "select", "student_id", "from", "friend" ], "question": "Show ids of all students who do not have any friends.", "question_toks": [ "Show", "ids", "of", "all", "students", "who", "do", "not", "have", "any", "friends", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "network_1", "query": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", "query_toks": [ "SELECT", "id", "FROM", "Highschooler", "EXCEPT", "SELECT", "student_id", "FROM", "Friend" ], "query_toks_no_value": [ "select", "id", "from", "highschooler", "except", "select", "student_id", "from", "friend" ], "question": "What are the ids of high school students who do not have friends?", "question_toks": [ "What", "are", "the", "ids", "of", "high", "school", "students", "who", "do", "not", "have", "friends", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "network_1", "query": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", "query_toks": [ "SELECT", "name", "FROM", "Highschooler", "EXCEPT", "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id" ], "query_toks_no_value": [ "select", "name", "from", "highschooler", "except", "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id" ], "question": "Show names of all high school students who do not have any friends.", "question_toks": [ "Show", "names", "of", "all", "high", "school", "students", "who", "do", "not", "have", "any", "friends", "." ], "sql": { "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": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "network_1", "query": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", "query_toks": [ "SELECT", "name", "FROM", "Highschooler", "EXCEPT", "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id" ], "query_toks_no_value": [ "select", "name", "from", "highschooler", "except", "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id" ], "question": "What are the names of students who have no friends?", "question_toks": [ "What", "are", "the", "names", "of", "students", "who", "have", "no", "friends", "?" ], "sql": { "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": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "network_1", "query": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", "query_toks": [ "SELECT", "student_id", "FROM", "Friend", "INTERSECT", "SELECT", "liked_id", "FROM", "Likes" ], "query_toks_no_value": [ "select", "student_id", "from", "friend", "intersect", "select", "liked_id", "from", "likes" ], "question": "Show the ids of high schoolers who have friends and are also liked by someone else.", "question_toks": [ "Show", "the", "ids", "of", "high", "schoolers", "who", "have", "friends", "and", "are", "also", "liked", "by", "someone", "else", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", "query_toks": [ "SELECT", "student_id", "FROM", "Friend", "INTERSECT", "SELECT", "liked_id", "FROM", "Likes" ], "query_toks_no_value": [ "select", "student_id", "from", "friend", "intersect", "select", "liked_id", "from", "likes" ], "question": "What are the ids of students who both have friends and are liked?", "question_toks": [ "What", "are", "the", "ids", "of", "students", "who", "both", "have", "friends", "and", "are", "liked", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "INTERSECT", "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.liked_id", "=", "T2.id" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "intersect", "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "liked_id", "=", "t2", ".", "id" ], "question": "Show name of all students who have some friends and also are liked by someone else.", "question_toks": [ "Show", "name", "of", "all", "students", "who", "have", "some", "friends", "and", "also", "are", "liked", "by", "someone", "else", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "INTERSECT", "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.liked_id", "=", "T2.id" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "intersect", "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "liked_id", "=", "t2", ".", "id" ], "question": "What are the names of high schoolers who both have friends and are liked?", "question_toks": [ "What", "are", "the", "names", "of", "high", "schoolers", "who", "both", "have", "friends", "and", "are", "liked", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "query_toks": [ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Likes", "GROUP", "BY", "student_id" ], "query_toks_no_value": [ "select", "student_id", ",", "count", "(", "*", ")", "from", "likes", "group", "by", "student_id" ], "question": "Count the number of likes for each student id.", "question_toks": [ "Count", "the", "number", "of", "likes", "for", "each", "student", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "query_toks": [ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Likes", "GROUP", "BY", "student_id" ], "query_toks_no_value": [ "select", "student_id", ",", "count", "(", "*", ")", "from", "likes", "group", "by", "student_id" ], "question": "How many likes correspond to each student id?", "question_toks": [ "How", "many", "likes", "correspond", "to", "each", "student", "id", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ], "question": "Show the names of high schoolers who have likes, and numbers of likes for each.", "question_toks": [ "Show", "the", "names", "of", "high", "schoolers", "who", "have", "likes", ",", "and", "numbers", "of", "likes", "for", "each", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ], "question": "What are the names of high schoolers who have likes, and how many likes does each have?", "question_toks": [ "What", "are", "the", "names", "of", "high", "schoolers", "who", "have", "likes", ",", "and", "how", "many", "likes", "does", "each", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name of the high schooler who has the greatest number of likes?", "question_toks": [ "What", "is", "the", "name", "of", "the", "high", "schooler", "who", "has", "the", "greatest", "number", "of", "likes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Give the name of the student with the most likes.", "question_toks": [ "Give", "the", "name", "of", "the", "student", "with", "the", "most", "likes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Show the names of students who have at least 2 likes.", "question_toks": [ "Show", "the", "names", "of", "students", "who", "have", "at", "least", "2", "likes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the names of students who have 2 or more likes?", "question_toks": [ "What", "are", "the", "names", "of", "students", "who", "have", "2", "or", "more", "likes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.grade", ">", "5", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "grade", ">", "value", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Show the names of students who have a grade higher than 5 and have at least 2 friends.", "question_toks": [ "Show", "the", "names", "of", "students", "who", "have", "a", "grade", "higher", "than", "5", "and", "have", "at", "least", "2", "friends", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], 5.0, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.grade", ">", "5", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "grade", ">", "value", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the names of high schoolers who have a grade of over 5 and have 2 or more friends?", "question_toks": [ "What", "are", "the", "names", "of", "high", "schoolers", "who", "have", "a", "grade", "of", "over", "5", "and", "have", "2", "or", "more", "friends", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], 5.0, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "How many likes does Kyle have?", "question_toks": [ "How", "many", "likes", "does", "Kyle", "have", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Return the number of likes that the high schooler named Kyle has.", "question_toks": [ "Return", "the", "number", "of", "likes", "that", "the", "high", "schooler", "named", "Kyle", "has", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "query_toks": [ "SELECT", "avg", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ], "query_toks_no_value": [ "select", "avg", "(", "grade", ")", "from", "highschooler", "where", "id", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ], "question": "Find the average grade of all students who have some friends.", "question_toks": [ "Find", "the", "average", "grade", "of", "all", "students", "who", "have", "some", "friends", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, 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": "network_1", "query": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "query_toks": [ "SELECT", "avg", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ], "query_toks_no_value": [ "select", "avg", "(", "grade", ")", "from", "highschooler", "where", "id", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ], "question": "What is the average grade of students who have friends?", "question_toks": [ "What", "is", "the", "average", "grade", "of", "students", "who", "have", "friends", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, 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": "network_1", "query": "SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "query_toks": [ "SELECT", "min", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "NOT", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ], "query_toks_no_value": [ "select", "min", "(", "grade", ")", "from", "highschooler", "where", "id", "not", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ], "question": "Find the minimum grade of students who have no friends.", "question_toks": [ "Find", "the", "minimum", "grade", "of", "students", "who", "have", "no", "friends", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, 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": "network_1", "query": "SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "query_toks": [ "SELECT", "min", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "NOT", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ], "query_toks_no_value": [ "select", "min", "(", "grade", ")", "from", "highschooler", "where", "id", "not", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ], "question": "What is the lowest grade of students who do not have any friends?", "question_toks": [ "What", "is", "the", "lowest", "grade", "of", "students", "who", "do", "not", "have", "any", "friends", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, 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": "dog_kennels", "query": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals", "query_toks": [ "SELECT", "state", "FROM", "Owners", "INTERSECT", "SELECT", "state", "FROM", "Professionals" ], "query_toks_no_value": [ "select", "state", "from", "owners", "intersect", "select", "state", "from", "professionals" ], "question": "Which states have both owners and professionals living there?", "question_toks": [ "Which", "states", "have", "both", "owners", "and", "professionals", "living", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals", "query_toks": [ "SELECT", "state", "FROM", "Owners", "INTERSECT", "SELECT", "state", "FROM", "Professionals" ], "query_toks_no_value": [ "select", "state", "from", "owners", "intersect", "select", "state", "from", "professionals" ], "question": "Find the states where both owners and professionals live.", "question_toks": [ "Find", "the", "states", "where", "both", "owners", "and", "professionals", "live", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", "WHERE", "dog_id", "IN", "(", "SELECT", "dog_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "dogs", "where", "dog_id", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "question": "What is the average age of the dogs who have gone through any treatments?", "question_toks": [ "What", "is", "the", "average", "age", "of", "the", "dogs", "who", "have", "gone", "through", "any", "treatments", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, 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": "dog_kennels", "query": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", "WHERE", "dog_id", "IN", "(", "SELECT", "dog_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "dogs", "where", "dog_id", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "question": "Find the average age of the dogs who went through treatments.", "question_toks": [ "Find", "the", "average", "age", "of", "the", "dogs", "who", "went", "through", "treatments", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, 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": "dog_kennels", "query": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "query_toks": [ "SELECT", "professional_id", ",", "last_name", ",", "cell_number", "FROM", "Professionals", "WHERE", "state", "=", "'Indiana", "'", "UNION", "SELECT", "T1.professional_id", ",", "T1.last_name", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "professional_id", ",", "last_name", ",", "cell_number", "from", "professionals", "where", "state", "=", "value", "union", "select", "t1", ".", "professional_id", ",", "t1", ".", "last_name", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.", "question_toks": [ "Which", "professionals", "live", "in", "the", "state", "of", "Indiana", "or", "have", "done", "treatment", "on", "more", "than", "2", "treatments", "?", "List", "his", "or", "her", "id", ",", "last", "name", "and", "cell", "phone", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Indiana\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "query_toks": [ "SELECT", "professional_id", ",", "last_name", ",", "cell_number", "FROM", "Professionals", "WHERE", "state", "=", "'Indiana", "'", "UNION", "SELECT", "T1.professional_id", ",", "T1.last_name", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "professional_id", ",", "last_name", ",", "cell_number", "from", "professionals", "where", "state", "=", "value", "union", "select", "t1", ".", "professional_id", ",", "t1", ".", "last_name", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments.", "question_toks": [ "Find", "the", "id", ",", "last", "name", "and", "cell", "phone", "of", "the", "professionals", "who", "live", "in", "the", "state", "of", "Indiana", "or", "have", "performed", "more", "than", "two", "treatments", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Indiana\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "dog_kennels", "query": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )", "query_toks": [ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "1000", ")" ], "query_toks_no_value": [ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "value", ")" ], "question": "Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .", "question_toks": [ "Which", "dogs", "have", "not", "cost", "their", "owner", "more", "than", "1000", "for", "treatment", "?", "List", "the", "dog", "names", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 45, false ] ], "having": [ [ false, 3, [ 0, [ 4, 49, false ], null ], 1000.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )", "query_toks": [ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "1000", ")" ], "query_toks_no_value": [ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "value", ")" ], "question": "What are the names of the dogs for which the owner has not spend more than 1000 for treatment ?", "question_toks": [ "What", "are", "the", "names", "of", "the", "dogs", "for", "which", "the", "owner", "has", "not", "spend", "more", "than", "1000", "for", "treatment", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 45, false ] ], "having": [ [ false, 3, [ 0, [ 4, 49, false ], null ], 1000.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", "query_toks": [ "SELECT", "first_name", "FROM", "Professionals", "UNION", "SELECT", "first_name", "FROM", "Owners", "EXCEPT", "SELECT", "name", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "first_name", "from", "professionals", "union", "select", "first_name", "from", "owners", "except", "select", "name", "from", "dogs" ], "question": "Which first names are used for professionals or owners but are not used as dog names?", "question_toks": [ "Which", "first", "names", "are", "used", "for", "professionals", "or", "owners", "but", "are", "not", "used", "as", "dog", "names", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", "query_toks": [ "SELECT", "first_name", "FROM", "Professionals", "UNION", "SELECT", "first_name", "FROM", "Owners", "EXCEPT", "SELECT", "name", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "first_name", "from", "professionals", "union", "select", "first_name", "from", "owners", "except", "select", "name", "from", "dogs" ], "question": "Find the first names that are used for professionals or owners but are not used as dog names.", "question_toks": [ "Find", "the", "first", "names", "that", "are", "used", "for", "professionals", "or", "owners", "but", "are", "not", "used", "as", "dog", "names", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", "query_toks": [ "SELECT", "professional_id", ",", "role_code", ",", "email_address", "FROM", "Professionals", "EXCEPT", "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.email_address", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ], "query_toks_no_value": [ "select", "professional_id", ",", "role_code", ",", "email_address", "from", "professionals", "except", "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "email_address", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ], "question": "Which professional did not operate any treatment on dogs? List the professional's id, role and email.", "question_toks": [ "Which", "professional", "did", "not", "operate", "any", "treatment", "on", "dogs", "?", "List", "the", "professional", "'s", "id", ",", "role", "and", "email", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "dog_kennels", "query": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", "query_toks": [ "SELECT", "professional_id", ",", "role_code", ",", "email_address", "FROM", "Professionals", "EXCEPT", "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.email_address", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ], "query_toks_no_value": [ "select", "professional_id", ",", "role_code", ",", "email_address", "from", "professionals", "except", "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "email_address", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ], "question": "Give me the id, role and email of the professionals who did not perform any treatment on dogs.", "question_toks": [ "Give", "me", "the", "id", ",", "role", "and", "email", "of", "the", "professionals", "who", "did", "not", "perform", "any", "treatment", "on", "dogs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T2.first_name", ",", "T2.last_name", "FROM", "Dogs", "AS", "T1", "JOIN", "Owners", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t2", ".", "first_name", ",", "t2", ".", "last_name", "from", "dogs", "as", "t1", "join", "owners", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "group", "by", "t1", ".", "owner_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which owner owns the most dogs? List the owner id, first name and last name.", "question_toks": [ "Which", "owner", "owns", "the", "most", "dogs", "?", "List", "the", "owner", "id", ",", "first", "name", "and", "last", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 21, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 21, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T2.first_name", ",", "T2.last_name", "FROM", "Dogs", "AS", "T1", "JOIN", "Owners", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t2", ".", "first_name", ",", "t2", ".", "last_name", "from", "dogs", "as", "t1", "join", "owners", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "group", "by", "t1", ".", "owner_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Return the owner id, first name and last name of the owner who has the most dogs.", "question_toks": [ "Return", "the", "owner", "id", ",", "first", "name", "and", "last", "name", "of", "the", "owner", "who", "has", "the", "most", "dogs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 21, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 21, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.first_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "first_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Which professionals have done at least two treatments? List the professional's id, role, and first name.", "question_toks": [ "Which", "professionals", "have", "done", "at", "least", "two", "treatments", "?", "List", "the", "professional", "'s", "id", ",", "role", ",", "and", "first", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.first_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "first_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "What are the id, role, and first name of the professionals who have performed two or more treatments?", "question_toks": [ "What", "are", "the", "id", ",", "role", ",", "and", "first", "name", "of", "the", "professionals", "who", "have", "performed", "two", "or", "more", "treatments", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.breed_name", "FROM", "Breeds", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.breed_code", "=", "T2.breed_code", "GROUP", "BY", "T1.breed_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "breed_name", "from", "breeds", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "breed_code", "=", "t2", ".", "breed_code", "group", "by", "t1", ".", "breed_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the name of the breed with the most dogs?", "question_toks": [ "What", "is", "the", "name", "of", "the", "breed", "with", "the", "most", "dogs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.breed_name", "FROM", "Breeds", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.breed_code", "=", "T2.breed_code", "GROUP", "BY", "T1.breed_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "breed_name", "from", "breeds", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "breed_code", "=", "t2", ".", "breed_code", "group", "by", "t1", ".", "breed_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which breed do the most dogs have? Give me the breed name.", "question_toks": [ "Which", "breed", "do", "the", "most", "dogs", "have", "?", "Give", "me", "the", "breed", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ".", "dog_id", "group", "by", "t1", ".", "owner_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.", "question_toks": [ "Which", "owner", "has", "paid", "for", "the", "most", "treatments", "on", "his", "or", "her", "dogs", "?", "List", "the", "owner", "id", "and", "last", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ".", "dog_id", "group", "by", "t1", ".", "owner_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs.", "question_toks": [ "Tell", "me", "the", "owner", "id", "and", "last", "name", "of", "the", "owner", "who", "spent", "the", "most", "on", "treatments", "of", "his", "or", "her", "dogs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "query_toks": [ "SELECT", "T1.treatment_type_description", "FROM", "Treatment_types", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code", "GROUP", "BY", "T1.treatment_type_code", "ORDER", "BY", "sum", "(", "cost_of_treatment", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "treatment_type_description", "from", "treatment_types", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code", "group", "by", "t1", ".", "treatment_type_code", "order", "by", "sum", "(", "cost_of_treatment", ")", "asc", "limit", "value" ], "question": "What is the description of the treatment type that costs the least money in total?", "question_toks": [ "What", "is", "the", "description", "of", "the", "treatment", "type", "that", "costs", "the", "least", "money", "in", "total", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 4, 49, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "query_toks": [ "SELECT", "T1.treatment_type_description", "FROM", "Treatment_types", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code", "GROUP", "BY", "T1.treatment_type_code", "ORDER", "BY", "sum", "(", "cost_of_treatment", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "treatment_type_description", "from", "treatment_types", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code", "group", "by", "t1", ".", "treatment_type_code", "order", "by", "sum", "(", "cost_of_treatment", ")", "asc", "limit", "value" ], "question": "Give me the description of the treatment type whose total cost is the lowest.", "question_toks": [ "Give", "me", "the", "description", "of", "the", "treatment", "type", "whose", "total", "cost", "is", "the", "lowest", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 4, 49, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T1.zip_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "sum", "(", "T3.cost_of_treatment", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t1", ".", "zip_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ".", "dog_id", "group", "by", "t1", ".", "owner_id", "order", "by", "sum", "(", "t3", ".", "cost_of_treatment", ")", "desc", "limit", "value" ], "question": "Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.", "question_toks": [ "Which", "owner", "has", "paid", "the", "largest", "amount", "of", "money", "in", "total", "for", "their", "dogs", "?", "Show", "the", "owner", "id", "and", "zip", "code", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 4, 49, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T1.zip_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "sum", "(", "T3.cost_of_treatment", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t1", ".", "zip_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ".", "dog_id", "group", "by", "t1", ".", "owner_id", "order", "by", "sum", "(", "t3", ".", "cost_of_treatment", ")", "desc", "limit", "value" ], "question": "Find the owner id and zip code of the owner who spent the most money in total for his or her dogs.", "question_toks": [ "Find", "the", "owner", "id", "and", "zip", "code", "of", "the", "owner", "who", "spent", "the", "most", "money", "in", "total", "for", "his", "or", "her", "dogs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 4, 49, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.professional_id", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "professional_id", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Which professionals have done at least two types of treatments? List the professional id and cell phone.", "question_toks": [ "Which", "professionals", "have", "done", "at", "least", "two", "types", "of", "treatments", "?", "List", "the", "professional", "id", "and", "cell", "phone", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.professional_id", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "professional_id", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Find the id and cell phone of the professionals who operate two or more types of treatments.", "question_toks": [ "Find", "the", "id", "and", "cell", "phone", "of", "the", "professionals", "who", "operate", "two", "or", "more", "types", "of", "treatments", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.last_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "WHERE", "cost_of_treatment", "<", "(", "SELECT", "avg", "(", "cost_of_treatment", ")", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "last_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "where", "cost_of_treatment", "<", "(", "select", "avg", "(", "cost_of_treatment", ")", "from", "treatments", ")" ], "question": "What are the first name and last name of the professionals who have done treatment with cost below average?", "question_toks": [ "What", "are", "the", "first", "name", "and", "last", "name", "of", "the", "professionals", "who", "have", "done", "treatment", "with", "cost", "below", "average", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 49, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 49, 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": "dog_kennels", "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.last_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "WHERE", "cost_of_treatment", "<", "(", "SELECT", "avg", "(", "cost_of_treatment", ")", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "last_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "where", "cost_of_treatment", "<", "(", "select", "avg", "(", "cost_of_treatment", ")", "from", "treatments", ")" ], "question": "Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names.", "question_toks": [ "Which", "professionals", "have", "operated", "a", "treatment", "that", "costs", "less", "than", "the", "average", "?", "Give", "me", "theor", "first", "names", "and", "last", "names", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 49, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 49, 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": "dog_kennels", "query": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id", "query_toks": [ "SELECT", "T1.date_of_treatment", ",", "T2.first_name", "FROM", "Treatments", "AS", "T1", "JOIN", "Professionals", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ], "query_toks_no_value": [ "select", "t1", ".", "date_of_treatment", ",", "t2", ".", "first_name", "from", "treatments", "as", "t1", "join", "professionals", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ], "question": "List the date of each treatment, together with the first name of the professional who operated it.", "question_toks": [ "List", "the", "date", "of", "each", "treatment", ",", "together", "with", "the", "first", "name", "of", "the", "professional", "who", "operated", "it", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ], [ "table_unit", 6 ] ], "conds": [ [ false, 2, [ 0, [ 0, 46, false ], null ], [ 0, 33, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 48, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id", "query_toks": [ "SELECT", "T1.date_of_treatment", ",", "T2.first_name", "FROM", "Treatments", "AS", "T1", "JOIN", "Professionals", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ], "query_toks_no_value": [ "select", "t1", ".", "date_of_treatment", ",", "t2", ".", "first_name", "from", "treatments", "as", "t1", "join", "professionals", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ], "question": "What are the date and the operating professional's first name of each treatment?", "question_toks": [ "What", "are", "the", "date", "and", "the", "operating", "professional", "'s", "first", "name", "of", "each", "treatment", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ], [ "table_unit", 6 ] ], "conds": [ [ false, 2, [ 0, [ 0, 46, false ], null ], [ 0, 33, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 48, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code", "query_toks": [ "SELECT", "T1.cost_of_treatment", ",", "T2.treatment_type_description", "FROM", "Treatments", "AS", "T1", "JOIN", "treatment_types", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code" ], "query_toks_no_value": [ "select", "t1", ".", "cost_of_treatment", ",", "t2", ".", "treatment_type_description", "from", "treatments", "as", "t1", "join", "treatment_types", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code" ], "question": "List the cost of each treatment and the corresponding treatment type description.", "question_toks": [ "List", "the", "cost", "of", "each", "treatment", "and", "the", "corresponding", "treatment", "type", "description", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 47, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 49, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code", "query_toks": [ "SELECT", "T1.cost_of_treatment", ",", "T2.treatment_type_description", "FROM", "Treatments", "AS", "T1", "JOIN", "treatment_types", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code" ], "query_toks_no_value": [ "select", "t1", ".", "cost_of_treatment", ",", "t2", ".", "treatment_type_description", "from", "treatments", "as", "t1", "join", "treatment_types", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code" ], "question": "What are the cost and treatment type description of each treatment?", "question_toks": [ "What", "are", "the", "cost", "and", "treatment", "type", "description", "of", "each", "treatment", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 47, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 49, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.last_name", ",", "T2.size_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "last_name", ",", "t2", ".", "size_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ], "question": "List each owner's first name, last name, and the size of his for her dog.", "question_toks": [ "List", "each", "owner", "'s", "first", "name", ",", "last", "name", ",", "and", "the", "size", "of", "his", "for", "her", "dog", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.last_name", ",", "T2.size_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "last_name", ",", "t2", ".", "size_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ], "question": "What are each owner's first name, last name, and the size of their dog?", "question_toks": [ "What", "are", "each", "owner", "'s", "first", "name", ",", "last", "name", ",", "and", "the", "size", "of", "their", "dog", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "query_toks": [ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ], "question": "List pairs of the owner's first name and the dogs's name.", "question_toks": [ "List", "pairs", "of", "the", "owner", "'s", "first", "name", "and", "the", "dogs", "'s", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "query_toks": [ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ], "question": "What are each owner's first name and their dogs's name?", "question_toks": [ "What", "are", "each", "owner", "'s", "first", "name", "and", "their", "dogs", "'s", "name", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "query_toks": [ "SELECT", "T1.name", ",", "T2.date_of_treatment", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id", "WHERE", "T1.breed_code", "=", "(", "SELECT", "breed_code", "FROM", "Dogs", "GROUP", "BY", "breed_code", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1", ")" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t2", ".", "date_of_treatment", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id", "where", "t1", ".", "breed_code", "=", "(", "select", "breed_code", "from", "dogs", "group", "by", "breed_code", "order", "by", "count", "(", "*", ")", "asc", "limit", "value", ")" ], "question": "List the names of the dogs of the rarest breed and the treatment dates of them.", "question_toks": [ "List", "the", "names", "of", "the", "dogs", "of", "the", "rarest", "breed", "and", "the", "treatment", "dates", "of", "them", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 48, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "query_toks": [ "SELECT", "T1.name", ",", "T2.date_of_treatment", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id", "WHERE", "T1.breed_code", "=", "(", "SELECT", "breed_code", "FROM", "Dogs", "GROUP", "BY", "breed_code", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1", ")" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t2", ".", "date_of_treatment", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id", "where", "t1", ".", "breed_code", "=", "(", "select", "breed_code", "from", "dogs", "group", "by", "breed_code", "order", "by", "count", "(", "*", ")", "asc", "limit", "value", ")" ], "question": "Which dogs are of the rarest breed? Show their names and treatment dates.", "question_toks": [ "Which", "dogs", "are", "of", "the", "rarest", "breed", "?", "Show", "their", "names", "and", "treatment", "dates", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 48, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'", "query_toks": [ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T1.state", "=", "'Virginia", "'" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t1", ".", "state", "=", "value" ], "question": "Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name.", "question_toks": [ "Which", "dogs", "are", "owned", "by", "someone", "who", "lives", "in", "Virginia", "?", "List", "the", "owner", "'s", "first", "name", "and", "the", "dog", "'s", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"Virginia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'", "query_toks": [ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T1.state", "=", "'Virginia", "'" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t1", ".", "state", "=", "value" ], "question": "Find the first names of owners living in Virginia and the names of dogs they own.", "question_toks": [ "Find", "the", "first", "names", "of", "owners", "living", "in", "Virginia", "and", "the", "names", "of", "dogs", "they", "own", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"Virginia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "query_toks": [ "SELECT", "DISTINCT", "T1.date_arrived", ",", "T1.date_departed", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "date_arrived", ",", "t1", ".", "date_departed", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id" ], "question": "What are the arriving date and the departing date of the dogs who have gone through a treatment?", "question_toks": [ "What", "are", "the", "arriving", "date", "and", "the", "departing", "date", "of", "the", "dogs", "who", "have", "gone", "through", "a", "treatment", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 30, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "query_toks": [ "SELECT", "DISTINCT", "T1.date_arrived", ",", "T1.date_departed", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "date_arrived", ",", "t1", ".", "date_departed", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id" ], "question": "Find the arriving date and the departing date of the dogs that received a treatment.", "question_toks": [ "Find", "the", "arriving", "date", "and", "the", "departing", "date", "of", "the", "dogs", "that", "received", "a", "treatment", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 30, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )", "query_toks": [ "SELECT", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T2.age", "=", "(", "SELECT", "max", "(", "age", ")", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t2", ".", "age", "=", "(", "select", "max", "(", "age", ")", "from", "dogs", ")" ], "question": "List the last name of the owner owning the youngest dog.", "question_toks": [ "List", "the", "last", "name", "of", "the", "owner", "owning", "the", "youngest", "dog", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 26, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 26, 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": "dog_kennels", "query": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )", "query_toks": [ "SELECT", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T2.age", "=", "(", "SELECT", "max", "(", "age", ")", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t2", ".", "age", "=", "(", "select", "max", "(", "age", ")", "from", "dogs", ")" ], "question": "Who owns the youngest dog? Give me his or her last name.", "question_toks": [ "Who", "owns", "the", "youngest", "dog", "?", "Give", "me", "his", "or", "her", "last", "name", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 26, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 26, 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": "dog_kennels", "query": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'", "query_toks": [ "SELECT", "email_address", "FROM", "Professionals", "WHERE", "state", "=", "'Hawaii", "'", "OR", "state", "=", "'Wisconsin", "'" ], "query_toks_no_value": [ "select", "email_address", "from", "professionals", "where", "state", "=", "value", "or", "state", "=", "value" ], "question": "List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.", "question_toks": [ "List", "the", "emails", "of", "the", "professionals", "who", "live", "in", "the", "state", "of", "Hawaii", "or", "the", "state", "of", "Wisconsin", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Hawaii\"", null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Wisconsin\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'", "query_toks": [ "SELECT", "email_address", "FROM", "Professionals", "WHERE", "state", "=", "'Hawaii", "'", "OR", "state", "=", "'Wisconsin", "'" ], "query_toks_no_value": [ "select", "email_address", "from", "professionals", "where", "state", "=", "value", "or", "state", "=", "value" ], "question": "What are the emails of the professionals living in either the state of Hawaii or the state of Wisconsin?", "question_toks": [ "What", "are", "the", "emails", "of", "the", "professionals", "living", "in", "either", "the", "state", "of", "Hawaii", "or", "the", "state", "of", "Wisconsin", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Hawaii\"", null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Wisconsin\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT date_arrived , date_departed FROM Dogs", "query_toks": [ "SELECT", "date_arrived", ",", "date_departed", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "date_arrived", ",", "date_departed", "from", "dogs" ], "question": "What are the arriving date and the departing date of all the dogs?", "question_toks": [ "What", "are", "the", "arriving", "date", "and", "the", "departing", "date", "of", "all", "the", "dogs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 30, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT date_arrived , date_departed FROM Dogs", "query_toks": [ "SELECT", "date_arrived", ",", "date_departed", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "date_arrived", ",", "date_departed", "from", "dogs" ], "question": "List the arrival date and the departure date for all the dogs.", "question_toks": [ "List", "the", "arrival", "date", "and", "the", "departure", "date", "for", "all", "the", "dogs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 30, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(DISTINCT dog_id) FROM Treatments", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "dog_id", ")", "FROM", "Treatments" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "dog_id", ")", "from", "treatments" ], "question": "How many dogs went through any treatments?", "question_toks": [ "How", "many", "dogs", "went", "through", "any", "treatments", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 45, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(DISTINCT dog_id) FROM Treatments", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "dog_id", ")", "FROM", "Treatments" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "dog_id", ")", "from", "treatments" ], "question": "Count the number of dogs that went through a treatment.", "question_toks": [ "Count", "the", "number", "of", "dogs", "that", "went", "through", "a", "treatment", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 45, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(DISTINCT professional_id) FROM Treatments", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "professional_id", ")", "FROM", "Treatments" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "professional_id", ")", "from", "treatments" ], "question": "How many professionals have performed any treatment to dogs?", "question_toks": [ "How", "many", "professionals", "have", "performed", "any", "treatment", "to", "dogs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 46, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(DISTINCT professional_id) FROM Treatments", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "professional_id", ")", "FROM", "Treatments" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "professional_id", ")", "from", "treatments" ], "question": "Find the number of professionals who have ever treated dogs.", "question_toks": [ "Find", "the", "number", "of", "professionals", "who", "have", "ever", "treated", "dogs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 46, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'", "query_toks": [ "SELECT", "role_code", ",", "street", ",", "city", ",", "state", "FROM", "professionals", "WHERE", "city", "LIKE", "'", "%", "West", "%", "'" ], "query_toks_no_value": [ "select", "role_code", ",", "street", ",", "city", ",", "state", "from", "professionals", "where", "city", "like", "value" ], "question": "Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state.", "question_toks": [ "Which", "professionals", "live", "in", "a", "city", "containing", "the", "substring", "'West", "'", "?", "List", "his", "or", "her", "role", ",", "street", ",", "city", "and", "state", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 37, false ], null ], "\"%West%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'", "query_toks": [ "SELECT", "role_code", ",", "street", ",", "city", ",", "state", "FROM", "professionals", "WHERE", "city", "LIKE", "'", "%", "West", "%", "'" ], "query_toks_no_value": [ "select", "role_code", ",", "street", ",", "city", ",", "state", "from", "professionals", "where", "city", "like", "value" ], "question": "Find the role, street, city and state of the professionals living in a city that contains the substring 'West'.", "question_toks": [ "Find", "the", "role", ",", "street", ",", "city", "and", "state", "of", "the", "professionals", "living", "in", "a", "city", "that", "contains", "the", "substring", "'West", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 37, false ], null ], "\"%West%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "query_toks": [ "SELECT", "first_name", ",", "last_name", ",", "email_address", "FROM", "Owners", "WHERE", "state", "LIKE", "'", "%", "North", "%", "'" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", ",", "email_address", "from", "owners", "where", "state", "like", "value" ], "question": "Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email.", "question_toks": [ "Which", "owners", "live", "in", "the", "state", "whose", "name", "contains", "the", "substring", "'North", "'", "?", "List", "his", "first", "name", ",", "last", "name", "and", "email", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 15, false ], null ], "\"%North%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "query_toks": [ "SELECT", "first_name", ",", "last_name", ",", "email_address", "FROM", "Owners", "WHERE", "state", "LIKE", "'", "%", "North", "%", "'" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", ",", "email_address", "from", "owners", "where", "state", "like", "value" ], "question": "Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'.", "question_toks": [ "Return", "the", "first", "name", ",", "last", "name", "and", "email", "of", "the", "owners", "living", "in", "a", "state", "whose", "name", "contains", "the", "substring", "'North", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 15, false ], null ], "\"%North%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Dogs", "WHERE", "age", "<", "(", "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "age", "<", "(", "select", "avg", "(", "age", ")", "from", "dogs", ")" ], "question": "How many dogs have an age below the average?", "question_toks": [ "How", "many", "dogs", "have", "an", "age", "below", "the", "average", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 26, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, 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": "dog_kennels", "query": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Dogs", "WHERE", "age", "<", "(", "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "age", "<", "(", "select", "avg", "(", "age", ")", "from", "dogs", ")" ], "question": "Count the number of dogs of an age below the average.", "question_toks": [ "Count", "the", "number", "of", "dogs", "of", "an", "age", "below", "the", "average", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 26, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, 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": "dog_kennels", "query": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", "query_toks": [ "SELECT", "cost_of_treatment", "FROM", "Treatments", "ORDER", "BY", "date_of_treatment", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "cost_of_treatment", "from", "treatments", "order", "by", "date_of_treatment", "desc", "limit", "value" ], "question": "How much does the most recent treatment cost?", "question_toks": [ "How", "much", "does", "the", "most", "recent", "treatment", "cost", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 49, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 48, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", "query_toks": [ "SELECT", "cost_of_treatment", "FROM", "Treatments", "ORDER", "BY", "date_of_treatment", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "cost_of_treatment", "from", "treatments", "order", "by", "date_of_treatment", "desc", "limit", "value" ], "question": "Show me the cost of the most recently performed treatment.", "question_toks": [ "Show", "me", "the", "cost", "of", "the", "most", "recently", "performed", "treatment", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 49, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 48, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Dogs", "WHERE", "dog_id", "NOT", "IN", "(", "SELECT", "dog_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "question": "How many dogs have not gone through any treatment?", "question_toks": [ "How", "many", "dogs", "have", "not", "gone", "through", "any", "treatment", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, 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": "dog_kennels", "query": "select count(*) from dogs where dog_id not in ( select dog_id from treatments )", "query_toks": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "question": "Tell me the number of dogs that have not received any treatment .", "question_toks": [ "Tell", "me", "the", "number", "of", "dogs", "that", "have", "not", "received", "any", "treatment", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, 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": "dog_kennels", "query": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Owners", "WHERE", "owner_id", "NOT", "IN", "(", "SELECT", "owner_id", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "owners", "where", "owner_id", "not", "in", "(", "select", "owner_id", "from", "dogs", ")" ], "question": "How many owners temporarily do not have any dogs?", "question_toks": [ "How", "many", "owners", "temporarily", "do", "not", "have", "any", "dogs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 10, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 21, 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": "dog_kennels", "query": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Owners", "WHERE", "owner_id", "NOT", "IN", "(", "SELECT", "owner_id", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "owners", "where", "owner_id", "not", "in", "(", "select", "owner_id", "from", "dogs", ")" ], "question": "Find the number of owners who do not own any dogs at this moment.", "question_toks": [ "Find", "the", "number", "of", "owners", "who", "do", "not", "own", "any", "dogs", "at", "this", "moment", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 10, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 21, 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": "dog_kennels", "query": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Professionals", "WHERE", "professional_id", "NOT", "IN", "(", "SELECT", "professional_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "professionals", "where", "professional_id", "not", "in", "(", "select", "professional_id", "from", "treatments", ")" ], "question": "How many professionals did not operate any treatment on dogs?", "question_toks": [ "How", "many", "professionals", "did", "not", "operate", "any", "treatment", "on", "dogs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 33, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 46, 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": "dog_kennels", "query": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Professionals", "WHERE", "professional_id", "NOT", "IN", "(", "SELECT", "professional_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "professionals", "where", "professional_id", "not", "in", "(", "select", "professional_id", "from", "treatments", ")" ], "question": "Find the number of professionals who have not treated any dogs.", "question_toks": [ "Find", "the", "number", "of", "professionals", "who", "have", "not", "treated", "any", "dogs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 33, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 46, 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": "dog_kennels", "query": "SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1", "query_toks": [ "SELECT", "name", ",", "age", ",", "weight", "FROM", "Dogs", "WHERE", "abandoned_yn", "=", "1" ], "query_toks_no_value": [ "select", "name", ",", "age", ",", "weight", "from", "dogs", "where", "abandoned_yn", "=", "value" ], "question": "List the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no.", "question_toks": [ "List", "the", "dog", "name", ",", "age", "and", "weight", "of", "the", "dogs", "who", "have", "been", "abandoned", "?", "1", "stands", "for", "yes", ",", "and", "0", "stands", "for", "no", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 26, false ], null ] ], [ 0, [ 0, [ 0, 29, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1", "query_toks": [ "SELECT", "name", ",", "age", ",", "weight", "FROM", "Dogs", "WHERE", "abandoned_yn", "=", "1" ], "query_toks_no_value": [ "select", "name", ",", "age", ",", "weight", "from", "dogs", "where", "abandoned_yn", "=", "value" ], "question": "What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables.", "question_toks": [ "What", "are", "the", "dog", "name", ",", "age", "and", "weight", "of", "the", "dogs", "that", "were", "abandoned", "?", "Note", "that", "1", "stands", "for", "yes", ",", "and", "0", "stands", "for", "no", "in", "the", "tables", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 26, false ], null ] ], [ 0, [ 0, [ 0, 29, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT avg(age) FROM Dogs", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "dogs" ], "question": "What is the average age of all the dogs?", "question_toks": [ "What", "is", "the", "average", "age", "of", "all", "the", "dogs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT avg(age) FROM Dogs", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "dogs" ], "question": "Compute the average age of all the dogs.", "question_toks": [ "Compute", "the", "average", "age", "of", "all", "the", "dogs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT max(age) FROM Dogs", "query_toks": [ "SELECT", "max", "(", "age", ")", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "max", "(", "age", ")", "from", "dogs" ], "question": "What is the age of the oldest dog?", "question_toks": [ "What", "is", "the", "age", "of", "the", "oldest", "dog", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT max(age) FROM Dogs", "query_toks": [ "SELECT", "max", "(", "age", ")", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "max", "(", "age", ")", "from", "dogs" ], "question": "Tell me the age of the oldest dog.", "question_toks": [ "Tell", "me", "the", "age", "of", "the", "oldest", "dog", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT charge_type , charge_amount FROM Charges", "query_toks": [ "SELECT", "charge_type", ",", "charge_amount", "FROM", "Charges" ], "query_toks_no_value": [ "select", "charge_type", ",", "charge_amount", "from", "charges" ], "question": "How much does each charge type costs? List both charge type and amount.", "question_toks": [ "How", "much", "does", "each", "charge", "type", "costs", "?", "List", "both", "charge", "type", "and", "amount", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT charge_type , charge_amount FROM Charges", "query_toks": [ "SELECT", "charge_type", ",", "charge_amount", "FROM", "Charges" ], "query_toks_no_value": [ "select", "charge_type", ",", "charge_amount", "from", "charges" ], "question": "List each charge type and its amount.", "question_toks": [ "List", "each", "charge", "type", "and", "its", "amount", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT max(charge_amount) FROM Charges", "query_toks": [ "SELECT", "max", "(", "charge_amount", ")", "FROM", "Charges" ], "query_toks_no_value": [ "select", "max", "(", "charge_amount", ")", "from", "charges" ], "question": "How much does the most expensive charge type costs?", "question_toks": [ "How", "much", "does", "the", "most", "expensive", "charge", "type", "costs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT max(charge_amount) FROM Charges", "query_toks": [ "SELECT", "max", "(", "charge_amount", ")", "FROM", "Charges" ], "query_toks_no_value": [ "select", "max", "(", "charge_amount", ")", "from", "charges" ], "question": "What is the charge amount of the most expensive charge type?", "question_toks": [ "What", "is", "the", "charge", "amount", "of", "the", "most", "expensive", "charge", "type", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT email_address , cell_number , home_phone FROM professionals", "query_toks": [ "SELECT", "email_address", ",", "cell_number", ",", "home_phone", "FROM", "professionals" ], "query_toks_no_value": [ "select", "email_address", ",", "cell_number", ",", "home_phone", "from", "professionals" ], "question": "List the email, cell phone and home phone of all the professionals.", "question_toks": [ "List", "the", "email", ",", "cell", "phone", "and", "home", "phone", "of", "all", "the", "professionals", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 41, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ], [ 0, [ 0, [ 0, 42, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT email_address , cell_number , home_phone FROM professionals", "query_toks": [ "SELECT", "email_address", ",", "cell_number", ",", "home_phone", "FROM", "professionals" ], "query_toks_no_value": [ "select", "email_address", ",", "cell_number", ",", "home_phone", "from", "professionals" ], "question": "What are the email, cell phone and home phone of each professional?", "question_toks": [ "What", "are", "the", "email", ",", "cell", "phone", "and", "home", "phone", "of", "each", "professional", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 41, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ], [ 0, [ 0, [ 0, 42, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT breed_code , size_code FROM dogs", "query_toks": [ "SELECT", "DISTINCT", "breed_code", ",", "size_code", "FROM", "dogs" ], "query_toks_no_value": [ "select", "distinct", "breed_code", ",", "size_code", "from", "dogs" ], "question": "What are all the possible breed type and size type combinations?", "question_toks": [ "What", "are", "all", "the", "possible", "breed", "type", "and", "size", "type", "combinations", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ], [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT breed_code , size_code FROM dogs", "query_toks": [ "SELECT", "DISTINCT", "breed_code", ",", "size_code", "FROM", "dogs" ], "query_toks_no_value": [ "select", "distinct", "breed_code", ",", "size_code", "from", "dogs" ], "question": "Find the distinct breed type and size type combinations for dogs.", "question_toks": [ "Find", "the", "distinct", "breed", "type", "and", "size", "type", "combinations", "for", "dogs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ], [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T3.treatment_type_description", "FROM", "professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "JOIN", "Treatment_types", "AS", "T3", "ON", "T2.treatment_type_code", "=", "T3.treatment_type_code" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t3", ".", "treatment_type_description", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "join", "treatment_types", "as", "t3", "on", "t2", ".", "treatment_type_code", "=", "t3", ".", "treatment_type_code" ], "question": "List the first name of all the professionals along with the description of the treatment they have done.", "question_toks": [ "List", "the", "first", "name", "of", "all", "the", "professionals", "along", "with", "the", "description", "of", "the", "treatment", "they", "have", "done", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ], "and", [ false, 2, [ 0, [ 0, 47, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T3.treatment_type_description", "FROM", "professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "JOIN", "Treatment_types", "AS", "T3", "ON", "T2.treatment_type_code", "=", "T3.treatment_type_code" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t3", ".", "treatment_type_description", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "join", "treatment_types", "as", "t3", "on", "t2", ".", "treatment_type_code", "=", "t3", ".", "treatment_type_code" ], "question": "What are each professional's first name and description of the treatment they have performed?", "question_toks": [ "What", "are", "each", "professional", "'s", "first", "name", "and", "description", "of", "the", "treatment", "they", "have", "performed", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ], "and", [ false, 2, [ 0, [ 0, 47, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT count(*) FROM singer", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "singer" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "singer" ], "question": "How many singers are there?", "question_toks": [ "How", "many", "singers", "are", "there", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT count(*) FROM singer", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "singer" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "singer" ], "question": "What is the count of singers?", "question_toks": [ "What", "is", "the", "count", "of", "singers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC", "query_toks": [ "SELECT", "Name", "FROM", "singer", "ORDER", "BY", "Net_Worth_Millions", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "singer", "order", "by", "net_worth_millions", "asc" ], "question": "List the name of singers in ascending order of net worth.", "question_toks": [ "List", "the", "name", "of", "singers", "in", "ascending", "order", "of", "net", "worth", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC", "query_toks": [ "SELECT", "Name", "FROM", "singer", "ORDER", "BY", "Net_Worth_Millions", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "singer", "order", "by", "net_worth_millions", "asc" ], "question": "What are the names of singers ordered by ascending net worth?", "question_toks": [ "What", "are", "the", "names", "of", "singers", "ordered", "by", "ascending", "net", "worth", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Birth_Year , Citizenship FROM singer", "query_toks": [ "SELECT", "Birth_Year", ",", "Citizenship", "FROM", "singer" ], "query_toks_no_value": [ "select", "birth_year", ",", "citizenship", "from", "singer" ], "question": "What are the birth year and citizenship of singers?", "question_toks": [ "What", "are", "the", "birth", "year", "and", "citizenship", "of", "singers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Birth_Year , Citizenship FROM singer", "query_toks": [ "SELECT", "Birth_Year", ",", "Citizenship", "FROM", "singer" ], "query_toks_no_value": [ "select", "birth_year", ",", "citizenship", "from", "singer" ], "question": "What are the birth years and citizenships of the singers?", "question_toks": [ "What", "are", "the", "birth", "years", "and", "citizenships", "of", "the", "singers", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Citizenship != \"France\"", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Citizenship", "!", "=", "``", "France", "''" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "citizenship", "!", "=", "value" ], "question": "List the name of singers whose citizenship is not \"France\".", "question_toks": [ "List", "the", "name", "of", "singers", "whose", "citizenship", "is", "not", "``", "France", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 5, false ], null ], "\"France\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Citizenship != \"France\"", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Citizenship", "!", "=", "``", "France", "''" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "citizenship", "!", "=", "value" ], "question": "What are the names of the singers who are not French citizens?", "question_toks": [ "What", "are", "the", "names", "of", "the", "singers", "who", "are", "not", "French", "citizens", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 5, false ], null ], "\"France\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Birth_Year", "=", "1948", "OR", "Birth_Year", "=", "1949" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "birth_year", "=", "value", "or", "birth_year", "=", "value" ], "question": "Show the name of singers whose birth year is either 1948 or 1949?", "question_toks": [ "Show", "the", "name", "of", "singers", "whose", "birth", "year", "is", "either", "1948", "or", "1949", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 1948.0, null ], "or", [ false, 2, [ 0, [ 0, 3, false ], null ], 1949.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Birth_Year", "=", "1948", "OR", "Birth_Year", "=", "1949" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "birth_year", "=", "value", "or", "birth_year", "=", "value" ], "question": "What are the names of the singers whose birth years are either 1948 or 1949?", "question_toks": [ "What", "are", "the", "names", "of", "the", "singers", "whose", "birth", "years", "are", "either", "1948", "or", "1949", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 1948.0, null ], "or", [ false, 2, [ 0, [ 0, 3, false ], null ], 1949.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "singer", "ORDER", "BY", "Net_Worth_Millions", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "singer", "order", "by", "net_worth_millions", "desc", "limit", "value" ], "question": "What is the name of the singer with the largest net worth?", "question_toks": [ "What", "is", "the", "name", "of", "the", "singer", "with", "the", "largest", "net", "worth", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "singer", "ORDER", "BY", "Net_Worth_Millions", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "singer", "order", "by", "net_worth_millions", "desc", "limit", "value" ], "question": "What is the name of the singer who is worth the most?", "question_toks": [ "What", "is", "the", "name", "of", "the", "singer", "who", "is", "worth", "the", "most", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship", "query_toks": [ "SELECT", "Citizenship", ",", "COUNT", "(", "*", ")", "FROM", "singer", "GROUP", "BY", "Citizenship" ], "query_toks_no_value": [ "select", "citizenship", ",", "count", "(", "*", ")", "from", "singer", "group", "by", "citizenship" ], "question": "Show different citizenship of singers and the number of singers of each citizenship.", "question_toks": [ "Show", "different", "citizenship", "of", "singers", "and", "the", "number", "of", "singers", "of", "each", "citizenship", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship", "query_toks": [ "SELECT", "Citizenship", ",", "COUNT", "(", "*", ")", "FROM", "singer", "GROUP", "BY", "Citizenship" ], "query_toks_no_value": [ "select", "citizenship", ",", "count", "(", "*", ")", "from", "singer", "group", "by", "citizenship" ], "question": "For each citizenship, how many singers are from that country?", "question_toks": [ "For", "each", "citizenship", ",", "how", "many", "singers", "are", "from", "that", "country", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Citizenship", "FROM", "singer", "GROUP", "BY", "Citizenship", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "citizenship", "from", "singer", "group", "by", "citizenship", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Please show the most common citizenship of singers.", "question_toks": [ "Please", "show", "the", "most", "common", "citizenship", "of", "singers", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "select citizenship from singer group by citizenship order by count(*) desc limit 1", "query_toks": [ "select", "citizenship", "from", "singer", "group", "by", "citizenship", "order", "by", "count", "(", "*", ")", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "citizenship", "from", "singer", "group", "by", "citizenship", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "What is the most common singer citizenship ?", "question_toks": [ "What", "is", "the", "most", "common", "singer", "citizenship", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship", "query_toks": [ "SELECT", "Citizenship", ",", "max", "(", "Net_Worth_Millions", ")", "FROM", "singer", "GROUP", "BY", "Citizenship" ], "query_toks_no_value": [ "select", "citizenship", ",", "max", "(", "net_worth_millions", ")", "from", "singer", "group", "by", "citizenship" ], "question": "Show different citizenships and the maximum net worth of singers of each citizenship.", "question_toks": [ "Show", "different", "citizenships", "and", "the", "maximum", "net", "worth", "of", "singers", "of", "each", "citizenship", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 1, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship", "query_toks": [ "SELECT", "Citizenship", ",", "max", "(", "Net_Worth_Millions", ")", "FROM", "singer", "GROUP", "BY", "Citizenship" ], "query_toks_no_value": [ "select", "citizenship", ",", "max", "(", "net_worth_millions", ")", "from", "singer", "group", "by", "citizenship" ], "question": "For each citizenship, what is the maximum net worth?", "question_toks": [ "For", "each", "citizenship", ",", "what", "is", "the", "maximum", "net", "worth", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 1, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID", "query_toks": [ "SELECT", "T2.Title", ",", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID" ], "query_toks_no_value": [ "select", "t2", ".", "title", ",", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id" ], "question": "Show titles of songs and names of singers.", "question_toks": [ "Show", "titles", "of", "songs", "and", "names", "of", "singers", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID", "query_toks": [ "SELECT", "T2.Title", ",", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID" ], "query_toks_no_value": [ "select", "t2", ".", "title", ",", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id" ], "question": "What are the song titles and singer names?", "question_toks": [ "What", "are", "the", "song", "titles", "and", "singer", "names", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000", "query_toks": [ "SELECT", "DISTINCT", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "WHERE", "T2.Sales", ">", "300000" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "where", "t2", ".", "sales", ">", "value" ], "question": "Show distinct names of singers that have songs with sales more than 300000.", "question_toks": [ "Show", "distinct", "names", "of", "singers", "that", "have", "songs", "with", "sales", "more", "than", "300000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], 300000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000", "query_toks": [ "SELECT", "DISTINCT", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "WHERE", "T2.Sales", ">", "300000" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "where", "t2", ".", "sales", ">", "value" ], "question": "what are the different names of the singers that have sales more than 300000?", "question_toks": [ "what", "are", "the", "different", "names", "of", "the", "singers", "that", "have", "sales", "more", "than", "300000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], 300000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "GROUP", "BY", "T1.Name", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t1", ".", "name", "having", "count", "(", "*", ")", ">", "value" ], "question": "Show the names of singers that have more than one song.", "question_toks": [ "Show", "the", "names", "of", "singers", "that", "have", "more", "than", "one", "song", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "GROUP", "BY", "T1.Name", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t1", ".", "name", "having", "count", "(", "*", ")", ">", "value" ], "question": "What are the names of the singers that have more than one songs?", "question_toks": [ "What", "are", "the", "names", "of", "the", "singers", "that", "have", "more", "than", "one", "songs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", "query_toks": [ "SELECT", "T1.Name", ",", "sum", "(", "T2.Sales", ")", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "GROUP", "BY", "T1.Name" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "sum", "(", "t2", ".", "sales", ")", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t1", ".", "name" ], "question": "Show the names of singers and the total sales of their songs.", "question_toks": [ "Show", "the", "names", "of", "singers", "and", "the", "total", "sales", "of", "their", "songs", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 4, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", "query_toks": [ "SELECT", "T1.Name", ",", "sum", "(", "T2.Sales", ")", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "GROUP", "BY", "T1.Name" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "sum", "(", "t2", ".", "sales", ")", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t1", ".", "name" ], "question": "For each singer name, what is the total sales for their songs?", "question_toks": [ "For", "each", "singer", "name", ",", "what", "is", "the", "total", "sales", "for", "their", "songs", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 4, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Singer_ID", "NOT", "IN", "(", "SELECT", "Singer_ID", "FROM", "song", ")" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "singer_id", "not", "in", "(", "select", "singer_id", "from", "song", ")" ], "question": "List the name of singers that do not have any song.", "question_toks": [ "List", "the", "name", "of", "singers", "that", "do", "not", "have", "any", "song", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, 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": "singer", "query": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Singer_ID", "NOT", "IN", "(", "SELECT", "Singer_ID", "FROM", "song", ")" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "singer_id", "not", "in", "(", "select", "singer_id", "from", "song", ")" ], "question": "What is the sname of every sing that does not have any song?", "question_toks": [ "What", "is", "the", "sname", "of", "every", "sing", "that", "does", "not", "have", "any", "song", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, 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": "singer", "query": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "query_toks": [ "SELECT", "Citizenship", "FROM", "singer", "WHERE", "Birth_Year", "<", "1945", "INTERSECT", "SELECT", "Citizenship", "FROM", "singer", "WHERE", "Birth_Year", ">", "1955" ], "query_toks_no_value": [ "select", "citizenship", "from", "singer", "where", "birth_year", "<", "value", "intersect", "select", "citizenship", "from", "singer", "where", "birth_year", ">", "value" ], "question": "Show the citizenship shared by singers with birth year before 1945 and after 1955.", "question_toks": [ "Show", "the", "citizenship", "shared", "by", "singers", "with", "birth", "year", "before", "1945", "and", "after", "1955", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 3, false ], null ], 1945.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], 1955.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "query_toks": [ "SELECT", "Citizenship", "FROM", "singer", "WHERE", "Birth_Year", "<", "1945", "INTERSECT", "SELECT", "Citizenship", "FROM", "singer", "WHERE", "Birth_Year", ">", "1955" ], "query_toks_no_value": [ "select", "citizenship", "from", "singer", "where", "birth_year", "<", "value", "intersect", "select", "citizenship", "from", "singer", "where", "birth_year", ">", "value" ], "question": "What are the citizenships that are shared by singers with a birth year before 1945 and after 1955?", "question_toks": [ "What", "are", "the", "citizenships", "that", "are", "shared", "by", "singers", "with", "a", "birth", "year", "before", "1945", "and", "after", "1955", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 3, false ], null ], 1945.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], 1955.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "real_estate_properties", "query": "SELECT count(*) FROM Other_Available_Features", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Other_Available_Features" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "other_available_features" ], "question": "How many available features are there in total?", "question_toks": [ "How", "many", "available", "features", "are", "there", "in", "total", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "real_estate_properties", "query": "SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = \"AirCon\"", "query_toks": [ "SELECT", "T2.feature_type_name", "FROM", "Other_Available_Features", "AS", "T1", "JOIN", "Ref_Feature_Types", "AS", "T2", "ON", "T1.feature_type_code", "=", "T2.feature_type_code", "WHERE", "T1.feature_name", "=", "``", "AirCon", "''" ], "query_toks_no_value": [ "select", "t2", ".", "feature_type_name", "from", "other_available_features", "as", "t1", "join", "ref_feature_types", "as", "t2", "on", "t1", ".", "feature_type_code", "=", "t2", ".", "feature_type_code", "where", "t1", ".", "feature_name", "=", "value" ], "question": "What is the feature type name of feature AirCon?", "question_toks": [ "What", "is", "the", "feature", "type", "name", "of", "feature", "AirCon", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"AirCon\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "real_estate_properties", "query": "SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code", "query_toks": [ "SELECT", "T2.property_type_description", "FROM", "Properties", "AS", "T1", "JOIN", "Ref_Property_Types", "AS", "T2", "ON", "T1.property_type_code", "=", "T2.property_type_code", "GROUP", "BY", "T1.property_type_code" ], "query_toks_no_value": [ "select", "t2", ".", "property_type_description", "from", "properties", "as", "t1", "join", "ref_property_types", "as", "t2", "on", "t1", ".", "property_type_code", "=", "t2", ".", "property_type_code", "group", "by", "t1", ".", "property_type_code" ], "question": "Show the property type descriptions of properties belonging to that code.", "question_toks": [ "Show", "the", "property", "type", "descriptions", "of", "properties", "belonging", "to", "that", "code", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "real_estate_properties", "query": "SELECT property_name FROM Properties WHERE property_type_code = \"House\" UNION SELECT property_name FROM Properties WHERE property_type_code = \"Apartment\" AND room_count > 1", "query_toks": [ "SELECT", "property_name", "FROM", "Properties", "WHERE", "property_type_code", "=", "``", "House", "''", "UNION", "SELECT", "property_name", "FROM", "Properties", "WHERE", "property_type_code", "=", "``", "Apartment", "''", "AND", "room_count", ">", "1" ], "query_toks_no_value": [ "select", "property_name", "from", "properties", "where", "property_type_code", "=", "value", "union", "select", "property_name", "from", "properties", "where", "property_type_code", "=", "value", "and", "room_count", ">", "value" ], "question": "What are the names of properties that are either houses or apartments with more than 1 room?", "question_toks": [ "What", "are", "the", "names", "of", "properties", "that", "are", "either", "houses", "or", "apartments", "with", "more", "than", "1", "room", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"House\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Apartment\"", null ], "and", [ false, 3, [ 0, [ 0, 15, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "concert_singer", "query": "SELECT count(*) FROM singer", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "singer" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "singer" ], "question": "Quantos cantores nós temos?", "question_toks": [ "Quantos", "cantores", "nós", "temos", "?" ], "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": "concert_singer", "query": "SELECT count(*) FROM singer", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "singer" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "singer" ], "question": "Qual é o número total de cantores?", "question_toks": [ "Qual", "é", "o", "número", "total", "de", "cantores", "?" ], "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": "concert_singer", "query": "SELECT name , country , age FROM singer ORDER BY age DESC", "query_toks": [ "SELECT", "name", ",", "country", ",", "age", "FROM", "singer", "ORDER", "BY", "age", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "country", ",", "age", "from", "singer", "order", "by", "age", "desc" ], "question": "Mostre o nome, o país e a idade de todos os cantores, ordenados por idade, do mais velho ao mais novo.", "question_toks": [ "Mostre", "o", "nome", ",", "o", "país", "e", "a", "idade", "de", "todos", "os", "cantores", ",", "ordenados", "por", "idade", ",", "do", "mais", "velho", "ao", "mais", "novo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , country , age FROM singer ORDER BY age DESC", "query_toks": [ "SELECT", "name", ",", "country", ",", "age", "FROM", "singer", "ORDER", "BY", "age", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "country", ",", "age", "from", "singer", "order", "by", "age", "desc" ], "question": "Quais são os nomes, países e idades de cada cantor em ordem decrescente de idade?", "question_toks": [ "Quais", "são", "os", "nomes", ",", "países", "e", "idades", "de", "cada", "cantor", "em", "ordem", "decrescente", "de", "idade", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'", "query_toks": [ "SELECT", "avg", "(", "age", ")", ",", "min", "(", "age", ")", ",", "max", "(", "age", ")", "FROM", "singer", "WHERE", "country", "=", "'France", "'" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", ",", "min", "(", "age", ")", ",", "max", "(", "age", ")", "from", "singer", "where", "country", "=", "value" ], "question": "Qual é a idade média, mínima e máxima de todos os cantores da França?", "question_toks": [ "Qual", "é", "a", "idade", "média", ",", "mínima", "e", "máxima", "de", "todos", "os", "cantores", "da", "França", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, false ], null ] ], [ 2, [ 0, [ 0, 13, false ], null ] ], [ 1, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"France\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'", "query_toks": [ "SELECT", "avg", "(", "age", ")", ",", "min", "(", "age", ")", ",", "max", "(", "age", ")", "FROM", "singer", "WHERE", "country", "=", "'France", "'" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", ",", "min", "(", "age", ")", ",", "max", "(", "age", ")", "from", "singer", "where", "country", "=", "value" ], "question": "Qual é a idade média, mínima e máxima de todos os cantores franceses?", "question_toks": [ "Qual", "é", "a", "idade", "média", ",", "mínima", "e", "máxima", "de", "todos", "os", "cantores", "franceses", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, false ], null ] ], [ 2, [ 0, [ 0, 13, false ], null ] ], [ 1, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"France\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1", "query_toks": [ "SELECT", "song_name", ",", "song_release_year", "FROM", "singer", "ORDER", "BY", "age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "song_name", ",", "song_release_year", "from", "singer", "order", "by", "age", "limit", "value" ], "question": "Mostre o nome e o ano de lançamento da música do cantor mais jovem.", "question_toks": [ "Mostre", "o", "nome", "e", "o", "ano", "de", "lançamento", "da", "música", "do", "cantor", "mais", "jovem", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1", "query_toks": [ "SELECT", "song_name", ",", "song_release_year", "FROM", "singer", "ORDER", "BY", "age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "song_name", ",", "song_release_year", "from", "singer", "order", "by", "age", "limit", "value" ], "question": "Quais são os nomes e anos de lançamento de todas as canções da cantora mais jovem?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "anos", "de", "lançamento", "de", "todas", "as", "canções", "da", "cantora", "mais", "jovem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT DISTINCT country FROM singer WHERE age > 20", "query_toks": [ "SELECT", "DISTINCT", "country", "FROM", "singer", "WHERE", "age", ">", "20" ], "query_toks_no_value": [ "select", "distinct", "country", "from", "singer", "where", "age", ">", "value" ], "question": "Quais são os países distintos de onde vêm os cantores com mais de 20 anos?", "question_toks": [ "Quais", "são", "os", "países", "distintos", "de", "onde", "vêm", "os", "cantores", "com", "mais", "de", "20", "anos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT DISTINCT country FROM singer WHERE age > 20", "query_toks": [ "SELECT", "DISTINCT", "country", "FROM", "singer", "WHERE", "age", ">", "20" ], "query_toks_no_value": [ "select", "distinct", "country", "from", "singer", "where", "age", ">", "value" ], "question": "Quais são os diferentes países com cantores com mais de 20 anos?", "question_toks": [ "Quais", "são", "os", "diferentes", "países", "com", "cantores", "com", "mais", "de", "20", "anos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT country , count(*) FROM singer GROUP BY country", "query_toks": [ "SELECT", "country", ",", "count", "(", "*", ")", "FROM", "singer", "GROUP", "BY", "country" ], "query_toks_no_value": [ "select", "country", ",", "count", "(", "*", ")", "from", "singer", "group", "by", "country" ], "question": "Mostre todos os países e o número de cantores em cada país.", "question_toks": [ "Mostre", "todos", "os", "países", "e", "o", "número", "de", "cantores", "em", "cada", "país", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT country , count(*) FROM singer GROUP BY country", "query_toks": [ "SELECT", "country", ",", "count", "(", "*", ")", "FROM", "singer", "GROUP", "BY", "country" ], "query_toks_no_value": [ "select", "country", ",", "count", "(", "*", ")", "from", "singer", "group", "by", "country" ], "question": "Quantos cantores são de cada país?", "question_toks": [ "Quantos", "cantores", "são", "de", "cada", "país", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", "query_toks": [ "SELECT", "song_name", "FROM", "singer", "WHERE", "age", ">", "(", "SELECT", "avg", "(", "age", ")", "FROM", "singer", ")" ], "query_toks_no_value": [ "select", "song_name", "from", "singer", "where", "age", ">", "(", "select", "avg", "(", "age", ")", "from", "singer", ")" ], "question": "Liste todos os nomes de músicas por cantores acima da idade média.", "question_toks": [ "Liste", "todos", "os", "nomes", "de", "músicas", "por", "cantores", "acima", "da", "idade", "média", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, 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": "concert_singer", "query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", "query_toks": [ "SELECT", "song_name", "FROM", "singer", "WHERE", "age", ">", "(", "SELECT", "avg", "(", "age", ")", "FROM", "singer", ")" ], "query_toks_no_value": [ "select", "song_name", "from", "singer", "where", "age", ">", "(", "select", "avg", "(", "age", ")", "from", "singer", ")" ], "question": "Quais são os nomes de todas as músicas de cantores mais velhos do que a média?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "todas", "as", "músicas", "de", "cantores", "mais", "velhos", "do", "que", "a", "média", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, 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": "concert_singer", "query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", "query_toks": [ "SELECT", "LOCATION", ",", "name", "FROM", "stadium", "WHERE", "capacity", "BETWEEN", "5000", "AND", "10000" ], "query_toks_no_value": [ "select", "location", ",", "name", "from", "stadium", "where", "capacity", "between", "value", "and", "value" ], "question": "Mostre a localização e o nome de todos os estádios com capacidade entre 5.000 e 10.000.", "question_toks": [ "Mostre", "a", "localização", "e", "o", "nome", "de", "todos", "os", "estádios", "com", "capacidade", "entre", "5.000", "e", "10.000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 4, false ], null ], 5000.0, 10000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", "query_toks": [ "SELECT", "LOCATION", ",", "name", "FROM", "stadium", "WHERE", "capacity", "BETWEEN", "5000", "AND", "10000" ], "query_toks_no_value": [ "select", "location", ",", "name", "from", "stadium", "where", "capacity", "between", "value", "and", "value" ], "question": "Quais são as localizações e nomes de todas as estações com capacidade entre 5.000 e 10.000?", "question_toks": [ "Quais", "são", "as", "localizações", "e", "nomes", "de", "todas", "as", "estações", "com", "capacidade", "entre", "5.000", "e", "10.000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 4, false ], null ], 5000.0, 10000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select max(capacity), average from stadium", "query_toks": [ "select", "max", "(", "capacity", ")", ",", "average", "from", "stadium" ], "query_toks_no_value": [ "select", "max", "(", "capacity", ")", ",", "average", "from", "stadium" ], "question": "Qual é a capacidade máxima e a média de todos os estádios?", "question_toks": [ "Qual", "é", "a", "capacidade", "máxima", "e", "a", "média", "de", "todos", "os", "estádios", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select avg(capacity) , max(capacity) from stadium", "query_toks": [ "select", "avg", "(", "capacity", ")", ",", "max", "(", "capacity", ")", "from", "stadium" ], "query_toks_no_value": [ "select", "avg", "(", "capacity", ")", ",", "max", "(", "capacity", ")", "from", "stadium" ], "question": "Qual é a capacidade média e máxima para todos os estádios?", "question_toks": [ "Qual", "é", "a", "capacidade", "média", "e", "máxima", "para", "todos", "os", "estádios", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 4, false ], null ] ], [ 1, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "query_toks": [ "SELECT", "name", ",", "capacity", "FROM", "stadium", "ORDER", "BY", "average", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "capacity", "from", "stadium", "order", "by", "average", "desc", "limit", "value" ], "question": "Qual o nome e capacidade do estádio com maior média de público?", "question_toks": [ "Qual", "o", "nome", "e", "capacidade", "do", "estádio", "com", "maior", "média", "de", "público", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 7, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "query_toks": [ "SELECT", "name", ",", "capacity", "FROM", "stadium", "ORDER", "BY", "average", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "capacity", "from", "stadium", "order", "by", "average", "desc", "limit", "value" ], "question": "Qual o nome e capacidade do estádio com maior média de público?", "question_toks": [ "Qual", "o", "nome", "e", "capacidade", "do", "estádio", "com", "maior", "média", "de", "público", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 7, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "concert", "WHERE", "YEAR", "=", "2014", "OR", "YEAR", "=", "2015" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "concert", "where", "year", "=", "value", "or", "year", "=", "value" ], "question": "Quantos shows há no ano de 2014 ou 2015?", "question_toks": [ "Quantos", "shows", "há", "no", "ano", "de", "2014", "ou", "2015", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ], "or", [ false, 2, [ 0, [ 0, 19, false ], null ], 2015.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "concert", "WHERE", "YEAR", "=", "2014", "OR", "YEAR", "=", "2015" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "concert", "where", "year", "=", "value", "or", "year", "=", "value" ], "question": "Quantos shows ocorreram em 2014 ou 2015?", "question_toks": [ "Quantos", "shows", "ocorreram", "em", "2014", "ou", "2015", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ], "or", [ false, 2, [ 0, [ 0, 19, false ], null ], 2015.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "GROUP", "BY", "T1.stadium_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "group", "by", "t1", ".", "stadium_id" ], "question": "Mostre o nome do estádio e o número de shows em cada estádio.", "question_toks": [ "Mostre", "o", "nome", "do", "estádio", "e", "o", "número", "de", "shows", "em", "cada", "estádio", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "GROUP", "BY", "T1.stadium_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "group", "by", "t1", ".", "stadium_id" ], "question": "Para cada estádio, quantos shows acontecem lá?", "question_toks": [ "Para", "cada", "estádio", ",", "quantos", "shows", "acontecem", "lá", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", ",", "T2.capacity", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.year", ">", "=", "2014", "GROUP", "BY", "T2.stadium_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "t2", ".", "capacity", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", ">", "=", "value", "group", "by", "t2", ".", "stadium_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Mostre o nome e a capacidade do estádio com o maior número de shows no ano de 2014 ou depois.", "question_toks": [ "Mostre", "o", "nome", "e", "a", "capacidade", "do", "estádio", "com", "o", "maior", "número", "de", "shows", "no", "ano", "de", "2014", "ou", "depois", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 5, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select t2.name , t2.capacity from concert as t1 join stadium as t2 on t1.stadium_id = t2.stadium_id where t1.year > 2013 group by t2.stadium_id order by count(*) desc limit 1", "query_toks": [ "select", "t2.name", ",", "t2.capacity", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1.stadium_id", "=", "t2.stadium_id", "where", "t1.year", ">", "2013", "group", "by", "t2.stadium_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "t2", ".", "capacity", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", ">", "value", "group", "by", "t2", ".", "stadium_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome e a capacidade do estádio com mais shows depois de 2013?", "question_toks": [ "Qual", "é", "o", "nome", "e", "a", "capacidade", "do", "estádio", "com", "mais", "shows", "depois", "de", "2013", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 19, false ], null ], 2013.0, null ] ], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "YEAR", "FROM", "concert", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "year", "from", "concert", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual ano tem o maior número de shows?", "question_toks": [ "Qual", "ano", "tem", "o", "maior", "número", "de", "shows", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "YEAR", "FROM", "concert", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "year", "from", "concert", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o ano que teve mais shows?", "question_toks": [ "Qual", "é", "o", "ano", "que", "teve", "mais", "shows", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)", "query_toks": [ "SELECT", "name", "FROM", "stadium", "WHERE", "stadium_id", "NOT", "IN", "(", "SELECT", "stadium_id", "FROM", "concert", ")" ], "query_toks_no_value": [ "select", "name", "from", "stadium", "where", "stadium_id", "not", "in", "(", "select", "stadium_id", "from", "concert", ")" ], "question": "Mostre os nomes dos estádios sem nenhum concerto.", "question_toks": [ "Mostre", "os", "nomes", "dos", "estádios", "sem", "nenhum", "concerto", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, 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": "concert_singer", "query": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)", "query_toks": [ "SELECT", "name", "FROM", "stadium", "WHERE", "stadium_id", "NOT", "IN", "(", "SELECT", "stadium_id", "FROM", "concert", ")" ], "query_toks_no_value": [ "select", "name", "from", "stadium", "where", "stadium_id", "not", "in", "(", "select", "stadium_id", "from", "concert", ")" ], "question": "Quais são os nomes dos estádios sem shows?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "estádios", "sem", "shows", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, 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": "concert_singer", "query": "SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30", "query_toks": [ "SELECT", "country", "FROM", "singer", "WHERE", "age", ">", "40", "INTERSECT", "SELECT", "country", "FROM", "singer", "WHERE", "age", "<", "30" ], "query_toks_no_value": [ "select", "country", "from", "singer", "where", "age", ">", "value", "intersect", "select", "country", "from", "singer", "where", "age", "<", "value" ], "question": "Mostre os países de origem de um cantor com mais de 40 anos e de um cantor com menos de 30.", "question_toks": [ "Mostre", "os", "países", "de", "origem", "de", "um", "cantor", "com", "mais", "de", "40", "anos", "e", "de", "um", "cantor", "com", "menos", "de", "30", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 40.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 13, false ], null ], 30.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014", "query_toks": [ "SELECT", "name", "FROM", "stadium", "EXCEPT", "SELECT", "T2.name", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.year", "=", "2014" ], "query_toks_no_value": [ "select", "name", "from", "stadium", "except", "select", "t2", ".", "name", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value" ], "question": "Mostre nomes para todos os estádios, exceto para estádios com shows no ano de 2014.", "question_toks": [ "Mostre", "nomes", "para", "todos", "os", "estádios", ",", "exceto", "para", "estádios", "com", "shows", "no", "ano", "de", "2014", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "concert_singer", "query": "SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014", "query_toks": [ "SELECT", "name", "FROM", "stadium", "EXCEPT", "SELECT", "T2.name", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.year", "=", "2014" ], "query_toks_no_value": [ "select", "name", "from", "stadium", "except", "select", "t2", ".", "name", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value" ], "question": "Quais são os nomes de todos os estádios que não tiveram show em 2014?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "todos", "os", "estádios", "que", "não", "tiveram", "show", "em", "2014", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "concert_singer", "query": "SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id", "query_toks": [ "SELECT", "T2.concert_name", ",", "T2.theme", ",", "count", "(", "*", ")", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "concert", "AS", "T2", "ON", "T1.concert_id", "=", "T2.concert_id", "GROUP", "BY", "T2.concert_id" ], "query_toks_no_value": [ "select", "t2", ".", "concert_name", ",", "t2", ".", "theme", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "concert", "as", "t2", "on", "t1", ".", "concert_id", "=", "t2", ".", "concert_id", "group", "by", "t2", ".", "concert_id" ], "question": "Mostre o nome e o tema de todos os concertos e o número de cantores em cada concerto.", "question_toks": [ "Mostre", "o", "nome", "e", "o", "tema", "de", "todos", "os", "concertos", "e", "o", "número", "de", "cantores", "em", "cada", "concerto", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ], [ 0, [ 0, [ 0, 17, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select t2.concert_name , t2.theme , count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id = t2.concert_id group by t2.concert_id", "query_toks": [ "select", "t2.concert_name", ",", "t2.theme", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "concert", "as", "t2", "on", "t1.concert_id", "=", "t2.concert_id", "group", "by", "t2.concert_id" ], "query_toks_no_value": [ "select", "t2", ".", "concert_name", ",", "t2", ".", "theme", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "concert", "as", "t2", "on", "t1", ".", "concert_id", "=", "t2", ".", "concert_id", "group", "by", "t2", ".", "concert_id" ], "question": "Quais são os nomes, temas e número de cantores para cada show?", "question_toks": [ "Quais", "são", "os", "nomes", ",", "temas", "e", "número", "de", "cantores", "para", "cada", "show", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ], [ 0, [ 0, [ 0, 17, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "singer", "AS", "T2", "ON", "T1.singer_id", "=", "T2.singer_id", "GROUP", "BY", "T2.singer_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "singer", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t2", ".", "singer_id" ], "question": "Liste os nomes dos cantores e o número de shows de cada um.", "question_toks": [ "Liste", "os", "nomes", "dos", "cantores", "e", "o", "número", "de", "shows", "de", "cada", "um", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "singer", "AS", "T2", "ON", "T1.singer_id", "=", "T2.singer_id", "GROUP", "BY", "T2.singer_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "singer_in_concert", "as", "t1", "join", "singer", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t2", ".", "singer_id" ], "question": "Quais são os nomes dos cantores e o número de shows de cada pessoa?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "cantores", "e", "o", "número", "de", "shows", "de", "cada", "pessoa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014", "query_toks": [ "SELECT", "T2.name", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "singer", "AS", "T2", "ON", "T1.singer_id", "=", "T2.singer_id", "JOIN", "concert", "AS", "T3", "ON", "T1.concert_id", "=", "T3.concert_id", "WHERE", "T3.year", "=", "2014" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "singer_in_concert", "as", "t1", "join", "singer", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "join", "concert", "as", "t3", "on", "t1", ".", "concert_id", "=", "t3", ".", "concert_id", "where", "t3", ".", "year", "=", "value" ], "question": "Liste todos os nomes de cantores em shows no ano de 2014.", "question_toks": [ "Liste", "todos", "os", "nomes", "de", "cantores", "em", "shows", "no", "ano", "de", "2014", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 8, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014", "query_toks": [ "SELECT", "T2.name", "FROM", "singer_in_concert", "AS", "T1", "JOIN", "singer", "AS", "T2", "ON", "T1.singer_id", "=", "T2.singer_id", "JOIN", "concert", "AS", "T3", "ON", "T1.concert_id", "=", "T3.concert_id", "WHERE", "T3.year", "=", "2014" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "singer_in_concert", "as", "t1", "join", "singer", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "join", "concert", "as", "t3", "on", "t1", ".", "concert_id", "=", "t3", ".", "concert_id", "where", "t3", ".", "year", "=", "value" ], "question": "Quais são os nomes dos cantores que se apresentaram em um show em 2014?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "cantores", "que", "se", "apresentaram", "em", "um", "show", "em", "2014", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 8, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", "query_toks": [ "SELECT", "name", ",", "country", "FROM", "singer", "WHERE", "song_name", "LIKE", "'", "%", "Hey", "%", "'" ], "query_toks_no_value": [ "select", "name", ",", "country", "from", "singer", "where", "song_name", "like", "value" ], "question": "Qual é o nome e a nação do cantor que tem uma música com 'Hey' no nome?", "question_toks": [ "Qual", "é", "o", "nome", "e", "a", "nação", "do", "cantor", "que", "tem", "uma", "música", "com", "'", "Hey", "'", "no", "nome", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 11, false ], null ], "\"%Hey%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", "query_toks": [ "SELECT", "name", ",", "country", "FROM", "singer", "WHERE", "song_name", "LIKE", "'", "%", "Hey", "%", "'" ], "query_toks_no_value": [ "select", "name", ",", "country", "from", "singer", "where", "song_name", "like", "value" ], "question": "Qual é o nome e país de origem de cada cantor que tem uma música com a palavra 'Hey' no título?", "question_toks": [ "Qual", "é", "o", "nome", "e", "país", "de", "origem", "de", "cada", "cantor", "que", "tem", "uma", "música", "com", "a", "palavra", "'", "Hey", "'", "no", "título", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 11, false ], null ], "\"%Hey%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015", "query_toks": [ "SELECT", "T2.name", ",", "T2.location", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.Year", "=", "2014", "INTERSECT", "SELECT", "T2.name", ",", "T2.location", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.Year", "=", "2015" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "t2", ".", "location", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value", "intersect", "select", "t2", ".", "name", ",", "t2", ".", "location", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value" ], "question": "Encontre o nome e a localização dos estádios onde aconteceram alguns shows nos anos de 2014 e 2015.", "question_toks": [ "Encontre", "o", "nome", "e", "a", "localização", "dos", "estádios", "onde", "aconteceram", "alguns", "shows", "nos", "anos", "de", "2014", "e", "2015", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2015.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015", "query_toks": [ "SELECT", "T2.name", ",", "T2.location", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.Year", "=", "2014", "INTERSECT", "SELECT", "T2.name", ",", "T2.location", "FROM", "concert", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.stadium_id", "WHERE", "T1.Year", "=", "2015" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "t2", ".", "location", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value", "intersect", "select", "t2", ".", "name", ",", "t2", ".", "location", "from", "concert", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "stadium_id", "where", "t1", ".", "year", "=", "value" ], "question": "Quais são os nomes e localizações dos estádios que tiveram shows ocorridos em 2014 e 2015?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "localizações", "dos", "estádios", "que", "tiveram", "shows", "ocorridos", "em", "2014", "e", "2015", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2014.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], 2015.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)", "query_toks": [ "select", "count", "(", "*", ")", "from", "concert", "where", "stadium_id", "=", "(", "select", "stadium_id", "from", "stadium", "order", "by", "capacity", "desc", "limit", "1", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "concert", "where", "stadium_id", "=", "(", "select", "stadium_id", "from", "stadium", "order", "by", "capacity", "desc", "limit", "value", ")" ], "question": "Descubra o número de shows ocorridos no estádio com maior capacidade.", "question_toks": [ "Descubra", "o", "número", "de", "shows", "ocorridos", "no", "estádio", "com", "maior", "capacidade", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "concert_singer", "query": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)", "query_toks": [ "select", "count", "(", "*", ")", "from", "concert", "where", "stadium_id", "=", "(", "select", "stadium_id", "from", "stadium", "order", "by", "capacity", "desc", "limit", "1", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "concert", "where", "stadium_id", "=", "(", "select", "stadium_id", "from", "stadium", "order", "by", "capacity", "desc", "limit", "value", ")" ], "question": "Qual a quantidade de shows que ocorreram no estádio com maior capacidade?", "question_toks": [ "Qual", "a", "quantidade", "de", "shows", "que", "ocorreram", "no", "estádio", "com", "maior", "capacidade", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM pets WHERE weight > 10", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "pets", "WHERE", "weight", ">", "10" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "pets", "where", "weight", ">", "value" ], "question": "Encontre o número de animais de estimação com peso superior a 10.", "question_toks": [ "Encontre", "o", "número", "de", "animais", "de", "estimação", "com", "peso", "superior", "a", "10", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 14, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM pets WHERE weight > 10", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "pets", "WHERE", "weight", ">", "10" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "pets", "where", "weight", ">", "value" ], "question": "Quantos animais de estimação pesam mais que 10?", "question_toks": [ "Quantos", "animais", "de", "estimação", "pesam", "mais", "que", "10", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 14, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1", "query_toks": [ "SELECT", "weight", "FROM", "pets", "ORDER", "BY", "pet_age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "weight", "from", "pets", "order", "by", "pet_age", "limit", "value" ], "question": "Encontre o peso do cão mais novo.", "question_toks": [ "Encontre", "o", "peso", "do", "cão", "mais", "novo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1", "query_toks": [ "SELECT", "weight", "FROM", "pets", "ORDER", "BY", "pet_age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "weight", "from", "pets", "order", "by", "pet_age", "limit", "value" ], "question": "Quanto pesa o cão mais novo?", "question_toks": [ "Quanto", "pesa", "o", "cão", "mais", "novo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT max(weight) , petType FROM pets GROUP BY petType", "query_toks": [ "SELECT", "max", "(", "weight", ")", ",", "petType", "FROM", "pets", "GROUP", "BY", "petType" ], "query_toks_no_value": [ "select", "max", "(", "weight", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "Encontre o peso máximo para cada tipo de animal de estimação. Liste o peso máximo e o tipo de animal de estimação.", "question_toks": [ "Encontre", "o", "peso", "máximo", "para", "cada", "tipo", "de", "animal", "de", "estimação", ".", "Liste", "o", "peso", "máximo", "e", "o", "tipo", "de", "animal", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT max(weight) , petType FROM pets GROUP BY petType", "query_toks": [ "SELECT", "max", "(", "weight", ")", ",", "petType", "FROM", "pets", "GROUP", "BY", "petType" ], "query_toks_no_value": [ "select", "max", "(", "weight", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "Liste o peso máximo e tipo para cada tipo de animal de estimação.", "question_toks": [ "Liste", "o", "peso", "máximo", "e", "tipo", "para", "cada", "tipo", "de", "animal", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T1.age", ">", "20" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t1", ".", "age", ">", "value" ], "question": "Encontre o número de animais de estimação pertencentes a alunos com mais de 20 anos.", "question_toks": [ "Encontre", "o", "número", "de", "animais", "de", "estimação", "pertencentes", "a", "alunos", "com", "mais", "de", "20", "anos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T1.age", ">", "20" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t1", ".", "age", ">", "value" ], "question": "Quantos animais de estimação pertencem a alunos com idade superior a 20 anos?", "question_toks": [ "Quantos", "animais", "de", "estimação", "pertencem", "a", "alunos", "com", "idade", "superior", "a", "20", "anos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T2.petid", "=", "T3.petid", "WHERE", "T1.sex", "=", "'F", "'", "AND", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t2", ".", "petid", "=", "t3", ".", "petid", "where", "t1", ".", "sex", "=", "value", "and", "t3", ".", "pettype", "=", "value" ], "question": "Encontre o número de animais de estimação criados por estudantes do sexo feminino (com sexo F).", "question_toks": [ "Encontre", "o", "número", "de", "animais", "de", "estimação", "criados", "por", "estudantes", "do", "sexo", "feminino", "(", "com", "sexo", "F", ")", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"F\"", null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T2.petid", "=", "T3.petid", "WHERE", "T1.sex", "=", "'F", "'", "AND", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t2", ".", "petid", "=", "t3", ".", "petid", "where", "t1", ".", "sex", "=", "value", "and", "t3", ".", "pettype", "=", "value" ], "question": "Quantos animais de estimação são criados por estudantes do sexo feminino?", "question_toks": [ "Quantos", "animais", "de", "estimação", "são", "criados", "por", "estudantes", "do", "sexo", "feminino", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"F\"", null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(DISTINCT pettype) FROM pets", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "pettype", ")", "FROM", "pets" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "pettype", ")", "from", "pets" ], "question": "Encontre o número de tipos distintos de animais de estimação.", "question_toks": [ "Encontre", "o", "número", "de", "tipos", "distintos", "de", "animais", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 12, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(DISTINCT pettype) FROM pets", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "pettype", ")", "FROM", "pets" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "pettype", ")", "from", "pets" ], "question": "Quantos tipos diferentes de animal de estimação existem?", "question_toks": [ "Quantos", "tipos", "diferentes", "de", "animal", "de", "estimação", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 12, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'", "query_toks": [ "SELECT", "DISTINCT", "T1.Fname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", "OR", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "or", "t3", ".", "pettype", "=", "value" ], "question": "Encontre o primeiro nome dos alunos que têm cães ou gatos.", "question_toks": [ "Encontre", "o", "primeiro", "nome", "dos", "alunos", "que", "têm", "cães", "ou", "gatos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ], "or", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'", "query_toks": [ "SELECT", "DISTINCT", "T1.Fname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", "OR", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "or", "t3", ".", "pettype", "=", "value" ], "question": "Quais são os primeiros nomes de todos os alunos que têm um cão ou gato como animal de estimação?", "question_toks": [ "Quais", "são", "os", "primeiros", "nomes", "de", "todos", "os", "alunos", "que", "têm", "um", "cão", "ou", "gato", "como", "animal", "de", "estimação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ], "or", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'cat' intersect select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'dog'", "query_toks": [ "select", "t1.fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1.stuid", "=", "t2.stuid", "join", "pets", "as", "t3", "on", "t3.petid", "=", "t2.petid", "where", "t3.pettype", "=", "\"cat\"", "intersect", "select", "t1.fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1.stuid", "=", "t2.stuid", "join", "pets", "as", "t3", "on", "t3.petid", "=", "t2.petid", "where", "t3.pettype", "=", "\"dog\"" ], "query_toks_no_value": [ "select", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "intersect", "select", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value" ], "question": "Encontre o primeiro nome dos alunos que têm animais de estimação, gatos e cachorros.", "question_toks": [ "Encontre", "o", "primeiro", "nome", "dos", "alunos", "que", "têm", "animais", "de", "estimação", ",", "gatos", "e", "cachorros", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'", "query_toks": [ "SELECT", "T1.Fname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", "INTERSECT", "SELECT", "T1.Fname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'dog", "'" ], "query_toks_no_value": [ "select", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "intersect", "select", "t1", ".", "fname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value" ], "question": "Quais são os primeiros nomes dos alunos que têm cães e gatos como animais de estimação?", "question_toks": [ "Quais", "são", "os", "primeiros", "nomes", "dos", "alunos", "que", "têm", "cães", "e", "gatos", "como", "animais", "de", "estimação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "query_toks": [ "SELECT", "major", ",", "age", "FROM", "student", "WHERE", "stuid", "NOT", "IN", "(", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", ")" ], "query_toks_no_value": [ "select", "major", ",", "age", "from", "student", "where", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", ")" ], "question": "Encontre o curso e a idade dos alunos que não têm um gato de estimação.", "question_toks": [ "Encontre", "o", "curso", "e", "a", "idade", "dos", "alunos", "que", "não", "têm", "um", "gato", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "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": "pets_1", "query": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "query_toks": [ "SELECT", "major", ",", "age", "FROM", "student", "WHERE", "stuid", "NOT", "IN", "(", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", ")" ], "query_toks_no_value": [ "select", "major", ",", "age", "from", "student", "where", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", ")" ], "question": "Qual é o curso de cada aluno que não tem um gato como animal de estimação, e também quantos anos eles têm?", "question_toks": [ "Qual", "é", "o", "curso", "de", "cada", "aluno", "que", "não", "tem", "um", "gato", "como", "animal", "de", "estimação", ",", "e", "também", "quantos", "anos", "eles", "têm", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "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": "pets_1", "query": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "query_toks": [ "SELECT", "stuid", "FROM", "student", "EXCEPT", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "except", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value" ], "question": "Encontre a id de alunos que não têm um gato de estimação.", "question_toks": [ "Encontre", "a", "id", "de", "alunos", "que", "não", "têm", "um", "gato", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "pets_1", "query": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "query_toks": [ "SELECT", "stuid", "FROM", "student", "EXCEPT", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "except", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value" ], "question": "Quais são os ids dos alunos que não possuem gatos como animais de estimação?", "question_toks": [ "Quais", "são", "os", "ids", "dos", "alunos", "que", "não", "possuem", "gatos", "como", "animais", "de", "estimação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "pets_1", "query": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "query_toks": [ "SELECT", "T1.fname", ",", "T1.age", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'dog", "'", "AND", "T1.stuid", "NOT", "IN", "(", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", ")" ], "query_toks_no_value": [ "select", "t1", ".", "fname", ",", "t1", ".", "age", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "and", "t1", ".", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", ")" ], "question": "Encontre o primeiro nome e a idade dos alunos que têm um cachorro, mas não têm um gato como animal de estimação.", "question_toks": [ "Encontre", "o", "primeiro", "nome", "e", "a", "idade", "dos", "alunos", "que", "têm", "um", "cachorro", ",", "mas", "não", "têm", "um", "gato", "como", "animal", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ], "and", [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "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": "pets_1", "query": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "query_toks": [ "SELECT", "T1.fname", ",", "T1.age", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'dog", "'", "AND", "T1.stuid", "NOT", "IN", "(", "SELECT", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pettype", "=", "'cat", "'", ")" ], "query_toks_no_value": [ "select", "t1", ".", "fname", ",", "t1", ".", "age", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", "and", "t1", ".", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pettype", "=", "value", ")" ], "question": "Qual é o primeiro nome de todo aluno que tem um cachorro, mas não tem um gato?", "question_toks": [ "Qual", "é", "o", "primeiro", "nome", "de", "todo", "aluno", "que", "tem", "um", "cachorro", ",", "mas", "não", "tem", "um", "gato", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"dog\"", null ], "and", [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "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": "pets_1", "query": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", "query_toks": [ "SELECT", "pettype", ",", "weight", "FROM", "pets", "ORDER", "BY", "pet_age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "pettype", ",", "weight", "from", "pets", "order", "by", "pet_age", "limit", "value" ], "question": "Encontre o tipo e o peso do animal de estimação mais novo.", "question_toks": [ "Encontre", "o", "tipo", "e", "o", "peso", "do", "animal", "de", "estimação", "mais", "novo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", "query_toks": [ "SELECT", "pettype", ",", "weight", "FROM", "pets", "ORDER", "BY", "pet_age", "LIMIT", "1" ], "query_toks_no_value": [ "select", "pettype", ",", "weight", "from", "pets", "order", "by", "pet_age", "limit", "value" ], "question": "Que tipo de animal de estimação é o animal mais jovem e quanto pesa?", "question_toks": [ "Que", "tipo", "de", "animal", "de", "estimação", "é", "o", "animal", "mais", "jovem", "e", "quanto", "pesa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT petid , weight FROM pets WHERE pet_age > 1", "query_toks": [ "SELECT", "petid", ",", "weight", "FROM", "pets", "WHERE", "pet_age", ">", "1" ], "query_toks_no_value": [ "select", "petid", ",", "weight", "from", "pets", "where", "pet_age", ">", "value" ], "question": "Encontre o id e o peso de todos os animais de estimação com idade superior a 1.", "question_toks": [ "Encontre", "o", "id", "e", "o", "peso", "de", "todos", "os", "animais", "de", "estimação", "com", "idade", "superior", "a", "1", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT petid , weight FROM pets WHERE pet_age > 1", "query_toks": [ "SELECT", "petid", ",", "weight", "FROM", "pets", "WHERE", "pet_age", ">", "1" ], "query_toks_no_value": [ "select", "petid", ",", "weight", "from", "pets", "where", "pet_age", ">", "value" ], "question": "Qual é o id e o peso de cada animal de estimação com mais de 1?", "question_toks": [ "Qual", "é", "o", "id", "e", "o", "peso", "de", "cada", "animal", "de", "estimação", "com", "mais", "de", "1", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype", "query_toks": [ "SELECT", "avg", "(", "pet_age", ")", ",", "max", "(", "pet_age", ")", ",", "pettype", "FROM", "pets", "GROUP", "BY", "pettype" ], "query_toks_no_value": [ "select", "avg", "(", "pet_age", ")", ",", "max", "(", "pet_age", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "Encontre a idade média e máxima para cada tipo de animal de estimação.", "question_toks": [ "Encontre", "a", "idade", "média", "e", "máxima", "para", "cada", "tipo", "de", "animal", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, false ], null ] ], [ 1, [ 0, [ 0, 13, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype", "query_toks": [ "SELECT", "avg", "(", "pet_age", ")", ",", "max", "(", "pet_age", ")", ",", "pettype", "FROM", "pets", "GROUP", "BY", "pettype" ], "query_toks_no_value": [ "select", "avg", "(", "pet_age", ")", ",", "max", "(", "pet_age", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "Qual é a idade média e máxima para cada tipo de animal de estimação?", "question_toks": [ "Qual", "é", "a", "idade", "média", "e", "máxima", "para", "cada", "tipo", "de", "animal", "de", "estimação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 13, false ], null ] ], [ 1, [ 0, [ 0, 13, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype", "query_toks": [ "SELECT", "avg", "(", "weight", ")", ",", "pettype", "FROM", "pets", "GROUP", "BY", "pettype" ], "query_toks_no_value": [ "select", "avg", "(", "weight", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "Encontre o peso médio para cada tipo de animal de estimação.", "question_toks": [ "Encontre", "o", "peso", "médio", "para", "cada", "tipo", "de", "animal", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype", "query_toks": [ "SELECT", "avg", "(", "weight", ")", ",", "pettype", "FROM", "pets", "GROUP", "BY", "pettype" ], "query_toks_no_value": [ "select", "avg", "(", "weight", ")", ",", "pettype", "from", "pets", "group", "by", "pettype" ], "question": "Qual é o peso médio de cada tipo de animal de estimação?", "question_toks": [ "Qual", "é", "o", "peso", "médio", "de", "cada", "tipo", "de", "animal", "de", "estimação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", "query_toks": [ "SELECT", "DISTINCT", "T1.fname", ",", "T1.age", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", ",", "t1", ".", "age", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid" ], "question": "Encontre o primeiro nome e a idade dos alunos que têm um animal de estimação.", "question_toks": [ "Encontre", "o", "primeiro", "nome", "e", "a", "idade", "dos", "alunos", "que", "têm", "um", "animal", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", "query_toks": [ "SELECT", "DISTINCT", "T1.fname", ",", "T1.age", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", ",", "t1", ".", "age", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid" ], "question": "Quais são os nomes e idades diferentes dos alunos que têm animais de estimação?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "idades", "diferentes", "dos", "alunos", "que", "têm", "animais", "de", "estimação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", "query_toks": [ "SELECT", "T2.petid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T1.Lname", "=", "'Smith", "'" ], "query_toks_no_value": [ "select", "t2", ".", "petid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t1", ".", "lname", "=", "value" ], "question": "Encontre a identificação do animal de estimação de um aluno cujo sobrenome é ‘Smith’.", "question_toks": [ "Encontre", "a", "identificação", "do", "animal", "de", "estimação", "de", "um", "aluno", "cujo", "sobrenome", "é", "‘", "Smith", "’", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Smith\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", "query_toks": [ "SELECT", "T2.petid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T1.Lname", "=", "'Smith", "'" ], "query_toks_no_value": [ "select", "t2", ".", "petid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t1", ".", "lname", "=", "value" ], "question": "Qual é a id do animal de estimação do aluno cujo sobrenome é 'Smith'?", "question_toks": [ "Qual", "é", "a", "id", "do", "animal", "de", "estimação", "do", "aluno", "cujo", "sobrenome", "é", "'", "Smith", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Smith\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "T1.stuid", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "GROUP", "BY", "T1.stuid" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "group", "by", "t1", ".", "stuid" ], "question": "Encontre o número de animais de estimação para cada aluno que possui algum animal de estimação e a identificação do aluno.", "question_toks": [ "Encontre", "o", "número", "de", "animais", "de", "estimação", "para", "cada", "aluno", "que", "possui", "algum", "animal", "de", "estimação", "e", "a", "identificação", "do", "aluno", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "select count(*) , t1.stuid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid group by t1.stuid", "query_toks": [ "select", "count", "(", "*", ")", ",", "t1.stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1.stuid", "=", "t2.stuid", "group", "by", "t1.stuid" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t1", ".", "stuid", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "group", "by", "t1", ".", "stuid" ], "question": "Para alunos que têm animais de estimação, quantos animais de estimação cada aluno tem? liste seus ids em vez de nomes.", "question_toks": [ "Para", "alunos", "que", "têm", "animais", "de", "estimação", ",", "quantos", "animais", "de", "estimação", "cada", "aluno", "tem", "?", "liste", "seus", "ids", "em", "vez", "de", "nomes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1", "query_toks": [ "SELECT", "T1.fname", ",", "T1.sex", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "GROUP", "BY", "T1.stuid", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "fname", ",", "t1", ".", "sex", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "group", "by", "t1", ".", "stuid", "having", "count", "(", "*", ")", ">", "value" ], "question": "Encontre o nome e o sexo do aluno que tem mais de um animal de estimação.", "question_toks": [ "Encontre", "o", "nome", "e", "o", "sexo", "do", "aluno", "que", "tem", "mais", "de", "um", "animal", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1", "query_toks": [ "SELECT", "T1.fname", ",", "T1.sex", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "GROUP", "BY", "T1.stuid", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "fname", ",", "t1", ".", "sex", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "group", "by", "t1", ".", "stuid", "having", "count", "(", "*", ")", ">", "value" ], "question": "Qual é o primeiro nome e sexo de todos os alunos que têm mais de um animal de estimação?", "question_toks": [ "Qual", "é", "o", "primeiro", "nome", "e", "sexo", "de", "todos", "os", "alunos", "que", "têm", "mais", "de", "um", "animal", "de", "estimação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "query_toks": [ "SELECT", "T1.lname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pet_age", "=", "3", "AND", "T3.pettype", "=", "'cat", "'" ], "query_toks_no_value": [ "select", "t1", ".", "lname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pet_age", "=", "value", "and", "t3", ".", "pettype", "=", "value" ], "question": "Encontre o sobrenome do aluno que tem um gato de 3 anos.", "question_toks": [ "Encontre", "o", "sobrenome", "do", "aluno", "que", "tem", "um", "gato", "de", "3", "anos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], 3.0, null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "query_toks": [ "SELECT", "T1.lname", "FROM", "student", "AS", "T1", "JOIN", "has_pet", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "JOIN", "pets", "AS", "T3", "ON", "T3.petid", "=", "T2.petid", "WHERE", "T3.pet_age", "=", "3", "AND", "T3.pettype", "=", "'cat", "'" ], "query_toks_no_value": [ "select", "t1", ".", "lname", "from", "student", "as", "t1", "join", "has_pet", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "join", "pets", "as", "t3", "on", "t3", ".", "petid", "=", "t2", ".", "petid", "where", "t3", ".", "pet_age", "=", "value", "and", "t3", ".", "pettype", "=", "value" ], "question": "Qual é o sobrenome do aluno que tem um gato de 3 anos?", "question_toks": [ "Qual", "é", "o", "sobrenome", "do", "aluno", "que", "tem", "um", "gato", "de", "3", "anos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], 3.0, null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "pets_1", "query": "select avg(age) from student where stuid not in (select stuid from has_pet)", "query_toks": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_pet", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_pet", ")" ], "question": "Encontre a idade média dos alunos que não têm animal de estimação.", "question_toks": [ "Encontre", "a", "idade", "média", "dos", "alunos", "que", "não", "têm", "animal", "de", "estimação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "pets_1", "query": "select avg(age) from student where stuid not in (select stuid from has_pet)", "query_toks": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_pet", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_pet", ")" ], "question": "Qual é a idade média de todos os alunos que não possuem animais de estimação?", "question_toks": [ "Qual", "é", "a", "idade", "média", "de", "todos", "os", "alunos", "que", "não", "possuem", "animais", "de", "estimação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "car_1", "query": "SELECT count(*) FROM CONTINENTS;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CONTINENTS", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "continents" ], "question": "Quantos continentes existem?", "question_toks": [ "Quantos", "continentes", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CONTINENTS;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CONTINENTS", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "continents" ], "question": "Qual é o número de continentes?", "question_toks": [ "Qual", "é", "o", "número", "de", "continentes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;", "query_toks": [ "SELECT", "T1.ContId", ",", "T1.Continent", ",", "count", "(", "*", ")", "FROM", "CONTINENTS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.ContId", "=", "T2.Continent", "GROUP", "BY", "T1.ContId", ";" ], "query_toks_no_value": [ "select", "t1", ".", "contid", ",", "t1", ".", "continent", ",", "count", "(", "*", ")", "from", "continents", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "contid", "=", "t2", ".", "continent", "group", "by", "t1", ".", "contid" ], "question": "Quantos países cada continente tem? Liste a id do continente, o nome do continente e o número de países.", "question_toks": [ "Quantos", "países", "cada", "continente", "tem", "?", "Liste", "a", "id", "do", "continente", ",", "o", "nome", "do", "continente", "e", "o", "número", "de", "países", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;", "query_toks": [ "SELECT", "T1.ContId", ",", "T1.Continent", ",", "count", "(", "*", ")", "FROM", "CONTINENTS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.ContId", "=", "T2.Continent", "GROUP", "BY", "T1.ContId", ";" ], "query_toks_no_value": [ "select", "t1", ".", "contid", ",", "t1", ".", "continent", ",", "count", "(", "*", ")", "from", "continents", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "contid", "=", "t2", ".", "continent", "group", "by", "t1", ".", "contid" ], "question": "Para cada continente, liste seu id, nome e quantos países ele tem?", "question_toks": [ "Para", "cada", "continente", ",", "liste", "seu", "id", ",", "nome", "e", "quantos", "países", "ele", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM COUNTRIES;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "COUNTRIES", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "countries" ], "question": "Quantos países estão listados?", "question_toks": [ "Quantos", "países", "estão", "listados", "?" ], "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": "car_1", "query": "SELECT count(*) FROM COUNTRIES;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "COUNTRIES", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "countries" ], "question": "Quantos países existem?", "question_toks": [ "Quantos", "países", "existem", "?" ], "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": "car_1", "query": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", "query_toks": [ "SELECT", "T1.FullName", ",", "T1.Id", ",", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", ";" ], "query_toks_no_value": [ "select", "t1", ".", "fullname", ",", "t1", ".", "id", ",", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id" ], "question": "Quantos modelos cada fabricante de automóveis produz? Liste o nome completo do fabricante, id e o número.", "question_toks": [ "Quantos", "modelos", "cada", "fabricante", "de", "automóveis", "produz", "?", "Liste", "o", "nome", "completo", "do", "fabricante", ",", "id", "e", "o", "número", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", "query_toks": [ "SELECT", "T1.FullName", ",", "T1.Id", ",", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", ";" ], "query_toks_no_value": [ "select", "t1", ".", "fullname", ",", "t1", ".", "id", ",", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id" ], "question": "Qual é o nome completo de cada montadora, junto com seu id e quantos modelos ela produz?", "question_toks": [ "Qual", "é", "o", "nome", "completo", "de", "cada", "montadora", ",", "junto", "com", "seu", "id", "e", "quantos", "modelos", "ela", "produz", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "ORDER", "BY", "T2.horsepower", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "order", "by", "t2", ".", "horsepower", "asc", "limit", "value" ], "question": "Qual modelo de carro tem a potência mínima?", "question_toks": [ "Qual", "modelo", "de", "carro", "tem", "a", "potência", "mínima", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "ORDER", "BY", "T2.horsepower", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "order", "by", "t2", ".", "horsepower", "asc", "limit", "value" ], "question": "Qual é o modelo do carro com a menor potência?", "question_toks": [ "Qual", "é", "o", "modelo", "do", "carro", "com", "a", "menor", "potência", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)", "query_toks": [ "SELECT", "T1.model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.Weight", "<", "(", "SELECT", "avg", "(", "Weight", ")", "FROM", "CARS_DATA", ")" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "weight", "<", "(", "select", "avg", "(", "weight", ")", "from", "cars_data", ")" ], "question": "Encontre o modelo do carro cujo peso está abaixo do peso médio.", "question_toks": [ "Encontre", "o", "modelo", "do", "carro", "cujo", "peso", "está", "abaixo", "do", "peso", "médio", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 21, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 21, 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": "car_1", "query": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)", "query_toks": [ "SELECT", "T1.model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.Weight", "<", "(", "SELECT", "avg", "(", "Weight", ")", "FROM", "CARS_DATA", ")" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "weight", "<", "(", "select", "avg", "(", "weight", ")", "from", "cars_data", ")" ], "question": "Qual é o modelo do carro com peso menor que a média?", "question_toks": [ "Qual", "é", "o", "modelo", "do", "carro", "com", "peso", "menor", "que", "a", "média", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 21, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 21, 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": "car_1", "query": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';", "query_toks": [ "SELECT", "DISTINCT", "T1.Maker", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "JOIN", "CAR_NAMES", "AS", "T3", "ON", "T2.model", "=", "T3.model", "JOIN", "CARS_DATA", "AS", "T4", "ON", "T3.MakeId", "=", "T4.id", "WHERE", "T4.year", "=", "'1970", "'", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "join", "car_names", "as", "t3", "on", "t2", ".", "model", "=", "t3", ".", "model", "join", "cars_data", "as", "t4", "on", "t3", ".", "makeid", "=", "t4", ".", "id", "where", "t4", ".", "year", "=", "value" ], "question": "Encontre o nome dos fabricantes que produziram alguns carros no ano de 1970?", "question_toks": [ "Encontre", "o", "nome", "dos", "fabricantes", "que", "produziram", "alguns", "carros", "no", "ano", "de", "1970", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], "\"1970\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';", "query_toks": [ "SELECT", "DISTINCT", "T1.Maker", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "JOIN", "CAR_NAMES", "AS", "T3", "ON", "T2.model", "=", "T3.model", "JOIN", "CARS_DATA", "AS", "T4", "ON", "T3.MakeId", "=", "T4.id", "WHERE", "T4.year", "=", "'1970", "'", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "join", "car_names", "as", "t3", "on", "t2", ".", "model", "=", "t3", ".", "model", "join", "cars_data", "as", "t4", "on", "t3", ".", "makeid", "=", "t4", ".", "id", "where", "t4", ".", "year", "=", "value" ], "question": "Qual é o nome dos diferentes fabricantes de automóveis que produziram um carro em 1970?", "question_toks": [ "Qual", "é", "o", "nome", "dos", "diferentes", "fabricantes", "de", "automóveis", "que", "produziram", "um", "carro", "em", "1970", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], "\"1970\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);", "query_toks": [ "SELECT", "T2.Make", ",", "T1.Year", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T1.Year", "=", "(", "SELECT", "min", "(", "YEAR", ")", "FROM", "CARS_DATA", ")", ";" ], "query_toks_no_value": [ "select", "t2", ".", "make", ",", "t1", ".", "year", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t1", ".", "year", "=", "(", "select", "min", "(", "year", ")", "from", "cars_data", ")" ], "question": "Encontre a marca e o tempo de produção dos carros que foram produzidos no primeiro ano?", "question_toks": [ "Encontre", "a", "marca", "e", "o", "tempo", "de", "produção", "dos", "carros", "que", "foram", "produzidos", "no", "primeiro", "ano", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 23, 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": "car_1", "query": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);", "query_toks": [ "SELECT", "T2.Make", ",", "T1.Year", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T1.Year", "=", "(", "SELECT", "min", "(", "YEAR", ")", "FROM", "CARS_DATA", ")", ";" ], "query_toks_no_value": [ "select", "t2", ".", "make", ",", "t1", ".", "year", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t1", ".", "year", "=", "(", "select", "min", "(", "year", ")", "from", "cars_data", ")" ], "question": "Qual é o fabricante do carr produzido no primeiro ano e em que ano foi?", "question_toks": [ "Qual", "é", "o", "fabricante", "do", "carr", "produzido", "no", "primeiro", "ano", "e", "em", "que", "ano", "foi", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 23, 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": "car_1", "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;", "query_toks": [ "SELECT", "DISTINCT", "T1.model", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.model", "=", "T2.model", "JOIN", "CARS_DATA", "AS", "T3", "ON", "T2.MakeId", "=", "T3.id", "WHERE", "T3.year", ">", "1980", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "model", "from", "model_list", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "cars_data", "as", "t3", "on", "t2", ".", "makeid", "=", "t3", ".", "id", "where", "t3", ".", "year", ">", "value" ], "question": "Quais modelos distintos de carros são produzidos após 1980?", "question_toks": [ "Quais", "modelos", "distintos", "de", "carros", "são", "produzidos", "após", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;", "query_toks": [ "SELECT", "DISTINCT", "T1.model", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.model", "=", "T2.model", "JOIN", "CARS_DATA", "AS", "T3", "ON", "T2.MakeId", "=", "T3.id", "WHERE", "T3.year", ">", "1980", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "model", "from", "model_list", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "cars_data", "as", "t3", "on", "t2", ".", "makeid", "=", "t3", ".", "id", "where", "t3", ".", "year", ">", "value" ], "question": "Quais são os diferentes modelos de cartões produzidos após 1980?", "question_toks": [ "Quais", "são", "os", "diferentes", "modelos", "de", "cartões", "produzidos", "após", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;", "query_toks": [ "SELECT", "T1.Continent", ",", "count", "(", "*", ")", "FROM", "CONTINENTS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.ContId", "=", "T2.continent", "JOIN", "car_makers", "AS", "T3", "ON", "T2.CountryId", "=", "T3.Country", "GROUP", "BY", "T1.Continent", ";" ], "query_toks_no_value": [ "select", "t1", ".", "continent", ",", "count", "(", "*", ")", "from", "continents", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "contid", "=", "t2", ".", "continent", "join", "car_makers", "as", "t3", "on", "t2", ".", "countryid", "=", "t3", ".", "country", "group", "by", "t1", ".", "continent" ], "question": "Quantas montadoras existem em cada continente? Liste o nome do continente e a contagem.", "question_toks": [ "Quantas", "montadoras", "existem", "em", "cada", "continente", "?", "Liste", "o", "nome", "do", "continente", "e", "a", "contagem", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;", "query_toks": [ "SELECT", "T1.Continent", ",", "count", "(", "*", ")", "FROM", "CONTINENTS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.ContId", "=", "T2.continent", "JOIN", "car_makers", "AS", "T3", "ON", "T2.CountryId", "=", "T3.Country", "GROUP", "BY", "T1.Continent", ";" ], "query_toks_no_value": [ "select", "t1", ".", "continent", ",", "count", "(", "*", ")", "from", "continents", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "contid", "=", "t2", ".", "continent", "join", "car_makers", "as", "t3", "on", "t2", ".", "countryid", "=", "t3", ".", "country", "group", "by", "t1", ".", "continent" ], "question": "Qual é o nome de cada continente e quantas montadoras existem em cada um?", "question_toks": [ "Qual", "é", "o", "nome", "de", "cada", "continente", "e", "quantas", "montadoras", "existem", "em", "cada", "um", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "T2.CountryName", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.Country", "=", "T2.CountryId", "GROUP", "BY", "T1.Country", "ORDER", "BY", "Count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t2", ".", "countryname", "from", "car_makers", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "country", "=", "t2", ".", "countryid", "group", "by", "t1", ".", "country", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual dos países tem mais fabricantes de automóveis? Liste o nome do país.", "question_toks": [ "Qual", "dos", "países", "tem", "mais", "fabricantes", "de", "automóveis", "?", "Liste", "o", "nome", "do", "país", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "T2.CountryName", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.Country", "=", "T2.CountryId", "GROUP", "BY", "T1.Country", "ORDER", "BY", "Count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t2", ".", "countryname", "from", "car_makers", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "country", "=", "t2", ".", "countryid", "group", "by", "t1", ".", "country", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome do país com mais montadoras?", "question_toks": [ "Qual", "é", "o", "nome", "do", "país", "com", "mais", "montadoras", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select count(*) , t2.fullname from model_list as t1 join car_makers as t2 on t1.maker = t2.id group by t2.id;", "query_toks": [ "select", "count", "(", "*", ")", ",", "t2.fullname", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.maker", "=", "t2.id", "group", "by", "t2.id", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t2", ".", "fullname", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "maker", "=", "t2", ".", "id", "group", "by", "t2", ".", "id" ], "question": "Quantos modelos de carros são produzidos por cada fabricante? Liste apenas a contagem e o nome completo do fabricante.", "question_toks": [ "Quantos", "modelos", "de", "carros", "são", "produzidos", "por", "cada", "fabricante", "?", "Liste", "apenas", "a", "contagem", "e", "o", "nome", "completo", "do", "fabricante", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id;", "query_toks": [ "SELECT", "Count", "(", "*", ")", ",", "T2.FullName", ",", "T2.id", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.Maker", "=", "T2.Id", "GROUP", "BY", "T2.id", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t2", ".", "fullname", ",", "t2", ".", "id", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "maker", "=", "t2", ".", "id", "group", "by", "t2", ".", "id" ], "question": "Qual é o número de modelos de carros produzidos por cada fabricante e qual é a id e o nome completo de cada fabricante?", "question_toks": [ "Qual", "é", "o", "número", "de", "modelos", "de", "carros", "produzidos", "por", "cada", "fabricante", "e", "qual", "é", "a", "id", "e", "o", "nome", "completo", "de", "cada", "fabricante", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", "query_toks": [ "SELECT", "T1.Accelerate", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T2.Make", "=", "'amc", "hornet", "sportabout", "(", "sw", ")", "'", ";" ], "query_toks_no_value": [ "select", "t1", ".", "accelerate", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t2", ".", "make", "=", "value" ], "question": "Qual é a aceleração do carro make amc hornet sportabout (sw)?", "question_toks": [ "Qual", "é", "a", "aceleração", "do", "carro", "make", "amc", "hornet", "sportabout", "(", "sw", ")", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 22, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"amc hornet sportabout (sw)\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", "query_toks": [ "SELECT", "T1.Accelerate", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T2.Make", "=", "'amc", "hornet", "sportabout", "(", "sw", ")", "'", ";" ], "query_toks_no_value": [ "select", "t1", ".", "accelerate", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t2", ".", "make", "=", "value" ], "question": "Quanto acelera o carro que torna o amc hornet sportabout (sw)?", "question_toks": [ "Quanto", "acelera", "o", "carro", "que", "torna", "o", "amc", "hornet", "sportabout", "(", "sw", ")", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 22, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"amc hornet sportabout (sw)\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.Country", "=", "T2.CountryId", "WHERE", "T2.CountryName", "=", "'france", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "country", "=", "t2", ".", "countryid", "where", "t2", ".", "countryname", "=", "value" ], "question": "Quantas montadoras existem na França?", "question_toks": [ "Quantas", "montadoras", "existem", "na", "França", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"france\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "COUNTRIES", "AS", "T2", "ON", "T1.Country", "=", "T2.CountryId", "WHERE", "T2.CountryName", "=", "'france", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "countries", "as", "t2", "on", "t1", ".", "country", "=", "t2", ".", "countryid", "where", "t2", ".", "countryname", "=", "value" ], "question": "Qual é o número de fabricantes de cuidados na França?", "question_toks": [ "Qual", "é", "o", "número", "de", "fabricantes", "de", "cuidados", "na", "França", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"france\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.Maker", "=", "T2.Id", "JOIN", "COUNTRIES", "AS", "T3", "ON", "T2.Country", "=", "T3.CountryId", "WHERE", "T3.CountryName", "=", "'usa", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "maker", "=", "t2", ".", "id", "join", "countries", "as", "t3", "on", "t2", ".", "country", "=", "t3", ".", "countryid", "where", "t3", ".", "countryname", "=", "value" ], "question": "Quantos modelos de carros são produzidos nos EUA?", "question_toks": [ "Quantos", "modelos", "de", "carros", "são", "produzidos", "nos", "EUA", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"usa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.Maker", "=", "T2.Id", "JOIN", "COUNTRIES", "AS", "T3", "ON", "T2.Country", "=", "T3.CountryId", "WHERE", "T3.CountryName", "=", "'usa", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "model_list", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "maker", "=", "t2", ".", "id", "join", "countries", "as", "t3", "on", "t2", ".", "country", "=", "t3", ".", "countryid", "where", "t3", ".", "countryname", "=", "value" ], "question": "Qual é a contagem dos modelos de carros produzidos nos Estados Unidos?", "question_toks": [ "Qual", "é", "a", "contagem", "dos", "modelos", "de", "carros", "produzidos", "nos", "Estados", "Unidos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"usa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;", "query_toks": [ "SELECT", "avg", "(", "mpg", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", "=", "4", ";" ], "query_toks_no_value": [ "select", "avg", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "value" ], "question": "Qual é a média de milhas por galão (mpg) dos carros com 4 cilindros?", "question_toks": [ "Qual", "é", "a", "média", "de", "milhas", "por", "galão", "(", "mpg", ")", "dos", "carros", "com", "4", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;", "query_toks": [ "SELECT", "avg", "(", "mpg", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", "=", "4", ";" ], "query_toks_no_value": [ "select", "avg", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "value" ], "question": "Qual é a média de milhas por galão de todos os cartões com 4 cilindros?", "question_toks": [ "Qual", "é", "a", "média", "de", "milhas", "por", "galão", "de", "todos", "os", "cartões", "com", "4", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select min(weight) from cars_data where cylinders = 8 and year = 1974", "query_toks": [ "select", "min", "(", "weight", ")", "from", "cars_data", "where", "cylinders", "=", "8", "and", "year", "=", "1974" ], "query_toks_no_value": [ "select", "min", "(", "weight", ")", "from", "cars_data", "where", "cylinders", "=", "value", "and", "year", "=", "value" ], "question": "Qual é o menor peso do carro produzido com 8 cilindros em 1974?", "question_toks": [ "Qual", "é", "o", "menor", "peso", "do", "carro", "produzido", "com", "8", "cilindros", "em", "1974", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 8.0, null ], "and", [ false, 2, [ 0, [ 0, 23, false ], null ], 1974.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select min(weight) from cars_data where cylinders = 8 and year = 1974", "query_toks": [ "select", "min", "(", "weight", ")", "from", "cars_data", "where", "cylinders", "=", "8", "and", "year", "=", "1974" ], "query_toks_no_value": [ "select", "min", "(", "weight", ")", "from", "cars_data", "where", "cylinders", "=", "value", "and", "year", "=", "value" ], "question": "Qual é o peso mínimo do carro com 8 cilindros produzido em 1974?", "question_toks": [ "Qual", "é", "o", "peso", "mínimo", "do", "carro", "com", "8", "cilindros", "produzido", "em", "1974", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 8.0, null ], "and", [ false, 2, [ 0, [ 0, 23, false ], null ], 1974.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Maker , Model FROM MODEL_LIST;", "query_toks": [ "SELECT", "Maker", ",", "Model", "FROM", "MODEL_LIST", ";" ], "query_toks_no_value": [ "select", "maker", ",", "model", "from", "model_list" ], "question": "Quais são todos os fabricantes e modelos?", "question_toks": [ "Quais", "são", "todos", "os", "fabricantes", "e", "modelos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Maker , Model FROM MODEL_LIST;", "query_toks": [ "SELECT", "Maker", ",", "Model", "FROM", "MODEL_LIST", ";" ], "query_toks_no_value": [ "select", "maker", ",", "model", "from", "model_list" ], "question": "Quais são os fabricantes e modelos?", "question_toks": [ "Quais", "são", "os", "fabricantes", "e", "modelos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;", "query_toks": [ "SELECT", "T1.CountryName", ",", "T1.CountryId", "FROM", "COUNTRIES", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.CountryId", "=", "T2.Country", "GROUP", "BY", "T1.CountryId", "HAVING", "count", "(", "*", ")", ">", "=", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryname", ",", "t1", ".", "countryid", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são os países com pelo menos um fabricante de automóveis? Nome e id da lista.", "question_toks": [ "Quais", "são", "os", "países", "com", "pelo", "menos", "um", "fabricante", "de", "automóveis", "?", "Nome", "e", "id", "da", "lista", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;", "query_toks": [ "SELECT", "T1.CountryName", ",", "T1.CountryId", "FROM", "COUNTRIES", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.CountryId", "=", "T2.Country", "GROUP", "BY", "T1.CountryId", "HAVING", "count", "(", "*", ")", ">", "=", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryname", ",", "t1", ".", "countryid", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são os nomes e ids de todos os países com pelo menos um fabricante de automóveis?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "ids", "de", "todos", "os", "países", "com", "pelo", "menos", "um", "fabricante", "de", "automóveis", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "horsepower", ">", "150", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "horsepower", ">", "value" ], "question": "Qual é o número de carros com potência superior a 150?", "question_toks": [ "Qual", "é", "o", "número", "de", "carros", "com", "potência", "superior", "a", "150", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 20, false ], null ], 150.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "horsepower", ">", "150", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "horsepower", ">", "value" ], "question": "Qual é o número de carros com potência superior a 150?", "question_toks": [ "Qual", "é", "o", "número", "de", "carros", "com", "potência", "superior", "a", "150", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 20, false ], null ], 150.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;", "query_toks": [ "SELECT", "avg", "(", "Weight", ")", ",", "YEAR", "FROM", "CARS_DATA", "GROUP", "BY", "YEAR", ";" ], "query_toks_no_value": [ "select", "avg", "(", "weight", ")", ",", "year", "from", "cars_data", "group", "by", "year" ], "question": "Qual é o peso médio dos carros a cada ano?", "question_toks": [ "Qual", "é", "o", "peso", "médio", "dos", "carros", "a", "cada", "ano", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 21, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;", "query_toks": [ "SELECT", "avg", "(", "Weight", ")", ",", "YEAR", "FROM", "CARS_DATA", "GROUP", "BY", "YEAR", ";" ], "query_toks_no_value": [ "select", "avg", "(", "weight", ")", ",", "year", "from", "cars_data", "group", "by", "year" ], "question": "Qual é o peso médio e ano para cada ano?", "question_toks": [ "Qual", "é", "o", "peso", "médio", "e", "ano", "para", "cada", "ano", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 21, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;", "query_toks": [ "SELECT", "T1.CountryName", "FROM", "COUNTRIES", "AS", "T1", "JOIN", "CONTINENTS", "AS", "T2", "ON", "T1.Continent", "=", "T2.ContId", "JOIN", "CAR_MAKERS", "AS", "T3", "ON", "T1.CountryId", "=", "T3.Country", "WHERE", "T2.Continent", "=", "'europe", "'", "GROUP", "BY", "T1.CountryName", "HAVING", "count", "(", "*", ")", ">", "=", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "continents", "as", "t2", "on", "t1", ".", "continent", "=", "t2", ".", "contid", "join", "car_makers", "as", "t3", "on", "t1", ".", "countryid", "=", "t3", ".", "country", "where", "t2", ".", "continent", "=", "value", "group", "by", "t1", ".", "countryname", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Que países da Europa têm pelo menos 3 fabricantes de automóveis?", "question_toks": [ "Que", "países", "da", "Europa", "têm", "pelo", "menos", "3", "fabricantes", "de", "automóveis", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"europe\"", null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;", "query_toks": [ "SELECT", "T1.CountryName", "FROM", "COUNTRIES", "AS", "T1", "JOIN", "CONTINENTS", "AS", "T2", "ON", "T1.Continent", "=", "T2.ContId", "JOIN", "CAR_MAKERS", "AS", "T3", "ON", "T1.CountryId", "=", "T3.Country", "WHERE", "T2.Continent", "=", "'europe", "'", "GROUP", "BY", "T1.CountryName", "HAVING", "count", "(", "*", ")", ">", "=", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "continents", "as", "t2", "on", "t1", ".", "continent", "=", "t2", ".", "contid", "join", "car_makers", "as", "t3", "on", "t1", ".", "countryid", "=", "t3", ".", "country", "where", "t2", ".", "continent", "=", "value", "group", "by", "t1", ".", "countryname", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são os nomes de todos os países europeus com pelo menos 3 fabricantes?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "todos", "os", "países", "europeus", "com", "pelo", "menos", "3", "fabricantes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"europe\"", null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;", "query_toks": [ "SELECT", "T2.horsepower", ",", "T1.Make", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.cylinders", "=", "3", "ORDER", "BY", "T2.horsepower", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t2", ".", "horsepower", ",", "t1", ".", "make", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "cylinders", "=", "value", "order", "by", "t2", ".", "horsepower", "desc", "limit", "value" ], "question": "Qual é a potência máxima e a marca dos modelos de automóveis com 3 cilindros?", "question_toks": [ "Qual", "é", "a", "potência", "máxima", "e", "a", "marca", "dos", "modelos", "de", "automóveis", "com", "3", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 3.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;", "query_toks": [ "SELECT", "T2.horsepower", ",", "T1.Make", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.cylinders", "=", "3", "ORDER", "BY", "T2.horsepower", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t2", ".", "horsepower", ",", "t1", ".", "make", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "cylinders", "=", "value", "order", "by", "t2", ".", "horsepower", "desc", "limit", "value" ], "question": "Qual é a maior quantidade de cavalos de força para os modelos com 3 cilindros e qual é a marca?", "question_toks": [ "Qual", "é", "a", "maior", "quantidade", "de", "cavalos", "de", "força", "para", "os", "modelos", "com", "3", "cilindros", "e", "qual", "é", "a", "marca", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 3.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "ORDER", "BY", "T2.mpg", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "order", "by", "t2", ".", "mpg", "desc", "limit", "value" ], "question": "Qual modelo economiza mais gasolina? Ou seja, tenha o máximo de milhas por galão.", "question_toks": [ "Qual", "modelo", "economiza", "mais", "gasolina", "?", "Ou", "seja", ",", "tenha", "o", "máximo", "de", "milhas", "por", "galão", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 17, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select t1.model from car_names as t1 join cars_data as t2 on t1.makeid = t2.id order by t2.mpg desc limit 1;", "query_toks": [ "select", "t1.model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1.makeid", "=", "t2.id", "order", "by", "t2.mpg", "desc", "limit", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "order", "by", "t2", ".", "mpg", "desc", "limit", "value" ], "question": "Qual é o modelo do carro com o mpg mais alto?", "question_toks": [ "Qual", "é", "o", "modelo", "do", "carro", "com", "o", "mpg", "mais", "alto", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 17, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR < 1980;", "query_toks": [ "SELECT", "avg", "(", "horsepower", ")", "FROM", "CARS_DATA", "WHERE", "YEAR", "<", "1980", ";" ], "query_toks_no_value": [ "select", "avg", "(", "horsepower", ")", "from", "cars_data", "where", "year", "<", "value" ], "question": "Qual é a potência média dos carros antes de 1980?", "question_toks": [ "Qual", "é", "a", "potência", "média", "dos", "carros", "antes", "de", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select avg(horsepower) from cars_data where year < 1980;", "query_toks": [ "select", "avg", "(", "horsepower", ")", "from", "cars_data", "where", "year", "<", "1980", ";" ], "query_toks_no_value": [ "select", "avg", "(", "horsepower", ")", "from", "cars_data", "where", "year", "<", "value" ], "question": "Qual é a potência média de todos os carros produzidos antes de 1980?", "question_toks": [ "Qual", "é", "a", "potência", "média", "de", "todos", "os", "carros", "produzidos", "antes", "de", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", "query_toks": [ "SELECT", "avg", "(", "T2.edispl", ")", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T1.Model", "=", "'volvo", "'", ";" ], "query_toks_no_value": [ "select", "avg", "(", "t2", ".", "edispl", ")", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t1", ".", "model", "=", "value" ], "question": "Qual é o edispl médio dos carros do modelo volvo?", "question_toks": [ "Qual", "é", "o", "edispl", "médio", "dos", "carros", "do", "modelo", "volvo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 14, false ], null ], "\"volvo\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", "query_toks": [ "SELECT", "avg", "(", "T2.edispl", ")", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T1.Model", "=", "'volvo", "'", ";" ], "query_toks_no_value": [ "select", "avg", "(", "t2", ".", "edispl", ")", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t1", ".", "model", "=", "value" ], "question": "Qual é o edispl médio para todos os volvos?", "question_toks": [ "Qual", "é", "o", "edispl", "médio", "para", "todos", "os", "volvos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 14, false ], null ], "\"volvo\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;", "query_toks": [ "SELECT", "max", "(", "Accelerate", ")", ",", "Cylinders", "FROM", "CARS_DATA", "GROUP", "BY", "Cylinders", ";" ], "query_toks_no_value": [ "select", "max", "(", "accelerate", ")", ",", "cylinders", "from", "cars_data", "group", "by", "cylinders" ], "question": "Qual é a aceleração máxima para diferentes números de cilindros?", "question_toks": [ "Qual", "é", "a", "aceleração", "máxima", "para", "diferentes", "números", "de", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 22, false ], null ] ], [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;", "query_toks": [ "SELECT", "max", "(", "Accelerate", ")", ",", "Cylinders", "FROM", "CARS_DATA", "GROUP", "BY", "Cylinders", ";" ], "query_toks_no_value": [ "select", "max", "(", "accelerate", ")", ",", "cylinders", "from", "cars_data", "group", "by", "cylinders" ], "question": "Qual é a aceleração máxima para todos os diferentes cilindros?", "question_toks": [ "Qual", "é", "a", "aceleração", "máxima", "para", "todos", "os", "diferentes", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 22, false ], null ] ], [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "Model", "FROM", "CAR_NAMES", "GROUP", "BY", "Model", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "model", "from", "car_names", "group", "by", "model", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual modelo tem mais versão (marca) de carros?", "question_toks": [ "Qual", "modelo", "tem", "mais", "versão", "(", "marca", ")", "de", "carros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 14, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "Model", "FROM", "CAR_NAMES", "GROUP", "BY", "Model", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "model", "from", "car_names", "group", "by", "model", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual modelo possui as versões mais diferentes?", "question_toks": [ "Qual", "modelo", "possui", "as", "versões", "mais", "diferentes", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 14, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", ">", "4", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "cylinders", ">", "value" ], "question": "Quantos carros têm mais de 4 cilindros?", "question_toks": [ "Quantos", "carros", "têm", "mais", "de", "4", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", ">", "4", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "cylinders", ">", "value" ], "question": "Qual é a quantidade de carros com mais de 4 cilindros?", "question_toks": [ "Qual", "é", "a", "quantidade", "de", "carros", "com", "mais", "de", "4", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE YEAR = 1980;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "YEAR", "=", "1980", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "year", "=", "value" ], "question": "quantos carros foram produzidos em 1980?", "question_toks": [ "quantos", "carros", "foram", "produzidos", "em", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CARS_DATA WHERE YEAR = 1980;", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "YEAR", "=", "1980", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "year", "=", "value" ], "question": "Em 1980, quantos carros foram fabricados?", "question_toks": [ "Em", "1980", ",", "quantos", "carros", "foram", "fabricados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "WHERE", "T1.FullName", "=", "'American", "Motor", "Company", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "where", "t1", ".", "fullname", "=", "value" ], "question": "Quantos modelos de automóveis foram produzidos pelo fabricante com o nome completo American Motor Company?", "question_toks": [ "Quantos", "modelos", "de", "automóveis", "foram", "produzidos", "pelo", "fabricante", "com", "o", "nome", "completo", "American", "Motor", "Company", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"American Motor Company\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "WHERE", "T1.FullName", "=", "'American", "Motor", "Company", "'", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "where", "t1", ".", "fullname", "=", "value" ], "question": "Qual é o número de modelos de automóveis criados pela montadora American Motor Company?", "question_toks": [ "Qual", "é", "o", "número", "de", "modelos", "de", "automóveis", "criados", "pela", "montadora", "American", "Motor", "Company", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"American Motor Company\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;", "query_toks": [ "SELECT", "T1.FullName", ",", "T1.Id", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", "HAVING", "count", "(", "*", ")", ">", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "fullname", ",", "t1", ".", "id", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais fabricantes projetaram mais de 3 modelos de automóveis? Liste o nome completo e o id.", "question_toks": [ "Quais", "fabricantes", "projetaram", "mais", "de", "3", "modelos", "de", "automóveis", "?", "Liste", "o", "nome", "completo", "e", "o", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;", "query_toks": [ "SELECT", "T1.FullName", ",", "T1.Id", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", "HAVING", "count", "(", "*", ")", ">", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "fullname", ",", "t1", ".", "id", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são os nomes e ids de todos os fabricantes com mais de 3 modelos?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "ids", "de", "todos", "os", "fabricantes", "com", "mais", "de", "3", "modelos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;", "query_toks": [ "SELECT", "DISTINCT", "T2.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Model", "=", "T2.Model", "JOIN", "CAR_MAKERS", "AS", "T3", "ON", "T2.Maker", "=", "T3.Id", "JOIN", "CARS_DATA", "AS", "T4", "ON", "T1.MakeId", "=", "T4.Id", "WHERE", "T3.FullName", "=", "'General", "Motors", "'", "OR", "T4.weight", ">", "3500", ";" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "model", "from", "car_names", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "car_makers", "as", "t3", "on", "t2", ".", "maker", "=", "t3", ".", "id", "join", "cars_data", "as", "t4", "on", "t1", ".", "makeid", "=", "t4", ".", "id", "where", "t3", ".", "fullname", "=", "value", "or", "t4", ".", "weight", ">", "value" ], "question": "Quais modelos distintos são produzidos pelo fabricante com o nome completo General Motors ou pesando mais de 3.500?", "question_toks": [ "Quais", "modelos", "distintos", "são", "produzidos", "pelo", "fabricante", "com", "o", "nome", "completo", "General", "Motors", "ou", "pesando", "mais", "de", "3.500", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 3 ], [ "table_unit", 2 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 12, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"General Motors\"", null ], "or", [ false, 3, [ 0, [ 0, 21, false ], null ], 3500.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;", "query_toks": [ "SELECT", "DISTINCT", "T2.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Model", "=", "T2.Model", "JOIN", "CAR_MAKERS", "AS", "T3", "ON", "T2.Maker", "=", "T3.Id", "JOIN", "CARS_DATA", "AS", "T4", "ON", "T1.MakeId", "=", "T4.Id", "WHERE", "T3.FullName", "=", "'General", "Motors", "'", "OR", "T4.weight", ">", "3500", ";" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "model", "from", "car_names", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "car_makers", "as", "t3", "on", "t2", ".", "maker", "=", "t3", ".", "id", "join", "cars_data", "as", "t4", "on", "t1", ".", "makeid", "=", "t4", ".", "id", "where", "t3", ".", "fullname", "=", "value", "or", "t4", ".", "weight", ">", "value" ], "question": "Quais são os diferentes modelos criados pela montadora General Motors ou pesavam mais de 3.500?", "question_toks": [ "Quais", "são", "os", "diferentes", "modelos", "criados", "pela", "montadora", "General", "Motors", "ou", "pesavam", "mais", "de", "3.500", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 3 ], [ "table_unit", 2 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 12, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"General Motors\"", null ], "or", [ false, 3, [ 0, [ 0, 21, false ], null ], 3500.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select distinct year from cars_data where weight between 3000 and 4000;", "query_toks": [ "select", "distinct", "year", "from", "cars_data", "where", "weight", "between", "3000", "and", "4000", ";" ], "query_toks_no_value": [ "select", "distinct", "year", "from", "cars_data", "where", "weight", "between", "value", "and", "value" ], "question": "Em que anos foram produzidos carros com peso não inferior a 3.000 e não superior a 4.000?", "question_toks": [ "Em", "que", "anos", "foram", "produzidos", "carros", "com", "peso", "não", "inferior", "a", "3.000", "e", "não", "superior", "a", "4.000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 21, false ], null ], 3000.0, 4000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select distinct year from cars_data where weight between 3000 and 4000;", "query_toks": [ "select", "distinct", "year", "from", "cars_data", "where", "weight", "between", "3000", "and", "4000", ";" ], "query_toks_no_value": [ "select", "distinct", "year", "from", "cars_data", "where", "weight", "between", "value", "and", "value" ], "question": "Quais são os diferentes anos em que foram produzidos carros com peso inferior a 4000 e também carros com peso superior a 3000?", "question_toks": [ "Quais", "são", "os", "diferentes", "anos", "em", "que", "foram", "produzidos", "carros", "com", "peso", "inferior", "a", "4000", "e", "também", "carros", "com", "peso", "superior", "a", "3000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 21, false ], null ], 3000.0, 4000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.horsepower", "FROM", "CARS_DATA", "AS", "T1", "ORDER", "BY", "T1.accelerate", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "horsepower", "from", "cars_data", "as", "t1", "order", "by", "t1", ".", "accelerate", "desc", "limit", "value" ], "question": "Qual é a potência do carro com a maior aceleração?", "question_toks": [ "Qual", "é", "a", "potência", "do", "carro", "com", "a", "maior", "aceleração", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 22, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.horsepower", "FROM", "CARS_DATA", "AS", "T1", "ORDER", "BY", "T1.accelerate", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "horsepower", "from", "cars_data", "as", "t1", "order", "by", "t1", ".", "accelerate", "desc", "limit", "value" ], "question": "Qual é a potência do carro com maior aceleração?", "question_toks": [ "Qual", "é", "a", "potência", "do", "carro", "com", "maior", "aceleração", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 22, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;", "query_toks": [ "SELECT", "T1.cylinders", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T2.Model", "=", "'volvo", "'", "ORDER", "BY", "T1.accelerate", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "cylinders", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t2", ".", "model", "=", "value", "order", "by", "t1", ".", "accelerate", "asc", "limit", "value" ], "question": "Para o modelo volvo, quantos cilindros o carro com menos aceleração tem?", "question_toks": [ "Para", "o", "modelo", "volvo", ",", "quantos", "cilindros", "o", "carro", "com", "menos", "aceleração", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 14, false ], null ], "\"volvo\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 22, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;", "query_toks": [ "SELECT", "T1.cylinders", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T2.Model", "=", "'volvo", "'", "ORDER", "BY", "T1.accelerate", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "cylinders", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t2", ".", "model", "=", "value", "order", "by", "t1", ".", "accelerate", "asc", "limit", "value" ], "question": "Para um modelo Volvo, quantos cilindros tem a versão com menos aceleração?", "question_toks": [ "Para", "um", "modelo", "Volvo", ",", "quantos", "cilindros", "tem", "a", "versão", "com", "menos", "aceleração", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 14, false ], null ], "\"volvo\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 22, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Accelerate", ">", "(", "SELECT", "Accelerate", "FROM", "CARS_DATA", "ORDER", "BY", "Horsepower", "DESC", "LIMIT", "1", ")", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "accelerate", ">", "(", "select", "accelerate", "from", "cars_data", "order", "by", "horsepower", "desc", "limit", "value", ")" ], "question": "Quantos carros têm uma aceleração maior do que o carro com a maior potência?", "question_toks": [ "Quantos", "carros", "têm", "uma", "aceleração", "maior", "do", "que", "o", "carro", "com", "a", "maior", "potência", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 22, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 22, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Accelerate", ">", "(", "SELECT", "Accelerate", "FROM", "CARS_DATA", "ORDER", "BY", "Horsepower", "DESC", "LIMIT", "1", ")", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "accelerate", ">", "(", "select", "accelerate", "from", "cars_data", "order", "by", "horsepower", "desc", "limit", "value", ")" ], "question": "Qual é o número de carros com maior aceleração do que aquele com maior potência?", "question_toks": [ "Qual", "é", "o", "número", "de", "carros", "com", "maior", "aceleração", "do", "que", "aquele", "com", "maior", "potência", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 22, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 22, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2", "query_toks": [ "select", "count", "(", "*", ")", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.countryid", "=", "t2.country", "group", "by", "t1.countryid", "having", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quantos países têm mais de 2 fabricantes de automóveis?", "question_toks": [ "Quantos", "países", "têm", "mais", "de", "2", "fabricantes", "de", "automóveis", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2", "query_toks": [ "select", "count", "(", "*", ")", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.countryid", "=", "t2.country", "group", "by", "t1.countryid", "having", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "value" ], "question": "Qual é o número de países com mais de 2 fabricantes de automóveis?", "question_toks": [ "Qual", "é", "o", "número", "de", "países", "com", "mais", "de", "2", "fabricantes", "de", "automóveis", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", ">", "6", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "cylinders", ">", "value" ], "question": "Quantos carros tem mais de 6 cilindros?", "question_toks": [ "Quantos", "carros", "tem", "mais", "de", "6", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 18, false ], null ], 6.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "CARS_DATA", "WHERE", "Cylinders", ">", "6", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cars_data", "where", "cylinders", ">", "value" ], "question": "Qual é a quantidade de carros com mais de 6 cilindros?", "question_toks": [ "Qual", "é", "a", "quantidade", "de", "carros", "com", "mais", "de", "6", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 18, false ], null ], 6.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.Cylinders", "=", "4", "ORDER", "BY", "T2.horsepower", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "cylinders", "=", "value", "order", "by", "t2", ".", "horsepower", "desc", "limit", "value" ], "question": "Para os carros com 4 cilindros, qual modelo tem a maior potência?", "question_toks": [ "Para", "os", "carros", "com", "4", "cilindros", ",", "qual", "modelo", "tem", "a", "maior", "potência", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;", "query_toks": [ "SELECT", "T1.Model", "FROM", "CAR_NAMES", "AS", "T1", "JOIN", "CARS_DATA", "AS", "T2", "ON", "T1.MakeId", "=", "T2.Id", "WHERE", "T2.Cylinders", "=", "4", "ORDER", "BY", "T2.horsepower", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "t1", ".", "model", "from", "car_names", "as", "t1", "join", "cars_data", "as", "t2", "on", "t1", ".", "makeid", "=", "t2", ".", "id", "where", "t2", ".", "cylinders", "=", "value", "order", "by", "t2", ".", "horsepower", "desc", "limit", "value" ], "question": "Para todos os carros de 4 cilindros, qual modelo tem mais potência?", "question_toks": [ "Para", "todos", "os", "carros", "de", "4", "cilindros", ",", "qual", "modelo", "tem", "mais", "potência", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T2.MakeId , T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT min(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3;", "query_toks": [ "SELECT", "T2.MakeId", ",", "T2.Make", "FROM", "CARS_DATA", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Id", "=", "T2.MakeId", "WHERE", "T1.Horsepower", ">", "(", "SELECT", "min", "(", "Horsepower", ")", "FROM", "CARS_DATA", ")", "AND", "T1.Cylinders", "<", "=", "3", ";" ], "query_toks_no_value": [ "select", "t2", ".", "makeid", ",", "t2", ".", "make", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t1", ".", "horsepower", ">", "(", "select", "min", "(", "horsepower", ")", "from", "cars_data", ")", "and", "t1", ".", "cylinders", "<", "=", "value" ], "question": "Entre os carros com mais do que a potência mais baixa, quais não têm mais de 3 cilindros? Liste o makeid do carro e faça o nome.", "question_toks": [ "Entre", "os", "carros", "com", "mais", "do", "que", "a", "potência", "mais", "baixa", ",", "quais", "não", "têm", "mais", "de", "3", "cilindros", "?", "Liste", "o", "makeid", "do", "carro", "e", "faça", "o", "nome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ], "and", [ false, 6, [ 0, [ 0, 18, false ], null ], 3.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select t2.makeid , t2.make from cars_data as t1 join car_names as t2 on t1.id = t2.makeid where t1.horsepower > (select min(horsepower) from cars_data) and t1.cylinders < 4;", "query_toks": [ "select", "t2.makeid", ",", "t2.make", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1.id", "=", "t2.makeid", "where", "t1.horsepower", ">", "(", "select", "min", "(", "horsepower", ")", "from", "cars_data", ")", "and", "t1.cylinders", "<", "4", ";" ], "query_toks_no_value": [ "select", "t2", ".", "makeid", ",", "t2", ".", "make", "from", "cars_data", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "makeid", "where", "t1", ".", "horsepower", ">", "(", "select", "min", "(", "horsepower", ")", "from", "cars_data", ")", "and", "t1", ".", "cylinders", "<", "value" ], "question": "Entre os carros que não têm a potência mínima, quais são os ids e nomes de marca de todos aqueles com menos de 4 cilindros?", "question_toks": [ "Entre", "os", "carros", "que", "não", "têm", "a", "potência", "mínima", ",", "quais", "são", "os", "ids", "e", "nomes", "de", "marca", "de", "todos", "aqueles", "com", "menos", "de", "4", "cilindros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 16, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ], "and", [ false, 4, [ 0, [ 0, 18, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select max(mpg) from cars_data where cylinders = 8 or year < 1980", "query_toks": [ "select", "max", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "8", "or", "year", "<", "1980" ], "query_toks_no_value": [ "select", "max", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "value", "or", "year", "<", "value" ], "question": "Qual é o máximo de milhas por galão de um carro com 8 cilindros ou produzido antes de 1980?", "question_toks": [ "Qual", "é", "o", "máximo", "de", "milhas", "por", "galão", "de", "um", "carro", "com", "8", "cilindros", "ou", "produzido", "antes", "de", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 8.0, null ], "or", [ false, 4, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "select max(mpg) from cars_data where cylinders = 8 or year < 1980", "query_toks": [ "select", "max", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "8", "or", "year", "<", "1980" ], "query_toks_no_value": [ "select", "max", "(", "mpg", ")", "from", "cars_data", "where", "cylinders", "=", "value", "or", "year", "<", "value" ], "question": "Qual é o mpg máximo dos carros que tinham 8 cilindros ou que foram produzidos antes de 1980?", "question_toks": [ "Qual", "é", "o", "mpg", "máximo", "dos", "carros", "que", "tinham", "8", "cilindros", "ou", "que", "foram", "produzidos", "antes", "de", "1980", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 18, false ], null ], 8.0, null ], "or", [ false, 4, [ 0, [ 0, 23, false ], null ], 1980.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';", "query_toks": [ "SELECT", "DISTINCT", "T1.model", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Model", "=", "T2.Model", "JOIN", "CARS_DATA", "AS", "T3", "ON", "T2.MakeId", "=", "T3.Id", "JOIN", "CAR_MAKERS", "AS", "T4", "ON", "T1.Maker", "=", "T4.Id", "WHERE", "T3.weight", "<", "3500", "AND", "T4.FullName", "!", "=", "'Ford", "Motor", "Company", "'", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "model", "from", "model_list", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "cars_data", "as", "t3", "on", "t2", ".", "makeid", "=", "t3", ".", "id", "join", "car_makers", "as", "t4", "on", "t1", ".", "maker", "=", "t4", ".", "id", "where", "t3", ".", "weight", "<", "value", "and", "t4", ".", "fullname", "!", "=", "value" ], "question": "Quais modelos são mais leves do que 3500, mas não foram construídos pela 'Ford Motor Company'?", "question_toks": [ "Quais", "modelos", "são", "mais", "leves", "do", "que", "3500", ",", "mas", "não", "foram", "construídos", "pela", "'", "Ford", "Motor", "Company", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 21, false ], null ], 3500.0, null ], "and", [ false, 7, [ 0, [ 0, 8, false ], null ], "\"Ford Motor Company\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';", "query_toks": [ "SELECT", "DISTINCT", "T1.model", "FROM", "MODEL_LIST", "AS", "T1", "JOIN", "CAR_NAMES", "AS", "T2", "ON", "T1.Model", "=", "T2.Model", "JOIN", "CARS_DATA", "AS", "T3", "ON", "T2.MakeId", "=", "T3.Id", "JOIN", "CAR_MAKERS", "AS", "T4", "ON", "T1.Maker", "=", "T4.Id", "WHERE", "T3.weight", "<", "3500", "AND", "T4.FullName", "!", "=", "'Ford", "Motor", "Company", "'", ";" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "model", "from", "model_list", "as", "t1", "join", "car_names", "as", "t2", "on", "t1", ".", "model", "=", "t2", ".", "model", "join", "cars_data", "as", "t3", "on", "t2", ".", "makeid", "=", "t3", ".", "id", "join", "car_makers", "as", "t4", "on", "t1", ".", "maker", "=", "t4", ".", "id", "where", "t3", ".", "weight", "<", "value", "and", "t4", ".", "fullname", "!", "=", "value" ], "question": "Quais são os diferentes modelos que são mais leves do que 3500, mas não foram construídos pela Ford Motor Company?", "question_toks": [ "Quais", "são", "os", "diferentes", "modelos", "que", "são", "mais", "leves", "do", "que", "3500", ",", "mas", "não", "foram", "construídos", "pela", "Ford", "Motor", "Company", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 16, false ], null ], "and", [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 21, false ], null ], 3500.0, null ], "and", [ false, 7, [ 0, [ 0, 8, false ], null ], "\"Ford Motor Company\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", "query_toks": [ "SELECT", "CountryName", "FROM", "countries", "EXCEPT", "SELECT", "T1.CountryName", "FROM", "countries", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.countryId", "=", "T2.Country", ";" ], "query_toks_no_value": [ "select", "countryname", "from", "countries", "except", "select", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country" ], "question": "Quais são os nomes dos países onde não existe um único fabricante de automóveis?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "países", "onde", "não", "existe", "um", "único", "fabricante", "de", "automóveis", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "car_1", "query": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", "query_toks": [ "SELECT", "CountryName", "FROM", "countries", "EXCEPT", "SELECT", "T1.CountryName", "FROM", "countries", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.countryId", "=", "T2.Country", ";" ], "query_toks_no_value": [ "select", "countryname", "from", "countries", "except", "select", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country" ], "question": "Quais são os nomes dos países sem fabricantes de automóveis?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "países", "sem", "fabricantes", "de", "automóveis", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "car_1", "query": "select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker group by t1.id having count(*) >= 2 intersect select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker join car_names as t3 on t2.model = t3.model group by t1.id having count(*) > 3;", "query_toks": [ "select", "t1.id", ",", "t1.maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1.id", "=", "t2.maker", "group", "by", "t1.id", "having", "count", "(", "*", ")", ">=", "2", "intersect", "select", "t1.id", ",", "t1.maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1.id", "=", "t2.maker", "join", "car_names", "as", "t3", "on", "t2.model", "=", "t3.model", "group", "by", "t1.id", "having", "count", "(", "*", ")", ">", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "id", ",", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "=", "value", "intersect", "select", "t1", ".", "id", ",", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "join", "car_names", "as", "t3", "on", "t2", ".", "model", "=", "t3", ".", "model", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são as montadoras que produzem pelo menos 2 modelos e mais de 3 montadoras? Liste a id e o fabricante.", "question_toks": [ "Quais", "são", "as", "montadoras", "que", "produzem", "pelo", "menos", "2", "modelos", "e", "mais", "de", "3", "montadoras", "?", "Liste", "a", "id", "e", "o", "fabricante", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3;", "query_toks": [ "SELECT", "T1.Id", ",", "T1.Maker", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "GROUP", "BY", "T1.Id", "HAVING", "count", "(", "*", ")", ">", "=", "2", "INTERSECT", "SELECT", "T1.Id", ",", "T1.Maker", "FROM", "CAR_MAKERS", "AS", "T1", "JOIN", "MODEL_LIST", "AS", "T2", "ON", "T1.Id", "=", "T2.Maker", "JOIN", "CAR_NAMES", "AS", "T3", "ON", "T2.model", "=", "T3.model", "GROUP", "BY", "T1.Id", "HAVING", "count", "(", "*", ")", ">", "3", ";" ], "query_toks_no_value": [ "select", "t1", ".", "id", ",", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "=", "value", "intersect", "select", "t1", ".", "id", ",", "t1", ".", "maker", "from", "car_makers", "as", "t1", "join", "model_list", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "maker", "join", "car_names", "as", "t3", "on", "t2", ".", "model", "=", "t3", ".", "model", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são os ids e fabricantes de todos os fabricantes de automóveis que produzem pelo menos 2 modelos e fazem mais de 3 carros?", "question_toks": [ "Quais", "são", "os", "ids", "e", "fabricantes", "de", "todos", "os", "fabricantes", "de", "automóveis", "que", "produzem", "pelo", "menos", "2", "modelos", "e", "fazem", "mais", "de", "3", "carros", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "car_1", "query": "SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat';", "query_toks": [ "SELECT", "T1.countryId", ",", "T1.CountryName", "FROM", "Countries", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.CountryId", "=", "T2.Country", "GROUP", "BY", "T1.countryId", "HAVING", "count", "(", "*", ")", ">", "3", "UNION", "SELECT", "T1.countryId", ",", "T1.CountryName", "FROM", "Countries", "AS", "T1", "JOIN", "CAR_MAKERS", "AS", "T2", "ON", "T1.CountryId", "=", "T2.Country", "JOIN", "MODEL_LIST", "AS", "T3", "ON", "T2.Id", "=", "T3.Maker", "WHERE", "T3.Model", "=", "'fiat", "'", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryid", ",", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "value", "union", "select", "t1", ".", "countryid", ",", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "join", "model_list", "as", "t3", "on", "t2", ".", "id", "=", "t3", ".", "maker", "where", "t3", ".", "model", "=", "value" ], "question": "Quais são os id e nomes dos países que têm mais de 3 fabricantes de automóveis ou produzem o modelo 'fiat'?", "question_toks": [ "Quais", "são", "os", "id", "e", "nomes", "dos", "países", "que", "têm", "mais", "de", "3", "fabricantes", "de", "automóveis", "ou", "produzem", "o", "modelo", "'", "fiat", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"fiat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "car_1", "query": "select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 3 union select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country join model_list as t3 on t2.id = t3.maker where t3.model = 'fiat';", "query_toks": [ "select", "t1.countryid", ",", "t1.countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.countryid", "=", "t2.country", "group", "by", "t1.countryid", "having", "count", "(", "*", ")", ">", "3", "union", "select", "t1.countryid", ",", "t1.countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1.countryid", "=", "t2.country", "join", "model_list", "as", "t3", "on", "t2.id", "=", "t3.maker", "where", "t3.model", "=", "\"fiat\"", ";" ], "query_toks_no_value": [ "select", "t1", ".", "countryid", ",", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "group", "by", "t1", ".", "countryid", "having", "count", "(", "*", ")", ">", "value", "union", "select", "t1", ".", "countryid", ",", "t1", ".", "countryname", "from", "countries", "as", "t1", "join", "car_makers", "as", "t2", "on", "t1", ".", "countryid", "=", "t2", ".", "country", "join", "model_list", "as", "t3", "on", "t2", ".", "id", "=", "t3", ".", "maker", "where", "t3", ".", "model", "=", "value" ], "question": "Quais são os ids e nomes de todos os países que têm mais de 3 fabricantes de automóveis ou produzem modelo fiat?", "question_toks": [ "Quais", "são", "os", "ids", "e", "nomes", "de", "todos", "os", "países", "que", "têm", "mais", "de", "3", "fabricantes", "de", "automóveis", "ou", "produzem", "modelo", "fiat", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 9, false ], null ], "and", [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 11, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"fiat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "flight_2", "query": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "Country", "FROM", "AIRLINES", "WHERE", "Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "country", "from", "airlines", "where", "airline", "=", "value" ], "question": "A que país pertence a companhia aérea \"JetBlue Airways\"?", "question_toks": [ "A", "que", "país", "pertence", "a", "companhia", "aérea", "\"", "JetBlue", "Airways", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "Country", "FROM", "AIRLINES", "WHERE", "Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "country", "from", "airlines", "where", "airline", "=", "value" ], "question": "Em que país a Jetblue Airways é afiliada?", "question_toks": [ "Em", "que", "país", "a", "Jetblue", "Airways", "é", "afiliada", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "Abbreviation", "FROM", "AIRLINES", "WHERE", "Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "abbreviation", "from", "airlines", "where", "airline", "=", "value" ], "question": "Qual é a abreviatura de Airline \"JetBlue Airways\"?", "question_toks": [ "Qual", "é", "a", "abreviatura", "de", "Airline", "\"", "JetBlue", "Airways", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "Abbreviation", "FROM", "AIRLINES", "WHERE", "Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "abbreviation", "from", "airlines", "where", "airline", "=", "value" ], "question": "Qual abreviatura corresponde a Jetblue Airways?", "question_toks": [ "Qual", "abreviatura", "corresponde", "a", "Jetblue", "Airways", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"", "query_toks": [ "SELECT", "Airline", ",", "Abbreviation", "FROM", "AIRLINES", "WHERE", "Country", "=", "``", "USA", "''" ], "query_toks_no_value": [ "select", "airline", ",", "abbreviation", "from", "airlines", "where", "country", "=", "value" ], "question": "Liste todos os nomes das companhias aéreas e suas abreviações em \"EUA\".", "question_toks": [ "Liste", "todos", "os", "nomes", "das", "companhias", "aéreas", "e", "suas", "abreviações", "em", "\"", "EUA", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"", "query_toks": [ "SELECT", "Airline", ",", "Abbreviation", "FROM", "AIRLINES", "WHERE", "Country", "=", "``", "USA", "''" ], "query_toks_no_value": [ "select", "airline", ",", "abbreviation", "from", "airlines", "where", "country", "=", "value" ], "question": "Quais são os nomes e abreviações das companhias aéreas nos EUA?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "abreviações", "das", "companhias", "aéreas", "nos", "EUA", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"", "query_toks": [ "SELECT", "AirportCode", ",", "AirportName", "FROM", "AIRPORTS", "WHERE", "city", "=", "``", "Anthony", "''" ], "query_toks_no_value": [ "select", "airportcode", ",", "airportname", "from", "airports", "where", "city", "=", "value" ], "question": "Liste o código e o nome do aeroporto na cidade de Anthony.", "question_toks": [ "Liste", "o", "código", "e", "o", "nome", "do", "aeroporto", "na", "cidade", "de", "Anthony", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Anthony\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"", "query_toks": [ "SELECT", "AirportCode", ",", "AirportName", "FROM", "AIRPORTS", "WHERE", "city", "=", "``", "Anthony", "''" ], "query_toks_no_value": [ "select", "airportcode", ",", "airportname", "from", "airports", "where", "city", "=", "value" ], "question": "Forneça o código e o nome do aeroporto correspondentes à cidade de Antônio.", "question_toks": [ "Forneça", "o", "código", "e", "o", "nome", "do", "aeroporto", "correspondentes", "à", "cidade", "de", "Antônio", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Anthony\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines" ], "question": "Quantas companhias aéreas nós temos?", "question_toks": [ "Quantas", "companhias", "aéreas", "nós", "temos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines" ], "question": "Qual é o número total de companhias aéreas?", "question_toks": [ "Qual", "é", "o", "número", "total", "de", "companhias", "aéreas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRPORTS", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRPORTS" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airports" ], "question": "Quantos aeroportos nós temos?", "question_toks": [ "Quantos", "aeroportos", "nós", "temos", "?" ], "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": "flight_2", "query": "SELECT count(*) FROM AIRPORTS", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRPORTS" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airports" ], "question": "Retorne o número de aeroportos.", "question_toks": [ "Retorne", "o", "número", "de", "aeroportos", "." ], "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": "flight_2", "query": "SELECT count(*) FROM FLIGHTS", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights" ], "question": "Quantos voos temos?", "question_toks": [ "Quantos", "voos", "temos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights" ], "question": "Retorna o número de voos.", "question_toks": [ "Retorna", "o", "número", "de", "voos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"", "query_toks": [ "SELECT", "Airline", "FROM", "AIRLINES", "WHERE", "Abbreviation", "=", "``", "UAL", "''" ], "query_toks_no_value": [ "select", "airline", "from", "airlines", "where", "abbreviation", "=", "value" ], "question": "Qual companhia aérea tem a abreviatura 'UAL'?", "question_toks": [ "Qual", "companhia", "aérea", "tem", "a", "abreviatura", "'", "UAL", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], "\"UAL\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"", "query_toks": [ "SELECT", "Airline", "FROM", "AIRLINES", "WHERE", "Abbreviation", "=", "``", "UAL", "''" ], "query_toks_no_value": [ "select", "airline", "from", "airlines", "where", "abbreviation", "=", "value" ], "question": "Dê à companhia aérea a abreviatura 'UAL'.", "question_toks": [ "Dê", "à", "companhia", "aérea", "a", "abreviatura", "'", "UAL", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], "\"UAL\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "WHERE", "Country", "=", "``", "USA", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "where", "country", "=", "value" ], "question": "Quantas companhias aéreas são dos EUA?", "question_toks": [ "Quantas", "companhias", "aéreas", "são", "dos", "EUA", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "WHERE", "Country", "=", "``", "USA", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "where", "country", "=", "value" ], "question": "Retorne o número de companhias aéreas nos EUA.", "question_toks": [ "Retorne", "o", "número", "de", "companhias", "aéreas", "nos", "EUA", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "query_toks": [ "SELECT", "City", ",", "Country", "FROM", "AIRPORTS", "WHERE", "AirportName", "=", "``", "Alton", "''" ], "query_toks_no_value": [ "select", "city", ",", "country", "from", "airports", "where", "airportname", "=", "value" ], "question": "Em que cidade e país fica o aeroporto de Alton?", "question_toks": [ "Em", "que", "cidade", "e", "país", "fica", "o", "aeroporto", "de", "Alton", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"Alton\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "query_toks": [ "SELECT", "City", ",", "Country", "FROM", "AIRPORTS", "WHERE", "AirportName", "=", "``", "Alton", "''" ], "query_toks_no_value": [ "select", "city", ",", "country", "from", "airports", "where", "airportname", "=", "value" ], "question": "Forneça a cidade e o país para o aeroporto de Alton.", "question_toks": [ "Forneça", "a", "cidade", "e", "o", "país", "para", "o", "aeroporto", "de", "Alton", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"Alton\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", "query_toks": [ "SELECT", "AirportName", "FROM", "AIRPORTS", "WHERE", "AirportCode", "=", "``", "AKO", "''" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "airportcode", "=", "value" ], "question": "Qual é o nome do aeroporto para o aeroporto 'AKO'?", "question_toks": [ "Qual", "é", "o", "nome", "do", "aeroporto", "para", "o", "aeroporto", "'", "AKO", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"AKO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", "query_toks": [ "SELECT", "AirportName", "FROM", "AIRPORTS", "WHERE", "AirportCode", "=", "``", "AKO", "''" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "airportcode", "=", "value" ], "question": "Retorne o nome do aeroporto com o código 'AKO'.", "question_toks": [ "Retorne", "o", "nome", "do", "aeroporto", "com", "o", "código", "'", "AKO", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"AKO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"", "query_toks": [ "SELECT", "AirportName", "FROM", "AIRPORTS", "WHERE", "City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "city", "=", "value" ], "question": "Quais são os nomes dos aeroportos na cidade 'Aberdeen'?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "aeroportos", "na", "cidade", "'", "Aberdeen", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"", "query_toks": [ "SELECT", "AirportName", "FROM", "AIRPORTS", "WHERE", "City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "city", "=", "value" ], "question": "Quais são os nomes dos aeroportos em Aberdeen?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "aeroportos", "em", "Aberdeen", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "WHERE", "SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "where", "sourceairport", "=", "value" ], "question": "Quantos voos partem de 'APG'?", "question_toks": [ "Quantos", "voos", "partem", "de", "'", "APG", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "WHERE", "SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "where", "sourceairport", "=", "value" ], "question": "Conte o número de voos partindo de 'APG'.", "question_toks": [ "Conte", "o", "número", "de", "voos", "partindo", "de", "'", "APG", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "WHERE", "DestAirport", "=", "``", "ATO", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "where", "destairport", "=", "value" ], "question": "Quantos voos têm destino ATO?", "question_toks": [ "Quantos", "voos", "têm", "destino", "ATO", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"ATO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "WHERE", "DestAirport", "=", "``", "ATO", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "where", "destairport", "=", "value" ], "question": "Conte o número de voos em ATO.", "question_toks": [ "Conte", "o", "número", "de", "voos", "em", "ATO", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"ATO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.SourceAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "sourceairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Quantos voos partem da cidade de Aberdeen?", "question_toks": [ "Quantos", "voos", "partem", "da", "cidade", "de", "Aberdeen", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.SourceAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "sourceairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Retorne o número de voos partindo de Aberdeen.", "question_toks": [ "Retorne", "o", "número", "de", "voos", "partindo", "de", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Quantos voos chegam à cidade de Aberdeen?", "question_toks": [ "Quantos", "voos", "chegam", "à", "cidade", "de", "Aberdeen", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Retorne o número de voos chegando em Aberdeen.", "question_toks": [ "Retorne", "o", "número", "de", "voos", "chegando", "em", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "JOIN", "AIRPORTS", "AS", "T3", "ON", "T1.SourceAirport", "=", "T3.AirportCode", "WHERE", "T2.City", "=", "``", "Ashley", "''", "AND", "T3.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "join", "airports", "as", "t3", "on", "t1", ".", "sourceairport", "=", "t3", ".", "airportcode", "where", "t2", ".", "city", "=", "value", "and", "t3", ".", "city", "=", "value" ], "question": "Quantos voos partem da cidade 'Aberdeen' e têm destino na cidade 'Ashley'?", "question_toks": [ "Quantos", "voos", "partem", "da", "cidade", "'", "Aberdeen", "'", "e", "têm", "destino", "na", "cidade", "'", "Ashley", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Ashley\"", null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "JOIN", "AIRPORTS", "AS", "T3", "ON", "T1.SourceAirport", "=", "T3.AirportCode", "WHERE", "T2.City", "=", "``", "Ashley", "''", "AND", "T3.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "join", "airports", "as", "t3", "on", "t1", ".", "sourceairport", "=", "t3", ".", "airportcode", "where", "t2", ".", "city", "=", "value", "and", "t3", ".", "city", "=", "value" ], "question": "Quantos voos voam de Aberdeen para Ashley?", "question_toks": [ "Quantos", "voos", "voam", "de", "Aberdeen", "para", "Ashley", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Ashley\"", null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRLINES", "AS", "T2", "ON", "T1.Airline", "=", "T2.uid", "WHERE", "T2.Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airlines", "as", "t2", "on", "t1", ".", "airline", "=", "t2", ".", "uid", "where", "t2", ".", "airline", "=", "value" ], "question": "Quantos voos tem a companhia aérea 'JetBlue Airways'?", "question_toks": [ "Quantos", "voos", "tem", "a", "companhia", "aérea", "'", "JetBlue", "Airways", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRLINES", "AS", "T2", "ON", "T1.Airline", "=", "T2.uid", "WHERE", "T2.Airline", "=", "``", "JetBlue", "Airways", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airlines", "as", "t2", "on", "t1", ".", "airline", "=", "t2", ".", "uid", "where", "t2", ".", "airline", "=", "value" ], "question": "Forneça o número de voos da Jetblue Airways.", "question_toks": [ "Forneça", "o", "número", "de", "voos", "da", "Jetblue", "Airways", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"JetBlue Airways\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T2.Airline", "=", "T1.uid", "WHERE", "T1.Airline", "=", "``", "United", "Airlines", "''", "AND", "T2.DestAirport", "=", "``", "ASY", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t2", ".", "airline", "=", "t1", ".", "uid", "where", "t1", ".", "airline", "=", "value", "and", "t2", ".", "destairport", "=", "value" ], "question": "Quantos voos da 'United Airlines' vão para o aeroporto 'ASY'?", "question_toks": [ "Quantos", "voos", "da", "'", "United", "Airlines", "'", "vão", "para", "o", "aeroporto", "'", "ASY", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], "\"ASY\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T2.Airline", "=", "T1.uid", "WHERE", "T1.Airline", "=", "``", "United", "Airlines", "''", "AND", "T2.DestAirport", "=", "``", "ASY", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t2", ".", "airline", "=", "t1", ".", "uid", "where", "t1", ".", "airline", "=", "value", "and", "t2", ".", "destairport", "=", "value" ], "question": "Conte o número de voos da United Airlines que chegam ao Aeroporto ASY.", "question_toks": [ "Conte", "o", "número", "de", "voos", "da", "United", "Airlines", "que", "chegam", "ao", "Aeroporto", "ASY", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ], "and", [ false, 2, [ 0, [ 0, 13, false ], null ], "\"ASY\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T2.Airline", "=", "T1.uid", "WHERE", "T1.Airline", "=", "``", "United", "Airlines", "''", "AND", "T2.SourceAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t2", ".", "airline", "=", "t1", ".", "uid", "where", "t1", ".", "airline", "=", "value", "and", "t2", ".", "sourceairport", "=", "value" ], "question": "Quantos voos da 'United Airlines' partem do aeroporto 'AHD'?", "question_toks": [ "Quantos", "voos", "da", "'", "United", "Airlines", "'", "partem", "do", "aeroporto", "'", "AHD", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T2.Airline", "=", "T1.uid", "WHERE", "T1.Airline", "=", "``", "United", "Airlines", "''", "AND", "T2.SourceAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t2", ".", "airline", "=", "t1", ".", "uid", "where", "t1", ".", "airline", "=", "value", "and", "t2", ".", "sourceairport", "=", "value" ], "question": "Retorne o número de voos da United Airlines saindo do aeroporto AHD.", "question_toks": [ "Retorne", "o", "número", "de", "voos", "da", "United", "Airlines", "saindo", "do", "aeroporto", "AHD", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ], "and", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "JOIN", "AIRLINES", "AS", "T3", "ON", "T3.uid", "=", "T1.Airline", "WHERE", "T2.City", "=", "``", "Aberdeen", "''", "AND", "T3.Airline", "=", "``", "United", "Airlines", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "join", "airlines", "as", "t3", "on", "t3", ".", "uid", "=", "t1", ".", "airline", "where", "t2", ".", "city", "=", "value", "and", "t3", ".", "airline", "=", "value" ], "question": "Quantos voos da United Airlines vão para a cidade de 'Aberdeen'?", "question_toks": [ "Quantos", "voos", "da", "United", "Airlines", "vão", "para", "a", "cidade", "de", "'", "Aberdeen", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ], "and", [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "JOIN", "AIRLINES", "AS", "T3", "ON", "T3.uid", "=", "T1.Airline", "WHERE", "T2.City", "=", "``", "Aberdeen", "''", "AND", "T3.Airline", "=", "``", "United", "Airlines", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "join", "airlines", "as", "t3", "on", "t3", ".", "uid", "=", "t1", ".", "airline", "where", "t2", ".", "city", "=", "value", "and", "t3", ".", "airline", "=", "value" ], "question": "Conte o número de voos da United Airlines que chegam em Aberdeen.", "question_toks": [ "Conte", "o", "número", "de", "voos", "da", "United", "Airlines", "que", "chegam", "em", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ], "and", [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ], "and", [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.City", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "GROUP", "BY", "T1.City", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "city", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "group", "by", "t1", ".", "city", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual cidade tem o maior número de voos chegando?", "question_toks": [ "Qual", "cidade", "tem", "o", "maior", "número", "de", "voos", "chegando", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.City", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "GROUP", "BY", "T1.City", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "city", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "group", "by", "t1", ".", "city", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual cidade tem o aeroporto de destino mais frequente?", "question_toks": [ "Qual", "cidade", "tem", "o", "aeroporto", "de", "destino", "mais", "frequente", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.City", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.City", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "city", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "city", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual cidade tem o maior número de voos de partida?", "question_toks": [ "Qual", "cidade", "tem", "o", "maior", "número", "de", "voos", "de", "partida", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 12, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.City", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.City", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "city", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "city", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual cidade é o aeroporto de origem mais frequente?", "question_toks": [ "Qual", "cidade", "é", "o", "aeroporto", "de", "origem", "mais", "frequente", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 12, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.AirportCode", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "OR", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.AirportCode", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airportcode", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "or", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "airportcode", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o código do aeroporto com maior número de voos?", "question_toks": [ "Qual", "é", "o", "código", "do", "aeroporto", "com", "maior", "número", "de", "voos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.AirportCode", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "OR", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.AirportCode", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airportcode", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "or", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "airportcode", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o código do aeroporto com mais voos?", "question_toks": [ "Qual", "é", "o", "código", "do", "aeroporto", "com", "mais", "voos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1", "query_toks": [ "SELECT", "T1.AirportCode", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "OR", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.AirportCode", "ORDER", "BY", "count", "(", "*", ")", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airportcode", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "or", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "airportcode", "order", "by", "count", "(", "*", ")", "limit", "value" ], "question": "Qual é o código do aeroporto com menor número de voos?", "question_toks": [ "Qual", "é", "o", "código", "do", "aeroporto", "com", "menor", "número", "de", "voos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1", "query_toks": [ "SELECT", "T1.AirportCode", "FROM", "AIRPORTS", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.AirportCode", "=", "T2.DestAirport", "OR", "T1.AirportCode", "=", "T2.SourceAirport", "GROUP", "BY", "T1.AirportCode", "ORDER", "BY", "count", "(", "*", ")", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airportcode", "from", "airports", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "airportcode", "=", "t2", ".", "destairport", "or", "t1", ".", "airportcode", "=", "t2", ".", "sourceairport", "group", "by", "t1", ".", "airportcode", "order", "by", "count", "(", "*", ")", "limit", "value" ], "question": "Dê o código do aeroporto com o menor número de voos.", "question_toks": [ "Dê", "o", "código", "do", "aeroporto", "com", "o", "menor", "número", "de", "voos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual companhia aérea tem o maior número de voos?", "question_toks": [ "Qual", "companhia", "aérea", "tem", "o", "maior", "número", "de", "voos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual companhia aérea atende mais voos?", "question_toks": [ "Qual", "companhia", "aérea", "atende", "mais", "voos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1", "query_toks": [ "SELECT", "T1.Abbreviation", ",", "T1.Country", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "ORDER", "BY", "count", "(", "*", ")", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "abbreviation", ",", "t1", ".", "country", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "order", "by", "count", "(", "*", ")", "limit", "value" ], "question": "Encontre a abreviatura e o país da companhia aérea com o menor número de voos?", "question_toks": [ "Encontre", "a", "abreviatura", "e", "o", "país", "da", "companhia", "aérea", "com", "o", "menor", "número", "de", "voos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1", "query_toks": [ "SELECT", "T1.Abbreviation", ",", "T1.Country", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "ORDER", "BY", "count", "(", "*", ")", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "abbreviation", ",", "t1", ".", "country", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "order", "by", "count", "(", "*", ")", "limit", "value" ], "question": "Qual é a abreviatura de airilne has the menos vôos e em que país se encontra?", "question_toks": [ "Qual", "é", "a", "abreviatura", "de", "airilne", "has", "the", "menos", "vôos", "e", "em", "que", "país", "se", "encontra", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Quais são as companhias aéreas que possuem algum vôo saindo do aeroporto 'AHD'?", "question_toks": [ "Quais", "são", "as", "companhias", "aéreas", "que", "possuem", "algum", "vôo", "saindo", "do", "aeroporto", "'", "AHD", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Quais companhias aéreas têm um voo com aeroporto de origem AHD?", "question_toks": [ "Quais", "companhias", "aéreas", "têm", "um", "voo", "com", "aeroporto", "de", "origem", "AHD", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.DestAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "destairport", "=", "value" ], "question": "Quais são as companhias aéreas que têm voos chegando no aeroporto 'AHD'?", "question_toks": [ "Quais", "são", "as", "companhias", "aéreas", "que", "têm", "voos", "chegando", "no", "aeroporto", "'", "AHD", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.DestAirport", "=", "``", "AHD", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "destairport", "=", "value" ], "question": "Quais companhias aéreas têm voos com destino ao aeroporto AHD?", "question_toks": [ "Quais", "companhias", "aéreas", "têm", "voos", "com", "destino", "ao", "aeroporto", "AHD", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"AHD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "APG", "''", "INTERSECT", "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "CVO", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value", "intersect", "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Encontre todas as companhias aéreas com voos dos aeroportos 'APG' e 'CVO'.", "question_toks": [ "Encontre", "todas", "as", "companhias", "aéreas", "com", "voos", "dos", "aeroportos", "'", "APG", "'", "e", "'", "CVO", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CVO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "APG", "''", "INTERSECT", "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "CVO", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value", "intersect", "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Quais companhias aéreas têm voos saindo dos aeroportos APG e CVO?", "question_toks": [ "Quais", "companhias", "aéreas", "têm", "voos", "saindo", "dos", "aeroportos", "APG", "e", "CVO", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CVO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "CVO", "''", "EXCEPT", "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value", "except", "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Encontre todas as companhias aéreas que possuem voos do aeroporto 'CVO', mas não da 'APG'.", "question_toks": [ "Encontre", "todas", "as", "companhias", "aéreas", "que", "possuem", "voos", "do", "aeroporto", "'", "CVO", "'", ",", "mas", "não", "da", "'", "APG", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CVO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "CVO", "''", "EXCEPT", "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "WHERE", "T2.SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value", "except", "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "where", "t2", ".", "sourceairport", "=", "value" ], "question": "Quais companhias aéreas partem de CVO, mas não de aeroportos APG?", "question_toks": [ "Quais", "companhias", "aéreas", "partem", "de", "CVO", ",", "mas", "não", "de", "aeroportos", "APG", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CVO\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "HAVING", "count", "(", "*", ")", ">", "10" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "having", "count", "(", "*", ")", ">", "value" ], "question": "Encontre todas as companhias aéreas com pelo menos 10 voos.", "question_toks": [ "Encontre", "todas", "as", "companhias", "aéreas", "com", "pelo", "menos", "10", "voos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "HAVING", "count", "(", "*", ")", ">", "10" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais companhias aéreas têm pelo menos 10 voos?", "question_toks": [ "Quais", "companhias", "aéreas", "têm", "pelo", "menos", "10", "voos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "HAVING", "count", "(", "*", ")", "<", "200" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "having", "count", "(", "*", ")", "<", "value" ], "question": "Encontre todas as companhias aéreas com menos de 200 voos.", "question_toks": [ "Encontre", "todas", "as", "companhias", "aéreas", "com", "menos", "de", "200", "voos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 4, [ 0, [ 3, 0, false ], null ], 200.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "query_toks": [ "SELECT", "T1.Airline", "FROM", "AIRLINES", "AS", "T1", "JOIN", "FLIGHTS", "AS", "T2", "ON", "T1.uid", "=", "T2.Airline", "GROUP", "BY", "T1.Airline", "HAVING", "count", "(", "*", ")", "<", "200" ], "query_toks_no_value": [ "select", "t1", ".", "airline", "from", "airlines", "as", "t1", "join", "flights", "as", "t2", "on", "t1", ".", "uid", "=", "t2", ".", "airline", "group", "by", "t1", ".", "airline", "having", "count", "(", "*", ")", "<", "value" ], "question": "Quais companhias aéreas têm menos de 200 voos?", "question_toks": [ "Quais", "companhias", "aéreas", "têm", "menos", "de", "200", "voos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 4, [ 0, [ 3, 0, false ], null ], 200.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRLINES", "AS", "T2", "ON", "T2.uid", "=", "T1.Airline", "WHERE", "T2.Airline", "=", "``", "United", "Airlines", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airlines", "as", "t2", "on", "t2", ".", "uid", "=", "t1", ".", "airline", "where", "t2", ".", "airline", "=", "value" ], "question": "Quais são os números dos voos da companhia aérea \"United Airlines\"?", "question_toks": [ "Quais", "são", "os", "números", "dos", "voos", "da", "companhia", "aérea", "\"", "United", "Airlines", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRLINES", "AS", "T2", "ON", "T2.uid", "=", "T1.Airline", "WHERE", "T2.Airline", "=", "``", "United", "Airlines", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airlines", "as", "t2", "on", "t2", ".", "uid", "=", "t1", ".", "airline", "where", "t2", ".", "airline", "=", "value" ], "question": "Quais números de voo correspondem aos voos da United Airlines?", "question_toks": [ "Quais", "números", "de", "voo", "correspondem", "aos", "voos", "da", "United", "Airlines", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"United Airlines\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "query_toks": [ "SELECT", "FlightNo", "FROM", "FLIGHTS", "WHERE", "SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "flightno", "from", "flights", "where", "sourceairport", "=", "value" ], "question": "Quais são os números dos voos que partem do aeroporto \"APG\"?", "question_toks": [ "Quais", "são", "os", "números", "dos", "voos", "que", "partem", "do", "aeroporto", "\"", "APG", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "query_toks": [ "SELECT", "FlightNo", "FROM", "FLIGHTS", "WHERE", "SourceAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "flightno", "from", "flights", "where", "sourceairport", "=", "value" ], "question": "Forneça os números dos voos que partem de APG.", "question_toks": [ "Forneça", "os", "números", "dos", "voos", "que", "partem", "de", "APG", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", "query_toks": [ "SELECT", "FlightNo", "FROM", "FLIGHTS", "WHERE", "DestAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "flightno", "from", "flights", "where", "destairport", "=", "value" ], "question": "Quais são os números dos voos que chegam ao aeroporto \"APG\"?", "question_toks": [ "Quais", "são", "os", "números", "dos", "voos", "que", "chegam", "ao", "aeroporto", "\"", "APG", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", "query_toks": [ "SELECT", "FlightNo", "FROM", "FLIGHTS", "WHERE", "DestAirport", "=", "``", "APG", "''" ], "query_toks_no_value": [ "select", "flightno", "from", "flights", "where", "destairport", "=", "value" ], "question": "Forneça os números dos voos que pousam no APG.", "question_toks": [ "Forneça", "os", "números", "dos", "voos", "que", "pousam", "no", "APG", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"APG\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.SourceAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "sourceairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Quais são os números dos voos que partem da cidade \"Aberdeen\"?", "question_toks": [ "Quais", "são", "os", "números", "dos", "voos", "que", "partem", "da", "cidade", "\"", "Aberdeen", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.SourceAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "sourceairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Forneça os números dos voos que partem de Aberdeen.", "question_toks": [ "Forneça", "os", "números", "dos", "voos", "que", "partem", "de", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 12, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Quais são os números dos voos que chegam à cidade \"Aberdeen\"?", "question_toks": [ "Quais", "são", "os", "números", "dos", "voos", "que", "chegam", "à", "cidade", "\"", "Aberdeen", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "query_toks": [ "SELECT", "T1.FlightNo", "FROM", "FLIGHTS", "AS", "T1", "JOIN", "AIRPORTS", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.City", "=", "``", "Aberdeen", "''" ], "query_toks_no_value": [ "select", "t1", ".", "flightno", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value" ], "question": "Forneça os números dos voos que chegam em Aberdeen.", "question_toks": [ "Forneça", "os", "números", "dos", "voos", "que", "chegam", "em", "Aberdeen", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Flights", "AS", "T1", "JOIN", "Airports", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.city", "=", "``", "Aberdeen", "''", "OR", "T2.city", "=", "``", "Abilene", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value", "or", "t2", ".", "city", "=", "value" ], "question": "Encontre o número de voos que pousam na cidade de Aberdeen ou Abilene.", "question_toks": [ "Encontre", "o", "número", "de", "voos", "que", "pousam", "na", "cidade", "de", "Aberdeen", "ou", "Abilene", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ], "or", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Abilene\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Flights", "AS", "T1", "JOIN", "Airports", "AS", "T2", "ON", "T1.DestAirport", "=", "T2.AirportCode", "WHERE", "T2.city", "=", "``", "Aberdeen", "''", "OR", "T2.city", "=", "``", "Abilene", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "flights", "as", "t1", "join", "airports", "as", "t2", "on", "t1", ".", "destairport", "=", "t2", ".", "airportcode", "where", "t2", ".", "city", "=", "value", "or", "t2", ".", "city", "=", "value" ], "question": "Quantos voos pousam em Aberdeen ou Abilene?", "question_toks": [ "Quantos", "voos", "pousam", "em", "Aberdeen", "ou", "Abilene", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 13, false ], null ], [ 0, 6, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Aberdeen\"", null ], "or", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Abilene\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", "query_toks": [ "SELECT", "AirportName", "FROM", "Airports", "WHERE", "AirportCode", "NOT", "IN", "(", "SELECT", "SourceAirport", "FROM", "Flights", "UNION", "SELECT", "DestAirport", "FROM", "Flights", ")" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "airportcode", "not", "in", "(", "select", "sourceairport", "from", "flights", "union", "select", "destairport", "from", "flights", ")" ], "question": "Encontre o nome dos aeroportos que não têm voos de ida e volta.", "question_toks": [ "Encontre", "o", "nome", "dos", "aeroportos", "que", "não", "têm", "voos", "de", "ida", "e", "volta", "." ], "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", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "flight_2", "query": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", "query_toks": [ "SELECT", "AirportName", "FROM", "Airports", "WHERE", "AirportCode", "NOT", "IN", "(", "SELECT", "SourceAirport", "FROM", "Flights", "UNION", "SELECT", "DestAirport", "FROM", "Flights", ")" ], "query_toks_no_value": [ "select", "airportname", "from", "airports", "where", "airportcode", "not", "in", "(", "select", "sourceairport", "from", "flights", "union", "select", "destairport", "from", "flights", ")" ], "question": "Quais aeroportos não possuem voos de ida ou de chegada?", "question_toks": [ "Quais", "aeroportos", "não", "possuem", "voos", "de", "ida", "ou", "de", "chegada", "?" ], "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", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) FROM employee", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "employee" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "employee" ], "question": "Quantos funcionários tem?", "question_toks": [ "Quantos", "funcionários", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) FROM employee", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "employee" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "employee" ], "question": "Conte o número de funcionários", "question_toks": [ "Conte", "o", "número", "de", "funcionários" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM employee ORDER BY age", "query_toks": [ "SELECT", "name", "FROM", "employee", "ORDER", "BY", "age" ], "query_toks_no_value": [ "select", "name", "from", "employee", "order", "by", "age" ], "question": "Classifique os nomes dos funcionários por idade em ordem crescente.", "question_toks": [ "Classifique", "os", "nomes", "dos", "funcionários", "por", "idade", "em", "ordem", "crescente", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM employee ORDER BY age", "query_toks": [ "SELECT", "name", "FROM", "employee", "ORDER", "BY", "age" ], "query_toks_no_value": [ "select", "name", "from", "employee", "order", "by", "age" ], "question": "Liste os nomes dos funcionários e classifique em ordem crescente de idade.", "question_toks": [ "Liste", "os", "nomes", "dos", "funcionários", "e", "classifique", "em", "ordem", "crescente", "de", "idade", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , city FROM employee GROUP BY city", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "city", "FROM", "employee", "GROUP", "BY", "city" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "city", "from", "employee", "group", "by", "city" ], "question": "Qual é o número de funcionários de cada cidade?", "question_toks": [ "Qual", "é", "o", "número", "de", "funcionários", "de", "cada", "cidade", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , city FROM employee GROUP BY city", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "city", "FROM", "employee", "GROUP", "BY", "city" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "city", "from", "employee", "group", "by", "city" ], "question": "Conte o número de funcionários de cada cidade.", "question_toks": [ "Conte", "o", "número", "de", "funcionários", "de", "cada", "cidade", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1", "query_toks": [ "SELECT", "city", "FROM", "employee", "WHERE", "age", "<", "30", "GROUP", "BY", "city", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "city", "from", "employee", "where", "age", "<", "value", "group", "by", "city", "having", "count", "(", "*", ")", ">", "value" ], "question": "De quais cidades vem mais de um funcionário com menos de 30 anos?", "question_toks": [ "De", "quais", "cidades", "vem", "mais", "de", "um", "funcionário", "com", "menos", "de", "30", "anos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 3, false ], null ], 30.0, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1", "query_toks": [ "SELECT", "city", "FROM", "employee", "WHERE", "age", "<", "30", "GROUP", "BY", "city", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "city", "from", "employee", "where", "age", "<", "value", "group", "by", "city", "having", "count", "(", "*", ")", ">", "value" ], "question": "Encontre as cidades que têm mais de um funcionário com menos de 30 anos.", "question_toks": [ "Encontre", "as", "cidades", "que", "têm", "mais", "de", "um", "funcionário", "com", "menos", "de", "30", "anos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 3, false ], null ], 30.0, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "LOCATION", "FROM", "shop", "GROUP", "BY", "LOCATION" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "location", "from", "shop", "group", "by", "location" ], "question": "Encontre o número de lojas em cada local.", "question_toks": [ "Encontre", "o", "número", "de", "lojas", "em", "cada", "local", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "LOCATION", "FROM", "shop", "GROUP", "BY", "LOCATION" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "location", "from", "shop", "group", "by", "location" ], "question": "Quantas lojas existem em cada local?", "question_toks": [ "Quantas", "lojas", "existem", "em", "cada", "local", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "query_toks": [ "SELECT", "manager_name", ",", "district", "FROM", "shop", "ORDER", "BY", "number_products", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "manager_name", ",", "district", "from", "shop", "order", "by", "number_products", "desc", "limit", "value" ], "question": "Encontre o nome do gerente e o distrito da loja cujo número de produtos é o maior.", "question_toks": [ "Encontre", "o", "nome", "do", "gerente", "e", "o", "distrito", "da", "loja", "cujo", "número", "de", "produtos", "é", "o", "maior", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "query_toks": [ "SELECT", "manager_name", ",", "district", "FROM", "shop", "ORDER", "BY", "number_products", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "manager_name", ",", "district", "from", "shop", "order", "by", "number_products", "desc", "limit", "value" ], "question": "Qual é o nome do gerente e o distrito da loja que vende o maior número de produtos?", "question_toks": [ "Qual", "é", "o", "nome", "do", "gerente", "e", "o", "distrito", "da", "loja", "que", "vende", "o", "maior", "número", "de", "produtos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT min(Number_products) , max(Number_products) FROM shop", "query_toks": [ "SELECT", "min", "(", "Number_products", ")", ",", "max", "(", "Number_products", ")", "FROM", "shop" ], "query_toks_no_value": [ "select", "min", "(", "number_products", ")", ",", "max", "(", "number_products", ")", "from", "shop" ], "question": "encontre o número mínimo e máximo de produtos de todas as lojas.", "question_toks": [ "encontre", "o", "número", "mínimo", "e", "máximo", "de", "produtos", "de", "todas", "as", "lojas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 9, false ], null ] ], [ 1, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT min(Number_products) , max(Number_products) FROM shop", "query_toks": [ "SELECT", "min", "(", "Number_products", ")", ",", "max", "(", "Number_products", ")", "FROM", "shop" ], "query_toks_no_value": [ "select", "min", "(", "number_products", ")", ",", "max", "(", "number_products", ")", "from", "shop" ], "question": "Quais são os números mínimo e máximo de produtos em todas as lojas?", "question_toks": [ "Quais", "são", "os", "números", "mínimo", "e", "máximo", "de", "produtos", "em", "todas", "as", "lojas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 9, false ], null ] ], [ 1, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC", "query_toks": [ "SELECT", "name", ",", "LOCATION", ",", "district", "FROM", "shop", "ORDER", "BY", "number_products", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "location", ",", "district", "from", "shop", "order", "by", "number_products", "desc" ], "question": "Retorne o nome, localização e distrito de todas as lojas em ordem decrescente de número de produtos.", "question_toks": [ "Retorne", "o", "nome", ",", "localização", "e", "distrito", "de", "todas", "as", "lojas", "em", "ordem", "decrescente", "de", "número", "de", "produtos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC", "query_toks": [ "SELECT", "name", ",", "LOCATION", ",", "district", "FROM", "shop", "ORDER", "BY", "number_products", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "location", ",", "district", "from", "shop", "order", "by", "number_products", "desc" ], "question": "Classifique todas as lojas por número de produtos em ordem decrescente e retorne o nome, a localização e o bairro de cada loja.", "question_toks": [ "Classifique", "todas", "as", "lojas", "por", "número", "de", "produtos", "em", "ordem", "decrescente", "e", "retorne", "o", "nome", ",", "a", "localização", "e", "o", "bairro", "de", "cada", "loja", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", "query_toks": [ "SELECT", "name", "FROM", "shop", "WHERE", "number_products", ">", "(", "SELECT", "avg", "(", "number_products", ")", "FROM", "shop", ")" ], "query_toks_no_value": [ "select", "name", "from", "shop", "where", "number_products", ">", "(", "select", "avg", "(", "number_products", ")", "from", "shop", ")" ], "question": "Encontre os nomes das lojas cujo número de produtos é maior do que o número médio de produtos.", "question_toks": [ "Encontre", "os", "nomes", "das", "lojas", "cujo", "número", "de", "produtos", "é", "maior", "do", "que", "o", "número", "médio", "de", "produtos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 9, 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": "employee_hire_evaluation", "query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", "query_toks": [ "SELECT", "name", "FROM", "shop", "WHERE", "number_products", ">", "(", "SELECT", "avg", "(", "number_products", ")", "FROM", "shop", ")" ], "query_toks_no_value": [ "select", "name", "from", "shop", "where", "number_products", ">", "(", "select", "avg", "(", "number_products", ")", "from", "shop", ")" ], "question": "O número de produtos de quais lojas está acima da média? Dê-me os nomes das lojas.", "question_toks": [ "O", "número", "de", "produtos", "de", "quais", "lojas", "está", "acima", "da", "média", "?", "Dê-me", "os", "nomes", "das", "lojas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 9, 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": "employee_hire_evaluation", "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", "FROM", "employee", "AS", "t1", "JOIN", "evaluation", "AS", "t2", "ON", "t1.Employee_ID", "=", "t2.Employee_ID", "GROUP", "BY", "t2.Employee_ID", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "employee", "as", "t1", "join", "evaluation", "as", "t2", "on", "t1", ".", "employee_id", "=", "t2", ".", "employee_id", "group", "by", "t2", ".", "employee_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "encontre o nome do funcionário mais premiado na avaliação.", "question_toks": [ "encontre", "o", "nome", "do", "funcionário", "mais", "premiado", "na", "avaliação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", "FROM", "employee", "AS", "t1", "JOIN", "evaluation", "AS", "t2", "ON", "t1.Employee_ID", "=", "t2.Employee_ID", "GROUP", "BY", "t2.Employee_ID", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "employee", "as", "t1", "join", "evaluation", "as", "t2", "on", "t1", ".", "employee_id", "=", "t2", ".", "employee_id", "group", "by", "t2", ".", "employee_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual funcionário recebeu mais prêmios nas avaliações? Dê-me o nome do funcionário.", "question_toks": [ "Qual", "funcionário", "recebeu", "mais", "prêmios", "nas", "avaliações", "?", "Dê-me", "o", "nome", "do", "funcionário", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", "FROM", "employee", "AS", "t1", "JOIN", "evaluation", "AS", "t2", "ON", "t1.Employee_ID", "=", "t2.Employee_ID", "ORDER", "BY", "t2.bonus", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "employee", "as", "t1", "join", "evaluation", "as", "t2", "on", "t1", ".", "employee_id", "=", "t2", ".", "employee_id", "order", "by", "t2", ".", "bonus", "desc", "limit", "value" ], "question": "Encontre o nome do funcionário que recebeu o maior bônus único.", "question_toks": [ "Encontre", "o", "nome", "do", "funcionário", "que", "recebeu", "o", "maior", "bônus", "único", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 17, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", "FROM", "employee", "AS", "t1", "JOIN", "evaluation", "AS", "t2", "ON", "t1.Employee_ID", "=", "t2.Employee_ID", "ORDER", "BY", "t2.bonus", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "employee", "as", "t1", "join", "evaluation", "as", "t2", "on", "t1", ".", "employee_id", "=", "t2", ".", "employee_id", "order", "by", "t2", ".", "bonus", "desc", "limit", "value" ], "question": "Qual funcionário recebeu o maior bônus? Dê-me o nome do funcionário.", "question_toks": [ "Qual", "funcionário", "recebeu", "o", "maior", "bônus", "?", "Dê-me", "o", "nome", "do", "funcionário", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 15, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 17, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "query_toks": [ "SELECT", "name", "FROM", "employee", "WHERE", "Employee_ID", "NOT", "IN", "(", "SELECT", "Employee_ID", "FROM", "evaluation", ")" ], "query_toks_no_value": [ "select", "name", "from", "employee", "where", "employee_id", "not", "in", "(", "select", "employee_id", "from", "evaluation", ")" ], "question": "Encontre os nomes dos funcionários que nunca ganharam nenhum prêmio na avaliação.", "question_toks": [ "Encontre", "os", "nomes", "dos", "funcionários", "que", "nunca", "ganharam", "nenhum", "prêmio", "na", "avaliação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, 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": "employee_hire_evaluation", "query": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "query_toks": [ "SELECT", "name", "FROM", "employee", "WHERE", "Employee_ID", "NOT", "IN", "(", "SELECT", "Employee_ID", "FROM", "evaluation", ")" ], "query_toks_no_value": [ "select", "name", "from", "employee", "where", "employee_id", "not", "in", "(", "select", "employee_id", "from", "evaluation", ")" ], "question": "Quais são os nomes dos funcionários que nunca foram avaliados?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "funcionários", "que", "nunca", "foram", "avaliados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, 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": "employee_hire_evaluation", "query": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t2.name", "FROM", "hiring", "AS", "t1", "JOIN", "shop", "AS", "t2", "ON", "t1.shop_id", "=", "t2.shop_id", "GROUP", "BY", "t1.shop_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "hiring", "as", "t1", "join", "shop", "as", "t2", "on", "t1", ".", "shop_id", "=", "t2", ".", "shop_id", "group", "by", "t1", ".", "shop_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome da loja que está contratando o maior número de funcionários?", "question_toks": [ "Qual", "é", "o", "nome", "da", "loja", "que", "está", "contratando", "o", "maior", "número", "de", "funcionários", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t2.name", "FROM", "hiring", "AS", "t1", "JOIN", "shop", "AS", "t2", "ON", "t1.shop_id", "=", "t2.shop_id", "GROUP", "BY", "t1.shop_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "hiring", "as", "t1", "join", "shop", "as", "t2", "on", "t1", ".", "shop_id", "=", "t2", ".", "shop_id", "group", "by", "t1", ".", "shop_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual loja tem mais funcionários? Dê-me o nome da loja.", "question_toks": [ "Qual", "loja", "tem", "mais", "funcionários", "?", "Dê-me", "o", "nome", "da", "loja", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)", "query_toks": [ "SELECT", "name", "FROM", "shop", "WHERE", "shop_id", "NOT", "IN", "(", "SELECT", "shop_id", "FROM", "hiring", ")" ], "query_toks_no_value": [ "select", "name", "from", "shop", "where", "shop_id", "not", "in", "(", "select", "shop_id", "from", "hiring", ")" ], "question": "Encontre o nome das lojas que não contratam nenhum funcionário.", "question_toks": [ "Encontre", "o", "nome", "das", "lojas", "que", "não", "contratam", "nenhum", "funcionário", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, 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": "employee_hire_evaluation", "query": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)", "query_toks": [ "SELECT", "name", "FROM", "shop", "WHERE", "shop_id", "NOT", "IN", "(", "SELECT", "shop_id", "FROM", "hiring", ")" ], "query_toks_no_value": [ "select", "name", "from", "shop", "where", "shop_id", "not", "in", "(", "select", "shop_id", "from", "hiring", ")" ], "question": "Quais lojas funcionam sem funcionários? Encontre os nomes das lojas", "question_toks": [ "Quais", "lojas", "funcionam", "sem", "funcionários", "?", "Encontre", "os", "nomes", "das", "lojas" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, 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": "employee_hire_evaluation", "query": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "t2.name", "FROM", "hiring", "AS", "t1", "JOIN", "shop", "AS", "t2", "ON", "t1.shop_id", "=", "t2.shop_id", "GROUP", "BY", "t2.name" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t2", ".", "name", "from", "hiring", "as", "t1", "join", "shop", "as", "t2", "on", "t1", ".", "shop_id", "=", "t2", ".", "shop_id", "group", "by", "t2", ".", "name" ], "question": "Encontre o número de funcionários contratados em cada loj", "question_toks": [ "Encontre", "o", "número", "de", "funcionários", "contratados", "em", "cada", "loj" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "t2.name", "FROM", "hiring", "AS", "t1", "JOIN", "shop", "AS", "t2", "ON", "t1.shop_id", "=", "t2.shop_id", "GROUP", "BY", "t2.name" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "t2", ".", "name", "from", "hiring", "as", "t1", "join", "shop", "as", "t2", "on", "t1", ".", "shop_id", "=", "t2", ".", "shop_id", "group", "by", "t2", ".", "name" ], "question": "Para cada loja, retorne o número de funcionários que trabalham lá e o nome da loja.", "question_toks": [ "Para", "cada", "loja", ",", "retorne", "o", "número", "de", "funcionários", "que", "trabalham", "lá", "e", "o", "nome", "da", "loja", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 11, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT sum(bonus) FROM evaluation", "query_toks": [ "SELECT", "sum", "(", "bonus", ")", "FROM", "evaluation" ], "query_toks_no_value": [ "select", "sum", "(", "bonus", ")", "from", "evaluation" ], "question": "Qual é o bônus total dado em todas as avaliações?", "question_toks": [ "Qual", "é", "o", "bônus", "total", "dado", "em", "todas", "as", "avaliações", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT sum(bonus) FROM evaluation", "query_toks": [ "SELECT", "sum", "(", "bonus", ")", "FROM", "evaluation" ], "query_toks_no_value": [ "select", "sum", "(", "bonus", ")", "from", "evaluation" ], "question": "Encontre o valor total do bônus concedido em todas as avaliações.", "question_toks": [ "Encontre", "o", "valor", "total", "do", "bônus", "concedido", "em", "todas", "as", "avaliações", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT * FROM hiring", "query_toks": [ "SELECT", "*", "FROM", "hiring" ], "query_toks_no_value": [ "select", "*", "from", "hiring" ], "question": "Dê-me todas as informações sobre contratação.", "question_toks": [ "Dê-me", "todas", "as", "informações", "sobre", "contratação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT * FROM hiring", "query_toks": [ "SELECT", "*", "FROM", "hiring" ], "query_toks_no_value": [ "select", "*", "from", "hiring" ], "question": "Quais são todas as informações sobre contratação?", "question_toks": [ "Quais", "são", "todas", "as", "informações", "sobre", "contratação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000", "query_toks": [ "SELECT", "district", "FROM", "shop", "WHERE", "Number_products", "<", "3000", "INTERSECT", "SELECT", "district", "FROM", "shop", "WHERE", "Number_products", ">", "10000" ], "query_toks_no_value": [ "select", "district", "from", "shop", "where", "number_products", "<", "value", "intersect", "select", "district", "from", "shop", "where", "number_products", ">", "value" ], "question": "Qual distrito tem lojas com menos de 3.000 produtos e lojas com mais de 10.000 produtos?", "question_toks": [ "Qual", "distrito", "tem", "lojas", "com", "menos", "de", "3.000", "produtos", "e", "lojas", "com", "mais", "de", "10.000", "produtos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 9, false ], null ], 3000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], 10000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000", "query_toks": [ "SELECT", "district", "FROM", "shop", "WHERE", "Number_products", "<", "3000", "INTERSECT", "SELECT", "district", "FROM", "shop", "WHERE", "Number_products", ">", "10000" ], "query_toks_no_value": [ "select", "district", "from", "shop", "where", "number_products", "<", "value", "intersect", "select", "district", "from", "shop", "where", "number_products", ">", "value" ], "question": "Encontre os distritos em que existem lojas que vendem menos de 3.000 produtos e lojas que vendem mais de 10.000 produtos.", "question_toks": [ "Encontre", "os", "distritos", "em", "que", "existem", "lojas", "que", "vendem", "menos", "de", "3.000", "produtos", "e", "lojas", "que", "vendem", "mais", "de", "10.000", "produtos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 9, false ], null ], 3000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], 10000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(DISTINCT LOCATION) FROM shop", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "LOCATION", ")", "FROM", "shop" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "location", ")", "from", "shop" ], "question": "Quantas localizações de lojas diferentes existem?", "question_toks": [ "Quantas", "localizações", "de", "lojas", "diferentes", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 7, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "employee_hire_evaluation", "query": "SELECT count(DISTINCT LOCATION) FROM shop", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "LOCATION", ")", "FROM", "shop" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "location", ")", "from", "shop" ], "question": "Conte o número de localizações de lojas distintas.", "question_toks": [ "Conte", "o", "número", "de", "localizações", "de", "lojas", "distintas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 7, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Documents", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Documents" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "documents" ], "question": "Quantos documentos temos?", "question_toks": [ "Quantos", "documentos", "temos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Documents", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Documents" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "documents" ], "question": "Conte o número de documentos.", "question_toks": [ "Conte", "o", "número", "de", "documentos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , document_name , document_description FROM Documents", "query_toks": [ "SELECT", "document_id", ",", "document_name", ",", "document_description", "FROM", "Documents" ], "query_toks_no_value": [ "select", "document_id", ",", "document_name", ",", "document_description", "from", "documents" ], "question": "Liste IDs de documentos, nomes de documentos e descrições de todos os documentos.", "question_toks": [ "Liste", "IDs", "de", "documentos", ",", "nomes", "de", "documentos", "e", "descrições", "de", "todos", "os", "documentos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , document_name , document_description FROM Documents", "query_toks": [ "SELECT", "document_id", ",", "document_name", ",", "document_description", "FROM", "Documents" ], "query_toks_no_value": [ "select", "document_id", ",", "document_name", ",", "document_description", "from", "documents" ], "question": "Quais são os ids, nomes e descrições de todos os documentos?", "question_toks": [ "Quais", "são", "os", "ids", ",", "nomes", "e", "descrições", "de", "todos", "os", "documentos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", "query_toks": [ "SELECT", "document_name", ",", "template_id", "FROM", "Documents", "WHERE", "Document_Description", "LIKE", "``", "%", "w", "%", "''" ], "query_toks_no_value": [ "select", "document_name", ",", "template_id", "from", "documents", "where", "document_description", "like", "value" ], "question": "Qual é o nome do documento e o id do modelo para o documento com a descrição com a letra 'w' nele?", "question_toks": [ "Qual", "é", "o", "nome", "do", "documento", "e", "o", "id", "do", "modelo", "para", "o", "documento", "com", "a", "descrição", "com", "a", "letra", "'", "w", "'", "nele", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 12, false ], null ], "\"%w%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", "query_toks": [ "SELECT", "document_name", ",", "template_id", "FROM", "Documents", "WHERE", "Document_Description", "LIKE", "``", "%", "w", "%", "''" ], "query_toks_no_value": [ "select", "document_name", ",", "template_id", "from", "documents", "where", "document_description", "like", "value" ], "question": "Retorne os nomes e ids de modelo para documentos que contenham a letra w em sua descrição.", "question_toks": [ "Retorne", "os", "nomes", "e", "ids", "de", "modelo", "para", "documentos", "que", "contenham", "a", "letra", "w", "em", "sua", "descrição", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 12, false ], null ], "\"%w%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", "query_toks": [ "SELECT", "document_id", ",", "template_id", ",", "Document_Description", "FROM", "Documents", "WHERE", "document_name", "=", "``", "Robbin", "CV", "''" ], "query_toks_no_value": [ "select", "document_id", ",", "template_id", ",", "document_description", "from", "documents", "where", "document_name", "=", "value" ], "question": "Qual é o id do documento, id do modelo e descrição para um documento chamado \"Robbin CV\"?", "question_toks": [ "Qual", "é", "o", "id", "do", "documento", ",", "id", "do", "modelo", "e", "descrição", "para", "um", "documento", "chamado", "\"", "Robbin", "CV", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Robbin CV\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", "query_toks": [ "SELECT", "document_id", ",", "template_id", ",", "Document_Description", "FROM", "Documents", "WHERE", "document_name", "=", "``", "Robbin", "CV", "''" ], "query_toks_no_value": [ "select", "document_id", ",", "template_id", ",", "document_description", "from", "documents", "where", "document_name", "=", "value" ], "question": "Retorne o id do documento, id do modelo e descrição do documento com o nome Robbin CV.", "question_toks": [ "Retorne", "o", "id", "do", "documento", ",", "id", "do", "modelo", "e", "descrição", "do", "documento", "com", "o", "nome", "Robbin", "CV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Robbin CV\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(DISTINCT template_id) FROM Documents", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "template_id", ")", "FROM", "Documents" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "template_id", ")", "from", "documents" ], "question": "Quantos modelos diferentes todos os documentos usam?", "question_toks": [ "Quantos", "modelos", "diferentes", "todos", "os", "documentos", "usam", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 10, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(DISTINCT template_id) FROM Documents", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "template_id", ")", "FROM", "Documents" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "template_id", ")", "from", "documents" ], "question": "Conte o número de modelos diferentes usados para documentos.", "question_toks": [ "Conte", "o", "número", "de", "modelos", "diferentes", "usados", "para", "documentos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 10, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Documents", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.Template_ID", "=", "T2.Template_ID", "WHERE", "T2.Template_Type_Code", "=", "'PPT", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "documents", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t2", ".", "template_type_code", "=", "value" ], "question": "Quantos documentos estão usando o modelo com o código de tipo 'PPT'?", "question_toks": [ "Quantos", "documentos", "estão", "usando", "o", "modelo", "com", "o", "código", "de", "tipo", "'", "PPT", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PPT\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Documents", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.Template_ID", "=", "T2.Template_ID", "WHERE", "T2.Template_Type_Code", "=", "'PPT", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "documents", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t2", ".", "template_type_code", "=", "value" ], "question": "Conte o número de documentos que usam o tipo de modelo PPT.", "question_toks": [ "Conte", "o", "número", "de", "documentos", "que", "usam", "o", "tipo", "de", "modelo", "PPT", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PPT\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id , count(*) FROM Documents GROUP BY template_id", "query_toks": [ "SELECT", "template_id", ",", "count", "(", "*", ")", "FROM", "Documents", "GROUP", "BY", "template_id" ], "query_toks_no_value": [ "select", "template_id", ",", "count", "(", "*", ")", "from", "documents", "group", "by", "template_id" ], "question": "Mostre todos os IDs de modelo e número de documentos usando cada modelo.", "question_toks": [ "Mostre", "todos", "os", "IDs", "de", "modelo", "e", "número", "de", "documentos", "usando", "cada", "modelo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id , count(*) FROM Documents GROUP BY template_id", "query_toks": [ "SELECT", "template_id", ",", "count", "(", "*", ")", "FROM", "Documents", "GROUP", "BY", "template_id" ], "query_toks_no_value": [ "select", "template_id", ",", "count", "(", "*", ")", "from", "documents", "group", "by", "template_id" ], "question": "Quais são todos os IDs de modelo diferentes usados para documentos e quantas vezes cada um deles foi usado?", "question_toks": [ "Quais", "são", "todos", "os", "IDs", "de", "modelo", "diferentes", "usados", "para", "documentos", "e", "quantas", "vezes", "cada", "um", "deles", "foi", "usado", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.template_id", ",", "T2.Template_Type_Code", "FROM", "Documents", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "template_id", ",", "t2", ".", "template_type_code", "from", "documents", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o código de id e tipo para o modelo usado pela maioria dos documentos?", "question_toks": [ "Qual", "é", "o", "código", "de", "id", "e", "tipo", "para", "o", "modelo", "usado", "pela", "maioria", "dos", "documentos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.template_id", ",", "T2.Template_Type_Code", "FROM", "Documents", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "template_id", ",", "t2", ".", "template_type_code", "from", "documents", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Retorne o id e o código de tipo do modelo que é usado para o maior número de documentos.", "question_toks": [ "Retorne", "o", "id", "e", "o", "código", "de", "tipo", "do", "modelo", "que", "é", "usado", "para", "o", "maior", "número", "de", "documentos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1", "query_toks": [ "SELECT", "template_id", "FROM", "Documents", "GROUP", "BY", "template_id", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "template_id", "from", "documents", "group", "by", "template_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Mostre os ids de todos os modelos usados por mais de um documento.", "question_toks": [ "Mostre", "os", "ids", "de", "todos", "os", "modelos", "usados", "por", "mais", "de", "um", "documento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1", "query_toks": [ "SELECT", "template_id", "FROM", "Documents", "GROUP", "BY", "template_id", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "template_id", "from", "documents", "group", "by", "template_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são os IDs de modelo de qualquer modelo usado em mais de um único documento?", "question_toks": [ "Quais", "são", "os", "IDs", "de", "modelo", "de", "qualquer", "modelo", "usado", "em", "mais", "de", "um", "único", "documento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents", "query_toks": [ "SELECT", "template_id", "FROM", "Templates", "EXCEPT", "SELECT", "template_id", "FROM", "Documents" ], "query_toks_no_value": [ "select", "template_id", "from", "templates", "except", "select", "template_id", "from", "documents" ], "question": "Mostre ids para todos os modelos não usados por nenhum documento.", "question_toks": [ "Mostre", "ids", "para", "todos", "os", "modelos", "não", "usados", "por", "nenhum", "documento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents", "query_toks": [ "SELECT", "template_id", "FROM", "Templates", "EXCEPT", "SELECT", "template_id", "FROM", "Documents" ], "query_toks_no_value": [ "select", "template_id", "from", "templates", "except", "select", "template_id", "from", "documents" ], "question": "Quais são os ids para modelos que não são usados em nenhum documento?", "question_toks": [ "Quais", "são", "os", "ids", "para", "modelos", "que", "não", "são", "usados", "em", "nenhum", "documento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Templates", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Templates" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "templates" ], "question": "Quantos modelos nós temos?", "question_toks": [ "Quantos", "modelos", "nós", "temos", "?" ], "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": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Templates", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Templates" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "templates" ], "question": "Conte o número de modelos.", "question_toks": [ "Conte", "o", "número", "de", "modelos", "." ], "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": "cre_Doc_Template_Mgt", "query": "SELECT template_id , version_number , template_type_code FROM Templates", "query_toks": [ "SELECT", "template_id", ",", "version_number", ",", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "template_id", ",", "version_number", ",", "template_type_code", "from", "templates" ], "question": "Mostre ids de modelo, números de versão e códigos de tipo de modelo para todos os modelos.", "question_toks": [ "Mostre", "ids", "de", "modelo", ",", "números", "de", "versão", "e", "códigos", "de", "tipo", "de", "modelo", "para", "todos", "os", "modelos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id , version_number , template_type_code FROM Templates", "query_toks": [ "SELECT", "template_id", ",", "version_number", ",", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "template_id", ",", "version_number", ",", "template_type_code", "from", "templates" ], "question": "Quais são os ids, números de versão e códigos de tipo para cada modelo?", "question_toks": [ "Quais", "são", "os", "ids", ",", "números", "de", "versão", "e", "códigos", "de", "tipo", "para", "cada", "modelo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT DISTINCT template_type_code FROM Templates", "query_toks": [ "SELECT", "DISTINCT", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "distinct", "template_type_code", "from", "templates" ], "question": "Mostre todos os códigos de tipo de modelo distintos para todos os modelos.", "question_toks": [ "Mostre", "todos", "os", "códigos", "de", "tipo", "de", "modelo", "distintos", "para", "todos", "os", "modelos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT DISTINCT template_type_code FROM Templates", "query_toks": [ "SELECT", "DISTINCT", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "distinct", "template_type_code", "from", "templates" ], "question": "Quais são os diferentes códigos de tipo de modelo?", "question_toks": [ "Quais", "são", "os", "diferentes", "códigos", "de", "tipo", "de", "modelo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"", "query_toks": [ "SELECT", "template_id", "FROM", "Templates", "WHERE", "template_type_code", "=", "``", "PP", "''", "OR", "template_type_code", "=", "``", "PPT", "''" ], "query_toks_no_value": [ "select", "template_id", "from", "templates", "where", "template_type_code", "=", "value", "or", "template_type_code", "=", "value" ], "question": "Quais são os ids dos modelos com código de tipo de modelo PP ou PPT?", "question_toks": [ "Quais", "são", "os", "ids", "dos", "modelos", "com", "código", "de", "tipo", "de", "modelo", "PP", "ou", "PPT", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PP\"", null ], "or", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PPT\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"", "query_toks": [ "SELECT", "template_id", "FROM", "Templates", "WHERE", "template_type_code", "=", "``", "PP", "''", "OR", "template_type_code", "=", "``", "PPT", "''" ], "query_toks_no_value": [ "select", "template_id", "from", "templates", "where", "template_type_code", "=", "value", "or", "template_type_code", "=", "value" ], "question": "Retorne os ids dos modelos que possuem o código PP ou PPT.", "question_toks": [ "Retorne", "os", "ids", "dos", "modelos", "que", "possuem", "o", "código", "PP", "ou", "PPT", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PP\"", null ], "or", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"PPT\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Templates", "WHERE", "template_type_code", "=", "``", "CV", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "templates", "where", "template_type_code", "=", "value" ], "question": "Quantos modelos têm o código de tipo de modelo CV?", "question_toks": [ "Quantos", "modelos", "têm", "o", "código", "de", "tipo", "de", "modelo", "CV", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"CV\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Templates", "WHERE", "template_type_code", "=", "``", "CV", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "templates", "where", "template_type_code", "=", "value" ], "question": "Conte o número de modelos do tipo CV.", "question_toks": [ "Conte", "o", "número", "de", "modelos", "do", "tipo", "CV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"CV\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "query_toks": [ "SELECT", "version_number", ",", "template_type_code", "FROM", "Templates", "WHERE", "version_number", ">", "5" ], "query_toks_no_value": [ "select", "version_number", ",", "template_type_code", "from", "templates", "where", "version_number", ">", "value" ], "question": "Qual é o número da versão e o código do tipo de modelo para o modelo com número de versão posterior a 5?", "question_toks": [ "Qual", "é", "o", "número", "da", "versão", "e", "o", "código", "do", "tipo", "de", "modelo", "para", "o", "modelo", "com", "número", "de", "versão", "posterior", "a", "5", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 5.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "query_toks": [ "SELECT", "version_number", ",", "template_type_code", "FROM", "Templates", "WHERE", "version_number", ">", "5" ], "query_toks_no_value": [ "select", "version_number", ",", "template_type_code", "from", "templates", "where", "version_number", ">", "value" ], "question": "Retorne os números de versão e códigos de tipo de modelo de modelos com um número de versão maior que 5.", "question_toks": [ "Retorne", "os", "números", "de", "versão", "e", "códigos", "de", "tipo", "de", "modelo", "de", "modelos", "com", "um", "número", "de", "versão", "maior", "que", "5", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 5.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code", "query_toks": [ "SELECT", "template_type_code", ",", "count", "(", "*", ")", "FROM", "Templates", "GROUP", "BY", "template_type_code" ], "query_toks_no_value": [ "select", "template_type_code", ",", "count", "(", "*", ")", "from", "templates", "group", "by", "template_type_code" ], "question": "Mostre todos os códigos de tipo de modelo e o número de modelos para cada um.", "question_toks": [ "Mostre", "todos", "os", "códigos", "de", "tipo", "de", "modelo", "e", "o", "número", "de", "modelos", "para", "cada", "um", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code", "query_toks": [ "SELECT", "template_type_code", ",", "count", "(", "*", ")", "FROM", "Templates", "GROUP", "BY", "template_type_code" ], "query_toks_no_value": [ "select", "template_type_code", ",", "count", "(", "*", ")", "from", "templates", "group", "by", "template_type_code" ], "question": "Quais são os diferentes códigos de tipo de modelo e quantos modelos correspondem a cada um?", "question_toks": [ "Quais", "são", "os", "diferentes", "códigos", "de", "tipo", "de", "modelo", "e", "quantos", "modelos", "correspondem", "a", "cada", "um", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "GROUP", "BY", "template_type_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "group", "by", "template_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual tipo de código de modelo tem o maior número de modelos?", "question_toks": [ "Qual", "tipo", "de", "código", "de", "modelo", "tem", "o", "maior", "número", "de", "modelos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "GROUP", "BY", "template_type_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "group", "by", "template_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Retorne o código de tipo do tipo de modelo ao qual a maioria dos modelos pertence.", "question_toks": [ "Retorne", "o", "código", "de", "tipo", "do", "tipo", "de", "modelo", "ao", "qual", "a", "maioria", "dos", "modelos", "pertence", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "GROUP", "BY", "template_type_code", "HAVING", "count", "(", "*", ")", "<", "3" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "group", "by", "template_type_code", "having", "count", "(", "*", ")", "<", "value" ], "question": "Mostre todos os códigos de tipo de modelo com menos de três modelos.", "question_toks": [ "Mostre", "todos", "os", "códigos", "de", "tipo", "de", "modelo", "com", "menos", "de", "três", "modelos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 4, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "GROUP", "BY", "template_type_code", "HAVING", "count", "(", "*", ")", "<", "3" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "group", "by", "template_type_code", "having", "count", "(", "*", ")", "<", "value" ], "question": "Quais são os códigos dos tipos de modelo que têm menos de 3 modelos?", "question_toks": [ "Quais", "são", "os", "códigos", "dos", "tipos", "de", "modelo", "que", "têm", "menos", "de", "3", "modelos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 4, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT min(Version_Number) , template_type_code FROM Templates", "query_toks": [ "SELECT", "min", "(", "Version_Number", ")", ",", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "min", "(", "version_number", ")", ",", "template_type_code", "from", "templates" ], "question": "Qual é o menor número de versão e seu código de tipo de modelo?", "question_toks": [ "Qual", "é", "o", "menor", "número", "de", "versão", "e", "seu", "código", "de", "tipo", "de", "modelo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT min(Version_Number) , template_type_code FROM Templates", "query_toks": [ "SELECT", "min", "(", "Version_Number", ")", ",", "template_type_code", "FROM", "Templates" ], "query_toks_no_value": [ "select", "min", "(", "version_number", ")", ",", "template_type_code", "from", "templates" ], "question": "Retorne o menor número de versão, junto com seu código de tipo de modelo correspondente.", "question_toks": [ "Retorne", "o", "menor", "número", "de", "versão", ",", "junto", "com", "seu", "código", "de", "tipo", "de", "modelo", "correspondente", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = \"Data base\"", "query_toks": [ "SELECT", "T1.template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "WHERE", "T2.document_name", "=", "``", "Data", "base", "''" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Qual é o código de tipo de modelo do modelo usado pelo documento com o nome \"Base de dados\"?", "question_toks": [ "Qual", "é", "o", "código", "de", "tipo", "de", "modelo", "do", "modelo", "usado", "pelo", "documento", "com", "o", "nome", "\"", "Base", "de", "dados", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Data base\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = \"Data base\"", "query_toks": [ "SELECT", "T1.template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "WHERE", "T2.document_name", "=", "``", "Data", "base", "''" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Retorne o código do tipo de modelo do modelo que é usado por um documento denominado Base de dados.", "question_toks": [ "Retorne", "o", "código", "do", "tipo", "de", "modelo", "do", "modelo", "que", "é", "usado", "por", "um", "documento", "denominado", "Base", "de", "dados", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Data base\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = \"BK\"", "query_toks": [ "SELECT", "T2.document_name", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "WHERE", "T1.template_type_code", "=", "``", "BK", "''" ], "query_toks_no_value": [ "select", "t2", ".", "document_name", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t1", ".", "template_type_code", "=", "value" ], "question": "Mostre todos os nomes de documentos usando modelos com o código de tipo de modelo BK.", "question_toks": [ "Mostre", "todos", "os", "nomes", "de", "documentos", "usando", "modelos", "com", "o", "código", "de", "tipo", "de", "modelo", "BK", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"BK\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = \"BK\"", "query_toks": [ "SELECT", "T2.document_name", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "WHERE", "T1.template_type_code", "=", "``", "BK", "''" ], "query_toks_no_value": [ "select", "t2", ".", "document_name", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "where", "t1", ".", "template_type_code", "=", "value" ], "question": "Quais são os nomes dos documentos que usam modelos com o código BK?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "documentos", "que", "usam", "modelos", "com", "o", "código", "BK", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"BK\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "query_toks": [ "SELECT", "T1.template_type_code", ",", "count", "(", "*", ")", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_type_code" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", ",", "count", "(", "*", ")", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_type_code" ], "question": "Mostre todos os códigos de tipo de modelo e o número de documentos usando cada tipo.", "question_toks": [ "Mostre", "todos", "os", "códigos", "de", "tipo", "de", "modelo", "e", "o", "número", "de", "documentos", "usando", "cada", "tipo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "query_toks": [ "SELECT", "T1.template_type_code", ",", "count", "(", "*", ")", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_type_code" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", ",", "count", "(", "*", ")", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_type_code" ], "question": "Quais são os diferentes códigos de tipo de modelo e quantos documentos usam cada tipo?", "question_toks": [ "Quais", "são", "os", "diferentes", "códigos", "de", "tipo", "de", "modelo", "e", "quantos", "documentos", "usam", "cada", "tipo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_type_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual tipo de código de modelo é usado pela maioria dos documentos?", "question_toks": [ "Qual", "tipo", "de", "código", "de", "modelo", "é", "usado", "pela", "maioria", "dos", "documentos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id", "GROUP", "BY", "T1.template_type_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id", "group", "by", "t1", ".", "template_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Retorne o código do tipo de modelo mais comumente usado em documentos.", "question_toks": [ "Retorne", "o", "código", "do", "tipo", "de", "modelo", "mais", "comumente", "usado", "em", "documentos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "EXCEPT", "SELECT", "template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "except", "select", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id" ], "question": "Mostre todos os códigos de tipo de modelo que não são usados por nenhum documento.", "question_toks": [ "Mostre", "todos", "os", "códigos", "de", "tipo", "de", "modelo", "que", "não", "são", "usados", "por", "nenhum", "documento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "query_toks": [ "SELECT", "template_type_code", "FROM", "Templates", "EXCEPT", "SELECT", "template_type_code", "FROM", "Templates", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.template_id", "=", "T2.template_id" ], "query_toks_no_value": [ "select", "template_type_code", "from", "templates", "except", "select", "template_type_code", "from", "templates", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "template_id", "=", "t2", ".", "template_id" ], "question": "Quais são os códigos dos tipos de modelo que não são usados para nenhum documento?", "question_toks": [ "Quais", "são", "os", "códigos", "dos", "tipos", "de", "modelo", "que", "não", "são", "usados", "para", "nenhum", "documento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code , template_type_description FROM Ref_template_types", "query_toks": [ "SELECT", "template_type_code", ",", "template_type_description", "FROM", "Ref_template_types" ], "query_toks_no_value": [ "select", "template_type_code", ",", "template_type_description", "from", "ref_template_types" ], "question": "Mostre todos os códigos e descrições de tipo de modelo.", "question_toks": [ "Mostre", "todos", "os", "códigos", "e", "descrições", "de", "tipo", "de", "modelo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code , template_type_description FROM Ref_template_types", "query_toks": [ "SELECT", "template_type_code", ",", "template_type_description", "FROM", "Ref_template_types" ], "query_toks_no_value": [ "select", "template_type_code", ",", "template_type_description", "from", "ref_template_types" ], "question": "Quais são os códigos de tipo e descrições para todos os tipos de modelo?", "question_toks": [ "Quais", "são", "os", "códigos", "de", "tipo", "e", "descrições", "para", "todos", "os", "tipos", "de", "modelo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", "query_toks": [ "SELECT", "template_type_description", "FROM", "Ref_template_types", "WHERE", "template_type_code", "=", "``", "AD", "''" ], "query_toks_no_value": [ "select", "template_type_description", "from", "ref_template_types", "where", "template_type_code", "=", "value" ], "question": "Quais são as descrições de tipo de modelo para o código de tipo de modelo \"AD\".", "question_toks": [ "Quais", "são", "as", "descrições", "de", "tipo", "de", "modelo", "para", "o", "código", "de", "tipo", "de", "modelo", "\"", "AD", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 1, false ], null ], "\"AD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", "query_toks": [ "SELECT", "template_type_description", "FROM", "Ref_template_types", "WHERE", "template_type_code", "=", "``", "AD", "''" ], "query_toks_no_value": [ "select", "template_type_description", "from", "ref_template_types", "where", "template_type_code", "=", "value" ], "question": "Retorne a descrição do tipo de modelo do tipo de modelo com o código AD.", "question_toks": [ "Retorne", "a", "descrição", "do", "tipo", "de", "modelo", "do", "tipo", "de", "modelo", "com", "o", "código", "AD", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 1, false ], null ], "\"AD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", "query_toks": [ "SELECT", "template_type_code", "FROM", "Ref_template_types", "WHERE", "template_type_description", "=", "``", "Book", "''" ], "query_toks_no_value": [ "select", "template_type_code", "from", "ref_template_types", "where", "template_type_description", "=", "value" ], "question": "Qual é o código do tipo de modelo para a descrição do tipo de modelo \"Livro\".", "question_toks": [ "Qual", "é", "o", "código", "do", "tipo", "de", "modelo", "para", "a", "descrição", "do", "tipo", "de", "modelo", "\"", "Livro", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Book\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", "query_toks": [ "SELECT", "template_type_code", "FROM", "Ref_template_types", "WHERE", "template_type_description", "=", "``", "Book", "''" ], "query_toks_no_value": [ "select", "template_type_code", "from", "ref_template_types", "where", "template_type_description", "=", "value" ], "question": "Retorne o código de tipo do tipo de modelo com a descrição \"Livro\".", "question_toks": [ "Retorne", "o", "código", "de", "tipo", "do", "tipo", "de", "modelo", "com", "a", "descrição", "\"", "Livro", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Book\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "query_toks": [ "SELECT", "DISTINCT", "T1.template_type_description", "FROM", "Ref_template_types", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_type_code", "=", "T2.template_type_code", "JOIN", "Documents", "AS", "T3", "ON", "T2.Template_ID", "=", "T3.template_ID" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "template_type_description", "from", "ref_template_types", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_type_code", "=", "t2", ".", "template_type_code", "join", "documents", "as", "t3", "on", "t2", ".", "template_id", "=", "t3", ".", "template_id" ], "question": "Quais são as descrições de tipo de modelo distintas para os modelos já usados por qualquer documento?", "question_toks": [ "Quais", "são", "as", "descrições", "de", "tipo", "de", "modelo", "distintas", "para", "os", "modelos", "já", "usados", "por", "qualquer", "documento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "query_toks": [ "SELECT", "DISTINCT", "T1.template_type_description", "FROM", "Ref_template_types", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_type_code", "=", "T2.template_type_code", "JOIN", "Documents", "AS", "T3", "ON", "T2.Template_ID", "=", "T3.template_ID" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "template_type_description", "from", "ref_template_types", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_type_code", "=", "t2", ".", "template_type_code", "join", "documents", "as", "t3", "on", "t2", ".", "template_id", "=", "t3", ".", "template_id" ], "question": "Retorne as diferentes descrições de modelos que foram usados em um documento.", "question_toks": [ "Retorne", "as", "diferentes", "descrições", "de", "modelos", "que", "foram", "usados", "em", "um", "documento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ], "and", [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"", "query_toks": [ "SELECT", "T2.template_id", "FROM", "Ref_template_types", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_type_code", "=", "T2.template_type_code", "WHERE", "T1.template_type_description", "=", "``", "Presentation", "''" ], "query_toks_no_value": [ "select", "t2", ".", "template_id", "from", "ref_template_types", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_type_code", "=", "t2", ".", "template_type_code", "where", "t1", ".", "template_type_description", "=", "value" ], "question": "Quais são os IDs do modelo com a descrição do tipo de modelo \"Apresentação\".", "question_toks": [ "Quais", "são", "os", "IDs", "do", "modelo", "com", "a", "descrição", "do", "tipo", "de", "modelo", "\"", "Apresentação", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Presentation\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"", "query_toks": [ "SELECT", "T2.template_id", "FROM", "Ref_template_types", "AS", "T1", "JOIN", "Templates", "AS", "T2", "ON", "T1.template_type_code", "=", "T2.template_type_code", "WHERE", "T1.template_type_description", "=", "``", "Presentation", "''" ], "query_toks_no_value": [ "select", "t2", ".", "template_id", "from", "ref_template_types", "as", "t1", "join", "templates", "as", "t2", "on", "t1", ".", "template_type_code", "=", "t2", ".", "template_type_code", "where", "t1", ".", "template_type_description", "=", "value" ], "question": "Retorne os ids correspondentes aos modelos com a descrição 'Apresentação'.", "question_toks": [ "Retorne", "os", "ids", "correspondentes", "aos", "modelos", "com", "a", "descrição", "'", "Apresentação", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Presentation\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Paragraphs", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Paragraphs" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "paragraphs" ], "question": "Quantos parágrafos no total?", "question_toks": [ "Quantos", "parágrafos", "no", "total", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Paragraphs", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Paragraphs" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "paragraphs" ], "question": "Conte o número de parágrafos.", "question_toks": [ "Conte", "o", "número", "de", "parágrafos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_ID", "=", "T2.document_ID", "WHERE", "T2.document_name", "=", "'Summer", "Show", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Quantos parágrafos para o documento com o nome 'Summer Show'?", "question_toks": [ "Quantos", "parágrafos", "para", "o", "documento", "com", "o", "nome", "'", "Summer", "Show", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Summer Show\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_ID", "=", "T2.document_ID", "WHERE", "T2.document_name", "=", "'Summer", "Show", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Conte o número de parágrafos no documento denominado 'Summer Show'.", "question_toks": [ "Conte", "o", "número", "de", "parágrafos", "no", "documento", "denominado", "'", "Summer", "Show", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Summer Show\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "select other_details from paragraphs where paragraph_text like 'korea'", "query_toks": [ "select", "other_details", "from", "paragraphs", "where", "paragraph_text", "like", "\"korea\"" ], "query_toks_no_value": [ "select", "other_details", "from", "paragraphs", "where", "paragraph_text", "like", "value" ], "question": "Mostre detalhes de parágrafo para parágrafo com o texto 'Coreia'.", "question_toks": [ "Mostre", "detalhes", "de", "parágrafo", "para", "parágrafo", "com", "o", "texto", "'", "Coreia", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 16, false ], null ], "\"korea\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "select other_details from paragraphs where paragraph_text like 'korea'", "query_toks": [ "select", "other_details", "from", "paragraphs", "where", "paragraph_text", "like", "\"korea\"" ], "query_toks_no_value": [ "select", "other_details", "from", "paragraphs", "where", "paragraph_text", "like", "value" ], "question": "Quais são os detalhes do parágrafo que inclui o texto 'Coréia'?", "question_toks": [ "Quais", "são", "os", "detalhes", "do", "parágrafo", "que", "inclui", "o", "texto", "'", "Coréia", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 16, false ], null ], "\"korea\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "query_toks": [ "SELECT", "T1.paragraph_id", ",", "T1.paragraph_text", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "WHERE", "T2.Document_Name", "=", "'Welcome", "to", "NY", "'" ], "query_toks_no_value": [ "select", "t1", ".", "paragraph_id", ",", "t1", ".", "paragraph_text", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Mostre todos os ids de parágrafo e textos para o documento com o nome 'Welcome to NY'.", "question_toks": [ "Mostre", "todos", "os", "ids", "de", "parágrafo", "e", "textos", "para", "o", "documento", "com", "o", "nome", "'", "Welcome", "to", "NY", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Welcome to NY\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "query_toks": [ "SELECT", "T1.paragraph_id", ",", "T1.paragraph_text", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "WHERE", "T2.Document_Name", "=", "'Welcome", "to", "NY", "'" ], "query_toks_no_value": [ "select", "t1", ".", "paragraph_id", ",", "t1", ".", "paragraph_text", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Quais são os ids e os textos dos parágrafos do documento intitulado 'Welcome to NY'?", "question_toks": [ "Quais", "são", "os", "ids", "e", "os", "textos", "dos", "parágrafos", "do", "documento", "intitulado", "'", "Welcome", "to", "NY", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Welcome to NY\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Customer reviews\"", "query_toks": [ "SELECT", "T1.paragraph_text", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "WHERE", "T2.document_name", "=", "``", "Customer", "reviews", "''" ], "query_toks_no_value": [ "select", "t1", ".", "paragraph_text", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Mostre todos os textos dos parágrafos do documento \"Revisões do cliente\".", "question_toks": [ "Mostre", "todos", "os", "textos", "dos", "parágrafos", "do", "documento", "\"", "Revisões", "do", "cliente", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Customer reviews\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Customer reviews\"", "query_toks": [ "SELECT", "T1.paragraph_text", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "WHERE", "T2.document_name", "=", "``", "Customer", "reviews", "''" ], "query_toks_no_value": [ "select", "t1", ".", "paragraph_text", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "where", "t2", ".", "document_name", "=", "value" ], "question": "Quais são os textos dos parágrafos para o documento com o nome 'Revisões do cliente'?", "question_toks": [ "Quais", "são", "os", "textos", "dos", "parágrafos", "para", "o", "documento", "com", "o", "nome", "'", "Revisões", "do", "cliente", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Customer reviews\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "query_toks": [ "SELECT", "document_id", ",", "count", "(", "*", ")", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "ORDER", "BY", "document_id" ], "query_toks_no_value": [ "select", "document_id", ",", "count", "(", "*", ")", "from", "paragraphs", "group", "by", "document_id", "order", "by", "document_id" ], "question": "Mostre todos os IDs de documentos e o número de parágrafos em cada documento. Solicite por identificação do documento.", "question_toks": [ "Mostre", "todos", "os", "IDs", "de", "documentos", "e", "o", "número", "de", "parágrafos", "em", "cada", "documento", ".", "Solicite", "por", "identificação", "do", "documento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 15, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "query_toks": [ "SELECT", "document_id", ",", "count", "(", "*", ")", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "ORDER", "BY", "document_id" ], "query_toks_no_value": [ "select", "document_id", ",", "count", "(", "*", ")", "from", "paragraphs", "group", "by", "document_id", "order", "by", "document_id" ], "question": "Retorna os diferentes ids de documentos junto com o número de parágrafos correspondentes a cada um, ordenados por id.", "question_toks": [ "Retorna", "os", "diferentes", "ids", "de", "documentos", "junto", "com", "o", "número", "de", "parágrafos", "correspondentes", "a", "cada", "um", ",", "ordenados", "por", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 15, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id", "query_toks": [ "SELECT", "T1.document_id", ",", "T2.document_name", ",", "count", "(", "*", ")", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "GROUP", "BY", "T1.document_id" ], "query_toks_no_value": [ "select", "t1", ".", "document_id", ",", "t2", ".", "document_name", ",", "count", "(", "*", ")", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "group", "by", "t1", ".", "document_id" ], "question": "Mostre todos os IDs de documentos, nomes e o número de parágrafos em cada documento.", "question_toks": [ "Mostre", "todos", "os", "IDs", "de", "documentos", ",", "nomes", "e", "o", "número", "de", "parágrafos", "em", "cada", "documento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id", "query_toks": [ "SELECT", "T1.document_id", ",", "T2.document_name", ",", "count", "(", "*", ")", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "GROUP", "BY", "T1.document_id" ], "query_toks_no_value": [ "select", "t1", ".", "document_id", ",", "t2", ".", "document_name", ",", "count", "(", "*", ")", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "group", "by", "t1", ".", "document_id" ], "question": "Quais são os ids e nomes de cada documento, bem como o número de parágrafos em cada um?", "question_toks": [ "Quais", "são", "os", "ids", "e", "nomes", "de", "cada", "documento", ",", "bem", "como", "o", "número", "de", "parágrafos", "em", "cada", "um", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Liste todos os IDs de documentos com pelo menos dois parágrafos.", "question_toks": [ "Liste", "todos", "os", "IDs", "de", "documentos", "com", "pelo", "menos", "dois", "parágrafos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são os ids dos documentos que possuem 2 ou mais parágrafos?", "question_toks": [ "Quais", "são", "os", "ids", "dos", "documentos", "que", "possuem", "2", "ou", "mais", "parágrafos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.document_id", ",", "T2.document_name", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "GROUP", "BY", "T1.document_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "document_id", ",", "t2", ".", "document_name", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "group", "by", "t1", ".", "document_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é a id e o nome do documento com maior número de parágrafos?", "question_toks": [ "Qual", "é", "a", "id", "e", "o", "nome", "do", "documento", "com", "maior", "número", "de", "parágrafos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.document_id", ",", "T2.document_name", "FROM", "Paragraphs", "AS", "T1", "JOIN", "Documents", "AS", "T2", "ON", "T1.document_id", "=", "T2.document_id", "GROUP", "BY", "T1.document_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "document_id", ",", "t2", ".", "document_name", "from", "paragraphs", "as", "t1", "join", "documents", "as", "t2", "on", "t1", ".", "document_id", "=", "t2", ".", "document_id", "group", "by", "t1", ".", "document_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Retorna o id e o nome do documento com mais parágrafos.", "question_toks": [ "Retorna", "o", "id", "e", "o", "nome", "do", "documento", "com", "mais", "parágrafos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 15, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "Qual é a identificação do documento com menor número de parágrafos?", "question_toks": [ "Qual", "é", "a", "identificação", "do", "documento", "com", "menor", "número", "de", "parágrafos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "Retorna o id do documento com o menor número de parágrafos.", "question_toks": [ "Retorna", "o", "id", "do", "documento", "com", "o", "menor", "número", "de", "parágrafos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "HAVING", "count", "(", "*", ")", "BETWEEN", "1", "AND", "2" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "having", "count", "(", "*", ")", "between", "value", "and", "value" ], "question": "Qual é a identificação do documento com 1 a 2 parágrafos?", "question_toks": [ "Qual", "é", "a", "identificação", "do", "documento", "com", "1", "a", "2", "parágrafos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [ [ false, 1, [ 0, [ 3, 0, false ], null ], 1.0, 2.0 ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "GROUP", "BY", "document_id", "HAVING", "count", "(", "*", ")", "BETWEEN", "1", "AND", "2" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "group", "by", "document_id", "having", "count", "(", "*", ")", "between", "value", "and", "value" ], "question": "Forneça os ids dos documentos que têm entre um e dois parágrafos.", "question_toks": [ "Forneça", "os", "ids", "dos", "documentos", "que", "têm", "entre", "um", "e", "dois", "parágrafos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 15, false ] ], "having": [ [ false, 1, [ 0, [ 3, 0, false ], null ], 1.0, 2.0 ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "WHERE", "paragraph_text", "=", "'Brazil", "'", "INTERSECT", "SELECT", "document_id", "FROM", "Paragraphs", "WHERE", "paragraph_text", "=", "'Ireland", "'" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "where", "paragraph_text", "=", "value", "intersect", "select", "document_id", "from", "paragraphs", "where", "paragraph_text", "=", "value" ], "question": "Mostre o id do documento com o texto do parágrafo 'Brasil' e 'Irlanda'.", "question_toks": [ "Mostre", "o", "id", "do", "documento", "com", "o", "texto", "do", "parágrafo", "'", "Brasil", "'", "e", "'", "Irlanda", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 16, false ], null ], "\"Brazil\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 16, false ], null ], "\"Ireland\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "cre_Doc_Template_Mgt", "query": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "query_toks": [ "SELECT", "document_id", "FROM", "Paragraphs", "WHERE", "paragraph_text", "=", "'Brazil", "'", "INTERSECT", "SELECT", "document_id", "FROM", "Paragraphs", "WHERE", "paragraph_text", "=", "'Ireland", "'" ], "query_toks_no_value": [ "select", "document_id", "from", "paragraphs", "where", "paragraph_text", "=", "value", "intersect", "select", "document_id", "from", "paragraphs", "where", "paragraph_text", "=", "value" ], "question": "Quais são os ids dos documentos que contêm o texto do parágrafo 'Brasil' e 'Irlanda'?", "question_toks": [ "Quais", "são", "os", "ids", "dos", "documentos", "que", "contêm", "o", "texto", "do", "parágrafo", "'", "Brasil", "'", "e", "'", "Irlanda", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 16, false ], null ], "\"Brazil\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 16, false ], null ], "\"Ireland\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT count(*) FROM teacher", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "teacher" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "teacher" ], "question": "Quantos professores tem?", "question_toks": [ "Quantos", "professores", "tem", "?" ], "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": "course_teach", "query": "SELECT count(*) FROM teacher", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "teacher" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "teacher" ], "question": "Qual é a contagem total de professores?", "question_toks": [ "Qual", "é", "a", "contagem", "total", "de", "professores", "?" ], "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": "course_teach", "query": "SELECT Name FROM teacher ORDER BY Age ASC", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "ORDER", "BY", "Age", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "order", "by", "age", "asc" ], "question": "Liste os nomes dos professores em ordem crescente de idade.", "question_toks": [ "Liste", "os", "nomes", "dos", "professores", "em", "ordem", "crescente", "de", "idade", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Name FROM teacher ORDER BY Age ASC", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "ORDER", "BY", "Age", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "order", "by", "age", "asc" ], "question": "Quais são os nomes dos professores ordenados por idade ascendente?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "professores", "ordenados", "por", "idade", "ascendente", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Age , Hometown FROM teacher", "query_toks": [ "SELECT", "Age", ",", "Hometown", "FROM", "teacher" ], "query_toks_no_value": [ "select", "age", ",", "hometown", "from", "teacher" ], "question": "Qual é a idade e cidade natal dos professores?", "question_toks": [ "Qual", "é", "a", "idade", "e", "cidade", "natal", "dos", "professores", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Age , Hometown FROM teacher", "query_toks": [ "SELECT", "Age", ",", "Hometown", "FROM", "teacher" ], "query_toks_no_value": [ "select", "age", ",", "hometown", "from", "teacher" ], "question": "Qual é a idade e cidade natal de cada professor?", "question_toks": [ "Qual", "é", "a", "idade", "e", "cidade", "natal", "de", "cada", "professor", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "select name from teacher where hometown != \"little lever urban district\"", "query_toks": [ "select", "name", "from", "teacher", "where", "hometown", "!=", "\"little lever urban district\"" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "hometown", "!", "=", "value" ], "question": "Liste o nome dos professores cuja cidade natal não seja `` Little Lever Urban District ''.", "question_toks": [ "Liste", "o", "nome", "dos", "professores", "cuja", "cidade", "natal", "não", "seja", "`", "`", "Little", "Lever", "Urban", "District", "''", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 7, false ], null ], "\"little lever urban district\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "select name from teacher where hometown != \"little lever urban district\"", "query_toks": [ "select", "name", "from", "teacher", "where", "hometown", "!=", "\"little lever urban district\"" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "hometown", "!", "=", "value" ], "question": "Quais são os nomes dos professores cuja cidade natal não é `` Little Lever Urban District ''?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "professores", "cuja", "cidade", "natal", "não", "é", "`", "`", "Little", "Lever", "Urban", "District", "''", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 7, false ], null ], "\"little lever urban district\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "WHERE", "Age", "=", "32", "OR", "Age", "=", "33" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "age", "=", "value", "or", "age", "=", "value" ], "question": "Mostre o nome dos professores com 32 ou 33 anos?", "question_toks": [ "Mostre", "o", "nome", "dos", "professores", "com", "32", "ou", "33", "anos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], 32.0, null ], "or", [ false, 2, [ 0, [ 0, 6, false ], null ], 33.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "WHERE", "Age", "=", "32", "OR", "Age", "=", "33" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "age", "=", "value", "or", "age", "=", "value" ], "question": "Quais são os nomes dos professores com 32 ou 33 anos?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "professores", "com", "32", "ou", "33", "anos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], 32.0, null ], "or", [ false, 2, [ 0, [ 0, 6, false ], null ], 33.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "ORDER", "BY", "Age", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "order", "by", "age", "asc", "limit", "value" ], "question": "Qual é a cidade natal do professor mais jovem?", "question_toks": [ "Qual", "é", "a", "cidade", "natal", "do", "professor", "mais", "jovem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "ORDER", "BY", "Age", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "order", "by", "age", "asc", "limit", "value" ], "question": "De onde é o professor mais novo?", "question_toks": [ "De", "onde", "é", "o", "professor", "mais", "novo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown", "query_toks": [ "SELECT", "Hometown", ",", "COUNT", "(", "*", ")", "FROM", "teacher", "GROUP", "BY", "Hometown" ], "query_toks_no_value": [ "select", "hometown", ",", "count", "(", "*", ")", "from", "teacher", "group", "by", "hometown" ], "question": "Mostre diferentes cidades natais de professores e o número de professores de cada cidade natal.", "question_toks": [ "Mostre", "diferentes", "cidades", "natais", "de", "professores", "e", "o", "número", "de", "professores", "de", "cada", "cidade", "natal", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown", "query_toks": [ "SELECT", "Hometown", ",", "COUNT", "(", "*", ")", "FROM", "teacher", "GROUP", "BY", "Hometown" ], "query_toks_no_value": [ "select", "hometown", ",", "count", "(", "*", ")", "from", "teacher", "group", "by", "hometown" ], "question": "Para cada cidade natal, quantos professores existem?", "question_toks": [ "Para", "cada", "cidade", "natal", ",", "quantos", "professores", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "GROUP", "BY", "Hometown", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "group", "by", "hometown", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Liste a cidade natal mais comum dos professores.", "question_toks": [ "Liste", "a", "cidade", "natal", "mais", "comum", "dos", "professores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "GROUP", "BY", "Hometown", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "group", "by", "hometown", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é a cidade natal mais comum para professores?", "question_toks": [ "Qual", "é", "a", "cidade", "natal", "mais", "comum", "para", "professores", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "GROUP", "BY", "Hometown", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "group", "by", "hometown", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Mostre as cidades natais compartilhadas por pelo menos dois professores.", "question_toks": [ "Mostre", "as", "cidades", "natais", "compartilhadas", "por", "pelo", "menos", "dois", "professores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "Hometown", "FROM", "teacher", "GROUP", "BY", "Hometown", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "hometown", "from", "teacher", "group", "by", "hometown", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são as cidades de onde vêm pelo menos dois professores?", "question_toks": [ "Quais", "são", "as", "cidades", "de", "onde", "vêm", "pelo", "menos", "dois", "professores", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 7, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID", "query_toks": [ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID" ], "query_toks_no_value": [ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id" ], "question": "Mostre os nomes dos professores e os cursos que eles devem ministrar.", "question_toks": [ "Mostre", "os", "nomes", "dos", "professores", "e", "os", "cursos", "que", "eles", "devem", "ministrar", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID", "query_toks": [ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID" ], "query_toks_no_value": [ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id" ], "question": "Qual é o nome de cada professor e que curso eles ministram?", "question_toks": [ "Qual", "é", "o", "nome", "de", "cada", "professor", "e", "que", "curso", "eles", "ministram", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name", "query_toks": [ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "ORDER", "BY", "T3.Name" ], "query_toks_no_value": [ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "order", "by", "t3", ".", "name" ], "question": "Mostre os nomes dos professores e os cursos que eles devem ministrar em ordem alfabética crescente do nome do professor.", "question_toks": [ "Mostre", "os", "nomes", "dos", "professores", "e", "os", "cursos", "que", "eles", "devem", "ministrar", "em", "ordem", "alfabética", "crescente", "do", "nome", "do", "professor", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name", "query_toks": [ "SELECT", "T3.Name", ",", "T2.Course", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "ORDER", "BY", "T3.Name" ], "query_toks_no_value": [ "select", "t3", ".", "name", ",", "t2", ".", "course", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "order", "by", "t3", ".", "name" ], "question": "Quais são os nomes dos professores e os cursos que ministram em ordem alfabética crescente pelo nome do professor?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "professores", "e", "os", "cursos", "que", "ministram", "em", "ordem", "alfabética", "crescente", "pelo", "nome", "do", "professor", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = \"Math\"", "query_toks": [ "SELECT", "T3.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "WHERE", "T2.Course", "=", "``", "Math", "''" ], "query_toks_no_value": [ "select", "t3", ".", "name", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "where", "t2", ".", "course", "=", "value" ], "question": "Mostre o nome do professor do curso de matemática.", "question_toks": [ "Mostre", "o", "nome", "do", "professor", "do", "curso", "de", "matemática", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], "\"Math\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = \"Math\"", "query_toks": [ "SELECT", "T3.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "course", "AS", "T2", "ON", "T1.Course_ID", "=", "T2.Course_ID", "JOIN", "teacher", "AS", "T3", "ON", "T1.Teacher_ID", "=", "T3.Teacher_ID", "WHERE", "T2.Course", "=", "``", "Math", "''" ], "query_toks_no_value": [ "select", "t3", ".", "name", "from", "course_arrange", "as", "t1", "join", "course", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "join", "teacher", "as", "t3", "on", "t1", ".", "teacher_id", "=", "t3", ".", "teacher_id", "where", "t2", ".", "course", "=", "value" ], "question": "Quais são os nomes das pessoas que ministram cursos de matemática?", "question_toks": [ "Quais", "são", "os", "nomes", "das", "pessoas", "que", "ministram", "cursos", "de", "matemática", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], "\"Math\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "query_toks": [ "SELECT", "T2.Name", ",", "COUNT", "(", "*", ")", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name" ], "question": "Mostre os nomes dos professores e o número de cursos que ministram.", "question_toks": [ "Mostre", "os", "nomes", "dos", "professores", "e", "o", "número", "de", "cursos", "que", "ministram", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "query_toks": [ "SELECT", "T2.Name", ",", "COUNT", "(", "*", ")", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name" ], "question": "Quais são os nomes dos professores e quantos cursos eles ministram?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "professores", "e", "quantos", "cursos", "eles", "ministram", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "T2.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Mostre nomes de professores que ministram pelo menos dois cursos.", "question_toks": [ "Mostre", "nomes", "de", "professores", "que", "ministram", "pelo", "menos", "dois", "cursos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "T2.Name", "FROM", "course_arrange", "AS", "T1", "JOIN", "teacher", "AS", "T2", "ON", "T1.Teacher_ID", "=", "T2.Teacher_ID", "GROUP", "BY", "T2.Name", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "course_arrange", "as", "t1", "join", "teacher", "as", "t2", "on", "t1", ".", "teacher_id", "=", "t2", ".", "teacher_id", "group", "by", "t2", ".", "name", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são os nomes dos professores que ministram pelo menos dois cursos?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "professores", "que", "ministram", "pelo", "menos", "dois", "cursos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 9, false ], null ], [ 0, 4, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "course_teach", "query": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "WHERE", "Teacher_id", "NOT", "IN", "(", "SELECT", "Teacher_id", "FROM", "course_arrange", ")" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "teacher_id", "not", "in", "(", "select", "teacher_id", "from", "course_arrange", ")" ], "question": "Liste os nomes dos professores que não foram contratados para ministrar cursos.", "question_toks": [ "Liste", "os", "nomes", "dos", "professores", "que", "não", "foram", "contratados", "para", "ministrar", "cursos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 4, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "course_teach", "query": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)", "query_toks": [ "SELECT", "Name", "FROM", "teacher", "WHERE", "Teacher_id", "NOT", "IN", "(", "SELECT", "Teacher_id", "FROM", "course_arrange", ")" ], "query_toks_no_value": [ "select", "name", "from", "teacher", "where", "teacher_id", "not", "in", "(", "select", "teacher_id", "from", "course_arrange", ")" ], "question": "Quais são os nomes dos professores cujos cursos não foram organizados?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "professores", "cujos", "cursos", "não", "foram", "organizados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 4, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "museum_visit", "query": "SELECT count(*) FROM visitor WHERE age < 30", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "visitor", "WHERE", "age", "<", "30" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "visitor", "where", "age", "<", "value" ], "question": "Quantos visitantes com menos de 30 anos existem?", "question_toks": [ "Quantos", "visitantes", "com", "menos", "de", "30", "anos", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 8, false ], null ], 30.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC", "query_toks": [ "SELECT", "name", "FROM", "visitor", "WHERE", "Level_of_membership", ">", "4", "ORDER", "BY", "Level_of_membership", "DESC" ], "query_toks_no_value": [ "select", "name", "from", "visitor", "where", "level_of_membership", ">", "value", "order", "by", "level_of_membership", "desc" ], "question": "Encontre os nomes dos visitantes cujo nível de associação é superior a 4 e ordene os resultados por nível, de alto a baixo.", "question_toks": [ "Encontre", "os", "nomes", "dos", "visitantes", "cujo", "nível", "de", "associação", "é", "superior", "a", "4", "e", "ordene", "os", "resultados", "por", "nível", ",", "de", "alto", "a", "baixo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 7, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 7, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT avg(age) FROM visitor WHERE Level_of_membership <= 4", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "visitor", "WHERE", "Level_of_membership", "<", "=", "4" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "visitor", "where", "level_of_membership", "<", "=", "value" ], "question": "Qual é a idade média dos visitantes cujo nível de adesão não é superior a 4?", "question_toks": [ "Qual", "é", "a", "idade", "média", "dos", "visitantes", "cujo", "nível", "de", "adesão", "não", "é", "superior", "a", "4", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 6, [ 0, [ 0, 7, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC", "query_toks": [ "SELECT", "name", ",", "Level_of_membership", "FROM", "visitor", "WHERE", "Level_of_membership", ">", "4", "ORDER", "BY", "age", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "level_of_membership", "from", "visitor", "where", "level_of_membership", ">", "value", "order", "by", "age", "desc" ], "question": "Encontre o nome e o nível de associação dos visitantes cujo nível de associação seja superior a 4 e classifique por idade, de idosos a jovens.", "question_toks": [ "Encontre", "o", "nome", "e", "o", "nível", "de", "associação", "dos", "visitantes", "cujo", "nível", "de", "associação", "seja", "superior", "a", "4", "e", "classifique", "por", "idade", ",", "de", "idosos", "a", "jovens", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 7, false ], null ], 4.0, null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 8, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1", "query_toks": [ "SELECT", "museum_id", ",", "name", "FROM", "museum", "ORDER", "BY", "num_of_staff", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "museum_id", ",", "name", "from", "museum", "order", "by", "num_of_staff", "desc", "limit", "value" ], "question": "Encontrar a id e o nome do museu com mais funcionários?", "question_toks": [ "Encontrar", "a", "id", "e", "o", "nome", "do", "museu", "com", "mais", "funcionários", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT avg(num_of_staff) FROM museum WHERE open_year < 2009", "query_toks": [ "SELECT", "avg", "(", "num_of_staff", ")", "FROM", "museum", "WHERE", "open_year", "<", "2009" ], "query_toks_no_value": [ "select", "avg", "(", "num_of_staff", ")", "from", "museum", "where", "open_year", "<", "value" ], "question": "Encontre o número médio de funcionários que trabalham para os museus que foram abertos antes de 2009.", "question_toks": [ "Encontre", "o", "número", "médio", "de", "funcionários", "que", "trabalham", "para", "os", "museus", "que", "foram", "abertos", "antes", "de", "2009", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 4, false ], null ], 2009.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT Num_of_Staff , Open_Year FROM museum WHERE name = 'Plaza Museum'", "query_toks": [ "SELECT", "Num_of_Staff", ",", "Open_Year", "FROM", "museum", "WHERE", "name", "=", "'Plaza", "Museum", "'" ], "query_toks_no_value": [ "select", "num_of_staff", ",", "open_year", "from", "museum", "where", "name", "=", "value" ], "question": "Qual é o ano de inauguração e o número de funcionários do museu denominado Plaza Museum?", "question_toks": [ "Qual", "é", "o", "ano", "de", "inauguração", "e", "o", "número", "de", "funcionários", "do", "museu", "denominado", "Plaza", "Museum", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Plaza Museum\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)", "query_toks": [ "SELECT", "name", "FROM", "museum", "WHERE", "num_of_staff", ">", "(", "SELECT", "min", "(", "num_of_staff", ")", "FROM", "museum", "WHERE", "open_year", ">", "2010", ")" ], "query_toks_no_value": [ "select", "name", "from", "museum", "where", "num_of_staff", ">", "(", "select", "min", "(", "num_of_staff", ")", "from", "museum", "where", "open_year", ">", "value", ")" ], "question": "encontre os nomes dos museus que têm mais funcionários do que o número mínimo de funcionários de todos os museus abertos após 2010.", "question_toks": [ "encontre", "os", "nomes", "dos", "museus", "que", "têm", "mais", "funcionários", "do", "que", "o", "número", "mínimo", "de", "funcionários", "de", "todos", "os", "museus", "abertos", "após", "2010", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 2010.0, null ] ], "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": "museum_visit", "query": "SELECT t1.id , t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING count(*) > 1", "query_toks": [ "SELECT", "t1.id", ",", "t1.name", ",", "t1.age", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "GROUP", "BY", "t1.id", "HAVING", "count", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "id", ",", "t1", ".", "name", ",", "t1", ".", "age", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "group", "by", "t1", ".", "id", "having", "count", "(", "*", ")", ">", "value" ], "question": "encontre a id, o nome e a idade dos visitantes que visitaram alguns museus mais de uma vez.", "question_toks": [ "encontre", "a", "id", ",", "o", "nome", "e", "a", "idade", "dos", "visitantes", "que", "visitaram", "alguns", "museus", "mais", "de", "uma", "vez", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT t2.visitor_id , t1.name , t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1", "query_toks": [ "SELECT", "t2.visitor_id", ",", "t1.name", ",", "t1.Level_of_membership", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "GROUP", "BY", "t2.visitor_id", "ORDER", "BY", "sum", "(", "t2.Total_spent", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "visitor_id", ",", "t1", ".", "name", ",", "t1", ".", "level_of_membership", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "group", "by", "t2", ".", "visitor_id", "order", "by", "sum", "(", "t2", ".", "total_spent", ")", "desc", "limit", "value" ], "question": "Qual é o id, nome e nível de associação dos visitantes que gastaram a maior quantia de dinheiro no total em todos os ingressos para museus?", "question_toks": [ "Qual", "é", "o", "id", ",", "nome", "e", "nível", "de", "associação", "dos", "visitantes", "que", "gastaram", "a", "maior", "quantia", "de", "dinheiro", "no", "total", "em", "todos", "os", "ingressos", "para", "museus", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 4, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT t2.Museum_ID , t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "t2.Museum_ID", ",", "t1.name", "FROM", "museum", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.Museum_ID", "=", "t2.Museum_ID", "GROUP", "BY", "t2.Museum_ID", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "museum_id", ",", "t1", ".", "name", "from", "museum", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "museum_id", "=", "t2", ".", "museum_id", "group", "by", "t2", ".", "museum_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Quais são o id e o nome do museu mais visitado?", "question_toks": [ "Quais", "são", "o", "id", "e", "o", "nome", "do", "museu", "mais", "visitado", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)", "query_toks": [ "SELECT", "name", "FROM", "museum", "WHERE", "Museum_ID", "NOT", "IN", "(", "SELECT", "museum_id", "FROM", "visit", ")" ], "query_toks_no_value": [ "select", "name", "from", "museum", "where", "museum_id", "not", "in", "(", "select", "museum_id", "from", "visit", ")" ], "question": "Qual é o nome do museu que ainda não teve visita?", "question_toks": [ "Qual", "é", "o", "nome", "do", "museu", "que", "ainda", "não", "teve", "visita", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, 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": "museum_visit", "query": "SELECT t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1", "query_toks": [ "SELECT", "t1.name", ",", "t1.age", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "ORDER", "BY", "t2.num_of_ticket", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t1", ".", "age", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "order", "by", "t2", ".", "num_of_ticket", "desc", "limit", "value" ], "question": "Encontre o nome e a idade do visitante que comprou mais ingressos de uma só vez.", "question_toks": [ "Encontre", "o", "nome", "e", "a", "idade", "do", "visitante", "que", "comprou", "mais", "ingressos", "de", "uma", "só", "vez", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 11, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit", "query_toks": [ "SELECT", "avg", "(", "num_of_ticket", ")", ",", "max", "(", "num_of_ticket", ")", "FROM", "visit" ], "query_toks_no_value": [ "select", "avg", "(", "num_of_ticket", ")", ",", "max", "(", "num_of_ticket", ")", "from", "visit" ], "question": "Qual é a média e o número máximo de ingressos comprados em todas as visitas?", "question_toks": [ "Qual", "é", "a", "média", "e", "o", "número", "máximo", "de", "ingressos", "comprados", "em", "todas", "as", "visitas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 11, false ], null ] ], [ 1, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT sum(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1", "query_toks": [ "SELECT", "sum", "(", "t2.Total_spent", ")", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "WHERE", "t1.Level_of_membership", "=", "1" ], "query_toks_no_value": [ "select", "sum", "(", "t2", ".", "total_spent", ")", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "where", "t1", ".", "level_of_membership", "=", "value" ], "question": "Qual é a despesa total com ingressos dos visitantes cujo nível de associação é 1?", "question_toks": [ "Qual", "é", "a", "despesa", "total", "com", "ingressos", "dos", "visitantes", "cujo", "nível", "de", "associação", "é", "1", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011", "query_toks": [ "SELECT", "t1.name", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "JOIN", "museum", "AS", "t3", "ON", "t3.Museum_ID", "=", "t2.Museum_ID", "WHERE", "t3.open_year", "<", "2009", "INTERSECT", "SELECT", "t1.name", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "JOIN", "museum", "AS", "t3", "ON", "t3.Museum_ID", "=", "t2.Museum_ID", "WHERE", "t3.open_year", ">", "2011" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "join", "museum", "as", "t3", "on", "t3", ".", "museum_id", "=", "t2", ".", "museum_id", "where", "t3", ".", "open_year", "<", "value", "intersect", "select", "t1", ".", "name", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "join", "museum", "as", "t3", "on", "t3", ".", "museum_id", "=", "t2", ".", "museum_id", "where", "t3", ".", "open_year", ">", "value" ], "question": "Qual é o nome do visitante que visitou um museu inaugurado antes de 2009 e um museu inaugurado depois de 2011?", "question_toks": [ "Qual", "é", "o", "nome", "do", "visitante", "que", "visitou", "um", "museu", "inaugurado", "antes", "de", "2009", "e", "um", "museu", "inaugurado", "depois", "de", "2011", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ], "and", [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 4, false ], null ], 2009.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 10, false ], null ], "and", [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 2011.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "museum_visit", "query": "SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010)", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "visitor", "WHERE", "id", "NOT", "IN", "(", "SELECT", "t2.visitor_id", "FROM", "museum", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.Museum_ID", "=", "t2.Museum_ID", "WHERE", "t1.open_year", ">", "2010", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "visitor", "where", "id", "not", "in", "(", "select", "t2", ".", "visitor_id", "from", "museum", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "museum_id", "=", "t2", ".", "museum_id", "where", "t1", ".", "open_year", ">", "value", ")" ], "question": "Encontre o número de visitantes que não visitaram nenhum museu inaugurado depois de 2010.", "question_toks": [ "Encontre", "o", "número", "de", "visitantes", "que", "não", "visitaram", "nenhum", "museu", "inaugurado", "depois", "de", "2010", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 9, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 2010.0, null ] ], "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": "museum_visit", "query": "SELECT count(*) FROM museum WHERE open_year > 2013 OR open_year < 2008", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "museum", "WHERE", "open_year", ">", "2013", "OR", "open_year", "<", "2008" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "museum", "where", "open_year", ">", "value", "or", "open_year", "<", "value" ], "question": "Quantos museus foram inaugurados depois de 2013 ou antes de 2008?", "question_toks": [ "Quantos", "museus", "foram", "inaugurados", "depois", "de", "2013", "ou", "antes", "de", "2008", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 4, false ], null ], 2013.0, null ], "or", [ false, 4, [ 0, [ 0, 4, false ], null ], 2008.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM players", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "players" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "players" ], "question": "Encontre o número total de jogadores.", "question_toks": [ "Encontre", "o", "número", "total", "de", "jogadores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM players", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "players" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "players" ], "question": "Quantos jogadores estão lá?", "question_toks": [ "Quantos", "jogadores", "estão", "lá", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM matches", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "matches" ], "question": "Encontre o número total de correspondências.", "question_toks": [ "Encontre", "o", "número", "total", "de", "correspondências", "." ], "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": "wta_1", "query": "SELECT count(*) FROM matches", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "matches" ], "question": "Conte o número de correspondências.", "question_toks": [ "Conte", "o", "número", "de", "correspondências", "." ], "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": "wta_1", "query": "SELECT first_name , birth_date FROM players WHERE country_code = 'USA'", "query_toks": [ "SELECT", "first_name", ",", "birth_date", "FROM", "players", "WHERE", "country_code", "=", "'USA", "'" ], "query_toks_no_value": [ "select", "first_name", ",", "birth_date", "from", "players", "where", "country_code", "=", "value" ], "question": "Liste o primeiro nome e a data de nascimento de todos os jogadores do país com o código EUA.", "question_toks": [ "Liste", "o", "primeiro", "nome", "e", "a", "data", "de", "nascimento", "de", "todos", "os", "jogadores", "do", "país", "com", "o", "código", "EUA", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , birth_date FROM players WHERE country_code = 'USA'", "query_toks": [ "SELECT", "first_name", ",", "birth_date", "FROM", "players", "WHERE", "country_code", "=", "'USA", "'" ], "query_toks_no_value": [ "select", "first_name", ",", "birth_date", "from", "players", "where", "country_code", "=", "value" ], "question": "Quais são os primeiros nomes e datas de nascimento dos jogadores dos EUA?", "question_toks": [ "Quais", "são", "os", "primeiros", "nomes", "e", "datas", "de", "nascimento", "dos", "jogadores", "dos", "EUA", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "query_toks": [ "SELECT", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "from", "matches" ], "question": "Encontre a idade média dos perdedores e vencedores de todas as partidas.", "question_toks": [ "Encontre", "a", "idade", "média", "dos", "perdedores", "e", "vencedores", "de", "todas", "as", "partidas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 9, false ], null ] ], [ 5, [ 0, [ 0, 28, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "query_toks": [ "SELECT", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "avg", "(", "loser_age", ")", ",", "avg", "(", "winner_age", ")", "from", "matches" ], "question": "Qual é a idade média dos perdedores e vencedores nas partidas?", "question_toks": [ "Qual", "é", "a", "idade", "média", "dos", "perdedores", "e", "vencedores", "nas", "partidas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 9, false ], null ] ], [ 5, [ 0, [ 0, 28, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(winner_rank) FROM matches", "query_toks": [ "SELECT", "avg", "(", "winner_rank", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "avg", "(", "winner_rank", ")", "from", "matches" ], "question": "Encontre a classificação média dos vencedores em todas as partidas.", "question_toks": [ "Encontre", "a", "classificação", "média", "dos", "vencedores", "em", "todas", "as", "partidas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(winner_rank) FROM matches", "query_toks": [ "SELECT", "avg", "(", "winner_rank", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "avg", "(", "winner_rank", ")", "from", "matches" ], "question": "Qual é a classificação média dos vencedores em todas as partidas?", "question_toks": [ "Qual", "é", "a", "classificação", "média", "dos", "vencedores", "em", "todas", "as", "partidas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT min(loser_rank) FROM matches", "query_toks": [ "SELECT", "min", "(", "loser_rank", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "min", "(", "loser_rank", ")", "from", "matches" ], "question": "Encontre a classificação mais alta de perdedores em todas as partidas.", "question_toks": [ "Encontre", "a", "classificação", "mais", "alta", "de", "perdedores", "em", "todas", "as", "partidas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT min(loser_rank) FROM matches", "query_toks": [ "SELECT", "min", "(", "loser_rank", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "min", "(", "loser_rank", ")", "from", "matches" ], "question": "Qual é a melhor classificação dos perdedores em todas as partidas?", "question_toks": [ "Qual", "é", "a", "melhor", "classificação", "dos", "perdedores", "em", "todas", "as", "partidas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT country_code) FROM players", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "country_code", ")", "FROM", "players" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "country_code", ")", "from", "players" ], "question": "encontre o número de códigos de países distintos de todos os jogadores.", "question_toks": [ "encontre", "o", "número", "de", "códigos", "de", "países", "distintos", "de", "todos", "os", "jogadores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 6, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT country_code) FROM players", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "country_code", ")", "FROM", "players" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "country_code", ")", "from", "players" ], "question": "De quantos países distintos os jogadores vêm?", "question_toks": [ "De", "quantos", "países", "distintos", "os", "jogadores", "vêm", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 6, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT loser_name) FROM matches", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "loser_name", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "loser_name", ")", "from", "matches" ], "question": "Encontre o número de nomes distintos de perdedores.", "question_toks": [ "Encontre", "o", "número", "de", "nomes", "distintos", "de", "perdedores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 15, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT loser_name) FROM matches", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "loser_name", ")", "FROM", "matches" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "loser_name", ")", "from", "matches" ], "question": "Quantos nomes de perdedores diferentes existem?", "question_toks": [ "Quantos", "nomes", "de", "perdedores", "diferentes", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 15, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10", "query_toks": [ "SELECT", "tourney_name", "FROM", "matches", "GROUP", "BY", "tourney_name", "HAVING", "count", "(", "*", ")", ">", "10" ], "query_toks_no_value": [ "select", "tourney_name", "from", "matches", "group", "by", "tourney_name", "having", "count", "(", "*", ")", ">", "value" ], "question": "Encontre o nome do torneio que possui mais de 10 partidas.", "question_toks": [ "Encontre", "o", "nome", "do", "torneio", "que", "possui", "mais", "de", "10", "partidas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 27, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 27, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10", "query_toks": [ "SELECT", "tourney_name", "FROM", "matches", "GROUP", "BY", "tourney_name", "HAVING", "count", "(", "*", ")", ">", "10" ], "query_toks_no_value": [ "select", "tourney_name", "from", "matches", "group", "by", "tourney_name", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são os nomes dos torneios com mais de 10 partidas?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "torneios", "com", "mais", "de", "10", "partidas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 27, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 27, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "query_toks": [ "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "INTERSECT", "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2016" ], "query_toks_no_value": [ "select", "winner_name", "from", "matches", "where", "year", "=", "value", "intersect", "select", "winner_name", "from", "matches", "where", "year", "=", "value" ], "question": "Liste os nomes de todos os vencedores que jogaram em 2013 e 2016.", "question_toks": [ "Liste", "os", "nomes", "de", "todos", "os", "vencedores", "que", "jogaram", "em", "2013", "e", "2016", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2013.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2016.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "query_toks": [ "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "INTERSECT", "SELECT", "winner_name", "FROM", "matches", "WHERE", "YEAR", "=", "2016" ], "query_toks_no_value": [ "select", "winner_name", "from", "matches", "where", "year", "=", "value", "intersect", "select", "winner_name", "from", "matches", "where", "year", "=", "value" ], "question": "Quais são os nomes dos jogadores que venceram em 2013 e 2016?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "jogadores", "que", "venceram", "em", "2013", "e", "2016", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2013.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2016.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "OR", "YEAR", "=", "2016" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "matches", "where", "year", "=", "value", "or", "year", "=", "value" ], "question": "Liste o número de todas as partidas que jogaram nos anos de 2013 ou 2016.", "question_toks": [ "Liste", "o", "número", "de", "todas", "as", "partidas", "que", "jogaram", "nos", "anos", "de", "2013", "ou", "2016", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2013.0, null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], 2016.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "matches", "WHERE", "YEAR", "=", "2013", "OR", "YEAR", "=", "2016" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "matches", "where", "year", "=", "value", "or", "year", "=", "value" ], "question": "Quantas partidas foram disputadas em 2013 ou 2016?", "question_toks": [ "Quantas", "partidas", "foram", "disputadas", "em", "2013", "ou", "2016", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], 2013.0, null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], 2016.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "query_toks": [ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'WTA", "Championships", "'", "INTERSECT", "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'Australian", "Open", "'" ], "query_toks_no_value": [ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value", "intersect", "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value" ], "question": "Qual é o código do país e o primeiro nome dos jogadores que ganharam o torneio WTA Championships e o Australian Open?", "question_toks": [ "Qual", "é", "o", "código", "do", "país", "e", "o", "primeiro", "nome", "dos", "jogadores", "que", "ganharam", "o", "torneio", "WTA", "Championships", "e", "o", "Australian", "Open", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"WTA Championships\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"Australian Open\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "query_toks": [ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'WTA", "Championships", "'", "INTERSECT", "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "WHERE", "T2.tourney_name", "=", "'Australian", "Open", "'" ], "query_toks_no_value": [ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value", "intersect", "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "where", "t2", ".", "tourney_name", "=", "value" ], "question": "Quais são os nomes e códigos de país dos jogadores que ganharam o WTA Championships e o Australian Open?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "códigos", "de", "país", "dos", "jogadores", "que", "ganharam", "o", "WTA", "Championships", "e", "o", "Australian", "Open", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"WTA Championships\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"Australian Open\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "country_code", "FROM", "players", "ORDER", "BY", "birth_date", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "country_code", "from", "players", "order", "by", "birth_date", "limit", "value" ], "question": "Encontre o nome e o código do país do jogador mais antigo.", "question_toks": [ "Encontre", "o", "nome", "e", "o", "código", "do", "país", "do", "jogador", "mais", "antigo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "country_code", "FROM", "players", "ORDER", "BY", "birth_date", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "country_code", "from", "players", "order", "by", "birth_date", "limit", "value" ], "question": "Qual é o primeiro nome e código do país do jogador mais antigo?", "question_toks": [ "Qual", "é", "o", "primeiro", "nome", "e", "código", "do", "país", "do", "jogador", "mais", "antigo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , last_name FROM players ORDER BY birth_date", "query_toks": [ "SELECT", "first_name", ",", "last_name", "FROM", "players", "ORDER", "BY", "birth_date" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", "from", "players", "order", "by", "birth_date" ], "question": "Liste o nome e o sobrenome de todos os jogadores na ordem da data de nascimento.", "question_toks": [ "Liste", "o", "nome", "e", "o", "sobrenome", "de", "todos", "os", "jogadores", "na", "ordem", "da", "data", "de", "nascimento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , last_name FROM players ORDER BY birth_date", "query_toks": [ "SELECT", "first_name", ",", "last_name", "FROM", "players", "ORDER", "BY", "birth_date" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", "from", "players", "order", "by", "birth_date" ], "question": "Quais são os nomes completos de todos os jogadores, classificados por data de nascimento?", "question_toks": [ "Quais", "são", "os", "nomes", "completos", "de", "todos", "os", "jogadores", ",", "classificados", "por", "data", "de", "nascimento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "query_toks": [ "SELECT", "first_name", ",", "last_name", "FROM", "players", "WHERE", "hand", "=", "'L", "'", "ORDER", "BY", "birth_date" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", "from", "players", "where", "hand", "=", "value", "order", "by", "birth_date" ], "question": "Liste o nome e o sobrenome de todos os jogadores que sobraram / L na ordem da data de nascimento.", "question_toks": [ "Liste", "o", "nome", "e", "o", "sobrenome", "de", "todos", "os", "jogadores", "que", "sobraram", "/", "L", "na", "ordem", "da", "data", "de", "nascimento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"L\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "query_toks": [ "SELECT", "first_name", ",", "last_name", "FROM", "players", "WHERE", "hand", "=", "'L", "'", "ORDER", "BY", "birth_date" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", "from", "players", "where", "hand", "=", "value", "order", "by", "birth_date" ], "question": "Quais são os nomes completos de todos os jogadores canhotos, por ordem de data de nascimento?", "question_toks": [ "Quais", "são", "os", "nomes", "completos", "de", "todos", "os", "jogadores", "canhotos", ",", "por", "ordem", "de", "data", "de", "nascimento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"L\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "query_toks": [ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "ORDER", "BY", "T2.tours", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "order", "by", "t2", ".", "tours", "desc", "limit", "value" ], "question": "Encontre o nome e o código do país do jogador que fez o maior número de turnês.", "question_toks": [ "Encontre", "o", "nome", "e", "o", "código", "do", "país", "do", "jogador", "que", "fez", "o", "maior", "número", "de", "turnês", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 43, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "query_toks": [ "SELECT", "T1.country_code", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "ORDER", "BY", "T2.tours", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "country_code", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "order", "by", "t2", ".", "tours", "desc", "limit", "value" ], "question": "Qual é o nome e o código do país do jogador com mais turnês?", "question_toks": [ "Qual", "é", "o", "nome", "e", "o", "código", "do", "país", "do", "jogador", "com", "mais", "turnês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 43, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "year", "from", "matches", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Encontre o ano com o maior número de correspondências.", "question_toks": [ "Encontre", "o", "ano", "com", "o", "maior", "número", "de", "correspondências", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 38, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "year", "from", "matches", "group", "by", "year", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual ano teve mais partidas?", "question_toks": [ "Qual", "ano", "teve", "mais", "partidas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 38, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", ",", "winner_rank_points", "FROM", "matches", "GROUP", "BY", "winner_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", ",", "winner_rank_points", "from", "matches", "group", "by", "winner_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Encontre o nome e os pontos de classificação do vencedor que ganhou mais vezes.", "question_toks": [ "Encontre", "o", "nome", "e", "os", "pontos", "de", "classificação", "do", "vencedor", "que", "ganhou", "mais", "vezes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 34, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", ",", "winner_rank_points", "FROM", "matches", "GROUP", "BY", "winner_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", ",", "winner_rank_points", "from", "matches", "group", "by", "winner_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome do vencedor que ganhou mais partidas e quantos pontos de classificação esse jogador tem?", "question_toks": [ "Qual", "é", "o", "nome", "do", "vencedor", "que", "ganhou", "mais", "partidas", "e", "quantos", "pontos", "de", "classificação", "esse", "jogador", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 34, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", "FROM", "matches", "WHERE", "tourney_name", "=", "'Australian", "Open", "'", "ORDER", "BY", "winner_rank_points", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", "from", "matches", "where", "tourney_name", "=", "value", "order", "by", "winner_rank_points", "desc", "limit", "value" ], "question": "Encontre o nome do vencedor que tem a pontuação mais alta e participou do torneio Australian Open.", "question_toks": [ "Encontre", "o", "nome", "do", "vencedor", "que", "tem", "a", "pontuação", "mais", "alta", "e", "participou", "do", "torneio", "Australian", "Open", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"Australian Open\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 36, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", "FROM", "matches", "WHERE", "tourney_name", "=", "'Australian", "Open", "'", "ORDER", "BY", "winner_rank_points", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", "from", "matches", "where", "tourney_name", "=", "value", "order", "by", "winner_rank_points", "desc", "limit", "value" ], "question": "Qual é o nome do vencedor com mais pontos de classificação que participou do torneio Open da Austrália?", "question_toks": [ "Qual", "é", "o", "nome", "do", "vencedor", "com", "mais", "pontos", "de", "classificação", "que", "participou", "do", "torneio", "Open", "da", "Austrália", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"Australian Open\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 36, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", ",", "loser_name", "FROM", "matches", "ORDER", "BY", "minutes", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", ",", "loser_name", "from", "matches", "order", "by", "minutes", "desc", "limit", "value" ], "question": "encontre os nomes do perdedor e do vencedor que jogou a partida com maior número de minutos.", "question_toks": [ "encontre", "os", "nomes", "do", "perdedor", "e", "do", "vencedor", "que", "jogou", "a", "partida", "com", "maior", "número", "de", "minutos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "query_toks": [ "SELECT", "winner_name", ",", "loser_name", "FROM", "matches", "ORDER", "BY", "minutes", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "winner_name", ",", "loser_name", "from", "matches", "order", "by", "minutes", "desc", "limit", "value" ], "question": "Quais são os nomes do vencedor e do perdedor que jogou a partida mais longa?", "question_toks": [ "Quais", "são", "os", "nomes", "do", "vencedor", "e", "do", "perdedor", "que", "jogou", "a", "partida", "mais", "longa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "query_toks": [ "SELECT", "avg", "(", "ranking", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ], "query_toks_no_value": [ "select", "avg", "(", "ranking", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ], "question": "Encontre a classificação média de cada jogador e seu primeiro nome.", "question_toks": [ "Encontre", "a", "classificação", "média", "de", "cada", "jogador", "e", "seu", "primeiro", "nome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "query_toks": [ "SELECT", "avg", "(", "ranking", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ], "query_toks_no_value": [ "select", "avg", "(", "ranking", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ], "question": "Quais são os primeiros nomes de todos os jogadores e suas classificações médias?", "question_toks": [ "Quais", "são", "os", "primeiros", "nomes", "de", "todos", "os", "jogadores", "e", "suas", "classificações", "médias", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "query_toks": [ "SELECT", "sum", "(", "ranking_points", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ], "query_toks_no_value": [ "select", "sum", "(", "ranking_points", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ], "question": "Encontre o total de pontos de classificação para cada jogador e seu primeiro nome.", "question_toks": [ "Encontre", "o", "total", "de", "pontos", "de", "classificação", "para", "cada", "jogador", "e", "seu", "primeiro", "nome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 4, [ 0, [ 0, 42, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "query_toks": [ "SELECT", "sum", "(", "ranking_points", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name" ], "query_toks_no_value": [ "select", "sum", "(", "ranking_points", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name" ], "question": "Quais são os primeiros nomes de todos os jogadores e seus pontos totais de classificação?", "question_toks": [ "Quais", "são", "os", "primeiros", "nomes", "de", "todos", "os", "jogadores", "e", "seus", "pontos", "totais", "de", "classificação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 41, false ], null ] ] }, "select": [ false, [ [ 4, [ 0, [ 0, 42, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , country_code FROM players GROUP BY country_code", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "country_code", "FROM", "players", "GROUP", "BY", "country_code" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "country_code", "from", "players", "group", "by", "country_code" ], "question": "encontre o número de jogadores para cada país.", "question_toks": [ "encontre", "o", "número", "de", "jogadores", "para", "cada", "país", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , country_code FROM players GROUP BY country_code", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "country_code", "FROM", "players", "GROUP", "BY", "country_code" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "country_code", "from", "players", "group", "by", "country_code" ], "question": "Quantos jogadores são de cada país?", "question_toks": [ "Quantos", "jogadores", "são", "de", "cada", "país", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "country_code", "from", "players", "group", "by", "country_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "encontre o código do país onde tem o maior número de jogadores.", "question_toks": [ "encontre", "o", "código", "do", "país", "onde", "tem", "o", "maior", "número", "de", "jogadores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "country_code", "from", "players", "group", "by", "country_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o código do país com mais jogadores?", "question_toks": [ "Qual", "é", "o", "código", "do", "país", "com", "mais", "jogadores", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", "query_toks": [ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "HAVING", "count", "(", "*", ")", ">", "50" ], "query_toks_no_value": [ "select", "country_code", "from", "players", "group", "by", "country_code", "having", "count", "(", "*", ")", ">", "value" ], "question": "Encontre os códigos de países com mais de 50 jogadores.", "question_toks": [ "Encontre", "os", "códigos", "de", "países", "com", "mais", "de", "50", "jogadores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 50.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", "query_toks": [ "SELECT", "country_code", "FROM", "players", "GROUP", "BY", "country_code", "HAVING", "count", "(", "*", ")", ">", "50" ], "query_toks_no_value": [ "select", "country_code", "from", "players", "group", "by", "country_code", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são os códigos de países com mais de 50 jogadores?", "question_toks": [ "Quais", "são", "os", "códigos", "de", "países", "com", "mais", "de", "50", "jogadores", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 50.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "query_toks": [ "SELECT", "sum", "(", "tours", ")", ",", "ranking_date", "FROM", "rankings", "GROUP", "BY", "ranking_date" ], "query_toks_no_value": [ "select", "sum", "(", "tours", ")", ",", "ranking_date", "from", "rankings", "group", "by", "ranking_date" ], "question": "Encontre o número total de passeios para cada data de classificação.", "question_toks": [ "Encontre", "o", "número", "total", "de", "passeios", "para", "cada", "data", "de", "classificação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 43, false ], null ] ], [ 0, [ 0, [ 0, 39, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 39, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "query_toks": [ "SELECT", "sum", "(", "tours", ")", ",", "ranking_date", "FROM", "rankings", "GROUP", "BY", "ranking_date" ], "query_toks_no_value": [ "select", "sum", "(", "tours", ")", ",", "ranking_date", "from", "rankings", "group", "by", "ranking_date" ], "question": "Quantos tours no total houve para cada data de classificação?", "question_toks": [ "Quantos", "tours", "no", "total", "houve", "para", "cada", "data", "de", "classificação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 43, false ], null ] ], [ 0, [ 0, [ 0, 39, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 39, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , YEAR FROM matches GROUP BY YEAR", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "year", "from", "matches", "group", "by", "year" ], "question": "Encontre o número de partidas ocorridas em cada ano.", "question_toks": [ "Encontre", "o", "número", "de", "partidas", "ocorridas", "em", "cada", "ano", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 38, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , YEAR FROM matches GROUP BY YEAR", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "YEAR", "FROM", "matches", "GROUP", "BY", "YEAR" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "year", "from", "matches", "group", "by", "year" ], "question": "Quantas partidas foram disputadas em cada ano?", "question_toks": [ "Quantas", "partidas", "foram", "disputadas", "em", "cada", "ano", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 38, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "query_toks": [ "SELECT", "DISTINCT", "winner_name", ",", "winner_rank", "FROM", "matches", "ORDER", "BY", "winner_age", "LIMIT", "3" ], "query_toks_no_value": [ "select", "distinct", "winner_name", ",", "winner_rank", "from", "matches", "order", "by", "winner_age", "limit", "value" ], "question": "Encontre o nome e a classificação dos 3 vencedores mais jovens em todas as partidas.", "question_toks": [ "Encontre", "o", "nome", "e", "a", "classificação", "dos", "3", "vencedores", "mais", "jovens", "em", "todas", "as", "partidas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 28, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "query_toks": [ "SELECT", "DISTINCT", "winner_name", ",", "winner_rank", "FROM", "matches", "ORDER", "BY", "winner_age", "LIMIT", "3" ], "query_toks_no_value": [ "select", "distinct", "winner_name", ",", "winner_rank", "from", "matches", "order", "by", "winner_age", "limit", "value" ], "question": "Quais são os nomes e as classificações dos três vencedores mais jovens em todas as partidas?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "as", "classificações", "dos", "três", "vencedores", "mais", "jovens", "em", "todas", "as", "partidas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 28, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "winner_name", ")", "FROM", "matches", "WHERE", "tourney_name", "=", "'WTA", "Championships", "'", "AND", "winner_hand", "=", "'L", "'" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "winner_name", ")", "from", "matches", "where", "tourney_name", "=", "value", "and", "winner_hand", "=", "value" ], "question": "Quantos vencedores diferentes participaram do campeonato WTA e eram canhotos?", "question_toks": [ "Quantos", "vencedores", "diferentes", "participaram", "do", "campeonato", "WTA", "e", "eram", "canhotos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 34, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"WTA Championships\"", null ], "and", [ false, 2, [ 0, [ 0, 30, false ], null ], "\"L\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "winner_name", ")", "FROM", "matches", "WHERE", "tourney_name", "=", "'WTA", "Championships", "'", "AND", "winner_hand", "=", "'L", "'" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "winner_name", ")", "from", "matches", "where", "tourney_name", "=", "value", "and", "winner_hand", "=", "value" ], "question": "Encontre o número de vencedores canhotos que participaram do Campeonato WTA.", "question_toks": [ "Encontre", "o", "número", "de", "vencedores", "canhotos", "que", "participaram", "do", "Campeonato", "WTA", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 34, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 27, false ], null ], "\"WTA Championships\"", null ], "and", [ false, 2, [ 0, [ 0, 30, false ], null ], "\"L\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.country_code", ",", "T1.birth_date", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "ORDER", "BY", "T2.winner_rank_points", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "country_code", ",", "t1", ".", "birth_date", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "order", "by", "t2", ".", "winner_rank_points", "desc", "limit", "value" ], "question": "Encontre o nome, código do país e data de nascimento do vencedor que tem a maior pontuação em todas as partidas.", "question_toks": [ "Encontre", "o", "nome", ",", "código", "do", "país", "e", "data", "de", "nascimento", "do", "vencedor", "que", "tem", "a", "maior", "pontuação", "em", "todas", "as", "partidas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 36, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.country_code", ",", "T1.birth_date", "FROM", "players", "AS", "T1", "JOIN", "matches", "AS", "T2", "ON", "T1.player_id", "=", "T2.winner_id", "ORDER", "BY", "T2.winner_rank_points", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "country_code", ",", "t1", ".", "birth_date", "from", "players", "as", "t1", "join", "matches", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "winner_id", "order", "by", "t2", ".", "winner_rank_points", "desc", "limit", "value" ], "question": "Qual é o nome, código do país e data de nascimento do jogador com mais pontos de classificação de vencedor em todas as partidas?", "question_toks": [ "Qual", "é", "o", "nome", ",", "código", "do", "país", "e", "data", "de", "nascimento", "do", "jogador", "com", "mais", "pontos", "de", "classificação", "de", "vencedor", "em", "todas", "as", "partidas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 32, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 36, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , hand FROM players GROUP BY hand", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "hand", "FROM", "players", "GROUP", "BY", "hand" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "hand", "from", "players", "group", "by", "hand" ], "question": "Encontre o número de jogadores para cada tipo de mão.", "question_toks": [ "Encontre", "o", "número", "de", "jogadores", "para", "cada", "tipo", "de", "mão", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "wta_1", "query": "SELECT count(*) , hand FROM players GROUP BY hand", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "hand", "FROM", "players", "GROUP", "BY", "hand" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "hand", "from", "players", "group", "by", "hand" ], "question": "Quantos jogadores existem para cada tipo de mão?", "question_toks": [ "Quantos", "jogadores", "existem", "para", "cada", "tipo", "de", "mão", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT count(*) FROM ship WHERE disposition_of_ship = 'Captured'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "ship", "WHERE", "disposition_of_ship", "=", "'Captured", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "ship", "where", "disposition_of_ship", "=", "value" ], "question": "Quantos navios acabaram sendo 'Capturados'?", "question_toks": [ "Quantos", "navios", "acabaram", "sendo", "'", "Capturados", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 13, false ], null ], "\"Captured\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name , tonnage FROM ship ORDER BY name DESC", "query_toks": [ "SELECT", "name", ",", "tonnage", "FROM", "ship", "ORDER", "BY", "name", "DESC" ], "query_toks_no_value": [ "select", "name", ",", "tonnage", "from", "ship", "order", "by", "name", "desc" ], "question": "Liste o nome e a tonelagem ordenados em ordem alfabética decrescente para os nomes.", "question_toks": [ "Liste", "o", "nome", "e", "a", "tonelagem", "ordenados", "em", "ordem", "alfabética", "decrescente", "para", "os", "nomes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name , date FROM battle", "query_toks": [ "SELECT", "name", ",", "date", "FROM", "battle" ], "query_toks_no_value": [ "select", "name", ",", "date", "from", "battle" ], "question": "Liste o nome, data e resultado de cada batalha.", "question_toks": [ "Liste", "o", "nome", ",", "data", "e", "resultado", "de", "cada", "batalha", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT max(killed) , min(killed) FROM death", "query_toks": [ "SELECT", "max", "(", "killed", ")", ",", "min", "(", "killed", ")", "FROM", "death" ], "query_toks_no_value": [ "select", "max", "(", "killed", ")", ",", "min", "(", "killed", ")", "from", "death" ], "question": "Qual é o número máximo e mínimo de mortes causadas a cada vez?", "question_toks": [ "Qual", "é", "o", "número", "máximo", "e", "mínimo", "de", "mortes", "causadas", "a", "cada", "vez", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 17, false ], null ] ], [ 2, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT avg(injured) FROM death", "query_toks": [ "SELECT", "avg", "(", "injured", ")", "FROM", "death" ], "query_toks_no_value": [ "select", "avg", "(", "injured", ")", "from", "death" ], "question": "Qual é o número médio de lesões causadas a cada vez?", "question_toks": [ "Qual", "é", "o", "número", "médio", "de", "lesões", "causadas", "a", "cada", "vez", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT T1.killed , T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'", "query_toks": [ "SELECT", "T1.killed", ",", "T1.injured", "FROM", "death", "AS", "T1", "JOIN", "ship", "AS", "t2", "ON", "T1.caused_by_ship_id", "=", "T2.id", "WHERE", "T2.tonnage", "=", "'t", "'" ], "query_toks_no_value": [ "select", "t1", ".", "killed", ",", "t1", ".", "injured", "from", "death", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "caused_by_ship_id", "=", "t2", ".", "id", "where", "t2", ".", "tonnage", "=", "value" ], "question": "Quais são as situações de morte e ferimentos causadas pelo navio com tonelagem 't'?", "question_toks": [ "Quais", "são", "as", "situações", "de", "morte", "e", "ferimentos", "causadas", "pelo", "navio", "com", "tonelagem", "'", "t", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ], [ 0, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"t\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name , RESULT FROM battle WHERE bulgarian_commander != 'Boril'", "query_toks": [ "SELECT", "name", ",", "RESULT", "FROM", "battle", "WHERE", "bulgarian_commander", "!", "=", "'Boril", "'" ], "query_toks_no_value": [ "select", "name", ",", "result", "from", "battle", "where", "bulgarian_commander", "!", "=", "value" ], "question": "Quais são o nome e os resultados das batalhas quando o comandante búlgaro não é 'Boril'", "question_toks": [ "Quais", "são", "o", "nome", "e", "os", "resultados", "das", "batalhas", "quando", "o", "comandante", "búlgaro", "não", "é", "'", "Boril", "'" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"Boril\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT DISTINCT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'", "query_toks": [ "SELECT", "DISTINCT", "T1.id", ",", "T1.name", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "WHERE", "T2.ship_type", "=", "'Brig", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "id", ",", "t1", ".", "name", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "where", "t2", ".", "ship_type", "=", "value" ], "question": "Quais são os diferentes ids e nomes das batalhas que perderam qualquer nave do tipo 'Brig'?", "question_toks": [ "Quais", "são", "os", "diferentes", "ids", "e", "nomes", "das", "batalhas", "que", "perderam", "qualquer", "nave", "do", "tipo", "'", "Brig", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Brig\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed) > 10", "query_toks": [ "SELECT", "T1.id", ",", "T1.name", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "JOIN", "death", "AS", "T3", "ON", "T2.id", "=", "T3.caused_by_ship_id", "GROUP", "BY", "T1.id", "HAVING", "sum", "(", "T3.killed", ")", ">", "10" ], "query_toks_no_value": [ "select", "t1", ".", "id", ",", "t1", ".", "name", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "join", "death", "as", "t3", "on", "t2", ".", "id", "=", "t3", ".", "caused_by_ship_id", "group", "by", "t1", ".", "id", "having", "sum", "(", "t3", ".", "killed", ")", ">", "value" ], "question": "Quais são os ids e nomes das batalhas que levaram a mais de 10 pessoas mortas no total.", "question_toks": [ "Quais", "são", "os", "ids", "e", "nomes", "das", "batalhas", "que", "levaram", "a", "mais", "de", "10", "pessoas", "mortas", "no", "total", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ], "and", [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [ [ false, 3, [ 0, [ 4, 17, false ], null ], 10.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.id", ",", "T2.name", "FROM", "death", "AS", "T1", "JOIN", "ship", "AS", "t2", "ON", "T1.caused_by_ship_id", "=", "T2.id", "GROUP", "BY", "T2.id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "id", ",", "t2", ".", "name", "from", "death", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "caused_by_ship_id", "=", "t2", ".", "id", "group", "by", "t2", ".", "id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é a identificação e o nome do navio que causou a maioria dos feridos?", "question_toks": [ "Qual", "é", "a", "identificação", "e", "o", "nome", "do", "navio", "que", "causou", "a", "maioria", "dos", "feridos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'", "query_toks": [ "SELECT", "name", "FROM", "battle", "WHERE", "bulgarian_commander", "=", "'Kaloyan", "'", "AND", "latin_commander", "=", "'Baldwin", "I", "'" ], "query_toks_no_value": [ "select", "name", "from", "battle", "where", "bulgarian_commander", "=", "value", "and", "latin_commander", "=", "value" ], "question": "Quais são os nomes de batalha distintos entre o comandante búlgaro 'Kaloyan' e o comandante latino 'Baldwin I'?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "batalha", "distintos", "entre", "o", "comandante", "búlgaro", "'", "Kaloyan", "'", "e", "o", "comandante", "latino", "'", "Baldwin", "I", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Kaloyan\"", null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Baldwin I\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT count(DISTINCT RESULT) FROM battle", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "RESULT", ")", "FROM", "battle" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "result", ")", "from", "battle" ], "question": "Quantos resultados diferentes existem para as batalhas?", "question_toks": [ "Quantos", "resultados", "diferentes", "existem", "para", "as", "batalhas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 6, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "battle", "WHERE", "id", "NOT", "IN", "(", "SELECT", "lost_in_battle", "FROM", "ship", "WHERE", "tonnage", "=", "'225", "'", ")", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "battle", "where", "id", "not", "in", "(", "select", "lost_in_battle", "from", "ship", "where", "tonnage", "=", "value", ")" ], "question": "Quantas batalhas não perdeu nenhum navio com tonelagem '225'?", "question_toks": [ "Quantas", "batalhas", "não", "perdeu", "nenhum", "navio", "com", "tonelagem", "'", "225", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"225\"", null ] ], "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": "battle_death", "query": "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'", "query_toks": [ "SELECT", "T1.name", ",", "T1.date", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "WHERE", "T2.name", "=", "'Lettice", "'", "INTERSECT", "SELECT", "T1.name", ",", "T1.date", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "WHERE", "T2.name", "=", "'HMS", "Atalanta", "'" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t1", ".", "date", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "where", "t2", ".", "name", "=", "value", "intersect", "select", "t1", ".", "name", ",", "t1", ".", "date", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "where", "t2", ".", "name", "=", "value" ], "question": "Liste o nome e a data da batalha que perdeu o navio chamado 'Lettice' e o navio chamado 'HMS Atalanta'", "question_toks": [ "Liste", "o", "nome", "e", "a", "data", "da", "batalha", "que", "perdeu", "o", "navio", "chamado", "'", "Lettice", "'", "e", "o", "navio", "chamado", "'", "HMS", "Atalanta", "'" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Lettice\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"HMS Atalanta\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "battle_death", "query": "SELECT name , RESULT , bulgarian_commander FROM battle EXCEPT SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'", "query_toks": [ "SELECT", "name", ",", "RESULT", ",", "bulgarian_commander", "FROM", "battle", "EXCEPT", "SELECT", "T1.name", ",", "T1.result", ",", "T1.bulgarian_commander", "FROM", "battle", "AS", "T1", "JOIN", "ship", "AS", "T2", "ON", "T1.id", "=", "T2.lost_in_battle", "WHERE", "T2.location", "=", "'English", "Channel", "'" ], "query_toks_no_value": [ "select", "name", ",", "result", ",", "bulgarian_commander", "from", "battle", "except", "select", "t1", ".", "name", ",", "t1", ".", "result", ",", "t1", ".", "bulgarian_commander", "from", "battle", "as", "t1", "join", "ship", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "lost_in_battle", "where", "t2", ".", "location", "=", "value" ], "question": "Mostre nomes, resultados e comandantes búlgaros das batalhas sem navios perdidos no 'Canal da Mancha'.", "question_toks": [ "Mostre", "nomes", ",", "resultados", "e", "comandantes", "búlgaros", "das", "batalhas", "sem", "navios", "perdidos", "no", "'", "Canal", "da", "Mancha", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"English Channel\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "battle_death", "query": "SELECT note FROM death WHERE note LIKE '%East%'", "query_toks": [ "SELECT", "note", "FROM", "death", "WHERE", "note", "LIKE", "'", "%", "East", "%", "'" ], "query_toks_no_value": [ "select", "note", "from", "death", "where", "note", "like", "value" ], "question": "Quais são as notas dos eventos de morte que têm substring 'Leste'?", "question_toks": [ "Quais", "são", "as", "notas", "dos", "eventos", "de", "morte", "que", "têm", "substring", "'", "Leste", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 16, false ], null ], "\"%East%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT line_1 , line_2 FROM addresses", "query_toks": [ "SELECT", "line_1", ",", "line_2", "FROM", "addresses" ], "query_toks_no_value": [ "select", "line_1", ",", "line_2", "from", "addresses" ], "question": "quais são todos os endereços, incluindo linha 1 e linha 2?", "question_toks": [ "quais", "são", "todos", "os", "endereços", ",", "incluindo", "linha", "1", "e", "linha", "2", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT line_1 , line_2 FROM addresses", "query_toks": [ "SELECT", "line_1", ",", "line_2", "FROM", "addresses" ], "query_toks_no_value": [ "select", "line_1", ",", "line_2", "from", "addresses" ], "question": "Qual é a primeira e a segunda linha para todos os endereços?", "question_toks": [ "Qual", "é", "a", "primeira", "e", "a", "segunda", "linha", "para", "todos", "os", "endereços", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Courses", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Courses" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "courses" ], "question": "Quantos cursos estão listados no total?", "question_toks": [ "Quantos", "cursos", "estão", "listados", "no", "total", "?" ], "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": "student_transcripts_tracking", "query": "SELECT count(*) FROM Courses", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Courses" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "courses" ], "question": "Quantos cursos existem?", "question_toks": [ "Quantos", "cursos", "existem", "?" ], "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": "student_transcripts_tracking", "query": "SELECT course_description FROM Courses WHERE course_name = 'math'", "query_toks": [ "SELECT", "course_description", "FROM", "Courses", "WHERE", "course_name", "=", "'math", "'" ], "query_toks_no_value": [ "select", "course_description", "from", "courses", "where", "course_name", "=", "value" ], "question": "Como o curso de matemática é descrito?", "question_toks": [ "Como", "o", "curso", "de", "matemática", "é", "descrito", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"math\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT course_description FROM Courses WHERE course_name = 'math'", "query_toks": [ "SELECT", "course_description", "FROM", "Courses", "WHERE", "course_name", "=", "'math", "'" ], "query_toks_no_value": [ "select", "course_description", "from", "courses", "where", "course_name", "=", "value" ], "question": "Quais são as descrições de todos os cursos de matemática?", "question_toks": [ "Quais", "são", "as", "descrições", "de", "todos", "os", "cursos", "de", "matemática", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"math\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'", "query_toks": [ "SELECT", "zip_postcode", "FROM", "Addresses", "WHERE", "city", "=", "'Port", "Chelsea", "'" ], "query_toks_no_value": [ "select", "zip_postcode", "from", "addresses", "where", "city", "=", "value" ], "question": "Qual é o CEP do endereço da cidade Port Chelsea?", "question_toks": [ "Qual", "é", "o", "CEP", "do", "endereço", "da", "cidade", "Port", "Chelsea", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Port Chelsea\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'", "query_toks": [ "SELECT", "zip_postcode", "FROM", "Addresses", "WHERE", "city", "=", "'Port", "Chelsea", "'" ], "query_toks_no_value": [ "select", "zip_postcode", "from", "addresses", "where", "city", "=", "value" ], "question": "Qual é o código postal de Port Chelsea?", "question_toks": [ "Qual", "é", "o", "código", "postal", "de", "Port", "Chelsea", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], "\"Port Chelsea\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.department_name", ",", "T1.department_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Departments", "AS", "T2", "ON", "T1.department_id", "=", "T2.department_id", "GROUP", "BY", "T1.department_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "department_name", ",", "t1", ".", "department_id", "from", "degree_programs", "as", "t1", "join", "departments", "as", "t2", "on", "t1", ".", "department_id", "=", "t2", ".", "department_id", "group", "by", "t1", ".", "department_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual departamento oferece o maior número de cursos? Lista o nome e a id do departamento.", "question_toks": [ "Qual", "departamento", "oferece", "o", "maior", "número", "de", "cursos", "?", "Lista", "o", "nome", "e", "a", "id", "do", "departamento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 19, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "select t2.department_name , t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id = t2.department_id group by t1.department_id order by count(*) desc limit 1", "query_toks": [ "select", "t2.department_name", ",", "t1.department_id", "from", "degree_programs", "as", "t1", "join", "departments", "as", "t2", "on", "t1.department_id", "=", "t2.department_id", "group", "by", "t1.department_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "t2", ".", "department_name", ",", "t1", ".", "department_id", "from", "degree_programs", "as", "t1", "join", "departments", "as", "t2", "on", "t1", ".", "department_id", "=", "t2", ".", "department_id", "group", "by", "t1", ".", "department_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome e id do departamento com o maior número de diplomas?", "question_toks": [ "Qual", "é", "o", "nome", "e", "id", "do", "departamento", "com", "o", "maior", "número", "de", "diplomas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 19, false ], null ], [ 0, 14, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT department_id) FROM Degree_Programs", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "department_id", ")", "FROM", "Degree_Programs" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "department_id", ")", "from", "degree_programs" ], "question": "Quantos departamentos oferecem algum diploma?", "question_toks": [ "Quantos", "departamentos", "oferecem", "algum", "diploma", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 19, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT department_id) FROM Degree_Programs", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "department_id", ")", "FROM", "Degree_Programs" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "department_id", ")", "from", "degree_programs" ], "question": "Quantos departamentos diferentes oferecem cursos?", "question_toks": [ "Quantos", "departamentos", "diferentes", "oferecem", "cursos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 19, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "degree_summary_name", ")", "FROM", "Degree_Programs" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "degree_summary_name", ")", "from", "degree_programs" ], "question": "Quantos nomes de diplomas diferentes são oferecidos?", "question_toks": [ "Quantos", "nomes", "de", "diplomas", "diferentes", "são", "oferecidos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 20, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "degree_summary_name", ")", "FROM", "Degree_Programs" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "degree_summary_name", ")", "from", "degree_programs" ], "question": "Quantos graus diferentes são oferecidos?", "question_toks": [ "Quantos", "graus", "diferentes", "são", "oferecidos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 20, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Departments", "AS", "T1", "JOIN", "Degree_Programs", "AS", "T2", "ON", "T1.department_id", "=", "T2.department_id", "WHERE", "T1.department_name", "=", "'engineer", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "departments", "as", "t1", "join", "degree_programs", "as", "t2", "on", "t1", ".", "department_id", "=", "t2", ".", "department_id", "where", "t1", ".", "department_name", "=", "value" ], "question": "Quantos cursos o departamento de engenharia oferece?", "question_toks": [ "Quantos", "cursos", "o", "departamento", "de", "engenharia", "oferece", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 19, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"engineer\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Departments", "AS", "T1", "JOIN", "Degree_Programs", "AS", "T2", "ON", "T1.department_id", "=", "T2.department_id", "WHERE", "T1.department_name", "=", "'engineer", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "departments", "as", "t1", "join", "degree_programs", "as", "t2", "on", "t1", ".", "department_id", "=", "t2", ".", "department_id", "where", "t1", ".", "department_name", "=", "value" ], "question": "Quantos diplomas o departamento de engenharia possui?", "question_toks": [ "Quantos", "diplomas", "o", "departamento", "de", "engenharia", "possui", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 14, false ], null ], [ 0, 19, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"engineer\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_name , section_description FROM Sections", "query_toks": [ "SELECT", "section_name", ",", "section_description", "FROM", "Sections" ], "query_toks_no_value": [ "select", "section_name", ",", "section_description", "from", "sections" ], "question": "Quais são os nomes e descrições de todas as seções?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "descrições", "de", "todas", "as", "seções", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_name , section_description FROM Sections", "query_toks": [ "SELECT", "section_name", ",", "section_description", "FROM", "Sections" ], "query_toks_no_value": [ "select", "section_name", ",", "section_description", "from", "sections" ], "question": "Quais são os nomes e descrições de todas as seções?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "descrições", "de", "todas", "as", "seções", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "query_toks": [ "SELECT", "T1.course_name", ",", "T1.course_id", "FROM", "Courses", "AS", "T1", "JOIN", "Sections", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_id", "HAVING", "count", "(", "*", ")", "<", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "course_name", ",", "t1", ".", "course_id", "from", "courses", "as", "t1", "join", "sections", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_id", "having", "count", "(", "*", ")", "<", "=", "value" ], "question": "Quais são os nomes e id dos cursos com no máximo 2 seções?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "id", "dos", "cursos", "com", "no", "máximo", "2", "seções", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 24, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 6, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "query_toks": [ "SELECT", "T1.course_name", ",", "T1.course_id", "FROM", "Courses", "AS", "T1", "JOIN", "Sections", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_id", "HAVING", "count", "(", "*", ")", "<", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "course_name", ",", "t1", ".", "course_id", "from", "courses", "as", "t1", "join", "sections", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_id", "having", "count", "(", "*", ")", "<", "=", "value" ], "question": "Quais são os nomes e ids de cada curso com menos de 2 seções?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "ids", "de", "cada", "curso", "com", "menos", "de", "2", "seções", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 24, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 6, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_name FROM Sections ORDER BY section_name DESC", "query_toks": [ "SELECT", "section_name", "FROM", "Sections", "ORDER", "BY", "section_name", "DESC" ], "query_toks_no_value": [ "select", "section_name", "from", "sections", "order", "by", "section_name", "desc" ], "question": "Liste o section_name em ordem lexicográfica reversa.", "question_toks": [ "Liste", "o", "section_name", "em", "ordem", "lexicográfica", "reversa", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 25, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_name FROM Sections ORDER BY section_name DESC", "query_toks": [ "SELECT", "section_name", "FROM", "Sections", "ORDER", "BY", "section_name", "DESC" ], "query_toks_no_value": [ "select", "section_name", "from", "sections", "order", "by", "section_name", "desc" ], "question": "Quais são os nomes das seções em ordem alfabética reversa?", "question_toks": [ "Quais", "são", "os", "nomes", "das", "seções", "em", "ordem", "alfabética", "reversa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 25, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.semester_name", ",", "T1.semester_id", "FROM", "Semesters", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.semester_id", "=", "T2.semester_id", "GROUP", "BY", "T1.semester_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "semester_name", ",", "t1", ".", "semester_id", "from", "semesters", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "semester_id", "=", "t2", ".", "semester_id", "group", "by", "t1", ".", "semester_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o semestre em que a maioria dos alunos se matriculou? Mostre o nome e o id.", "question_toks": [ "Qual", "é", "o", "semestre", "em", "que", "a", "maioria", "dos", "alunos", "se", "matriculou", "?", "Mostre", "o", "nome", "e", "o", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 28, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 29, false ], null ] ], [ 0, [ 0, [ 0, 28, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 28, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.semester_name", ",", "T1.semester_id", "FROM", "Semesters", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.semester_id", "=", "T2.semester_id", "GROUP", "BY", "T1.semester_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "semester_name", ",", "t1", ".", "semester_id", "from", "semesters", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "semester_id", "=", "t2", ".", "semester_id", "group", "by", "t1", ".", "semester_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Para cada semestre, qual o nome e id daquele com mais alunos matriculados?", "question_toks": [ "Para", "cada", "semestre", ",", "qual", "o", "nome", "e", "id", "daquele", "com", "mais", "alunos", "matriculados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 28, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 29, false ], null ] ], [ 0, [ 0, [ 0, 28, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 28, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'", "query_toks": [ "SELECT", "department_description", "FROM", "Departments", "WHERE", "department_name", "LIKE", "'", "%", "computer", "%", "'" ], "query_toks_no_value": [ "select", "department_description", "from", "departments", "where", "department_name", "like", "value" ], "question": "Qual é a descrição do departamento cujo nome tem a substring do computador?", "question_toks": [ "Qual", "é", "a", "descrição", "do", "departamento", "cujo", "nome", "tem", "a", "substring", "do", "computador", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 15, false ], null ], "\"%computer%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'", "query_toks": [ "SELECT", "department_description", "FROM", "Departments", "WHERE", "department_name", "LIKE", "'", "%", "computer", "%", "'" ], "query_toks_no_value": [ "select", "department_description", "from", "departments", "where", "department_name", "like", "value" ], "question": "Qual é a descrição do departamento para aquele cujo nome tem a palavra computador?", "question_toks": [ "Qual", "é", "a", "descrição", "do", "departamento", "para", "aquele", "cujo", "nome", "tem", "a", "palavra", "computador", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 15, false ], null ], "\"%computer%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", ",", "T1.student_id", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", ",", "t1", ".", "student_id", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", "=", "value" ], "question": "Quem está matriculado em 2 programas de graduação em um semestre? Liste o nome, o nome do meio, o sobrenome e o id.", "question_toks": [ "Quem", "está", "matriculado", "em", "2", "programas", "de", "graduação", "em", "um", "semestre", "?", "Liste", "o", "nome", ",", "o", "nome", "do", "meio", ",", "o", "sobrenome", "e", "o", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 32, false ] ], "having": [ [ false, 2, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", ",", "T1.student_id", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", ",", "t1", ".", "student_id", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", "=", "value" ], "question": "Quais são o primeiro nome, o nome do meio e o sobrenome, junto com os ids, de todos os alunos que se inscreveram em 2 programas de graduação em um semestre?", "question_toks": [ "Quais", "são", "o", "primeiro", "nome", ",", "o", "nome", "do", "meio", "e", "o", "sobrenome", ",", "junto", "com", "os", "ids", ",", "de", "todos", "os", "alunos", "que", "se", "inscreveram", "em", "2", "programas", "de", "graduação", "em", "um", "semestre", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 32, false ] ], "having": [ [ false, 2, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "JOIN", "Degree_Programs", "AS", "T3", "ON", "T2.degree_program_id", "=", "T3.degree_program_id", "WHERE", "T3.degree_summary_name", "=", "'Bachelor", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "join", "degree_programs", "as", "t3", "on", "t2", ".", "degree_program_id", "=", "t3", ".", "degree_program_id", "where", "t3", ".", "degree_summary_name", "=", "value" ], "question": "Quem está matriculado em um programa de bacharelado? Liste o primeiro nome, nome do meio, sobrenome.", "question_toks": [ "Quem", "está", "matriculado", "em", "um", "programa", "de", "bacharelado", "?", "Liste", "o", "primeiro", "nome", ",", "nome", "do", "meio", ",", "sobrenome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ], "and", [ false, 2, [ 0, [ 0, 45, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Bachelor\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "JOIN", "Degree_Programs", "AS", "T3", "ON", "T2.degree_program_id", "=", "T3.degree_program_id", "WHERE", "T3.degree_summary_name", "=", "'Bachelor", "'" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "join", "degree_programs", "as", "t3", "on", "t2", ".", "degree_program_id", "=", "t3", ".", "degree_program_id", "where", "t3", ".", "degree_summary_name", "=", "value" ], "question": "Quais são o primeiro nome, o nome do meio e o sobrenome de todos os inscritos em um programa de bacharelado?", "question_toks": [ "Quais", "são", "o", "primeiro", "nome", ",", "o", "nome", "do", "meio", "e", "o", "sobrenome", "de", "todos", "os", "inscritos", "em", "um", "programa", "de", "bacharelado", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ], "and", [ false, 2, [ 0, [ 0, 45, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Bachelor\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.degree_summary_name", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "GROUP", "BY", "T1.degree_summary_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "degree_summary_name", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "group", "by", "t1", ".", "degree_summary_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Encontre o tipo de programa em que a maioria dos alunos está matriculada?", "question_toks": [ "Encontre", "o", "tipo", "de", "programa", "em", "que", "a", "maioria", "dos", "alunos", "está", "matriculada", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 20, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.degree_summary_name", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "GROUP", "BY", "T1.degree_summary_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "degree_summary_name", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "group", "by", "t1", ".", "degree_summary_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome do resumo do diploma com o maior número de alunos matriculados?", "question_toks": [ "Qual", "é", "o", "nome", "do", "resumo", "do", "diploma", "com", "o", "maior", "número", "de", "alunos", "matriculados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 20, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.degree_program_id", ",", "T1.degree_summary_name", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "GROUP", "BY", "T1.degree_program_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "degree_program_id", ",", "t1", ".", "degree_summary_name", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "group", "by", "t1", ".", "degree_program_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Encontre o programa no qual o maior número de alunos está matriculado. Liste a id e o resumo.", "question_toks": [ "Encontre", "o", "programa", "no", "qual", "o", "maior", "número", "de", "alunos", "está", "matriculado", ".", "Liste", "a", "id", "e", "o", "resumo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, false ], null ] ], [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.degree_program_id", ",", "T1.degree_summary_name", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "GROUP", "BY", "T1.degree_program_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "degree_program_id", ",", "t1", ".", "degree_summary_name", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "group", "by", "t1", ".", "degree_program_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o id do programa e o resumo do curso que tem mais alunos matriculados?", "question_toks": [ "Qual", "é", "o", "id", "do", "programa", "e", "o", "resumo", "do", "curso", "que", "tem", "mais", "alunos", "matriculados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 18, false ], null ] ], [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 18, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.student_id", ",", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", ",", "count", "(", "*", ")", ",", "T1.student_id", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "student_id", ",", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", ",", "count", "(", "*", ")", ",", "t1", ".", "student_id", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual aluno se inscreveu mais vezes em algum programa? Liste a id, nome, nome do meio, sobrenome, o número de matrículas e id do aluno.", "question_toks": [ "Qual", "aluno", "se", "inscreveu", "mais", "vezes", "em", "algum", "programa", "?", "Liste", "a", "id", ",", "nome", ",", "nome", "do", "meio", ",", "sobrenome", ",", "o", "número", "de", "matrículas", "e", "id", "do", "aluno", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 32, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 32, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.student_id", ",", "T1.first_name", ",", "T1.middle_name", ",", "T1.last_name", ",", "count", "(", "*", ")", ",", "T1.student_id", "FROM", "Students", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "student_id", ",", "t1", ".", "first_name", ",", "t1", ".", "middle_name", ",", "t1", ".", "last_name", ",", "count", "(", "*", ")", ",", "t1", ".", "student_id", "from", "students", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome, o nome do meio e o sobrenome, junto com o id e o número de matrículas, do aluno que mais se inscreveu em algum programa?", "question_toks": [ "Qual", "é", "o", "nome", ",", "o", "nome", "do", "meio", "e", "o", "sobrenome", ",", "junto", "com", "o", "id", "e", "o", "número", "de", "matrículas", ",", "do", "aluno", "que", "mais", "se", "inscreveu", "em", "algum", "programa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 32, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 32, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "query_toks": [ "SELECT", "semester_name", "FROM", "Semesters", "WHERE", "semester_id", "NOT", "IN", "(", "SELECT", "semester_id", "FROM", "Student_Enrolment", ")" ], "query_toks_no_value": [ "select", "semester_name", "from", "semesters", "where", "semester_id", "not", "in", "(", "select", "semester_id", "from", "student_enrolment", ")" ], "question": "Quais semestres não tem nenhum aluno matriculado? Liste o nome do semestre.", "question_toks": [ "Quais", "semestres", "não", "tem", "nenhum", "aluno", "matriculado", "?", "Liste", "o", "nome", "do", "semestre", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 29, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 28, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 46, 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": "student_transcripts_tracking", "query": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "query_toks": [ "SELECT", "semester_name", "FROM", "Semesters", "WHERE", "semester_id", "NOT", "IN", "(", "SELECT", "semester_id", "FROM", "Student_Enrolment", ")" ], "query_toks_no_value": [ "select", "semester_name", "from", "semesters", "where", "semester_id", "not", "in", "(", "select", "semester_id", "from", "student_enrolment", ")" ], "question": "Qual é o nome do semestre sem alunos matriculados?", "question_toks": [ "Qual", "é", "o", "nome", "do", "semestre", "sem", "alunos", "matriculados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 29, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 28, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 46, 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": "student_transcripts_tracking", "query": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "query_toks": [ "SELECT", "DISTINCT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Enrolment_Courses", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_enrolment_courses", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id" ], "question": "Quais são os nomes de todos os cursos em que os alunos estão matriculados?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "todos", "os", "cursos", "em", "que", "os", "alunos", "estão", "matriculados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 8 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 50, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "query_toks": [ "SELECT", "DISTINCT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Enrolment_Courses", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_enrolment_courses", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id" ], "question": "Quais são os nomes de todos os cursos que têm alguns alunos matriculados?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "todos", "os", "cursos", "que", "têm", "alguns", "alunos", "matriculados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 8 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 50, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Enrolment_Courses", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_enrolment_courses", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome do curso com maior número de matrículas?", "question_toks": [ "Qual", "é", "o", "nome", "do", "curso", "com", "maior", "número", "de", "matrículas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 8 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 50, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Enrolment_Courses", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_enrolment_courses", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome do curso com mais alunos matriculados?", "question_toks": [ "Qual", "é", "o", "nome", "do", "curso", "com", "mais", "alunos", "matriculados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 8 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 50, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id", "query_toks": [ "SELECT", "T1.last_name", "FROM", "Students", "AS", "T1", "JOIN", "Addresses", "AS", "T2", "ON", "T1.current_address_id", "=", "T2.address_id", "WHERE", "T2.state_province_county", "=", "'NorthCarolina", "'", "EXCEPT", "SELECT", "DISTINCT", "T3.last_name", "FROM", "Students", "AS", "T3", "JOIN", "Student_Enrolment", "AS", "T4", "ON", "T3.student_id", "=", "T4.student_id" ], "query_toks_no_value": [ "select", "t1", ".", "last_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1", ".", "current_address_id", "=", "t2", ".", "address_id", "where", "t2", ".", "state_province_county", "=", "value", "except", "select", "distinct", "t3", ".", "last_name", "from", "students", "as", "t3", "join", "student_enrolment", "as", "t4", "on", "t3", ".", "student_id", "=", "t4", ".", "student_id" ], "question": "Encontre o sobrenome dos alunos que moram atualmente no estado da Carolina do Norte, mas não se inscreveram em nenhum programa de graduação.", "question_toks": [ "Encontre", "o", "sobrenome", "dos", "alunos", "que", "moram", "atualmente", "no", "estado", "da", "Carolina", "do", "Norte", ",", "mas", "não", "se", "inscreveram", "em", "nenhum", "programa", "de", "graduação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"NorthCarolina\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id", "query_toks": [ "SELECT", "T1.last_name", "FROM", "Students", "AS", "T1", "JOIN", "Addresses", "AS", "T2", "ON", "T1.current_address_id", "=", "T2.address_id", "WHERE", "T2.state_province_county", "=", "'NorthCarolina", "'", "EXCEPT", "SELECT", "DISTINCT", "T3.last_name", "FROM", "Students", "AS", "T3", "JOIN", "Student_Enrolment", "AS", "T4", "ON", "T3.student_id", "=", "T4.student_id" ], "query_toks_no_value": [ "select", "t1", ".", "last_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1", ".", "current_address_id", "=", "t2", ".", "address_id", "where", "t2", ".", "state_province_county", "=", "value", "except", "select", "distinct", "t3", ".", "last_name", "from", "students", "as", "t3", "join", "student_enrolment", "as", "t4", "on", "t3", ".", "student_id", "=", "t4", ".", "student_id" ], "question": "Quais são os sobrenomes dos alunos que moram na Carolina do Norte, mas não se inscreveram em nenhum programa de graduação?", "question_toks": [ "Quais", "são", "os", "sobrenomes", "dos", "alunos", "que", "moram", "na", "Carolina", "do", "Norte", ",", "mas", "não", "se", "inscreveram", "em", "nenhum", "programa", "de", "graduação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"NorthCarolina\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 32, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.transcript_date", ",", "T1.transcript_id", "FROM", "Transcript_Contents", "AS", "T1", "JOIN", "Transcripts", "AS", "T2", "ON", "T1.transcript_id", "=", "T2.transcript_id", "GROUP", "BY", "T1.transcript_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "transcript_date", ",", "t1", ".", "transcript_id", "from", "transcript_contents", "as", "t1", "join", "transcripts", "as", "t2", "on", "t1", ".", "transcript_id", "=", "t2", ".", "transcript_id", "group", "by", "t1", ".", "transcript_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Mostre a data e id da transcrição com pelo menos 2 resultados do curso.", "question_toks": [ "Mostre", "a", "data", "e", "id", "da", "transcrição", "com", "pelo", "menos", "2", "resultados", "do", "curso", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ], [ "table_unit", 9 ] ], "conds": [ [ false, 2, [ 0, [ 0, 56, false ], null ], [ 0, 52, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 56, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 56, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.transcript_date", ",", "T1.transcript_id", "FROM", "Transcript_Contents", "AS", "T1", "JOIN", "Transcripts", "AS", "T2", "ON", "T1.transcript_id", "=", "T2.transcript_id", "GROUP", "BY", "T1.transcript_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "transcript_date", ",", "t1", ".", "transcript_id", "from", "transcript_contents", "as", "t1", "join", "transcripts", "as", "t2", "on", "t1", ".", "transcript_id", "=", "t2", ".", "transcript_id", "group", "by", "t1", ".", "transcript_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Qual é a data e id da transcrição com pelo menos 2 cursos listados?", "question_toks": [ "Qual", "é", "a", "data", "e", "id", "da", "transcrição", "com", "pelo", "menos", "2", "cursos", "listados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ], [ "table_unit", 9 ] ], "conds": [ [ false, 2, [ 0, [ 0, 56, false ], null ], [ 0, 52, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 56, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 56, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'", "query_toks": [ "SELECT", "cell_mobile_number", "FROM", "Students", "WHERE", "first_name", "=", "'Timmothy", "'", "AND", "last_name", "=", "'Ward", "'" ], "query_toks_no_value": [ "select", "cell_mobile_number", "from", "students", "where", "first_name", "=", "value", "and", "last_name", "=", "value" ], "question": "Qual é o número de telefone do homem com o primeiro nome Timmothy e o sobrenome Ward?", "question_toks": [ "Qual", "é", "o", "número", "de", "telefone", "do", "homem", "com", "o", "primeiro", "nome", "Timmothy", "e", "o", "sobrenome", "Ward", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 35, false ], null ], "\"Timmothy\"", null ], "and", [ false, 2, [ 0, [ 0, 37, false ], null ], "\"Ward\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "select cell_mobile_number from students where first_name = 'timmothy' and last_name = 'ward'", "query_toks": [ "select", "cell_mobile_number", "from", "students", "where", "first_name", "=", "\"timmothy\"", "and", "last_name", "=", "\"ward\"" ], "query_toks_no_value": [ "select", "cell_mobile_number", "from", "students", "where", "first_name", "=", "value", "and", "last_name", "=", "value" ], "question": "Qual é o número do celular do aluno chamado Timmothy Ward?", "question_toks": [ "Qual", "é", "o", "número", "do", "celular", "do", "aluno", "chamado", "Timmothy", "Ward", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 35, false ], null ], "\"timmothy\"", null ], "and", [ false, 2, [ 0, [ 0, 37, false ], null ], "\"ward\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "middle_name", ",", "last_name", "FROM", "Students", "ORDER", "BY", "date_first_registered", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "middle_name", ",", "last_name", "from", "students", "order", "by", "date_first_registered", "asc", "limit", "value" ], "question": "Quem é o primeiro aluno a se registrar? Liste o nome, o nome do meio e o sobrenome.", "question_toks": [ "Quem", "é", "o", "primeiro", "aluno", "a", "se", "registrar", "?", "Liste", "o", "nome", ",", "o", "nome", "do", "meio", "e", "o", "sobrenome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 41, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "middle_name", ",", "last_name", "FROM", "Students", "ORDER", "BY", "date_first_registered", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "middle_name", ",", "last_name", "from", "students", "order", "by", "date_first_registered", "asc", "limit", "value" ], "question": "Qual é o nome, nome do meio e sobrenome do primeiro aluno a se registrar?", "question_toks": [ "Qual", "é", "o", "nome", ",", "nome", "do", "meio", "e", "sobrenome", "do", "primeiro", "aluno", "a", "se", "registrar", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 41, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "middle_name", ",", "last_name", "FROM", "Students", "ORDER", "BY", "date_left", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "middle_name", ",", "last_name", "from", "students", "order", "by", "date_left", "asc", "limit", "value" ], "question": "Quem é o primeiro graduado da escola? Liste o nome, o nome do meio e o sobrenome.", "question_toks": [ "Quem", "é", "o", "primeiro", "graduado", "da", "escola", "?", "Liste", "o", "nome", ",", "o", "nome", "do", "meio", "e", "o", "sobrenome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 42, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1", "query_toks": [ "SELECT", "first_name", ",", "middle_name", ",", "last_name", "FROM", "Students", "ORDER", "BY", "date_left", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "first_name", ",", "middle_name", ",", "last_name", "from", "students", "order", "by", "date_left", "asc", "limit", "value" ], "question": "Qual é o nome, nome do meio e sobrenome do primeiro graduado da escola?", "question_toks": [ "Qual", "é", "o", "nome", ",", "nome", "do", "meio", "e", "sobrenome", "do", "primeiro", "graduado", "da", "escola", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 42, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "query_toks": [ "SELECT", "first_name", "FROM", "Students", "WHERE", "current_address_id", "!", "=", "permanent_address_id" ], "query_toks_no_value": [ "select", "first_name", "from", "students", "where", "current_address_id", "!", "=", "permanent_address_id" ], "question": "Cujo endereço permanente é diferente de seu endereço atual? Liste seu primeiro nome.", "question_toks": [ "Cujo", "endereço", "permanente", "é", "diferente", "de", "seu", "endereço", "atual", "?", "Liste", "seu", "primeiro", "nome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 33, false ], null ], [ 0, 34, false ], null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "query_toks": [ "SELECT", "first_name", "FROM", "Students", "WHERE", "current_address_id", "!", "=", "permanent_address_id" ], "query_toks_no_value": [ "select", "first_name", "from", "students", "where", "current_address_id", "!", "=", "permanent_address_id" ], "question": "Qual é o primeiro nome do aluno cujo endereço permanente é diferente do atual?", "question_toks": [ "Qual", "é", "o", "primeiro", "nome", "do", "aluno", "cujo", "endereço", "permanente", "é", "diferente", "do", "atual", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 33, false ], null ], [ 0, 34, false ], null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.address_id", ",", "T1.line_1", ",", "T1.line_2", "FROM", "Addresses", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.address_id", "=", "T2.current_address_id", "GROUP", "BY", "T1.address_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "address_id", ",", "t1", ".", "line_1", ",", "t1", ".", "line_2", "from", "addresses", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "address_id", "=", "t2", ".", "current_address_id", "group", "by", "t1", ".", "address_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual endereço contém o maior número de alunos atualmente? Liste a identificação do endereço e todas as linhas.", "question_toks": [ "Qual", "endereço", "contém", "o", "maior", "número", "de", "alunos", "atualmente", "?", "Liste", "a", "identificação", "do", "endereço", "e", "todas", "as", "linhas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 6 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 33, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.address_id", ",", "T1.line_1", ",", "T1.line_2", "FROM", "Addresses", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.address_id", "=", "T2.current_address_id", "GROUP", "BY", "T1.address_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "address_id", ",", "t1", ".", "line_1", ",", "t1", ".", "line_2", "from", "addresses", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "address_id", "=", "t2", ".", "current_address_id", "group", "by", "t1", ".", "address_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o id, linha 1 e linha 2 do endereço com mais alunos?", "question_toks": [ "Qual", "é", "o", "id", ",", "linha", "1", "e", "linha", "2", "do", "endereço", "com", "mais", "alunos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 6 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 33, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT avg(transcript_date) FROM Transcripts", "query_toks": [ "SELECT", "avg", "(", "transcript_date", ")", "FROM", "Transcripts" ], "query_toks_no_value": [ "select", "avg", "(", "transcript_date", ")", "from", "transcripts" ], "question": "Em média, quando as transcrições foram impressas?", "question_toks": [ "Em", "média", ",", "quando", "as", "transcrições", "foram", "impressas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 53, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT avg(transcript_date) FROM Transcripts", "query_toks": [ "SELECT", "avg", "(", "transcript_date", ")", "FROM", "Transcripts" ], "query_toks_no_value": [ "select", "avg", "(", "transcript_date", ")", "from", "transcripts" ], "question": "Qual é a data média de transcrição?", "question_toks": [ "Qual", "é", "a", "data", "média", "de", "transcrição", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 53, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", "query_toks": [ "SELECT", "transcript_date", ",", "other_details", "FROM", "Transcripts", "ORDER", "BY", "transcript_date", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "transcript_date", ",", "other_details", "from", "transcripts", "order", "by", "transcript_date", "asc", "limit", "value" ], "question": "Quando a primeira transcrição é lançada? Liste a data e os detalhes.", "question_toks": [ "Quando", "a", "primeira", "transcrição", "é", "lançada", "?", "Liste", "a", "data", "e", "os", "detalhes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 54, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 53, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", "query_toks": [ "SELECT", "transcript_date", ",", "other_details", "FROM", "Transcripts", "ORDER", "BY", "transcript_date", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "transcript_date", ",", "other_details", "from", "transcripts", "order", "by", "transcript_date", "asc", "limit", "value" ], "question": "Qual é a primeira data de lançamento de uma transcrição e quais detalhes você pode me dizer?", "question_toks": [ "Qual", "é", "a", "primeira", "data", "de", "lançamento", "de", "uma", "transcrição", "e", "quais", "detalhes", "você", "pode", "me", "dizer", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 54, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 53, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Transcripts", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Transcripts" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "transcripts" ], "question": "Quantas transcrições são lançadas?", "question_toks": [ "Quantas", "transcrições", "são", "lançadas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) FROM Transcripts", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Transcripts" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "transcripts" ], "question": "Quantas transcrições estão listadas?", "question_toks": [ "Quantas", "transcrições", "estão", "listadas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1", "query_toks": [ "SELECT", "transcript_date", "FROM", "Transcripts", "ORDER", "BY", "transcript_date", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "transcript_date", "from", "transcripts", "order", "by", "transcript_date", "desc", "limit", "value" ], "question": "Qual é a data de lançamento da última transcrição?", "question_toks": [ "Qual", "é", "a", "data", "de", "lançamento", "da", "última", "transcrição", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 53, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1", "query_toks": [ "SELECT", "transcript_date", "FROM", "Transcripts", "ORDER", "BY", "transcript_date", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "transcript_date", "from", "transcripts", "order", "by", "transcript_date", "desc", "limit", "value" ], "question": "Quando foi lançada a última transcrição?", "question_toks": [ "Quando", "foi", "lançada", "a", "última", "transcrição", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 9 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 53, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "student_course_id", "FROM", "Transcript_Contents", "GROUP", "BY", "student_course_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "student_course_id", "from", "transcript_contents", "group", "by", "student_course_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Quantas vezes, no máximo, um resultado de inscrição em um curso pode ser exibido em diferentes transcrições? Mostre também o id de inscrição no curso.", "question_toks": [ "Quantas", "vezes", ",", "no", "máximo", ",", "um", "resultado", "de", "inscrição", "em", "um", "curso", "pode", "ser", "exibido", "em", "diferentes", "transcrições", "?", "Mostre", "também", "o", "id", "de", "inscrição", "no", "curso", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 55, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 55, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "student_course_id", "FROM", "Transcript_Contents", "GROUP", "BY", "student_course_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "student_course_id", "from", "transcript_contents", "group", "by", "student_course_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o número máximo de vezes que um curso aparece em transcrições diferentes e qual é a id de inscrição desse curso?", "question_toks": [ "Qual", "é", "o", "número", "máximo", "de", "vezes", "que", "um", "curso", "aparece", "em", "transcrições", "diferentes", "e", "qual", "é", "a", "id", "de", "inscrição", "desse", "curso", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 55, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 55, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "T2.transcript_date", ",", "T1.transcript_id", "FROM", "Transcript_Contents", "AS", "T1", "JOIN", "Transcripts", "AS", "T2", "ON", "T1.transcript_id", "=", "T2.transcript_id", "GROUP", "BY", "T1.transcript_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "transcript_date", ",", "t1", ".", "transcript_id", "from", "transcript_contents", "as", "t1", "join", "transcripts", "as", "t2", "on", "t1", ".", "transcript_id", "=", "t2", ".", "transcript_id", "group", "by", "t1", ".", "transcript_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "Mostre a data da transcrição que Mostre o menor número de resultados, liste também o id.", "question_toks": [ "Mostre", "a", "data", "da", "transcrição", "que", "Mostre", "o", "menor", "número", "de", "resultados", ",", "liste", "também", "o", "id", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ], [ "table_unit", 9 ] ], "conds": [ [ false, 2, [ 0, [ 0, 56, false ], null ], [ 0, 52, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 56, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 56, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "T2.transcript_date", ",", "T1.transcript_id", "FROM", "Transcript_Contents", "AS", "T1", "JOIN", "Transcripts", "AS", "T2", "ON", "T1.transcript_id", "=", "T2.transcript_id", "GROUP", "BY", "T1.transcript_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "transcript_date", ",", "t1", ".", "transcript_id", "from", "transcript_contents", "as", "t1", "join", "transcripts", "as", "t2", "on", "t1", ".", "transcript_id", "=", "t2", ".", "transcript_id", "group", "by", "t1", ".", "transcript_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "Qual é a data e id da transcrição com o menor número de resultados?", "question_toks": [ "Qual", "é", "a", "data", "e", "id", "da", "transcrição", "com", "o", "menor", "número", "de", "resultados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 10 ], [ "table_unit", 9 ] ], "conds": [ [ false, 2, [ 0, [ 0, 56, false ], null ], [ 0, 52, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 53, false ], null ] ], [ 0, [ 0, [ 0, 56, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 56, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "query_toks": [ "SELECT", "DISTINCT", "T2.semester_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "WHERE", "degree_summary_name", "=", "'Master", "'", "INTERSECT", "SELECT", "DISTINCT", "T2.semester_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "WHERE", "degree_summary_name", "=", "'Bachelor", "'" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "semester_id", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "where", "degree_summary_name", "=", "value", "intersect", "select", "distinct", "t2", ".", "semester_id", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "where", "degree_summary_name", "=", "value" ], "question": "Encontre o semestre em que os alunos de mestrado e de bacharelado foram matriculados.", "question_toks": [ "Encontre", "o", "semestre", "em", "que", "os", "alunos", "de", "mestrado", "e", "de", "bacharelado", "foram", "matriculados", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 46, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Master\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 46, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Bachelor\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "query_toks": [ "SELECT", "DISTINCT", "T2.semester_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "WHERE", "degree_summary_name", "=", "'Master", "'", "INTERSECT", "SELECT", "DISTINCT", "T2.semester_id", "FROM", "Degree_Programs", "AS", "T1", "JOIN", "Student_Enrolment", "AS", "T2", "ON", "T1.degree_program_id", "=", "T2.degree_program_id", "WHERE", "degree_summary_name", "=", "'Bachelor", "'" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "semester_id", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "where", "degree_summary_name", "=", "value", "intersect", "select", "distinct", "t2", ".", "semester_id", "from", "degree_programs", "as", "t1", "join", "student_enrolment", "as", "t2", "on", "t1", ".", "degree_program_id", "=", "t2", ".", "degree_program_id", "where", "degree_summary_name", "=", "value" ], "question": "Qual é o id do semestre que teve alunos de mestrado e de bacharelado matriculados?", "question_toks": [ "Qual", "é", "o", "id", "do", "semestre", "que", "teve", "alunos", "de", "mestrado", "e", "de", "bacharelado", "matriculados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 46, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Master\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 18, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 46, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Bachelor\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT current_address_id) FROM Students", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "current_address_id", ")", "FROM", "Students" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "current_address_id", ")", "from", "students" ], "question": "Em quantos endereços diferentes os alunos moram atualmente?", "question_toks": [ "Em", "quantos", "endereços", "diferentes", "os", "alunos", "moram", "atualmente", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 33, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT count(DISTINCT current_address_id) FROM Students", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "current_address_id", ")", "FROM", "Students" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "current_address_id", ")", "from", "students" ], "question": "Quais são os diferentes endereços onde os alunos moram?", "question_toks": [ "Quais", "são", "os", "diferentes", "endereços", "onde", "os", "alunos", "moram", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 33, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "query_toks": [ "SELECT", "other_student_details", "FROM", "Students", "ORDER", "BY", "other_student_details", "DESC" ], "query_toks_no_value": [ "select", "other_student_details", "from", "students", "order", "by", "other_student_details", "desc" ], "question": "Liste todos os detalhes do aluno em ordem lexicográfica reversa.", "question_toks": [ "Liste", "todos", "os", "detalhes", "do", "aluno", "em", "ordem", "lexicográfica", "reversa", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 43, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "query_toks": [ "SELECT", "other_student_details", "FROM", "Students", "ORDER", "BY", "other_student_details", "DESC" ], "query_toks_no_value": [ "select", "other_student_details", "from", "students", "order", "by", "other_student_details", "desc" ], "question": "Que outros detalhes você pode me dar sobre os alunos em ordem alfabética reversa?", "question_toks": [ "Que", "outros", "detalhes", "você", "pode", "me", "dar", "sobre", "os", "alunos", "em", "ordem", "alfabética", "reversa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 43, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_description FROM Sections WHERE section_name = 'h'", "query_toks": [ "SELECT", "section_description", "FROM", "Sections", "WHERE", "section_name", "=", "'h", "'" ], "query_toks_no_value": [ "select", "section_description", "from", "sections", "where", "section_name", "=", "value" ], "question": "Descreva a seção h.", "question_toks": [ "Descreva", "a", "seção", "h." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"h\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "SELECT section_description FROM Sections WHERE section_name = 'h'", "query_toks": [ "SELECT", "section_description", "FROM", "Sections", "WHERE", "section_name", "=", "'h", "'" ], "query_toks_no_value": [ "select", "section_description", "from", "sections", "where", "section_name", "=", "value" ], "question": "Qual é a descrição da seção chamada h?", "question_toks": [ "Qual", "é", "a", "descrição", "da", "seção", "chamada", "h", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"h\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'", "query_toks": [ "select", "t1.first_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1.permanent_address_id", "=", "t2.address_id", "where", "t2.country", "=", "\"haiti\"", "or", "t1.cell_mobile_number", "=", "\"09700166582\"" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1", ".", "permanent_address_id", "=", "t2", ".", "address_id", "where", "t2", ".", "country", "=", "value", "or", "t1", ".", "cell_mobile_number", "=", "value" ], "question": "Encontre o primeiro nome dos alunos que moram permanentemente no país Haiti ou possuem o número do celular 09700166582.", "question_toks": [ "Encontre", "o", "primeiro", "nome", "dos", "alunos", "que", "moram", "permanentemente", "no", "país", "Haiti", "ou", "possuem", "o", "número", "do", "celular", "09700166582", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 34, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"haiti\"", null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], "\"09700166582\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "student_transcripts_tracking", "query": "select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'", "query_toks": [ "select", "t1.first_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1.permanent_address_id", "=", "t2.address_id", "where", "t2.country", "=", "\"haiti\"", "or", "t1.cell_mobile_number", "=", "\"09700166582\"" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", "from", "students", "as", "t1", "join", "addresses", "as", "t2", "on", "t1", ".", "permanent_address_id", "=", "t2", ".", "address_id", "where", "t2", ".", "country", "=", "value", "or", "t1", ".", "cell_mobile_number", "=", "value" ], "question": "Quais são os primeiros nomes dos alunos que moram permanentemente no Haiti ou têm o número do celular 09700166582?", "question_toks": [ "Quais", "são", "os", "primeiros", "nomes", "dos", "alunos", "que", "moram", "permanentemente", "no", "Haiti", "ou", "têm", "o", "número", "do", "celular", "09700166582", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 34, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], "\"haiti\"", null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], "\"09700166582\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon ORDER BY title", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "ORDER", "BY", "title" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "order", "by", "title" ], "question": "Liste o título de todos os desenhos em ordem alfabética.", "question_toks": [ "Liste", "o", "título", "de", "todos", "os", "desenhos", "em", "ordem", "alfabética", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon ORDER BY title", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "ORDER", "BY", "title" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "order", "by", "title" ], "question": "Quais são os títulos dos desenhos animados classificados em ordem alfabética?", "question_toks": [ "Quais", "são", "os", "títulos", "dos", "desenhos", "animados", "classificados", "em", "ordem", "alfabética", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 20, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\";", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "WHERE", "Directed_by", "=", "``", "Ben", "Jones", "''", ";" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "where", "directed_by", "=", "value" ], "question": "Liste todos os desenhos animados dirigidos por \"Ben Jones\".", "question_toks": [ "Liste", "todos", "os", "desenhos", "animados", "dirigidos", "por", "\"", "Ben", "Jones", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\";", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "WHERE", "Directed_by", "=", "``", "Ben", "Jones", "''", ";" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "where", "directed_by", "=", "value" ], "question": "Quais são os nomes de todos os desenhos animados dirigidos por Ben Jones?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "todos", "os", "desenhos", "animados", "dirigidos", "por", "Ben", "Jones", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\";", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Cartoon", "WHERE", "Written_by", "=", "``", "Joseph", "Kuhr", "''", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cartoon", "where", "written_by", "=", "value" ], "question": "Quantos desenhos animados foram escritos por \"Joseph Kuhr\"?", "question_toks": [ "Quantos", "desenhos", "animados", "foram", "escritos", "por", "\"", "Joseph", "Kuhr", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Joseph Kuhr\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\";", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Cartoon", "WHERE", "Written_by", "=", "``", "Joseph", "Kuhr", "''", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "cartoon", "where", "written_by", "=", "value" ], "question": "Qual é o número de desenhos animados escritos por Joseph Kuhr?", "question_toks": [ "Qual", "é", "o", "número", "de", "desenhos", "animados", "escritos", "por", "Joseph", "Kuhr", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Joseph Kuhr\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date", "query_toks": [ "SELECT", "title", ",", "Directed_by", "FROM", "Cartoon", "ORDER", "BY", "Original_air_date" ], "query_toks_no_value": [ "select", "title", ",", "directed_by", "from", "cartoon", "order", "by", "original_air_date" ], "question": "liste todos os títulos de desenhos animados e seus diretores ordenados por data de exibição", "question_toks": [ "liste", "todos", "os", "títulos", "de", "desenhos", "animados", "e", "seus", "diretores", "ordenados", "por", "data", "de", "exibição" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ], [ 0, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 23, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date", "query_toks": [ "SELECT", "title", ",", "Directed_by", "FROM", "Cartoon", "ORDER", "BY", "Original_air_date" ], "query_toks_no_value": [ "select", "title", ",", "directed_by", "from", "cartoon", "order", "by", "original_air_date" ], "question": "Qual é o nome e os diretores de todos os desenhos animados que são pedidos por data de exibição?", "question_toks": [ "Qual", "é", "o", "nome", "e", "os", "diretores", "de", "todos", "os", "desenhos", "animados", "que", "são", "pedidos", "por", "data", "de", "exibição", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ], [ 0, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 23, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "WHERE", "Directed_by", "=", "``", "Ben", "Jones", "''", "OR", "Directed_by", "=", "``", "Brandon", "Vietti", "''", ";" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "where", "directed_by", "=", "value", "or", "directed_by", "=", "value" ], "question": "Liste o título de todos os desenhos animados dirigidos por \"Ben Jones\" ou \"Brandon Vietti\".", "question_toks": [ "Liste", "o", "título", "de", "todos", "os", "desenhos", "animados", "dirigidos", "por", "\"", "Ben", "Jones", "\"", "ou", "\"", "Brandon", "Vietti", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ], "or", [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Brandon Vietti\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";", "query_toks": [ "SELECT", "Title", "FROM", "Cartoon", "WHERE", "Directed_by", "=", "``", "Ben", "Jones", "''", "OR", "Directed_by", "=", "``", "Brandon", "Vietti", "''", ";" ], "query_toks_no_value": [ "select", "title", "from", "cartoon", "where", "directed_by", "=", "value", "or", "directed_by", "=", "value" ], "question": "Quais são os títulos de todos os desenhos animados dirigidos por Ben Jones ou Brandon Vietti?", "question_toks": [ "Quais", "são", "os", "títulos", "de", "todos", "os", "desenhos", "animados", "dirigidos", "por", "Ben", "Jones", "ou", "Brandon", "Vietti", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ], "or", [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Brandon Vietti\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "Country", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "Country", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "country", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "country", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual país tem mais canais de TV? Liste o país e o número de canais de TV que possui.", "question_toks": [ "Qual", "país", "tem", "mais", "canais", "de", "TV", "?", "Liste", "o", "país", "e", "o", "número", "de", "canais", "de", "TV", "que", "possui", "." ], "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": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;", "query_toks": [ "SELECT", "Country", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "Country", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "country", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "country", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o país com mais canais de TV e quantos tem?", "question_toks": [ "Qual", "é", "o", "país", "com", "mais", "canais", "de", "TV", "e", "quantos", "tem", "?" ], "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": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "series_name", ")", ",", "count", "(", "DISTINCT", "content", ")", "FROM", "TV_Channel", ";" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "series_name", ")", ",", "count", "(", "distinct", "content", ")", "from", "tv_channel" ], "question": "Liste o número de nomes e conteúdos de séries diferentes na tabela de canais de TV.", "question_toks": [ "Liste", "o", "número", "de", "nomes", "e", "conteúdos", "de", "séries", "diferentes", "na", "tabela", "de", "canais", "de", "TV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 2, true ], null ] ], [ 3, [ 0, [ 0, 5, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "series_name", ")", ",", "count", "(", "DISTINCT", "content", ")", "FROM", "TV_Channel", ";" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "series_name", ")", ",", "count", "(", "distinct", "content", ")", "from", "tv_channel" ], "question": "Quantas séries e conteúdos diferentes estão listados na tabela de canais de TV?", "question_toks": [ "Quantas", "séries", "e", "conteúdos", "diferentes", "estão", "listados", "na", "tabela", "de", "canais", "de", "TV", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 2, true ], null ] ], [ 3, [ 0, [ 0, 5, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "Content", "FROM", "TV_Channel", "WHERE", "series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "content", "from", "tv_channel", "where", "series_name", "=", "value" ], "question": "Qual é o conteúdo do Canal de TV com o nome de série \"Sky Radio\"?", "question_toks": [ "Qual", "é", "o", "conteúdo", "do", "Canal", "de", "TV", "com", "o", "nome", "de", "série", "\"", "Sky", "Radio", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "Content", "FROM", "TV_Channel", "WHERE", "series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "content", "from", "tv_channel", "where", "series_name", "=", "value" ], "question": "Qual é o conteúdo da série Sky Radio?", "question_toks": [ "Qual", "é", "o", "conteúdo", "da", "série", "Sky", "Radio", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "Package_Option", "FROM", "TV_Channel", "WHERE", "series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "package_option", "from", "tv_channel", "where", "series_name", "=", "value" ], "question": "Qual é a Opção de Pacote de Canal de TV com o nome de série \"Sky Radio\"?", "question_toks": [ "Qual", "é", "a", "Opção", "de", "Pacote", "de", "Canal", "de", "TV", "com", "o", "nome", "de", "série", "\"", "Sky", "Radio", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "Package_Option", "FROM", "TV_Channel", "WHERE", "series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "package_option", "from", "tv_channel", "where", "series_name", "=", "value" ], "question": "Quais são as opções de pacote dos canais de TV cujos nomes de série são Sky Radio?", "question_toks": [ "Quais", "são", "as", "opções", "de", "pacote", "dos", "canais", "de", "TV", "cujos", "nomes", "de", "série", "são", "Sky", "Radio", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) FROM TV_Channel WHERE LANGUAGE = \"English\";", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "TV_Channel", "WHERE", "LANGUAGE", "=", "``", "English", "''", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "tv_channel", "where", "language", "=", "value" ], "question": "Quantos canais de TV usando o idioma inglês?", "question_toks": [ "Quantos", "canais", "de", "TV", "usando", "o", "idioma", "inglês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) FROM TV_Channel WHERE LANGUAGE = \"English\";", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "TV_Channel", "WHERE", "LANGUAGE", "=", "``", "English", "''", ";" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "tv_channel", "where", "language", "=", "value" ], "question": "Quantos canais de TV usam o idioma inglês?", "question_toks": [ "Quantos", "canais", "de", "TV", "usam", "o", "idioma", "inglês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;", "query_toks": [ "SELECT", "LANGUAGE", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "LANGUAGE", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "language", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "language", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "Liste o idioma usado com o menor número de canais de TV. Lista o idioma e o número de canais de TV.", "question_toks": [ "Liste", "o", "idioma", "usado", "com", "o", "menor", "número", "de", "canais", "de", "TV", ".", "Lista", "o", "idioma", "e", "o", "número", "de", "canais", "de", "TV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;", "query_toks": [ "SELECT", "LANGUAGE", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "LANGUAGE", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1", ";" ], "query_toks_no_value": [ "select", "language", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "language", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "Quais são os idiomas usados pelo menor número de canais de TV e quantos canais os usam?", "question_toks": [ "Quais", "são", "os", "idiomas", "usados", "pelo", "menor", "número", "de", "canais", "de", "TV", "e", "quantos", "canais", "os", "usam", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE", "query_toks": [ "SELECT", "LANGUAGE", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "LANGUAGE" ], "query_toks_no_value": [ "select", "language", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "language" ], "question": "Liste cada idioma e o número de canais de TV que o utilizam.", "question_toks": [ "Liste", "cada", "idioma", "e", "o", "número", "de", "canais", "de", "TV", "que", "o", "utilizam", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE", "query_toks": [ "SELECT", "LANGUAGE", ",", "count", "(", "*", ")", "FROM", "TV_Channel", "GROUP", "BY", "LANGUAGE" ], "query_toks_no_value": [ "select", "language", ",", "count", "(", "*", ")", "from", "tv_channel", "group", "by", "language" ], "question": "Para cada idioma, liste o número de canais de TV que o utilizam.", "question_toks": [ "Para", "cada", "idioma", ",", "liste", "o", "número", "de", "canais", "de", "TV", "que", "o", "utilizam", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = \"The Rise of the Blue Beetle!\";", "query_toks": [ "SELECT", "T1.series_name", "FROM", "TV_Channel", "AS", "T1", "JOIN", "Cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.Title", "=", "``", "The", "Rise", "of", "the", "Blue", "Beetle", "!", "``", ";" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "title", "=", "value" ], "question": "Qual é o canal de TV que Mostre o desenho animado \"The Rise of the Blue Beetle!\"? Liste o nome da série do canal de TV.", "question_toks": [ "Qual", "é", "o", "canal", "de", "TV", "que", "Mostre", "o", "desenho", "animado", "\"", "The", "Rise", "of", "the", "Blue", "Beetle", "!", "\"", "?", "Liste", "o", "nome", "da", "série", "do", "canal", "de", "TV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"The Rise of the Blue Beetle!\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = \"The Rise of the Blue Beetle!\";", "query_toks": [ "SELECT", "T1.series_name", "FROM", "TV_Channel", "AS", "T1", "JOIN", "Cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.Title", "=", "``", "The", "Rise", "of", "the", "Blue", "Beetle", "!", "``", ";" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "title", "=", "value" ], "question": "Qual é o nome da série do canal de TV que Mostre o desenho animado \"The Rise of the Blue Beetle\"?", "question_toks": [ "Qual", "é", "o", "nome", "da", "série", "do", "canal", "de", "TV", "que", "Mostre", "o", "desenho", "animado", "\"", "The", "Rise", "of", "the", "Blue", "Beetle", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"The Rise of the Blue Beetle!\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "T2.Title", "FROM", "TV_Channel", "AS", "T1", "JOIN", "Cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T1.series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "t2", ".", "title", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t1", ".", "series_name", "=", "value" ], "question": "Liste o título de todos os desenhos animados exibidos no canal de TV com o nome da série \"Sky Radio\".", "question_toks": [ "Liste", "o", "título", "de", "todos", "os", "desenhos", "animados", "exibidos", "no", "canal", "de", "TV", "com", "o", "nome", "da", "série", "\"", "Sky", "Radio", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "T2.Title", "FROM", "TV_Channel", "AS", "T1", "JOIN", "Cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T1.series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "t2", ".", "title", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t1", ".", "series_name", "=", "value" ], "question": "Qual o título de todos os desenhos animados que estão no canal de TV com o nome da série \"Sky Radio\"?", "question_toks": [ "Qual", "o", "título", "de", "todos", "os", "desenhos", "animados", "que", "estão", "no", "canal", "de", "TV", "com", "o", "nome", "da", "série", "\"", "Sky", "Radio", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Episode FROM TV_series ORDER BY rating", "query_toks": [ "SELECT", "Episode", "FROM", "TV_series", "ORDER", "BY", "rating" ], "query_toks_no_value": [ "select", "episode", "from", "tv_series", "order", "by", "rating" ], "question": "Liste o episódio de todas as séries de TV classificadas por classificação.", "question_toks": [ "Liste", "o", "episódio", "de", "todas", "as", "séries", "de", "TV", "classificadas", "por", "classificação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Episode FROM TV_series ORDER BY rating", "query_toks": [ "SELECT", "Episode", "FROM", "TV_series", "ORDER", "BY", "rating" ], "query_toks_no_value": [ "select", "episode", "from", "tv_series", "order", "by", "rating" ], "question": "Quais são todos os episódios ordenados por classificações?", "question_toks": [ "Quais", "são", "todos", "os", "episódios", "ordenados", "por", "classificações", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;", "query_toks": [ "SELECT", "Episode", ",", "Rating", "FROM", "TV_series", "ORDER", "BY", "Rating", "DESC", "LIMIT", "3", ";" ], "query_toks_no_value": [ "select", "episode", ",", "rating", "from", "tv_series", "order", "by", "rating", "desc", "limit", "value" ], "question": "Liste as 3 principais séries de TV com classificação mais alta. Liste o episódio e a classificação da série de TV.", "question_toks": [ "Liste", "as", "3", "principais", "séries", "de", "TV", "com", "classificação", "mais", "alta", ".", "Liste", "o", "episódio", "e", "a", "classificação", "da", "série", "de", "TV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;", "query_toks": [ "SELECT", "Episode", ",", "Rating", "FROM", "TV_series", "ORDER", "BY", "Rating", "DESC", "LIMIT", "3", ";" ], "query_toks_no_value": [ "select", "episode", ",", "rating", "from", "tv_series", "order", "by", "rating", "desc", "limit", "value" ], "question": "Quais são os três episódios mais bem avaliados na tabela de séries de TV e quais foram essas avaliações?", "question_toks": [ "Quais", "são", "os", "três", "episódios", "mais", "bem", "avaliados", "na", "tabela", "de", "séries", "de", "TV", "e", "quais", "foram", "essas", "avaliações", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 13, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT max(SHARE) , min(SHARE) FROM TV_series;", "query_toks": [ "SELECT", "max", "(", "SHARE", ")", ",", "min", "(", "SHARE", ")", "FROM", "TV_series", ";" ], "query_toks_no_value": [ "select", "max", "(", "share", ")", ",", "min", "(", "share", ")", "from", "tv_series" ], "question": "Qual é a participação mínima e máxima de séries de TV?", "question_toks": [ "Qual", "é", "a", "participação", "mínima", "e", "máxima", "de", "séries", "de", "TV", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ], [ 2, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT max(SHARE) , min(SHARE) FROM TV_series;", "query_toks": [ "SELECT", "max", "(", "SHARE", ")", ",", "min", "(", "SHARE", ")", "FROM", "TV_series", ";" ], "query_toks_no_value": [ "select", "max", "(", "share", ")", ",", "min", "(", "share", ")", "from", "tv_series" ], "question": "Qual é a participação máxima e mínima para a série de TV?", "question_toks": [ "Qual", "é", "a", "participação", "máxima", "e", "mínima", "para", "a", "série", "de", "TV", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ], [ 2, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "Air_Date", "FROM", "TV_series", "WHERE", "Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "air_date", "from", "tv_series", "where", "episode", "=", "value" ], "question": "Qual é a data de exibição da série de TV com o episódio \"A Love of a Lifetime\"?", "question_toks": [ "Qual", "é", "a", "data", "de", "exibição", "da", "série", "de", "TV", "com", "o", "episódio", "\"", "A", "Love", "of", "a", "Lifetime", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "Air_Date", "FROM", "TV_series", "WHERE", "Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "air_date", "from", "tv_series", "where", "episode", "=", "value" ], "question": "Quando o episódio \"A Love of a Lifetime\" foi ao ar?", "question_toks": [ "Quando", "o", "episódio", "\"", "A", "Love", "of", "a", "Lifetime", "\"", "foi", "ao", "ar", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "Weekly_Rank", "FROM", "TV_series", "WHERE", "Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "weekly_rank", "from", "tv_series", "where", "episode", "=", "value" ], "question": "O que é o Weekly Rank da série de TV com o episódio \"A Love of a Lifetime\"?", "question_toks": [ "O", "que", "é", "o", "Weekly", "Rank", "da", "série", "de", "TV", "com", "o", "episódio", "\"", "A", "Love", "of", "a", "Lifetime", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "Weekly_Rank", "FROM", "TV_series", "WHERE", "Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "weekly_rank", "from", "tv_series", "where", "episode", "=", "value" ], "question": "Qual é a classificação semanal para o episódio \"A Love of a Lifetime\"?", "question_toks": [ "Qual", "é", "a", "classificação", "semanal", "para", "o", "episódio", "\"", "A", "Love", "of", "a", "Lifetime", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "T1.series_name", "FROM", "TV_Channel", "AS", "T1", "JOIN", "TV_series", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", "from", "tv_channel", "as", "t1", "join", "tv_series", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "episode", "=", "value" ], "question": "Qual é o canal de TV da série de TV com o episódio \"A Love of a Lifetime\"? Liste o nome da série do canal de TV.", "question_toks": [ "Qual", "é", "o", "canal", "de", "TV", "da", "série", "de", "TV", "com", "o", "episódio", "\"", "A", "Love", "of", "a", "Lifetime", "\"", "?", "Liste", "o", "nome", "da", "série", "do", "canal", "de", "TV", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = \"A Love of a Lifetime\";", "query_toks": [ "SELECT", "T1.series_name", "FROM", "TV_Channel", "AS", "T1", "JOIN", "TV_series", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.Episode", "=", "``", "A", "Love", "of", "a", "Lifetime", "''", ";" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", "from", "tv_channel", "as", "t1", "join", "tv_series", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "episode", "=", "value" ], "question": "Qual é o nome da série que tem o episódio \"A Love of a Lifetime\"?", "question_toks": [ "Qual", "é", "o", "nome", "da", "série", "que", "tem", "o", "episódio", "\"", "A", "Love", "of", "a", "Lifetime", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"A Love of a Lifetime\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "T2.Episode", "FROM", "TV_Channel", "AS", "T1", "JOIN", "TV_series", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T1.series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "t2", ".", "episode", "from", "tv_channel", "as", "t1", "join", "tv_series", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t1", ".", "series_name", "=", "value" ], "question": "Liste o Episódio de todas as séries de TV exibidas no Canal de TV com o nome da série \"Sky Radio\".", "question_toks": [ "Liste", "o", "Episódio", "de", "todas", "as", "séries", "de", "TV", "exibidas", "no", "Canal", "de", "TV", "com", "o", "nome", "da", "série", "\"", "Sky", "Radio", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "query_toks": [ "SELECT", "T2.Episode", "FROM", "TV_Channel", "AS", "T1", "JOIN", "TV_series", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T1.series_name", "=", "``", "Sky", "Radio", "''", ";" ], "query_toks_no_value": [ "select", "t2", ".", "episode", "from", "tv_channel", "as", "t1", "join", "tv_series", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t1", ".", "series_name", "=", "value" ], "question": "Qual é o episódio da série de TV chamada \"Sky Radio\"?", "question_toks": [ "Qual", "é", "o", "episódio", "da", "série", "de", "TV", "chamada", "\"", "Sky", "Radio", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 18, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Sky Radio\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "Directed_by", "FROM", "cartoon", "GROUP", "BY", "Directed_by" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "directed_by", "from", "cartoon", "group", "by", "directed_by" ], "question": "Encontre o número de desenhos animados dirigidos por cada um dos diretores listados.", "question_toks": [ "Encontre", "o", "número", "de", "desenhos", "animados", "dirigidos", "por", "cada", "um", "dos", "diretores", "listados", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 21, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "Directed_by", "FROM", "cartoon", "GROUP", "BY", "Directed_by" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "directed_by", "from", "cartoon", "group", "by", "directed_by" ], "question": "Quantos desenhos animados cada diretor criou?", "question_toks": [ "Quantos", "desenhos", "animados", "cada", "diretor", "criou", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 21, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 21, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "select production_code , channel from cartoon order by original_air_date desc limit 1", "query_toks": [ "select", "production_code", ",", "channel", "from", "cartoon", "order", "by", "original_air_date", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "production_code", ",", "channel", "from", "cartoon", "order", "by", "original_air_date", "desc", "limit", "value" ], "question": "Encontre o código de produção e o canal do desenho animado exibido mais recentemente.", "question_toks": [ "Encontre", "o", "código", "de", "produção", "e", "o", "canal", "do", "desenho", "animado", "exibido", "mais", "recentemente", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 23, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "select production_code , channel from cartoon order by original_air_date desc limit 1", "query_toks": [ "select", "production_code", ",", "channel", "from", "cartoon", "order", "by", "original_air_date", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "production_code", ",", "channel", "from", "cartoon", "order", "by", "original_air_date", "desc", "limit", "value" ], "question": "Qual é o código e canal de produção do cartoon mais recente?", "question_toks": [ "Qual", "é", "o", "código", "e", "canal", "de", "produção", "do", "cartoon", "mais", "recente", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 23, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = \"yes\"", "query_toks": [ "SELECT", "package_option", ",", "series_name", "FROM", "TV_Channel", "WHERE", "hight_definition_TV", "=", "``", "yes", "''" ], "query_toks_no_value": [ "select", "package_option", ",", "series_name", "from", "tv_channel", "where", "hight_definition_tv", "=", "value" ], "question": "Encontre a escolha do pacote e o nome da série do canal de TV que possui TV de alta definição.", "question_toks": [ "Encontre", "a", "escolha", "do", "pacote", "e", "o", "nome", "da", "série", "do", "canal", "de", "TV", "que", "possui", "TV", "de", "alta", "definição", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"yes\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = \"yes\"", "query_toks": [ "SELECT", "package_option", ",", "series_name", "FROM", "TV_Channel", "WHERE", "hight_definition_TV", "=", "``", "yes", "''" ], "query_toks_no_value": [ "select", "package_option", ",", "series_name", "from", "tv_channel", "where", "hight_definition_tv", "=", "value" ], "question": "Quais são as opções de pacote e o nome da série para o canal de TV que suporta TV de alta definição?", "question_toks": [ "Quais", "são", "as", "opções", "de", "pacote", "e", "o", "nome", "da", "série", "para", "o", "canal", "de", "TV", "que", "suporta", "TV", "de", "alta", "definição", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"yes\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "query_toks": [ "SELECT", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.written_by", "=", "'Todd", "Casey", "'" ], "query_toks_no_value": [ "select", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "written_by", "=", "value" ], "question": "quais canais de TV de quais países estão exibindo algum cartoon escrito por Todd Casey?", "question_toks": [ "quais", "canais", "de", "TV", "de", "quais", "países", "estão", "exibindo", "algum", "cartoon", "escrito", "por", "Todd", "Casey", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Todd Casey\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "query_toks": [ "SELECT", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.written_by", "=", "'Todd", "Casey", "'" ], "query_toks_no_value": [ "select", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "written_by", "=", "value" ], "question": "Quais são os países que têm desenhos animados na TV escritos por Todd Casey?", "question_toks": [ "Quais", "são", "os", "países", "que", "têm", "desenhos", "animados", "na", "TV", "escritos", "por", "Todd", "Casey", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Todd Casey\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "query_toks": [ "SELECT", "country", "FROM", "TV_Channel", "EXCEPT", "SELECT", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.written_by", "=", "'Todd", "Casey", "'" ], "query_toks_no_value": [ "select", "country", "from", "tv_channel", "except", "select", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "written_by", "=", "value" ], "question": "quais canais de TV de países não estão exibindo nenhum desenho animado escrito por Todd Casey?", "question_toks": [ "quais", "canais", "de", "TV", "de", "países", "não", "estão", "exibindo", "nenhum", "desenho", "animado", "escrito", "por", "Todd", "Casey", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Todd Casey\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "tvshow", "query": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "query_toks": [ "SELECT", "country", "FROM", "TV_Channel", "EXCEPT", "SELECT", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.written_by", "=", "'Todd", "Casey", "'" ], "query_toks_no_value": [ "select", "country", "from", "tv_channel", "except", "select", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "written_by", "=", "value" ], "question": "Quais são os países que não estão exibindo desenhos animados escritos por Todd Casey?", "question_toks": [ "Quais", "são", "os", "países", "que", "não", "estão", "exibindo", "desenhos", "animados", "escritos", "por", "Todd", "Casey", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], "\"Todd Casey\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "tvshow", "query": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "query_toks": [ "SELECT", "T1.series_name", ",", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.directed_by", "=", "'Michael", "Chang", "'", "INTERSECT", "SELECT", "T1.series_name", ",", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.directed_by", "=", "'Ben", "Jones", "'" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", ",", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "directed_by", "=", "value", "intersect", "select", "t1", ".", "series_name", ",", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "directed_by", "=", "value" ], "question": "Encontre o nome da série e o país do canal de TV que está exibindo alguns desenhos animados dirigidos por Ben Jones e Michael Chang?", "question_toks": [ "Encontre", "o", "nome", "da", "série", "e", "o", "país", "do", "canal", "de", "TV", "que", "está", "exibindo", "alguns", "desenhos", "animados", "dirigidos", "por", "Ben", "Jones", "e", "Michael", "Chang", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Michael Chang\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "query_toks": [ "SELECT", "T1.series_name", ",", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.directed_by", "=", "'Michael", "Chang", "'", "INTERSECT", "SELECT", "T1.series_name", ",", "T1.country", "FROM", "TV_Channel", "AS", "T1", "JOIN", "cartoon", "AS", "T2", "ON", "T1.id", "=", "T2.Channel", "WHERE", "T2.directed_by", "=", "'Ben", "Jones", "'" ], "query_toks_no_value": [ "select", "t1", ".", "series_name", ",", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "directed_by", "=", "value", "intersect", "select", "t1", ".", "series_name", ",", "t1", ".", "country", "from", "tv_channel", "as", "t1", "join", "cartoon", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "channel", "where", "t2", ".", "directed_by", "=", "value" ], "question": "Qual é o nome da série e o país de todos os canais de TV que exibem desenhos animados dirigidos por Ben Jones e desenhos animados dirigidos por Michael Chang?", "question_toks": [ "Qual", "é", "o", "nome", "da", "série", "e", "o", "país", "de", "todos", "os", "canais", "de", "TV", "que", "exibem", "desenhos", "animados", "dirigidos", "por", "Ben", "Jones", "e", "desenhos", "animados", "dirigidos", "por", "Michael", "Chang", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Michael Chang\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 25, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "query_toks": [ "SELECT", "Pixel_aspect_ratio_PAR", ",", "country", "FROM", "tv_channel", "WHERE", "LANGUAGE", "!", "=", "'English", "'" ], "query_toks_no_value": [ "select", "pixel_aspect_ratio_par", ",", "country", "from", "tv_channel", "where", "language", "!", "=", "value" ], "question": "encontre a proporção de pixel e a nação dos canais de TV que não usam o inglês.", "question_toks": [ "encontre", "a", "proporção", "de", "pixel", "e", "a", "nação", "dos", "canais", "de", "TV", "que", "não", "usam", "o", "inglês", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "query_toks": [ "SELECT", "Pixel_aspect_ratio_PAR", ",", "country", "FROM", "tv_channel", "WHERE", "LANGUAGE", "!", "=", "'English", "'" ], "query_toks_no_value": [ "select", "pixel_aspect_ratio_par", ",", "country", "from", "tv_channel", "where", "language", "!", "=", "value" ], "question": "Qual é a proporção do pixel e o país de origem de todos os canais de TV que não usam o inglês?", "question_toks": [ "Qual", "é", "a", "proporção", "do", "pixel", "e", "o", "país", "de", "origem", "de", "todos", "os", "canais", "de", "TV", "que", "não", "usam", "o", "inglês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "query_toks": [ "SELECT", "id", "FROM", "tv_channel", "GROUP", "BY", "country", "HAVING", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "id", "from", "tv_channel", "group", "by", "country", "having", "count", "(", "*", ")", ">", "value" ], "question": "localize o id dos canais de tv que vêm de países onde possuam mais de dois canais de tv", "question_toks": [ "localize", "o", "id", "dos", "canais", "de", "tv", "que", "vêm", "de", "países", "onde", "possuam", "mais", "de", "dois", "canais", "de", "tv" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "query_toks": [ "SELECT", "id", "FROM", "tv_channel", "GROUP", "BY", "country", "HAVING", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "id", "from", "tv_channel", "group", "by", "country", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são os ids de todos os canais de TV que possuem mais de 2 canais de TV?", "question_toks": [ "Quais", "são", "os", "ids", "de", "todos", "os", "canais", "de", "TV", "que", "possuem", "mais", "de", "2", "canais", "de", "TV", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "tvshow", "query": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "query_toks": [ "SELECT", "id", "FROM", "TV_Channel", "EXCEPT", "SELECT", "channel", "FROM", "cartoon", "WHERE", "directed_by", "=", "'Ben", "Jones", "'" ], "query_toks_no_value": [ "select", "id", "from", "tv_channel", "except", "select", "channel", "from", "cartoon", "where", "directed_by", "=", "value" ], "question": "encontre o id dos canais de TV que não reproduzem nenhum desenho animado dirigido por Ben Jones.", "question_toks": [ "encontre", "o", "id", "dos", "canais", "de", "TV", "que", "não", "reproduzem", "nenhum", "desenho", "animado", "dirigido", "por", "Ben", "Jones", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "tvshow", "query": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "query_toks": [ "SELECT", "id", "FROM", "TV_Channel", "EXCEPT", "SELECT", "channel", "FROM", "cartoon", "WHERE", "directed_by", "=", "'Ben", "Jones", "'" ], "query_toks_no_value": [ "select", "id", "from", "tv_channel", "except", "select", "channel", "from", "cartoon", "where", "directed_by", "=", "value" ], "question": "Quais são os ids dos canais de TV que não possuem cartuns dirigidos por Ben Jones?", "question_toks": [ "Quais", "são", "os", "ids", "dos", "canais", "de", "TV", "que", "não", "possuem", "cartuns", "dirigidos", "por", "Ben", "Jones", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "tvshow", "query": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "query_toks": [ "SELECT", "package_option", "FROM", "TV_Channel", "WHERE", "id", "NOT", "IN", "(", "SELECT", "channel", "FROM", "cartoon", "WHERE", "directed_by", "=", "'Ben", "Jones", "'", ")" ], "query_toks_no_value": [ "select", "package_option", "from", "tv_channel", "where", "id", "not", "in", "(", "select", "channel", "from", "cartoon", "where", "directed_by", "=", "value", ")" ], "question": "encontre a opção de pacote do canal de tv que não possui desenho animado dirigido por Ben Jones.", "question_toks": [ "encontre", "a", "opção", "de", "pacote", "do", "canal", "de", "tv", "que", "não", "possui", "desenho", "animado", "dirigido", "por", "Ben", "Jones", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "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": "tvshow", "query": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "query_toks": [ "SELECT", "package_option", "FROM", "TV_Channel", "WHERE", "id", "NOT", "IN", "(", "SELECT", "channel", "FROM", "cartoon", "WHERE", "directed_by", "=", "'Ben", "Jones", "'", ")" ], "query_toks_no_value": [ "select", "package_option", "from", "tv_channel", "where", "id", "not", "in", "(", "select", "channel", "from", "cartoon", "where", "directed_by", "=", "value", ")" ], "question": "Quais são as opções de pacote de todos os canais de TV que não estão exibindo nenhum desenho animado dirigido por Ben Jones?", "question_toks": [ "Quais", "são", "as", "opções", "de", "pacote", "de", "todos", "os", "canais", "de", "TV", "que", "não", "estão", "exibindo", "nenhum", "desenho", "animado", "dirigido", "por", "Ben", "Jones", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 21, false ], null ], "\"Ben Jones\"", null ] ], "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": "poker_player", "query": "SELECT count(*) FROM poker_player", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "poker_player" ], "question": "Quantos jogadores de pôquer existem?", "question_toks": [ "Quantos", "jogadores", "de", "pôquer", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT count(*) FROM poker_player", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "poker_player" ], "question": "Conte o número de jogadores de pôquer.", "question_toks": [ "Conte", "o", "número", "de", "jogadores", "de", "pôquer", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC", "query_toks": [ "SELECT", "Earnings", "FROM", "poker_player", "ORDER", "BY", "Earnings", "DESC" ], "query_toks_no_value": [ "select", "earnings", "from", "poker_player", "order", "by", "earnings", "desc" ], "question": "Liste os ganhos dos jogadores de pôquer em ordem decrescente.", "question_toks": [ "Liste", "os", "ganhos", "dos", "jogadores", "de", "pôquer", "em", "ordem", "decrescente", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC", "query_toks": [ "SELECT", "Earnings", "FROM", "poker_player", "ORDER", "BY", "Earnings", "DESC" ], "query_toks_no_value": [ "select", "earnings", "from", "poker_player", "order", "by", "earnings", "desc" ], "question": "Quais são os ganhos dos jogadores de pôquer, ordenados em ordem decrescente por valor?", "question_toks": [ "Quais", "são", "os", "ganhos", "dos", "jogadores", "de", "pôquer", ",", "ordenados", "em", "ordem", "decrescente", "por", "valor", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Final_Table_Made , Best_Finish FROM poker_player", "query_toks": [ "SELECT", "Final_Table_Made", ",", "Best_Finish", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "final_table_made", ",", "best_finish", "from", "poker_player" ], "question": "Liste as mesas finais feitas e os melhores resultados dos jogadores de pôquer.", "question_toks": [ "Liste", "as", "mesas", "finais", "feitas", "e", "os", "melhores", "resultados", "dos", "jogadores", "de", "pôquer", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Final_Table_Made , Best_Finish FROM poker_player", "query_toks": [ "SELECT", "Final_Table_Made", ",", "Best_Finish", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "final_table_made", ",", "best_finish", "from", "poker_player" ], "question": "Quais são as mesas finais feitas e os melhores resultados para todos os jogadores de pôquer?", "question_toks": [ "Quais", "são", "as", "mesas", "finais", "feitas", "e", "os", "melhores", "resultados", "para", "todos", "os", "jogadores", "de", "pôquer", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT avg(Earnings) FROM poker_player", "query_toks": [ "SELECT", "avg", "(", "Earnings", ")", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "avg", "(", "earnings", ")", "from", "poker_player" ], "question": "Qual é a média de ganhos dos jogadores de pôquer?", "question_toks": [ "Qual", "é", "a", "média", "de", "ganhos", "dos", "jogadores", "de", "pôquer", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT avg(Earnings) FROM poker_player", "query_toks": [ "SELECT", "avg", "(", "Earnings", ")", "FROM", "poker_player" ], "query_toks_no_value": [ "select", "avg", "(", "earnings", ")", "from", "poker_player" ], "question": "Retorna os ganhos médios de todos os jogadores de pôquer.", "question_toks": [ "Retorna", "os", "ganhos", "médios", "de", "todos", "os", "jogadores", "de", "pôquer", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1", "query_toks": [ "SELECT", "Money_Rank", "FROM", "poker_player", "ORDER", "BY", "Earnings", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "money_rank", "from", "poker_player", "order", "by", "earnings", "desc", "limit", "value" ], "question": "Qual é a classificação de dinheiro do jogador de pôquer com os maiores ganhos?", "question_toks": [ "Qual", "é", "a", "classificação", "de", "dinheiro", "do", "jogador", "de", "pôquer", "com", "os", "maiores", "ganhos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1", "query_toks": [ "SELECT", "Money_Rank", "FROM", "poker_player", "ORDER", "BY", "Earnings", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "money_rank", "from", "poker_player", "order", "by", "earnings", "desc", "limit", "value" ], "question": "Retorne a classificação de dinheiro do jogador com os maiores ganhos.", "question_toks": [ "Retorne", "a", "classificação", "de", "dinheiro", "do", "jogador", "com", "os", "maiores", "ganhos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000", "query_toks": [ "SELECT", "max", "(", "Final_Table_Made", ")", "FROM", "poker_player", "WHERE", "Earnings", "<", "200000" ], "query_toks_no_value": [ "select", "max", "(", "final_table_made", ")", "from", "poker_player", "where", "earnings", "<", "value" ], "question": "Qual é o número máximo de mesas finais feitas entre jogadores de pôquer com ganhos inferiores a 200.000?", "question_toks": [ "Qual", "é", "o", "número", "máximo", "de", "mesas", "finais", "feitas", "entre", "jogadores", "de", "pôquer", "com", "ganhos", "inferiores", "a", "200.000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 6, false ], null ], 200000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000", "query_toks": [ "SELECT", "max", "(", "Final_Table_Made", ")", "FROM", "poker_player", "WHERE", "Earnings", "<", "200000" ], "query_toks_no_value": [ "select", "max", "(", "final_table_made", ")", "from", "poker_player", "where", "earnings", "<", "value" ], "question": "Retorne o máximo de mesas finais feitas em todos os jogadores de pôquer com ganhos abaixo de 200.000.", "question_toks": [ "Retorne", "o", "máximo", "de", "mesas", "finais", "feitas", "em", "todos", "os", "jogadores", "de", "pôquer", "com", "ganhos", "abaixo", "de", "200.000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 6, false ], null ], 200000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id" ], "question": "Quais são os nomes dos jogadores de pôquer?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "jogadores", "de", "pôquer", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id" ], "question": "Retorne os nomes de todos os jogadores de pôquer.", "question_toks": [ "Retorne", "os", "nomes", "de", "todos", "os", "jogadores", "de", "pôquer", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T2.Earnings", ">", "300000" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t2", ".", "earnings", ">", "value" ], "question": "Quais são os nomes dos jogadores de pôquer cujos ganhos são superiores a 300.000?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "jogadores", "de", "pôquer", "cujos", "ganhos", "são", "superiores", "a", "300.000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 6, false ], null ], 300000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T2.Earnings", ">", "300000" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t2", ".", "earnings", ">", "value" ], "question": "Dê os nomes dos jogadores de pôquer com ganhos acima de 300.000.", "question_toks": [ "Dê", "os", "nomes", "dos", "jogadores", "de", "pôquer", "com", "ganhos", "acima", "de", "300.000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 6, false ], null ], 300000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Final_Table_Made" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "final_table_made" ], "question": "Liste os nomes dos jogadores de pôquer ordenados pelas mesas finais feitas em ordem crescente.", "question_toks": [ "Liste", "os", "nomes", "dos", "jogadores", "de", "pôquer", "ordenados", "pelas", "mesas", "finais", "feitas", "em", "ordem", "crescente", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Final_Table_Made" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "final_table_made" ], "question": "Quais são os nomes dos jogadores de pôquer, ordenados de acordo com o número de mesas finais que fizeram?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "jogadores", "de", "pôquer", ",", "ordenados", "de", "acordo", "com", "o", "número", "de", "mesas", "finais", "que", "fizeram", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1", "query_toks": [ "SELECT", "T1.Birth_Date", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Earnings", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "birth_date", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "earnings", "asc", "limit", "value" ], "question": "Qual é a data de nascimento do jogador de pôquer com os menores ganhos?", "question_toks": [ "Qual", "é", "a", "data", "de", "nascimento", "do", "jogador", "de", "pôquer", "com", "os", "menores", "ganhos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1", "query_toks": [ "SELECT", "T1.Birth_Date", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Earnings", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "birth_date", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "earnings", "asc", "limit", "value" ], "question": "Retorne a data de nascimento do jogador de pôquer com os menores ganhos.", "question_toks": [ "Retorne", "a", "data", "de", "nascimento", "do", "jogador", "de", "pôquer", "com", "os", "menores", "ganhos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Money_Rank", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Height", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "money_rank", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "height", "desc", "limit", "value" ], "question": "Qual é a classificação de dinheiro do jogador de pôquer mais alto?", "question_toks": [ "Qual", "é", "a", "classificação", "de", "dinheiro", "do", "jogador", "de", "pôquer", "mais", "alto", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 11, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Money_Rank", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Height", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "money_rank", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "height", "desc", "limit", "value" ], "question": "Retorne a classificação de dinheiro do jogador de pôquer com a maior altura.", "question_toks": [ "Retorne", "a", "classificação", "de", "dinheiro", "do", "jogador", "de", "pôquer", "com", "a", "maior", "altura", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 11, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200", "query_toks": [ "SELECT", "avg", "(", "T2.Earnings", ")", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T1.Height", ">", "200" ], "query_toks_no_value": [ "select", "avg", "(", "t2", ".", "earnings", ")", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t1", ".", "height", ">", "value" ], "question": "Qual é o ganho médio de jogadores de pôquer com altura superior a 200?", "question_toks": [ "Qual", "é", "o", "ganho", "médio", "de", "jogadores", "de", "pôquer", "com", "altura", "superior", "a", "200", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 11, false ], null ], 200.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200", "query_toks": [ "SELECT", "avg", "(", "T2.Earnings", ")", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T1.Height", ">", "200" ], "query_toks_no_value": [ "select", "avg", "(", "t2", ".", "earnings", ")", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t1", ".", "height", ">", "value" ], "question": "Dê os ganhos médios de jogadores de pôquer com mais de 200 anos.", "question_toks": [ "Dê", "os", "ganhos", "médios", "de", "jogadores", "de", "pôquer", "com", "mais", "de", "200", "anos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 5, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 11, false ], null ], 200.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Earnings", "DESC" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "earnings", "desc" ], "question": "Quais são os nomes dos jogadores de pôquer em ordem decrescente de ganhos?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "jogadores", "de", "pôquer", "em", "ordem", "decrescente", "de", "ganhos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC", "query_toks": [ "SELECT", "T1.Name", "FROM", "people", "AS", "T1", "JOIN", "poker_player", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Earnings", "DESC" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "people", "as", "t1", "join", "poker_player", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "earnings", "desc" ], "question": "Retorne os nomes dos jogadores de pôquer classificados por seus ganhos decrescentes.", "question_toks": [ "Retorne", "os", "nomes", "dos", "jogadores", "de", "pôquer", "classificados", "por", "seus", "ganhos", "decrescentes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 6, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality", "query_toks": [ "SELECT", "Nationality", ",", "COUNT", "(", "*", ")", "FROM", "people", "GROUP", "BY", "Nationality" ], "query_toks_no_value": [ "select", "nationality", ",", "count", "(", "*", ")", "from", "people", "group", "by", "nationality" ], "question": "Quais são as diferentes nacionalidades de pessoas e o número correspondente de pessoas de cada nação?", "question_toks": [ "Quais", "são", "as", "diferentes", "nacionalidades", "de", "pessoas", "e", "o", "número", "correspondente", "de", "pessoas", "de", "cada", "nação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality", "query_toks": [ "SELECT", "Nationality", ",", "COUNT", "(", "*", ")", "FROM", "people", "GROUP", "BY", "Nationality" ], "query_toks_no_value": [ "select", "nationality", ",", "count", "(", "*", ")", "from", "people", "group", "by", "nationality" ], "question": "Quantas pessoas existem de cada nacionalidade?", "question_toks": [ "Quantas", "pessoas", "existem", "de", "cada", "nacionalidade", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Nationality", "FROM", "people", "GROUP", "BY", "Nationality", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "nationality", "from", "people", "group", "by", "nationality", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é a nacionalidade mais comum das pessoas?", "question_toks": [ "Qual", "é", "a", "nacionalidade", "mais", "comum", "das", "pessoas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Nationality", "FROM", "people", "GROUP", "BY", "Nationality", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "nationality", "from", "people", "group", "by", "nationality", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Forneça a nacionalidade mais comum a todas as pessoas.", "question_toks": [ "Forneça", "a", "nacionalidade", "mais", "comum", "a", "todas", "as", "pessoas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "Nationality", "FROM", "people", "GROUP", "BY", "Nationality", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "nationality", "from", "people", "group", "by", "nationality", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são as nacionalidades que são compartilhadas por pelo menos duas pessoas?", "question_toks": [ "Quais", "são", "as", "nacionalidades", "que", "são", "compartilhadas", "por", "pelo", "menos", "duas", "pessoas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2", "query_toks": [ "SELECT", "Nationality", "FROM", "people", "GROUP", "BY", "Nationality", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "nationality", "from", "people", "group", "by", "nationality", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Retorne as nacionalidades para as quais há duas ou mais pessoas.", "question_toks": [ "Retorne", "as", "nacionalidades", "para", "as", "quais", "há", "duas", "ou", "mais", "pessoas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC", "query_toks": [ "SELECT", "Name", ",", "Birth_Date", "FROM", "people", "ORDER", "BY", "Name", "ASC" ], "query_toks_no_value": [ "select", "name", ",", "birth_date", "from", "people", "order", "by", "name", "asc" ], "question": "Liste os nomes e datas de nascimento das pessoas em ordem alfabética crescente de nome.", "question_toks": [ "Liste", "os", "nomes", "e", "datas", "de", "nascimento", "das", "pessoas", "em", "ordem", "alfabética", "crescente", "de", "nome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC", "query_toks": [ "SELECT", "Name", ",", "Birth_Date", "FROM", "people", "ORDER", "BY", "Name", "ASC" ], "query_toks_no_value": [ "select", "name", ",", "birth_date", "from", "people", "order", "by", "name", "asc" ], "question": "Quais são os nomes e datas de nascimento das pessoas, ordenados por seus nomes em ordem alfabética?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "datas", "de", "nascimento", "das", "pessoas", ",", "ordenados", "por", "seus", "nomes", "em", "ordem", "alfabética", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 9, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name FROM people WHERE Nationality != \"Russia\"", "query_toks": [ "SELECT", "Name", "FROM", "people", "WHERE", "Nationality", "!", "=", "``", "Russia", "''" ], "query_toks_no_value": [ "select", "name", "from", "people", "where", "nationality", "!", "=", "value" ], "question": "Mostre os nomes de pessoas cuja nacionalidade não seja \"Rússia\".", "question_toks": [ "Mostre", "os", "nomes", "de", "pessoas", "cuja", "nacionalidade", "não", "seja", "\"", "Rússia", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 8, false ], null ], "\"Russia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name FROM people WHERE Nationality != \"Russia\"", "query_toks": [ "SELECT", "Name", "FROM", "people", "WHERE", "Nationality", "!", "=", "``", "Russia", "''" ], "query_toks_no_value": [ "select", "name", "from", "people", "where", "nationality", "!", "=", "value" ], "question": "Quais são os nomes de pessoas que não são da Rússia?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "pessoas", "que", "não", "são", "da", "Rússia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 8, false ], null ], "\"Russia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", "query_toks": [ "SELECT", "Name", "FROM", "people", "WHERE", "People_ID", "NOT", "IN", "(", "SELECT", "People_ID", "FROM", "poker_player", ")" ], "query_toks_no_value": [ "select", "name", "from", "people", "where", "people_id", "not", "in", "(", "select", "people_id", "from", "poker_player", ")" ], "question": "Liste os nomes de pessoas que não são jogadores de pôquer.", "question_toks": [ "Liste", "os", "nomes", "de", "pessoas", "que", "não", "são", "jogadores", "de", "pôquer", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 7, 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": "poker_player", "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", "query_toks": [ "SELECT", "Name", "FROM", "people", "WHERE", "People_ID", "NOT", "IN", "(", "SELECT", "People_ID", "FROM", "poker_player", ")" ], "query_toks_no_value": [ "select", "name", "from", "people", "where", "people_id", "not", "in", "(", "select", "people_id", "from", "poker_player", ")" ], "question": "Quais são os nomes das pessoas que não jogam poker?", "question_toks": [ "Quais", "são", "os", "nomes", "das", "pessoas", "que", "não", "jogam", "poker", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 7, 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": "poker_player", "query": "SELECT count(DISTINCT Nationality) FROM people", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "Nationality", ")", "FROM", "people" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "nationality", ")", "from", "people" ], "question": "Quantas nacionalidades distintas existem?", "question_toks": [ "Quantas", "nacionalidades", "distintas", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 8, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "poker_player", "query": "SELECT count(DISTINCT Nationality) FROM people", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "Nationality", ")", "FROM", "people" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "nationality", ")", "from", "people" ], "question": "Conte o número de diferentes nacionalidades.", "question_toks": [ "Conte", "o", "número", "de", "diferentes", "nacionalidades", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 8, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT count(*) FROM area_code_state", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "area_code_state" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "area_code_state" ], "question": "Quantos estados existem?", "question_toks": [ "Quantos", "estados", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC", "query_toks": [ "SELECT", "contestant_number", ",", "contestant_name", "FROM", "contestants", "ORDER", "BY", "contestant_name", "DESC" ], "query_toks_no_value": [ "select", "contestant_number", ",", "contestant_name", "from", "contestants", "order", "by", "contestant_name", "desc" ], "question": "Liste os números e nomes dos competidores, ordenados por nomes decrescentes.", "question_toks": [ "Liste", "os", "números", "e", "nomes", "dos", "competidores", ",", "ordenados", "por", "nomes", "decrescentes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT vote_id , phone_number , state FROM votes", "query_toks": [ "SELECT", "vote_id", ",", "phone_number", ",", "state", "FROM", "votes" ], "query_toks_no_value": [ "select", "vote_id", ",", "phone_number", ",", "state", "from", "votes" ], "question": "Liste os ids dos votos, números de telefone e estados de todos os votos.", "question_toks": [ "Liste", "os", "ids", "dos", "votos", ",", "números", "de", "telefone", "e", "estados", "de", "todos", "os", "votos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT max(area_code) , min(area_code) FROM area_code_state", "query_toks": [ "SELECT", "max", "(", "area_code", ")", ",", "min", "(", "area_code", ")", "FROM", "area_code_state" ], "query_toks_no_value": [ "select", "max", "(", "area_code", ")", ",", "min", "(", "area_code", ")", "from", "area_code_state" ], "question": "Quais são os valores máximo e mínimo dos códigos de área?", "question_toks": [ "Quais", "são", "os", "valores", "máximo", "e", "mínimo", "dos", "códigos", "de", "área", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 1, false ], null ] ], [ 2, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT max(created) FROM votes WHERE state = 'CA'", "query_toks": [ "SELECT", "max", "(", "created", ")", "FROM", "votes", "WHERE", "state", "=", "'CA", "'" ], "query_toks_no_value": [ "select", "max", "(", "created", ")", "from", "votes", "where", "state", "=", "value" ], "question": "Qual é a última data de criação de votos do estado 'CA'?", "question_toks": [ "Qual", "é", "a", "última", "data", "de", "criação", "de", "votos", "do", "estado", "'", "CA", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"CA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'", "query_toks": [ "SELECT", "contestant_name", "FROM", "contestants", "WHERE", "contestant_name", "!", "=", "'Jessie", "Alloway", "'" ], "query_toks_no_value": [ "select", "contestant_name", "from", "contestants", "where", "contestant_name", "!", "=", "value" ], "question": "Quais são os nomes dos concorrentes cujos nomes não são 'Jessie Alloway'", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "concorrentes", "cujos", "nomes", "não", "são", "'", "Jessie", "Alloway", "'" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"Jessie Alloway\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT DISTINCT state , created FROM votes", "query_toks": [ "SELECT", "DISTINCT", "state", ",", "created", "FROM", "votes" ], "query_toks_no_value": [ "select", "distinct", "state", ",", "created", "from", "votes" ], "question": "Quais são os estados distintos e tempo de criação de todos os votos?", "question_toks": [ "Quais", "são", "os", "estados", "distintos", "e", "tempo", "de", "criação", "de", "todos", "os", "votos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.contestant_number", ",", "T1.contestant_name", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "GROUP", "BY", "T1.contestant_number", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "contestant_number", ",", "t1", ".", "contestant_name", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "group", "by", "t1", ".", "contestant_number", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são os números e nomes dos concorrentes que tiveram pelo menos dois votos?", "question_toks": [ "Quais", "são", "os", "números", "e", "nomes", "dos", "concorrentes", "que", "tiveram", "pelo", "menos", "dois", "votos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "T1.contestant_number", ",", "T1.contestant_name", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "GROUP", "BY", "T1.contestant_number", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "contestant_number", ",", "t1", ".", "contestant_name", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "group", "by", "t1", ".", "contestant_number", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "De todos os concorrentes que foram votados, qual é o número de concorrentes e o nome do concorrente que obteve menos votos?", "question_toks": [ "De", "todos", "os", "concorrentes", "que", "foram", "votados", ",", "qual", "é", "o", "número", "de", "concorrentes", "e", "o", "nome", "do", "concorrente", "que", "obteve", "menos", "votos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "votes", "WHERE", "state", "=", "'NY", "'", "OR", "state", "=", "'CA", "'" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "votes", "where", "state", "=", "value", "or", "state", "=", "value" ], "question": "Qual é o número de votos do estado 'NY' ou 'CA'?", "question_toks": [ "Qual", "é", "o", "número", "de", "votos", "do", "estado", "'", "NY", "'", "ou", "'", "CA", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"NY\"", null ], "or", [ false, 2, [ 0, [ 0, 7, false ], null ], "\"CA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "contestants", "WHERE", "contestant_number", "NOT", "IN", "(", "SELECT", "contestant_number", "FROM", "votes", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "contestants", "where", "contestant_number", "not", "in", "(", "select", "contestant_number", "from", "votes", ")" ], "question": "Quantos concorrentes não foram votados?", "question_toks": [ "Quantos", "concorrentes", "não", "foram", "votados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 3, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, 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": "voter_1", "query": "SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.area_code", "FROM", "area_code_state", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.state", "=", "T2.state", "GROUP", "BY", "T1.area_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "area_code", "from", "area_code_state", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "state", "=", "t2", ".", "state", "group", "by", "t1", ".", "area_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o código de área em que mais votou?", "question_toks": [ "Qual", "é", "o", "código", "de", "área", "em", "que", "mais", "votou", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 2, false ], null ], [ 0, 7, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 1, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT T2.created , T2.state , T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'", "query_toks": [ "SELECT", "T2.created", ",", "T2.state", ",", "T2.phone_number", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "WHERE", "T1.contestant_name", "=", "'Tabatha", "Gehling", "'" ], "query_toks_no_value": [ "select", "t2", ".", "created", ",", "t2", ".", "state", ",", "t2", ".", "phone_number", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "where", "t1", ".", "contestant_name", "=", "value" ], "question": "Quais são as datas de criação, estados e números de telefone dos votos para o competidor chamado 'Tabatha Gehling'?", "question_toks": [ "Quais", "são", "as", "datas", "de", "criação", ",", "estados", "e", "números", "de", "telefone", "dos", "votos", "para", "o", "competidor", "chamado", "'", "Tabatha", "Gehling", "'", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Tabatha Gehling\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "voter_1", "query": "SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss'", "query_toks": [ "SELECT", "T3.area_code", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "JOIN", "area_code_state", "AS", "T3", "ON", "T2.state", "=", "T3.state", "WHERE", "T1.contestant_name", "=", "'Tabatha", "Gehling", "'", "INTERSECT", "SELECT", "T3.area_code", "FROM", "contestants", "AS", "T1", "JOIN", "votes", "AS", "T2", "ON", "T1.contestant_number", "=", "T2.contestant_number", "JOIN", "area_code_state", "AS", "T3", "ON", "T2.state", "=", "T3.state", "WHERE", "T1.contestant_name", "=", "'Kelly", "Clauss", "'" ], "query_toks_no_value": [ "select", "t3", ".", "area_code", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "join", "area_code_state", "as", "t3", "on", "t2", ".", "state", "=", "t3", ".", "state", "where", "t1", ".", "contestant_name", "=", "value", "intersect", "select", "t3", ".", "area_code", "from", "contestants", "as", "t1", "join", "votes", "as", "t2", "on", "t1", ".", "contestant_number", "=", "t2", ".", "contestant_number", "join", "area_code_state", "as", "t3", "on", "t2", ".", "state", "=", "t3", ".", "state", "where", "t1", ".", "contestant_name", "=", "value" ], "question": "Liste os códigos de área nos quais os eleitores votaram tanto na concorrente 'Tabatha Gehling' quanto na concorrente 'Kelly Clauss'.", "question_toks": [ "Liste", "os", "códigos", "de", "área", "nos", "quais", "os", "eleitores", "votaram", "tanto", "na", "concorrente", "'", "Tabatha", "Gehling", "'", "quanto", "na", "concorrente", "'", "Kelly", "Clauss", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ], "and", [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Tabatha Gehling\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ], "and", [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 2, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Kelly Clauss\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "voter_1", "query": "select contestant_name from contestants where contestant_name like \"%al%\"", "query_toks": [ "select", "contestant_name", "from", "contestants", "where", "contestant_name", "like", "\"%al%\"" ], "query_toks_no_value": [ "select", "contestant_name", "from", "contestants", "where", "contestant_name", "like", "value" ], "question": "Retorne os nomes dos competidores cujos nomes contêm a substring 'Al'.", "question_toks": [ "Retorne", "os", "nomes", "dos", "competidores", "cujos", "nomes", "contêm", "a", "substring", "'", "Al", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 4, false ], null ], "\"%al%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE IndepYear > 1950", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "IndepYear", ">", "1950" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "indepyear", ">", "value" ], "question": "Quais são os nomes de todos os países que se tornaram independentes após 1950?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "todos", "os", "países", "que", "se", "tornaram", "independentes", "após", "1950", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 1950.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE IndepYear > 1950", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "IndepYear", ">", "1950" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "indepyear", ">", "value" ], "question": "Dê os nomes das nações que foram fundadas depois de 1950.", "question_toks": [ "Dê", "os", "nomes", "das", "nações", "que", "foram", "fundadas", "depois", "de", "1950", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 13, false ], null ], 1950.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "country", "WHERE", "GovernmentForm", "=", "``", "Republic", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "where", "governmentform", "=", "value" ], "question": "Quantos países têm uma república como forma de governo?", "question_toks": [ "Quantos", "países", "têm", "uma", "república", "como", "forma", "de", "governo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "country", "WHERE", "GovernmentForm", "=", "``", "Republic", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "where", "governmentform", "=", "value" ], "question": "Quantos países têm governos que são repúblicas?", "question_toks": [ "Quantos", "países", "têm", "governos", "que", "são", "repúblicas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", "query_toks": [ "SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Region", "=", "``", "Caribbean", "''" ], "query_toks_no_value": [ "select", "sum", "(", "surfacearea", ")", "from", "country", "where", "region", "=", "value" ], "question": "Qual é a superfície total dos países da região do Caribe?", "question_toks": [ "Qual", "é", "a", "superfície", "total", "dos", "países", "da", "região", "do", "Caribe", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Caribbean\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", "query_toks": [ "SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Region", "=", "``", "Caribbean", "''" ], "query_toks_no_value": [ "select", "sum", "(", "surfacearea", ")", "from", "country", "where", "region", "=", "value" ], "question": "Quanta área de superfície os países do Caribe cobrem juntos?", "question_toks": [ "Quanta", "área", "de", "superfície", "os", "países", "do", "Caribe", "cobrem", "juntos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Caribbean\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "query_toks": [ "SELECT", "Continent", "FROM", "country", "WHERE", "Name", "=", "``", "Anguilla", "''" ], "query_toks_no_value": [ "select", "continent", "from", "country", "where", "name", "=", "value" ], "question": "Em que continente está Anguila?", "question_toks": [ "Em", "que", "continente", "está", "Anguila", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Anguilla\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "query_toks": [ "SELECT", "Continent", "FROM", "country", "WHERE", "Name", "=", "``", "Anguilla", "''" ], "query_toks_no_value": [ "select", "continent", "from", "country", "where", "name", "=", "value" ], "question": "Qual é o nome do continente ao qual Anguila pertence?", "question_toks": [ "Qual", "é", "o", "nome", "do", "continente", "ao", "qual", "Anguila", "pertence", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Anguilla\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "query_toks": [ "SELECT", "Region", "FROM", "country", "AS", "T1", "JOIN", "city", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Name", "=", "``", "Kabul", "''" ], "query_toks_no_value": [ "select", "region", "from", "country", "as", "t1", "join", "city", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "name", "=", "value" ], "question": "Em que região está localizada a cidade Cabul?", "question_toks": [ "Em", "que", "região", "está", "localizada", "a", "cidade", "Cabul", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kabul\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "query_toks": [ "SELECT", "Region", "FROM", "country", "AS", "T1", "JOIN", "city", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Name", "=", "``", "Kabul", "''" ], "query_toks_no_value": [ "select", "region", "from", "country", "as", "t1", "join", "city", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "name", "=", "value" ], "question": "Em que região fica Cabul?", "question_toks": [ "Em", "que", "região", "fica", "Cabul", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kabul\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Aruba", "''", "ORDER", "BY", "Percentage", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value", "order", "by", "percentage", "desc", "limit", "value" ], "question": "Qual idioma é o mais popular em Aruba?", "question_toks": [ "Qual", "idioma", "é", "o", "mais", "popular", "em", "Aruba", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Aruba\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 26, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Aruba", "''", "ORDER", "BY", "Percentage", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value", "order", "by", "percentage", "desc", "limit", "value" ], "question": "Qual idioma é falado predominantemente em Aruba?", "question_toks": [ "Qual", "idioma", "é", "falado", "predominantemente", "em", "Aruba", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Aruba\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 26, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", "query_toks": [ "SELECT", "Population", ",", "LifeExpectancy", "FROM", "country", "WHERE", "Name", "=", "``", "Brazil", "''" ], "query_toks_no_value": [ "select", "population", ",", "lifeexpectancy", "from", "country", "where", "name", "=", "value" ], "question": "Qual é a população e a expectativa de vida no Brasil?", "question_toks": [ "Qual", "é", "a", "população", "e", "a", "expectativa", "de", "vida", "no", "Brasil", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Brazil\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", "query_toks": [ "SELECT", "Population", ",", "LifeExpectancy", "FROM", "country", "WHERE", "Name", "=", "``", "Brazil", "''" ], "query_toks_no_value": [ "select", "population", ",", "lifeexpectancy", "from", "country", "where", "name", "=", "value" ], "question": "Dê-me a população do Brasil e as expectativas de vida.", "question_toks": [ "Dê-me", "a", "população", "do", "Brasil", "e", "as", "expectativas", "de", "vida", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Brazil\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "query_toks": [ "SELECT", "Population", ",", "Region", "FROM", "country", "WHERE", "Name", "=", "``", "Angola", "''" ], "query_toks_no_value": [ "select", "population", ",", "region", "from", "country", "where", "name", "=", "value" ], "question": "Quais são a região e população de Angola?", "question_toks": [ "Quais", "são", "a", "região", "e", "população", "de", "Angola", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Angola\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "query_toks": [ "SELECT", "Population", ",", "Region", "FROM", "country", "WHERE", "Name", "=", "``", "Angola", "''" ], "query_toks_no_value": [ "select", "population", ",", "region", "from", "country", "where", "name", "=", "value" ], "question": "A que região pertence Angola e qual é a sua população?", "question_toks": [ "A", "que", "região", "pertence", "Angola", "e", "qual", "é", "a", "sua", "população", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Angola\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Region", "=", "``", "Central", "Africa", "''" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "region", "=", "value" ], "question": "Qual é a expectativa de vida média para os países da região da África Central?", "question_toks": [ "Qual", "é", "a", "expectativa", "de", "vida", "média", "para", "os", "países", "da", "região", "da", "África", "Central", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Central Africa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Region", "=", "``", "Central", "Africa", "''" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "region", "=", "value" ], "question": "Qual é a expectativa de vida média das pessoas na África Central?", "question_toks": [ "Qual", "é", "a", "expectativa", "de", "vida", "média", "das", "pessoas", "na", "África", "Central", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"Central Africa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "ORDER", "BY", "LifeExpectancy", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "order", "by", "lifeexpectancy", "limit", "value" ], "question": "Qual é o nome do país com a menor expectativa de vida da Ásia?", "question_toks": [ "Qual", "é", "o", "nome", "do", "país", "com", "a", "menor", "expectativa", "de", "vida", "da", "Ásia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 15, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "ORDER", "BY", "LifeExpectancy", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "order", "by", "lifeexpectancy", "limit", "value" ], "question": "Dê o nome do país da Ásia com a menor expectativa de vida.", "question_toks": [ "Dê", "o", "nome", "do", "país", "da", "Ásia", "com", "a", "menor", "expectativa", "de", "vida", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 15, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "max", "(", "GNP", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "max", "(", "gnp", ")", "from", "country", "where", "continent", "=", "value" ], "question": "Qual é a população total e o PIB máximo na Ásia?", "question_toks": [ "Qual", "é", "a", "população", "total", "e", "o", "PIB", "máximo", "na", "Ásia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 1, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "max", "(", "GNP", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "max", "(", "gnp", ")", "from", "country", "where", "continent", "=", "value" ], "question": "Quantas pessoas vivem na Ásia e qual é o maior PIB entre elas?", "question_toks": [ "Quantas", "pessoas", "vivem", "na", "Ásia", "e", "qual", "é", "o", "maior", "PIB", "entre", "elas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 1, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", "AND", "GovernmentForm", "=", "``", "Republic", "''" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "continent", "=", "value", "and", "governmentform", "=", "value" ], "question": "Qual é a expectativa de vida média em países africanos que são repúblicas?", "question_toks": [ "Qual", "é", "a", "expectativa", "de", "vida", "média", "em", "países", "africanos", "que", "são", "repúblicas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ], "and", [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", "AND", "GovernmentForm", "=", "``", "Republic", "''" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "continent", "=", "value", "and", "governmentform", "=", "value" ], "question": "Dê a expectativa de vida média para os países da África que são repúblicas?", "question_toks": [ "Dê", "a", "expectativa", "de", "vida", "média", "para", "os", "países", "da", "África", "que", "são", "repúblicas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ], "and", [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", "query_toks": [ "SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "OR", "Continent", "=", "``", "Europe", "''" ], "query_toks_no_value": [ "select", "sum", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "or", "continent", "=", "value" ], "question": "Qual é a área de superfície total dos continentes Ásia e Europa?", "question_toks": [ "Qual", "é", "a", "área", "de", "superfície", "total", "dos", "continentes", "Ásia", "e", "Europa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ], "or", [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", "query_toks": [ "SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "OR", "Continent", "=", "``", "Europe", "''" ], "query_toks_no_value": [ "select", "sum", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "or", "continent", "=", "value" ], "question": "Forneça a área de superfície total coberta por países da Ásia ou Europa.", "question_toks": [ "Forneça", "a", "área", "de", "superfície", "total", "coberta", "por", "países", "da", "Ásia", "ou", "Europa", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ], "or", [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", "query_toks": [ "SELECT", "sum", "(", "Population", ")", "FROM", "city", "WHERE", "District", "=", "``", "Gelderland", "''" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", "from", "city", "where", "district", "=", "value" ], "question": "Quantas pessoas vivem no distrito de Gelderland?", "question_toks": [ "Quantas", "pessoas", "vivem", "no", "distrito", "de", "Gelderland", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Gelderland\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", "query_toks": [ "SELECT", "sum", "(", "Population", ")", "FROM", "city", "WHERE", "District", "=", "``", "Gelderland", "''" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", "from", "city", "where", "district", "=", "value" ], "question": "Qual é a população total do distrito de Gelderland?", "question_toks": [ "Qual", "é", "a", "população", "total", "do", "distrito", "de", "Gelderland", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Gelderland\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "query_toks": [ "SELECT", "avg", "(", "GNP", ")", ",", "sum", "(", "population", ")", "FROM", "country", "WHERE", "GovernmentForm", "=", "``", "US", "Territory", "''" ], "query_toks_no_value": [ "select", "avg", "(", "gnp", ")", ",", "sum", "(", "population", ")", "from", "country", "where", "governmentform", "=", "value" ], "question": "Qual é o PIB médio e a população total em todas as nações cujo governo é território dos EUA?", "question_toks": [ "Qual", "é", "o", "PIB", "médio", "e", "a", "população", "total", "em", "todas", "as", "nações", "cujo", "governo", "é", "território", "dos", "EUA", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 16, false ], null ] ], [ 4, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"US Territory\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "query_toks": [ "SELECT", "avg", "(", "GNP", ")", ",", "sum", "(", "population", ")", "FROM", "country", "WHERE", "GovernmentForm", "=", "``", "US", "Territory", "''" ], "query_toks_no_value": [ "select", "avg", "(", "gnp", ")", ",", "sum", "(", "population", ")", "from", "country", "where", "governmentform", "=", "value" ], "question": "Forneça o PIB médio e a população total das nações consideradas território dos EUA.", "question_toks": [ "Forneça", "o", "PIB", "médio", "e", "a", "população", "total", "das", "nações", "consideradas", "território", "dos", "EUA", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 16, false ], null ] ], [ 4, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"US Territory\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "LANGUAGE", ")", "FROM", "countrylanguage" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "language", ")", "from", "countrylanguage" ], "question": "Quantas línguas únicas são faladas no mundo?", "question_toks": [ "Quantas", "línguas", "únicas", "são", "faladas", "no", "mundo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "LANGUAGE", ")", "FROM", "countrylanguage" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "language", ")", "from", "countrylanguage" ], "question": "Qual é o número de idiomas distintos usados em todo o mundo?", "question_toks": [ "Qual", "é", "o", "número", "de", "idiomas", "distintos", "usados", "em", "todo", "o", "mundo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "GovernmentForm", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "governmentform", ")", "from", "country", "where", "continent", "=", "value" ], "question": "Quantos tipos de governo existem na África?", "question_toks": [ "Quantos", "tipos", "de", "governo", "existem", "na", "África", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 19, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "GovernmentForm", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "governmentform", ")", "from", "country", "where", "continent", "=", "value" ], "question": "Quantas formas diferentes de governo existem na África?", "question_toks": [ "Quantas", "formas", "diferentes", "de", "governo", "existem", "na", "África", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 19, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", "query_toks": [ "SELECT", "COUNT", "(", "T2.Language", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Aruba", "''" ], "query_toks_no_value": [ "select", "count", "(", "t2", ".", "language", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value" ], "question": "Qual é o número total de idiomas usados em Aruba?", "question_toks": [ "Qual", "é", "o", "número", "total", "de", "idiomas", "usados", "em", "Aruba", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Aruba\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", "query_toks": [ "SELECT", "COUNT", "(", "T2.Language", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Aruba", "''" ], "query_toks_no_value": [ "select", "count", "(", "t2", ".", "language", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value" ], "question": "Quantos idiomas são falados em Aruba?", "question_toks": [ "Quantos", "idiomas", "são", "falados", "em", "Aruba", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Aruba\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Afghanistan", "''", "AND", "IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value", "and", "isofficial", "=", "value" ], "question": "Quantas línguas oficiais o Afeganistão tem?", "question_toks": [ "Quantas", "línguas", "oficiais", "o", "Afeganistão", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Afghanistan\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Name", "=", "``", "Afghanistan", "''", "AND", "IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "name", "=", "value", "and", "isofficial", "=", "value" ], "question": "Quantas línguas oficiais são faladas no Afeganistão?", "question_toks": [ "Quantas", "línguas", "oficiais", "são", "faladas", "no", "Afeganistão", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"Afghanistan\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Name", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome do país que fala o maior número de línguas?", "question_toks": [ "Qual", "é", "o", "nome", "do", "país", "que", "fala", "o", "maior", "número", "de", "línguas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Name", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Dê o nome da nação que usa a maior quantidade de línguas.", "question_toks": [ "Dê", "o", "nome", "da", "nação", "que", "usa", "a", "maior", "quantidade", "de", "línguas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Continent", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Continent", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "continent", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "continent", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual continente tem as mais diversas línguas?", "question_toks": [ "Qual", "continente", "tem", "as", "mais", "diversas", "línguas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Continent", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Continent", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "continent", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "continent", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual continente fala mais línguas?", "question_toks": [ "Qual", "continente", "fala", "mais", "línguas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Dutch", "''", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", ")" ], "question": "Quantos países falam inglês e holandês?", "question_toks": [ "Quantos", "países", "falam", "inglês", "e", "holandês", "?" ], "sql": { "from": { "table_units": [ [ "sql", { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Dutch", "''", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", ")" ], "question": "Qual é o número de nações que usam o inglês e o holandês?", "question_toks": [ "Qual", "é", "o", "número", "de", "nações", "que", "usam", "o", "inglês", "e", "o", "holandês", "?" ], "sql": { "from": { "table_units": [ [ "sql", { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "French", "''" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value" ], "question": "Quais são os nomes das nações que falam inglês e francês?", "question_toks": [ "Quais", "são", "os", "nomes", "das", "nações", "que", "falam", "inglês", "e", "francês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"French\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "French", "''" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value" ], "question": "Dê os nomes de nações que falam inglês e francês.", "question_toks": [ "Dê", "os", "nomes", "de", "nações", "que", "falam", "inglês", "e", "francês", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"French\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "French", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "Quais são os nomes das nações onde o inglês e o francês são línguas oficiais?", "question_toks": [ "Quais", "são", "os", "nomes", "das", "nações", "onde", "o", "inglês", "e", "o", "francês", "são", "línguas", "oficiais", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"French\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''", "INTERSECT", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "French", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value", "intersect", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "Dê nomes de países com inglês e francês como línguas oficiais.", "question_toks": [ "Dê", "nomes", "de", "países", "com", "inglês", "e", "francês", "como", "línguas", "oficiais", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"French\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "query_toks": [ "SELECT", "COUNT", "(", "DISTINCT", "Continent", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Chinese", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "continent", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value" ], "question": "Qual é o número de continentes distintos onde o chinês é falado?", "question_toks": [ "Qual", "é", "o", "número", "de", "continentes", "distintos", "onde", "o", "chinês", "é", "falado", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 10, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Chinese\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "query_toks": [ "SELECT", "COUNT", "(", "DISTINCT", "Continent", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Chinese", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "continent", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value" ], "question": "Quantos continentes falam chinês?", "question_toks": [ "Quantos", "continentes", "falam", "chinês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 10, true ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Chinese\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "query_toks": [ "SELECT", "DISTINCT", "T1.Region", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "OR", "T2.Language", "=", "``", "Dutch", "''" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "region", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "or", "t2", ".", "language", "=", "value" ], "question": "Quais são as regiões que usam inglês ou holandês?", "question_toks": [ "Quais", "são", "as", "regiões", "que", "usam", "inglês", "ou", "holandês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "or", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "query_toks": [ "SELECT", "DISTINCT", "T1.Region", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "OR", "T2.Language", "=", "``", "Dutch", "''" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "region", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "or", "t2", ".", "language", "=", "value" ], "question": "Quais regiões falam holandês ou inglês?", "question_toks": [ "Quais", "regiões", "falam", "holandês", "ou", "inglês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "or", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = \"english\" and isofficial = \"t\" union select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = \"dutch\" and isofficial = \"t\"", "query_toks": [ "select", "t1.name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1.code", "=", "t2.countrycode", "where", "t2.language", "=", "\"english\"", "and", "isofficial", "=", "\"t\"", "union", "select", "t1.name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1.code", "=", "t2.countrycode", "where", "t2.language", "=", "\"dutch\"", "and", "isofficial", "=", "\"t\"" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "isofficial", "=", "value", "union", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "isofficial", "=", "value" ], "question": "Quais são os países onde o inglês ou o holandês é o idioma oficial?", "question_toks": [ "Quais", "são", "os", "países", "onde", "o", "inglês", "ou", "o", "holandês", "é", "o", "idioma", "oficial", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"english\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"t\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"dutch\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"t\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "world_1", "query": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND IsOfficial = \"T\" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\" AND IsOfficial = \"T\"", "query_toks": [ "SELECT", "*", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "IsOfficial", "=", "``", "T", "''", "UNION", "SELECT", "*", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "Dutch", "''", "AND", "IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "*", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "isofficial", "=", "value", "union", "select", "*", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "isofficial", "=", "value" ], "question": "Quais países têm o inglês ou o holandês como idioma oficial?", "question_toks": [ "Quais", "países", "têm", "o", "inglês", "ou", "o", "holandês", "como", "idioma", "oficial", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Dutch\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Continent", "=", "``", "Asia", "''", "GROUP", "BY", "T2.Language", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "continent", "=", "value", "group", "by", "t2", ".", "language", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual idioma é o mais popular no continente asiático?", "question_toks": [ "Qual", "idioma", "é", "o", "mais", "popular", "no", "continente", "asiático", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [ [ 0, 24, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.Continent", "=", "``", "Asia", "''", "GROUP", "BY", "T2.Language", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "continent", "=", "value", "group", "by", "t2", ".", "language", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o idioma usado pelo maior número de nações asiáticas?", "question_toks": [ "Qual", "é", "o", "idioma", "usado", "pelo", "maior", "número", "de", "nações", "asiáticas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [ [ 0, 24, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = \"Republic\" GROUP BY T2.Language HAVING COUNT(*) = 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.GovernmentForm", "=", "``", "Republic", "''", "GROUP", "BY", "T2.Language", "HAVING", "COUNT", "(", "*", ")", "=", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "governmentform", "=", "value", "group", "by", "t2", ".", "language", "having", "count", "(", "*", ")", "=", "value" ], "question": "Quais línguas são faladas por apenas um país nos governos da república?", "question_toks": [ "Quais", "línguas", "são", "faladas", "por", "apenas", "um", "país", "nos", "governos", "da", "república", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [ [ 0, 24, false ] ], "having": [ [ false, 2, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = \"Republic\" GROUP BY T2.Language HAVING COUNT(*) = 1", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.GovernmentForm", "=", "``", "Republic", "''", "GROUP", "BY", "T2.Language", "HAVING", "COUNT", "(", "*", ")", "=", "1" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "governmentform", "=", "value", "group", "by", "t2", ".", "language", "having", "count", "(", "*", ")", "=", "value" ], "question": "Quais línguas são usadas apenas por um único país com um governo republicano?", "question_toks": [ "Quais", "línguas", "são", "usadas", "apenas", "por", "um", "único", "país", "com", "um", "governo", "republicano", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [ [ 0, 24, false ] ], "having": [ [ false, 2, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", ",", "T1.Population", "FROM", "city", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.CountryCode", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "ORDER", "BY", "T1.Population", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t1", ".", "population", "from", "city", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "countrycode", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "order", "by", "t1", ".", "population", "desc", "limit", "value" ], "question": "Encontre a cidade com a maior população que usa o inglês.", "question_toks": [ "Encontre", "a", "cidade", "com", "a", "maior", "população", "que", "usa", "o", "inglês", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", ",", "T1.Population", "FROM", "city", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.CountryCode", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "ORDER", "BY", "T1.Population", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t1", ".", "population", "from", "city", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "countrycode", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "order", "by", "t1", ".", "population", "desc", "limit", "value" ], "question": "Qual é a cidade mais populosa que fala inglês?", "question_toks": [ "Qual", "é", "a", "cidade", "mais", "populosa", "que", "fala", "inglês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "Population", ",", "LifeExpectancy", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "population", ",", "lifeexpectancy", "from", "country", "where", "continent", "=", "value", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "Encontre o nome, a população e a expectativa de vida do país asiático com a maior área?", "question_toks": [ "Encontre", "o", "nome", ",", "a", "população", "e", "a", "expectativa", "de", "vida", "do", "país", "asiático", "com", "a", "maior", "área", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "Population", ",", "LifeExpectancy", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "population", ",", "lifeexpectancy", "from", "country", "where", "continent", "=", "value", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "Qual é o nome, população e expectativa de vida do maior país asiático por terra?", "question_toks": [ "Qual", "é", "o", "nome", ",", "população", "e", "expectativa", "de", "vida", "do", "maior", "país", "asiático", "por", "terra", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Name", "NOT", "IN", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''", ")" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "name", "not", "in", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value", ")" ], "question": "Qual é a expectativa de vida média nos países onde o inglês não é a língua oficial?", "question_toks": [ "Qual", "é", "a", "expectativa", "de", "vida", "média", "nos", "países", "onde", "o", "inglês", "não", "é", "a", "língua", "oficial", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "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": "world_1", "query": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")", "query_toks": [ "SELECT", "avg", "(", "LifeExpectancy", ")", "FROM", "country", "WHERE", "Name", "NOT", "IN", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''", ")" ], "query_toks_no_value": [ "select", "avg", "(", "lifeexpectancy", ")", "from", "country", "where", "name", "not", "in", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", "and", "t2", ".", "isofficial", "=", "value", ")" ], "question": "Forneça a expectativa de vida média de países nos quais o inglês não é a língua oficial.", "question_toks": [ "Forneça", "a", "expectativa", "de", "vida", "média", "de", "países", "nos", "quais", "o", "inglês", "não", "é", "a", "língua", "oficial", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "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": "world_1", "query": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "query_toks": [ "SELECT", "sum", "(", "Population", ")", "FROM", "country", "WHERE", "Name", "NOT", "IN", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", ")" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", "from", "country", "where", "name", "not", "in", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", ")" ], "question": "Qual é o número total de pessoas que vivem em nações que não usam o inglês?", "question_toks": [ "Qual", "é", "o", "número", "total", "de", "pessoas", "que", "vivem", "em", "nações", "que", "não", "usam", "o", "inglês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "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": "world_1", "query": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "query_toks": [ "SELECT", "sum", "(", "Population", ")", "FROM", "country", "WHERE", "Name", "NOT", "IN", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", ")" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", "from", "country", "where", "name", "not", "in", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", ")" ], "question": "Quantas pessoas vivem em países que não falam inglês?", "question_toks": [ "Quantas", "pessoas", "vivem", "em", "países", "que", "não", "falam", "inglês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "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": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.HeadOfState", "=", "``", "Beatrix", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "headofstate", "=", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "Qual é a língua oficial falada no país cujo chefe de estado é Beatrix?", "question_toks": [ "Qual", "é", "a", "língua", "oficial", "falada", "no", "país", "cujo", "chefe", "de", "estado", "é", "Beatrix", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Beatrix\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "T2.Language", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T1.HeadOfState", "=", "``", "Beatrix", "''", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "t2", ".", "language", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t1", ".", "headofstate", "=", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "Qual é a língua oficial do país cujo chefe de estado é Beatrix.", "question_toks": [ "Qual", "é", "a", "língua", "oficial", "do", "país", "cujo", "chefe", "de", "estado", "é", "Beatrix", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 20, false ], null ], "\"Beatrix\"", null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "T2.Language", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "IndepYear", "<", "1930", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "t2", ".", "language", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "indepyear", "<", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "Qual é o número total de línguas oficiais exclusivas faladas nos países fundados antes de 1930?", "question_toks": [ "Qual", "é", "o", "número", "total", "de", "línguas", "oficiais", "exclusivas", "faladas", "nos", "países", "fundados", "antes", "de", "1930", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, true ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 13, false ], null ], 1930.0, null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "T2.Language", ")", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "IndepYear", "<", "1930", "AND", "T2.IsOfficial", "=", "``", "T", "''" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "t2", ".", "language", ")", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "indepyear", "<", "value", "and", "t2", ".", "isofficial", "=", "value" ], "question": "Para os países fundados antes de 1930, qual é o número total de línguas oficiais distintas?", "question_toks": [ "Para", "os", "países", "fundados", "antes", "de", "1930", ",", "qual", "é", "o", "número", "total", "de", "línguas", "oficiais", "distintas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, true ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 13, false ], null ], 1930.0, null ], "and", [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "SurfaceArea", ">", "(", "SELECT", "min", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Europe", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "surfacearea", ">", "(", "select", "min", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "Quais são os países com maior superfície do que qualquer país da Europa?", "question_toks": [ "Quais", "são", "os", "países", "com", "maior", "superfície", "do", "que", "qualquer", "país", "da", "Europa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 12, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "SurfaceArea", ">", "(", "SELECT", "min", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Europe", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "surfacearea", ">", "(", "select", "min", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "Quais países têm maior área do que qualquer país da Europa?", "question_toks": [ "Quais", "países", "têm", "maior", "área", "do", "que", "qualquer", "país", "da", "Europa", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 12, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT max(population) FROM country WHERE Continent = \"Asia\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", "AND", "population", "<", "(", "SELECT", "max", "(", "population", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", "<", "(", "select", "max", "(", "population", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "Quais são os países africanos que têm menos população do que qualquer país da Ásia?", "question_toks": [ "Quais", "são", "os", "países", "africanos", "que", "têm", "menos", "população", "do", "que", "qualquer", "país", "da", "Ásia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ], "and", [ false, 4, [ 0, [ 0, 14, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT min(population) FROM country WHERE Continent = \"Asia\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", "AND", "population", "<", "(", "SELECT", "min", "(", "population", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", "<", "(", "select", "min", "(", "population", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "Quais países africanos têm uma população menor do que qualquer país da Ásia?", "question_toks": [ "Quais", "países", "africanos", "têm", "uma", "população", "menor", "do", "que", "qualquer", "país", "da", "Ásia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ], "and", [ false, 4, [ 0, [ 0, 14, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT max(population) FROM country WHERE Continent = \"Africa\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "AND", "population", ">", "(", "SELECT", "max", "(", "population", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", ">", "(", "select", "max", "(", "population", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "Quais países asiáticos têm uma população maior do que qualquer país da África?", "question_toks": [ "Quais", "países", "asiáticos", "têm", "uma", "população", "maior", "do", "que", "qualquer", "país", "da", "África", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ], "and", [ false, 3, [ 0, [ 0, 14, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ] ], "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": "world_1", "query": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT min(population) FROM country WHERE Continent = \"Africa\")", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "AND", "population", ">", "(", "SELECT", "min", "(", "population", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Africa", "''", ")" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", ">", "(", "select", "min", "(", "population", ")", "from", "country", "where", "continent", "=", "value", ")" ], "question": "Quais são os países asiáticos que têm uma população maior que a de qualquer país da África?", "question_toks": [ "Quais", "são", "os", "países", "asiáticos", "que", "têm", "uma", "população", "maior", "que", "a", "de", "qualquer", "país", "da", "África", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ], "and", [ false, 3, [ 0, [ 0, 14, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 14, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Africa\"", null ] ], "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": "world_1", "query": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "query_toks": [ "SELECT", "CountryCode", "FROM", "countrylanguage", "EXCEPT", "SELECT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "countrycode", "from", "countrylanguage", "except", "select", "countrycode", "from", "countrylanguage", "where", "language", "=", "value" ], "question": "Quais são os códigos de país para países que não falam inglês?", "question_toks": [ "Quais", "são", "os", "códigos", "de", "país", "para", "países", "que", "não", "falam", "inglês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "world_1", "query": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "query_toks": [ "SELECT", "CountryCode", "FROM", "countrylanguage", "EXCEPT", "SELECT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "countrycode", "from", "countrylanguage", "except", "select", "countrycode", "from", "countrylanguage", "where", "language", "=", "value" ], "question": "Retorne os códigos de país para países que não falam inglês.", "question_toks": [ "Retorne", "os", "códigos", "de", "país", "para", "países", "que", "não", "falam", "inglês", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "world_1", "query": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"", "query_toks": [ "SELECT", "DISTINCT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "!", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "distinct", "countrycode", "from", "countrylanguage", "where", "language", "!", "=", "value" ], "question": "Quais são os códigos dos países onde as pessoas usam outros idiomas além do inglês?", "question_toks": [ "Quais", "são", "os", "códigos", "dos", "países", "onde", "as", "pessoas", "usam", "outros", "idiomas", "além", "do", "inglês", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"", "query_toks": [ "SELECT", "DISTINCT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "!", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "distinct", "countrycode", "from", "countrylanguage", "where", "language", "!", "=", "value" ], "question": "Forneça os códigos dos países nos quais as pessoas falam línguas que não o inglês.", "question_toks": [ "Forneça", "os", "códigos", "dos", "países", "nos", "quais", "as", "pessoas", "falam", "línguas", "que", "não", "o", "inglês", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "query_toks": [ "SELECT", "Code", "FROM", "country", "WHERE", "GovernmentForm", "!", "=", "``", "Republic", "''", "EXCEPT", "SELECT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "code", "from", "country", "where", "governmentform", "!", "=", "value", "except", "select", "countrycode", "from", "countrylanguage", "where", "language", "=", "value" ], "question": "Quais são os códigos dos países que não falam inglês e cujas formas de governo não são República?", "question_toks": [ "Quais", "são", "os", "códigos", "dos", "países", "que", "não", "falam", "inglês", "e", "cujas", "formas", "de", "governo", "não", "são", "República", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "world_1", "query": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "query_toks": [ "SELECT", "Code", "FROM", "country", "WHERE", "GovernmentForm", "!", "=", "``", "Republic", "''", "EXCEPT", "SELECT", "CountryCode", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "English", "''" ], "query_toks_no_value": [ "select", "code", "from", "country", "where", "governmentform", "!", "=", "value", "except", "select", "countrycode", "from", "countrylanguage", "where", "language", "=", "value" ], "question": "Retorne os códigos de países que não falam inglês e não têm repúblicas para governos.", "question_toks": [ "Retorne", "os", "códigos", "de", "países", "que", "não", "falam", "inglês", "e", "não", "têm", "repúblicas", "para", "governos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 19, false ], null ], "\"Republic\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "world_1", "query": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "query_toks": [ "SELECT", "DISTINCT", "T2.Name", "FROM", "country", "AS", "T1", "JOIN", "city", "AS", "T2", "ON", "T2.CountryCode", "=", "T1.Code", "WHERE", "T1.Continent", "=", "'Europe", "'", "AND", "T1.Name", "NOT", "IN", "(", "SELECT", "T3.Name", "FROM", "country", "AS", "T3", "JOIN", "countrylanguage", "AS", "T4", "ON", "T3.Code", "=", "T4.CountryCode", "WHERE", "T4.IsOfficial", "=", "'T", "'", "AND", "T4.Language", "=", "'English", "'", ")" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "name", "from", "country", "as", "t1", "join", "city", "as", "t2", "on", "t2", ".", "countrycode", "=", "t1", ".", "code", "where", "t1", ".", "continent", "=", "value", "and", "t1", ".", "name", "not", "in", "(", "select", "t3", ".", "name", "from", "country", "as", "t3", "join", "countrylanguage", "as", "t4", "on", "t3", ".", "code", "=", "t4", ".", "countrycode", "where", "t4", ".", "isofficial", "=", "value", "and", "t4", ".", "language", "=", "value", ")" ], "question": "Quais cidades estão em países europeus onde o inglês não é o idioma oficial?", "question_toks": [ "Quais", "cidades", "estão", "em", "países", "europeus", "onde", "o", "inglês", "não", "é", "o", "idioma", "oficial", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ], "and", [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ], "and", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "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": "world_1", "query": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "query_toks": [ "SELECT", "DISTINCT", "T2.Name", "FROM", "country", "AS", "T1", "JOIN", "city", "AS", "T2", "ON", "T2.CountryCode", "=", "T1.Code", "WHERE", "T1.Continent", "=", "'Europe", "'", "AND", "T1.Name", "NOT", "IN", "(", "SELECT", "T3.Name", "FROM", "country", "AS", "T3", "JOIN", "countrylanguage", "AS", "T4", "ON", "T3.Code", "=", "T4.CountryCode", "WHERE", "T4.IsOfficial", "=", "'T", "'", "AND", "T4.Language", "=", "'English", "'", ")" ], "query_toks_no_value": [ "select", "distinct", "t2", ".", "name", "from", "country", "as", "t1", "join", "city", "as", "t2", "on", "t2", ".", "countrycode", "=", "t1", ".", "code", "where", "t1", ".", "continent", "=", "value", "and", "t1", ".", "name", "not", "in", "(", "select", "t3", ".", "name", "from", "country", "as", "t3", "join", "countrylanguage", "as", "t4", "on", "t3", ".", "code", "=", "t4", ".", "countrycode", "where", "t4", ".", "isofficial", "=", "value", "and", "t4", ".", "language", "=", "value", ")" ], "question": "Quais são os nomes das cidades na Europa em que o inglês não é a língua oficial?", "question_toks": [ "Quais", "são", "os", "nomes", "das", "cidades", "na", "Europa", "em", "que", "o", "inglês", "não", "é", "a", "língua", "oficial", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ], "and", [ true, 8, [ 0, [ 0, 9, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ], "and", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"English\"", null ] ], "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": "world_1", "query": "select distinct t3.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode join city as t3 on t1.code = t3.countrycode where t2.isofficial = 't' and t2.language = 'chinese' and t1.continent = \"asia\"", "query_toks": [ "select", "distinct", "t3.name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1.code", "=", "t2.countrycode", "join", "city", "as", "t3", "on", "t1.code", "=", "t3.countrycode", "where", "t2.isofficial", "=", "\"t\"", "and", "t2.language", "=", "\"chinese\"", "and", "t1.continent", "=", "\"asia\"" ], "query_toks_no_value": [ "select", "distinct", "t3", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "join", "city", "as", "t3", "on", "t1", ".", "code", "=", "t3", ".", "countrycode", "where", "t2", ".", "isofficial", "=", "value", "and", "t2", ".", "language", "=", "value", "and", "t1", ".", "continent", "=", "value" ], "question": "Quais cidades exclusivas estão em países asiáticos onde o chinês é o idioma oficial?", "question_toks": [ "Quais", "cidades", "exclusivas", "estão", "em", "países", "asiáticos", "onde", "o", "chinês", "é", "o", "idioma", "oficial", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ], "and", [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"t\"", null ], "and", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"chinese\"", null ], "and", [ false, 2, [ 0, [ 0, 10, false ], null ], "\"asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", "query_toks": [ "SELECT", "DISTINCT", "T3.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "JOIN", "city", "AS", "T3", "ON", "T1.Code", "=", "T3.CountryCode", "WHERE", "T2.IsOfficial", "=", "'T", "'", "AND", "T2.Language", "=", "'Chinese", "'", "AND", "T1.Continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "distinct", "t3", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "join", "city", "as", "t3", "on", "t1", ".", "code", "=", "t3", ".", "countrycode", "where", "t2", ".", "isofficial", "=", "value", "and", "t2", ".", "language", "=", "value", "and", "t1", ".", "continent", "=", "value" ], "question": "Retorne os diferentes nomes de cidades que estão na Ásia e para as quais o chinês é o idioma oficial.", "question_toks": [ "Retorne", "os", "diferentes", "nomes", "de", "cidades", "que", "estão", "na", "Ásia", "e", "para", "as", "quais", "o", "chinês", "é", "o", "idioma", "oficial", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ], "and", [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 25, false ], null ], "\"T\"", null ], "and", [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Chinese\"", null ], "and", [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "SurfaceArea", ",", "IndepYear", "FROM", "country", "ORDER", "BY", "Population", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "surfacearea", ",", "indepyear", "from", "country", "order", "by", "population", "limit", "value" ], "question": "Qual é o nome, ano de independência e área de superfície do país com a menor população?", "question_toks": [ "Qual", "é", "o", "nome", ",", "ano", "de", "independência", "e", "área", "de", "superfície", "do", "país", "com", "a", "menor", "população", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "SurfaceArea", ",", "IndepYear", "FROM", "country", "ORDER", "BY", "Population", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "surfacearea", ",", "indepyear", "from", "country", "order", "by", "population", "limit", "value" ], "question": "Forneça o nome, o ano da independência e a área do país com a população mais baixa.", "question_toks": [ "Forneça", "o", "nome", ",", "o", "ano", "da", "independência", "e", "a", "área", "do", "país", "com", "a", "população", "mais", "baixa", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "population", ",", "HeadOfState", "FROM", "country", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "population", ",", "headofstate", "from", "country", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "Qual é a população, nome e líder do país com a maior área?", "question_toks": [ "Qual", "é", "a", "população", ",", "nome", "e", "líder", "do", "país", "com", "a", "maior", "área", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "query_toks": [ "SELECT", "Name", ",", "population", ",", "HeadOfState", "FROM", "country", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", ",", "population", ",", "headofstate", "from", "country", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "Forneça o nome, a população e o chefe de estado do país que possui a maior área.", "question_toks": [ "Forneça", "o", "nome", ",", "a", "população", "e", "o", "chefe", "de", "estado", "do", "país", "que", "possui", "a", "maior", "área", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 20, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2", "query_toks": [ "SELECT", "COUNT", "(", "T2.Language", ")", ",", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Name", "HAVING", "COUNT", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "count", "(", "t2", ".", "language", ")", ",", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "name", "having", "count", "(", "*", ")", ">", "value" ], "question": "Retorne o nome do país e o número de idiomas falados para cada país que fala pelo menos 3 idiomas.", "question_toks": [ "Retorne", "o", "nome", "do", "país", "e", "o", "número", "de", "idiomas", "falados", "para", "cada", "país", "que", "fala", "pelo", "menos", "3", "idiomas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2", "query_toks": [ "SELECT", "COUNT", "(", "T2.Language", ")", ",", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "GROUP", "BY", "T1.Name", "HAVING", "COUNT", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "count", "(", "t2", ".", "language", ")", ",", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "group", "by", "t1", ".", "name", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são os nomes dos países que falam mais de 2 idiomas, bem como quantos idiomas falam?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "países", "que", "falam", "mais", "de", "2", "idiomas", ",", "bem", "como", "quantos", "idiomas", "falam", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "District", "FROM", "city", "WHERE", "Population", ">", "(", "SELECT", "avg", "(", "Population", ")", "FROM", "city", ")", "GROUP", "BY", "District" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "district", "from", "city", "where", "population", ">", "(", "select", "avg", "(", "population", ")", "from", "city", ")", "group", "by", "district" ], "question": "Encontre o número de cidades em cada distrito cuja população é maior do que a população média das cidades?", "question_toks": [ "Encontre", "o", "número", "de", "cidades", "em", "cada", "distrito", "cuja", "população", "é", "maior", "do", "que", "a", "população", "média", "das", "cidades", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "District", "FROM", "city", "WHERE", "Population", ">", "(", "SELECT", "avg", "(", "Population", ")", "FROM", "city", ")", "GROUP", "BY", "District" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "district", "from", "city", "where", "population", ">", "(", "select", "avg", "(", "population", ")", "from", "city", ")", "group", "by", "district" ], "question": "Quantas cidades em cada distrito têm uma população acima da média da população em todas as cidades?", "question_toks": [ "Quantas", "cidades", "em", "cada", "distrito", "têm", "uma", "população", "acima", "da", "média", "da", "população", "em", "todas", "as", "cidades", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "GovernmentForm", "FROM", "country", "GROUP", "BY", "GovernmentForm", "HAVING", "avg", "(", "LifeExpectancy", ")", ">", "72" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "governmentform", "from", "country", "group", "by", "governmentform", "having", "avg", "(", "lifeexpectancy", ")", ">", "value" ], "question": "Encontre o nome do formulário de governo e a população total para cada formulário de governo cuja expectativa média de vida seja superior a 72.", "question_toks": [ "Encontre", "o", "nome", "do", "formulário", "de", "governo", "e", "a", "população", "total", "para", "cada", "formulário", "de", "governo", "cuja", "expectativa", "média", "de", "vida", "seja", "superior", "a", "72", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [ [ false, 3, [ 0, [ 5, 15, false ], null ], 72.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "GovernmentForm", "FROM", "country", "GROUP", "BY", "GovernmentForm", "HAVING", "avg", "(", "LifeExpectancy", ")", ">", "72" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "governmentform", "from", "country", "group", "by", "governmentform", "having", "avg", "(", "lifeexpectancy", ")", ">", "value" ], "question": "Quais são as diferentes formas de governo e qual é a população total de cada para formas de governo que têm uma expectativa de vida média superior a 72?", "question_toks": [ "Quais", "são", "as", "diferentes", "formas", "de", "governo", "e", "qual", "é", "a", "população", "total", "de", "cada", "para", "formas", "de", "governo", "que", "têm", "uma", "expectativa", "de", "vida", "média", "superior", "a", "72", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 0, [ 0, [ 0, 19, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 19, false ] ], "having": [ [ false, 3, [ 0, [ 5, 15, false ], null ], 72.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "avg", "(", "LifeExpectancy", ")", ",", "Continent", "FROM", "country", "GROUP", "BY", "Continent", "HAVING", "avg", "(", "LifeExpectancy", ")", "<", "72" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "lifeexpectancy", ")", ",", "continent", "from", "country", "group", "by", "continent", "having", "avg", "(", "lifeexpectancy", ")", "<", "value" ], "question": "Encontre a esperança média de vida e a população total para cada continente onde a esperança média de vida é inferior a 72?", "question_toks": [ "Encontre", "a", "esperança", "média", "de", "vida", "e", "a", "população", "total", "para", "cada", "continente", "onde", "a", "esperança", "média", "de", "vida", "é", "inferior", "a", "72", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 5, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 4, [ 0, [ 5, 15, false ], null ], 72.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", "query_toks": [ "SELECT", "sum", "(", "Population", ")", ",", "avg", "(", "LifeExpectancy", ")", ",", "Continent", "FROM", "country", "GROUP", "BY", "Continent", "HAVING", "avg", "(", "LifeExpectancy", ")", "<", "72" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "lifeexpectancy", ")", ",", "continent", "from", "country", "group", "by", "continent", "having", "avg", "(", "lifeexpectancy", ")", "<", "value" ], "question": "Quais são os diferentes continentes e a população total e a esperança média de vida correspondente a cada um, para continentes que têm uma esperança média de vida inferior a 72?", "question_toks": [ "Quais", "são", "os", "diferentes", "continentes", "e", "a", "população", "total", "e", "a", "esperança", "média", "de", "vida", "correspondente", "a", "cada", "um", ",", "para", "continentes", "que", "têm", "uma", "esperança", "média", "de", "vida", "inferior", "a", "72", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 5, [ 0, [ 0, 15, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [ [ false, 4, [ 0, [ 5, 15, false ], null ], 72.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", "query_toks": [ "SELECT", "Name", ",", "SurfaceArea", "FROM", "country", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "5" ], "query_toks_no_value": [ "select", "name", ",", "surfacearea", "from", "country", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "Quais são os nomes e áreas dos países com as 5 maiores áreas?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "áreas", "dos", "países", "com", "as", "5", "maiores", "áreas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 5, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", "query_toks": [ "SELECT", "Name", ",", "SurfaceArea", "FROM", "country", "ORDER", "BY", "SurfaceArea", "DESC", "LIMIT", "5" ], "query_toks_no_value": [ "select", "name", ",", "surfacearea", "from", "country", "order", "by", "surfacearea", "desc", "limit", "value" ], "question": "Retorne os nomes e áreas de superfície dos 5 maiores países.", "question_toks": [ "Retorne", "os", "nomes", "e", "áreas", "de", "superfície", "dos", "5", "maiores", "países", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 12, false ], null ] ] ], "limit": 5, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", "query_toks": [ "SELECT", "Name", "FROM", "country", "ORDER", "BY", "Population", "DESC", "LIMIT", "3" ], "query_toks_no_value": [ "select", "name", "from", "country", "order", "by", "population", "desc", "limit", "value" ], "question": "Quais são os nomes dos países com as 3 maiores populações?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "países", "com", "as", "3", "maiores", "populações", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", "query_toks": [ "SELECT", "Name", "FROM", "country", "ORDER", "BY", "Population", "DESC", "LIMIT", "3" ], "query_toks_no_value": [ "select", "name", "from", "country", "order", "by", "population", "desc", "limit", "value" ], "question": "Retorne os nomes dos 3 países mais populosos.", "question_toks": [ "Retorne", "os", "nomes", "dos", "3", "países", "mais", "populosos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", "query_toks": [ "SELECT", "Name", "FROM", "country", "ORDER", "BY", "Population", "ASC", "LIMIT", "3" ], "query_toks_no_value": [ "select", "name", "from", "country", "order", "by", "population", "asc", "limit", "value" ], "question": "Quais são os nomes das nações com as 3 populações mais baixas?", "question_toks": [ "Quais", "são", "os", "nomes", "das", "nações", "com", "as", "3", "populações", "mais", "baixas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", "query_toks": [ "SELECT", "Name", "FROM", "country", "ORDER", "BY", "Population", "ASC", "LIMIT", "3" ], "query_toks_no_value": [ "select", "name", "from", "country", "order", "by", "population", "asc", "limit", "value" ], "question": "Retorne os nomes dos 3 países com menos pessoas.", "question_toks": [ "Retorne", "os", "nomes", "dos", "3", "países", "com", "menos", "pessoas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 14, false ], null ] ] ], "limit": 3, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) FROM country WHERE continent = \"Asia\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "country", "WHERE", "continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "where", "continent", "=", "value" ], "question": "quantos países existem na ásia?", "question_toks": [ "quantos", "países", "existem", "na", "ásia", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) FROM country WHERE continent = \"Asia\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "country", "WHERE", "continent", "=", "``", "Asia", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "country", "where", "continent", "=", "value" ], "question": "Conte o número de países da Ásia.", "question_toks": [ "Conte", "o", "número", "de", "países", "da", "Ásia", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Asia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "continent", "=", "``", "Europe", "''", "AND", "Population", "=", "``", "80000", "''" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", "=", "value" ], "question": "Quais são os nomes dos países que estão no continente europeu e têm uma população de 80.000?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "países", "que", "estão", "no", "continente", "europeu", "e", "têm", "uma", "população", "de", "80.000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ], "and", [ false, 2, [ 0, [ 0, 14, false ], null ], "\"80000\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "query_toks": [ "SELECT", "Name", "FROM", "country", "WHERE", "continent", "=", "``", "Europe", "''", "AND", "Population", "=", "``", "80000", "''" ], "query_toks_no_value": [ "select", "name", "from", "country", "where", "continent", "=", "value", "and", "population", "=", "value" ], "question": "Dê os nomes dos países que estão na Europa e têm uma população igual a 80.000.", "question_toks": [ "Dê", "os", "nomes", "dos", "países", "que", "estão", "na", "Europa", "e", "têm", "uma", "população", "igual", "a", "80.000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Europe\"", null ], "and", [ false, 2, [ 0, [ 0, 14, false ], null ], "\"80000\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "select sum(population) , avg(surfacearea) from country where continent = \"north america\" and surfacearea > 3000", "query_toks": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "\"north america\"", "and", "surfacearea", ">", "3000" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "and", "surfacearea", ">", "value" ], "question": "Qual é a população total e a área média dos países do continente da América do Norte cuja área é maior que 3.000?", "question_toks": [ "Qual", "é", "a", "população", "total", "e", "a", "área", "média", "dos", "países", "do", "continente", "da", "América", "do", "Norte", "cuja", "área", "é", "maior", "que", "3.000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 5, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"north america\"", null ], "and", [ false, 3, [ 0, [ 0, 12, false ], null ], 3000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "select sum(population) , avg(surfacearea) from country where continent = \"north america\" and surfacearea > 3000", "query_toks": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "\"north america\"", "and", "surfacearea", ">", "3000" ], "query_toks_no_value": [ "select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "and", "surfacearea", ">", "value" ], "question": "Dê a população total e a área de superfície média correspondentes aos países da América do Norte que têm uma área de superfície superior a 3.000.", "question_toks": [ "Dê", "a", "população", "total", "e", "a", "área", "de", "superfície", "média", "correspondentes", "aos", "países", "da", "América", "do", "Norte", "que", "têm", "uma", "área", "de", "superfície", "superior", "a", "3.000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 4, [ 0, [ 0, 14, false ], null ] ], [ 5, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"north america\"", null ], "and", [ false, 3, [ 0, [ 0, 12, false ], null ], 3000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT name FROM city WHERE Population BETWEEN 160000 AND 900000", "query_toks": [ "SELECT", "name", "FROM", "city", "WHERE", "Population", "BETWEEN", "160000", "AND", "900000" ], "query_toks_no_value": [ "select", "name", "from", "city", "where", "population", "between", "value", "and", "value" ], "question": "Quais são as cidades cuja população está entre 160000 e 900000?", "question_toks": [ "Quais", "são", "as", "cidades", "cuja", "população", "está", "entre", "160000", "e", "900000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 5, false ], null ], 160000.0, 900000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "select name from city where population between 160000 and 900000", "query_toks": [ "select", "name", "from", "city", "where", "population", "between", "160000", "and", "900000" ], "query_toks_no_value": [ "select", "name", "from", "city", "where", "population", "between", "value", "and", "value" ], "question": "Retorne os nomes das cidades com uma população entre 160000 e 900000.", "question_toks": [ "Retorne", "os", "nomes", "das", "cidades", "com", "uma", "população", "entre", "160000", "e", "900000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 1, [ 0, [ 0, 5, false ], null ], 160000.0, 900000.0 ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "LANGUAGE", "FROM", "countrylanguage", "GROUP", "BY", "LANGUAGE", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "language", "from", "countrylanguage", "group", "by", "language", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual idioma é falado pelo maior número de países?", "question_toks": [ "Qual", "idioma", "é", "falado", "pelo", "maior", "número", "de", "países", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 24, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "LANGUAGE", "FROM", "countrylanguage", "GROUP", "BY", "LANGUAGE", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "language", "from", "countrylanguage", "group", "by", "language", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Forneça o idioma falado na maioria dos países.", "question_toks": [ "Forneça", "o", "idioma", "falado", "na", "maioria", "dos", "países", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 24, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode", "query_toks": [ "SELECT", "LANGUAGE", ",", "CountryCode", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "language", ",", "countrycode", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "group", "by", "countrycode" ], "question": "Qual é o idioma falado pela maior porcentagem de pessoas em cada país?", "question_toks": [ "Qual", "é", "o", "idioma", "falado", "pela", "maior", "porcentagem", "de", "pessoas", "em", "cada", "país", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode", "query_toks": [ "SELECT", "LANGUAGE", ",", "CountryCode", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "language", ",", "countrycode", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "group", "by", "countrycode" ], "question": "Quais são os códigos de país dos diferentes países e quais são os idiomas falados pela maior porcentagem de pessoas em cada um?", "question_toks": [ "Quais", "são", "os", "códigos", "de", "país", "dos", "diferentes", "países", "e", "quais", "são", "os", "idiomas", "falados", "pela", "maior", "porcentagem", "de", "pessoas", "em", "cada", "um", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 24, false ], null ] ], [ 0, [ 0, [ 0, 23, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "Spanish", "''", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "where", "language", "=", "value", "group", "by", "countrycode" ], "question": "Qual é o número total de países onde o espanhol é falado pela maior porcentagem de pessoas?", "question_toks": [ "Qual", "é", "o", "número", "total", "de", "países", "onde", "o", "espanhol", "é", "falado", "pela", "maior", "porcentagem", "de", "pessoas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Spanish\"", null ] ], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "query_toks": [ "SELECT", "count", "(", "*", ")", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "Spanish", "''", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "where", "language", "=", "value", "group", "by", "countrycode" ], "question": "Conte o número de países nos quais o espanhol é a língua predominantemente falada.", "question_toks": [ "Conte", "o", "número", "de", "países", "nos", "quais", "o", "espanhol", "é", "a", "língua", "predominantemente", "falada", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Spanish\"", null ] ], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "query_toks": [ "SELECT", "CountryCode", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "Spanish", "''", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "countrycode", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "where", "language", "=", "value", "group", "by", "countrycode" ], "question": "Quais são os códigos dos países onde o espanhol é falado pela maior porcentagem de pessoas?", "question_toks": [ "Quais", "são", "os", "códigos", "dos", "países", "onde", "o", "espanhol", "é", "falado", "pela", "maior", "porcentagem", "de", "pessoas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Spanish\"", null ] ], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "world_1", "query": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "query_toks": [ "SELECT", "CountryCode", ",", "max", "(", "Percentage", ")", "FROM", "countrylanguage", "WHERE", "LANGUAGE", "=", "``", "Spanish", "''", "GROUP", "BY", "CountryCode" ], "query_toks_no_value": [ "select", "countrycode", ",", "max", "(", "percentage", ")", "from", "countrylanguage", "where", "language", "=", "value", "group", "by", "countrycode" ], "question": "Retorne os códigos dos países nos quais o espanhol é o idioma predominantemente falado.", "question_toks": [ "Retorne", "os", "códigos", "dos", "países", "nos", "quais", "o", "espanhol", "é", "o", "idioma", "predominantemente", "falado", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ], [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 24, false ], null ], "\"Spanish\"", null ] ], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT count(*) FROM conductor", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "conductor" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "conductor" ], "question": "Quantos condutores existem?", "question_toks": [ "Quantos", "condutores", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT count(*) FROM conductor", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "conductor" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "conductor" ], "question": "Conte o número de condutores.", "question_toks": [ "Conte", "o", "número", "de", "condutores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Age ASC", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Age", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "age", "asc" ], "question": "Liste os nomes dos regentes em ordem crescente de idade.", "question_toks": [ "Liste", "os", "nomes", "dos", "regentes", "em", "ordem", "crescente", "de", "idade", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Age ASC", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Age", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "age", "asc" ], "question": "Quais são os nomes dos regentes, ordenados por idade?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "regentes", ",", "ordenados", "por", "idade", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 3, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor WHERE Nationality != 'USA'", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "WHERE", "Nationality", "!", "=", "'USA", "'" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "where", "nationality", "!", "=", "value" ], "question": "Quais são os nomes dos regentes cujas nacionalidades não são \"EUA\"?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "regentes", "cujas", "nacionalidades", "não", "são", "\"", "EUA", "\"", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor WHERE Nationality != 'USA'", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "WHERE", "Nationality", "!", "=", "'USA", "'" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "where", "nationality", "!", "=", "value" ], "question": "Retorne os nomes dos condutores que não possuam a nacionalidade \"USA\".", "question_toks": [ "Retorne", "os", "nomes", "dos", "condutores", "que", "não", "possuam", "a", "nacionalidade", "\"", "USA", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 4, false ], null ], "\"USA\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "ORDER", "BY", "Year_of_Founded", "DESC" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "order", "by", "year_of_founded", "desc" ], "question": "Quais são as gravadoras de orquestras em ordem decrescente de anos em que foram fundadas?", "question_toks": [ "Quais", "são", "as", "gravadoras", "de", "orquestras", "em", "ordem", "decrescente", "de", "anos", "em", "que", "foram", "fundadas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 10, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "ORDER", "BY", "Year_of_Founded", "DESC" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "order", "by", "year_of_founded", "desc" ], "question": "Devolva as gravadoras de orquestras, classificadas de acordo com os anos em que foram fundadas.", "question_toks": [ "Devolva", "as", "gravadoras", "de", "orquestras", ",", "classificadas", "de", "acordo", "com", "os", "anos", "em", "que", "foram", "fundadas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 10, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT avg(Attendance) FROM SHOW", "query_toks": [ "SELECT", "avg", "(", "Attendance", ")", "FROM", "SHOW" ], "query_toks_no_value": [ "select", "avg", "(", "attendance", ")", "from", "show" ], "question": "Qual é a média de atendimento aos shows?", "question_toks": [ "Qual", "é", "a", "média", "de", "atendimento", "aos", "shows", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT avg(Attendance) FROM SHOW", "query_toks": [ "SELECT", "avg", "(", "Attendance", ")", "FROM", "SHOW" ], "query_toks_no_value": [ "select", "avg", "(", "attendance", ")", "from", "show" ], "question": "Retorne a participação média em todos os shows.", "question_toks": [ "Retorne", "a", "participação", "média", "em", "todos", "os", "shows", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"", "query_toks": [ "SELECT", "max", "(", "SHARE", ")", ",", "min", "(", "SHARE", ")", "FROM", "performance", "WHERE", "TYPE", "!", "=", "``", "Live", "final", "''" ], "query_toks_no_value": [ "select", "max", "(", "share", ")", ",", "min", "(", "share", ")", "from", "performance", "where", "type", "!", "=", "value" ], "question": "Quais são as cotas máxima e mínima de apresentações cujo tipo não seja \"Final ao vivo\".", "question_toks": [ "Quais", "são", "as", "cotas", "máxima", "e", "mínima", "de", "apresentações", "cujo", "tipo", "não", "seja", "\"", "Final", "ao", "vivo", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 18, false ], null ] ], [ 2, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 14, false ], null ], "\"Live final\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"", "query_toks": [ "SELECT", "max", "(", "SHARE", ")", ",", "min", "(", "SHARE", ")", "FROM", "performance", "WHERE", "TYPE", "!", "=", "``", "Live", "final", "''" ], "query_toks_no_value": [ "select", "max", "(", "share", ")", ",", "min", "(", "share", ")", "from", "performance", "where", "type", "!", "=", "value" ], "question": "Devolva as cotas máximas e mínimas para atuações que não possuam o tipo \"Final ao vivo\".", "question_toks": [ "Devolva", "as", "cotas", "máximas", "e", "mínimas", "para", "atuações", "que", "não", "possuam", "o", "tipo", "\"", "Final", "ao", "vivo", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 18, false ], null ] ], [ 2, [ 0, [ 0, 18, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 14, false ], null ], "\"Live final\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT count(DISTINCT Nationality) FROM conductor", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "Nationality", ")", "FROM", "conductor" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "nationality", ")", "from", "conductor" ], "question": "Quantas nacionalidades diferentes os regentes têm?", "question_toks": [ "Quantas", "nacionalidades", "diferentes", "os", "regentes", "têm", "?" ], "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": "orchestra", "query": "SELECT count(DISTINCT Nationality) FROM conductor", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "Nationality", ")", "FROM", "conductor" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "nationality", ")", "from", "conductor" ], "question": "Conte o número de diferentes nacionalidades de regentes.", "question_toks": [ "Conte", "o", "número", "de", "diferentes", "nacionalidades", "de", "regentes", "." ], "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": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Year_of_Work", "DESC" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "year_of_work", "desc" ], "question": "Liste os nomes dos regentes em ordem decrescente de anos de trabalho.", "question_toks": [ "Liste", "os", "nomes", "dos", "regentes", "em", "ordem", "decrescente", "de", "anos", "de", "trabalho", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Year_of_Work", "DESC" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "year_of_work", "desc" ], "question": "Quais são os nomes dos maestros, classificados em ordem decrescente pelo número de anos em que trabalharam?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "maestros", ",", "classificados", "em", "ordem", "decrescente", "pelo", "número", "de", "anos", "em", "que", "trabalharam", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Year_of_Work", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "year_of_work", "desc", "limit", "value" ], "question": "Liste o nome do maestro com mais anos de trabalho.", "question_toks": [ "Liste", "o", "nome", "do", "maestro", "com", "mais", "anos", "de", "trabalho", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "conductor", "ORDER", "BY", "Year_of_Work", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "conductor", "order", "by", "year_of_work", "desc", "limit", "value" ], "question": "Qual é o nome do maestro que trabalhou o maior número de anos?", "question_toks": [ "Qual", "é", "o", "nome", "do", "maestro", "que", "trabalhou", "o", "maior", "número", "de", "anos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 5, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "query_toks": [ "SELECT", "T1.Name", ",", "T2.Orchestra", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t2", ".", "orchestra", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id" ], "question": "Mostre os nomes dos maestros e das orquestras que dirigiram.", "question_toks": [ "Mostre", "os", "nomes", "dos", "maestros", "e", "das", "orquestras", "que", "dirigiram", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "query_toks": [ "SELECT", "T1.Name", ",", "T2.Orchestra", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t2", ".", "orchestra", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id" ], "question": "Quais são os nomes dos regentes, bem como das orquestras correspondentes que eles dirigiram?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "regentes", ",", "bem", "como", "das", "orquestras", "correspondentes", "que", "eles", "dirigiram", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "GROUP", "BY", "T2.Conductor_ID", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "group", "by", "t2", ".", "conductor_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Mostre os nomes dos maestros que dirigiram mais de uma orquestra.", "question_toks": [ "Mostre", "os", "nomes", "dos", "maestros", "que", "dirigiram", "mais", "de", "uma", "orquestra", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "GROUP", "BY", "T2.Conductor_ID", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "group", "by", "t2", ".", "conductor_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são os nomes dos maestros que regeram em mais de uma orquestra?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "maestros", "que", "regeram", "em", "mais", "de", "uma", "orquestra", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "GROUP", "BY", "T2.Conductor_ID", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "group", "by", "t2", ".", "conductor_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Mostre o nome do maestro que regeu o maior número de orquestras.", "question_toks": [ "Mostre", "o", "nome", "do", "maestro", "que", "regeu", "o", "maior", "número", "de", "orquestras", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "GROUP", "BY", "T2.Conductor_ID", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "group", "by", "t2", ".", "conductor_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome do maestro que dirigiu mais orquestras?", "question_toks": [ "Qual", "é", "o", "nome", "do", "maestro", "que", "dirigiu", "mais", "orquestras", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "WHERE", "Year_of_Founded", ">", "2008" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "where", "year_of_founded", ">", "value" ], "question": "Indique o nome do maestro que regeu orquestras fundadas depois de 2008.", "question_toks": [ "Indique", "o", "nome", "do", "maestro", "que", "regeu", "orquestras", "fundadas", "depois", "de", "2008", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 10, false ], null ], 2008.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", "query_toks": [ "SELECT", "T1.Name", "FROM", "conductor", "AS", "T1", "JOIN", "orchestra", "AS", "T2", "ON", "T1.Conductor_ID", "=", "T2.Conductor_ID", "WHERE", "Year_of_Founded", ">", "2008" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "conductor", "as", "t1", "join", "orchestra", "as", "t2", "on", "t1", ".", "conductor_id", "=", "t2", ".", "conductor_id", "where", "year_of_founded", ">", "value" ], "question": "Quais são os nomes dos maestros que regeram orquestras fundadas após o ano de 2008?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "maestros", "que", "regeram", "orquestras", "fundadas", "após", "o", "ano", "de", "2008", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 10, false ], null ], 2008.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", "query_toks": [ "SELECT", "Record_Company", ",", "COUNT", "(", "*", ")", "FROM", "orchestra", "GROUP", "BY", "Record_Company" ], "query_toks_no_value": [ "select", "record_company", ",", "count", "(", "*", ")", "from", "orchestra", "group", "by", "record_company" ], "question": "Por favor, mostre as diferentes gravadoras e o número correspondente de orquestras.", "question_toks": [ "Por", "favor", ",", "mostre", "as", "diferentes", "gravadoras", "e", "o", "número", "correspondente", "de", "orquestras", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", "query_toks": [ "SELECT", "Record_Company", ",", "COUNT", "(", "*", ")", "FROM", "orchestra", "GROUP", "BY", "Record_Company" ], "query_toks_no_value": [ "select", "record_company", ",", "count", "(", "*", ")", "from", "orchestra", "group", "by", "record_company" ], "question": "Quantas orquestras cada gravadora administra?", "question_toks": [ "Quantas", "orquestras", "cada", "gravadora", "administra", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "query_toks": [ "SELECT", "Major_Record_Format", "FROM", "orchestra", "GROUP", "BY", "Major_Record_Format", "ORDER", "BY", "COUNT", "(", "*", ")", "ASC" ], "query_toks_no_value": [ "select", "major_record_format", "from", "orchestra", "group", "by", "major_record_format", "order", "by", "count", "(", "*", ")", "asc" ], "question": "Por favor, mostre os formatos de registro das orquestras em ordem crescente de contagem.", "question_toks": [ "Por", "favor", ",", "mostre", "os", "formatos", "de", "registro", "das", "orquestras", "em", "ordem", "crescente", "de", "contagem", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "query_toks": [ "SELECT", "Major_Record_Format", "FROM", "orchestra", "GROUP", "BY", "Major_Record_Format", "ORDER", "BY", "COUNT", "(", "*", ")", "ASC" ], "query_toks_no_value": [ "select", "major_record_format", "from", "orchestra", "group", "by", "major_record_format", "order", "by", "count", "(", "*", ")", "asc" ], "question": "Quais são os principais formatos de registro de orquestras, classificados por sua frequência?", "question_toks": [ "Quais", "são", "os", "principais", "formatos", "de", "registro", "de", "orquestras", ",", "classificados", "por", "sua", "frequência", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "GROUP", "BY", "Record_Company", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "group", "by", "record_company", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Liste a gravadora compartilhada pelo maior número de orquestras.", "question_toks": [ "Liste", "a", "gravadora", "compartilhada", "pelo", "maior", "número", "de", "orquestras", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "GROUP", "BY", "Record_Company", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "group", "by", "record_company", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é a gravadora utilizada pelo maior número de orquestras?", "question_toks": [ "Qual", "é", "a", "gravadora", "utilizada", "pelo", "maior", "número", "de", "orquestras", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)", "query_toks": [ "SELECT", "Orchestra", "FROM", "orchestra", "WHERE", "Orchestra_ID", "NOT", "IN", "(", "SELECT", "Orchestra_ID", "FROM", "performance", ")" ], "query_toks_no_value": [ "select", "orchestra", "from", "orchestra", "where", "orchestra_id", "not", "in", "(", "select", "orchestra_id", "from", "performance", ")" ], "question": "Liste os nomes das orquestras que não têm apresentação.", "question_toks": [ "Liste", "os", "nomes", "das", "orquestras", "que", "não", "têm", "apresentação", "." ], "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", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, 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": "orchestra", "query": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)", "query_toks": [ "SELECT", "Orchestra", "FROM", "orchestra", "WHERE", "Orchestra_ID", "NOT", "IN", "(", "SELECT", "Orchestra_ID", "FROM", "performance", ")" ], "query_toks_no_value": [ "select", "orchestra", "from", "orchestra", "where", "orchestra_id", "not", "in", "(", "select", "orchestra_id", "from", "performance", ")" ], "question": "Quais são as orquestras que não realizam apresentações?", "question_toks": [ "Quais", "são", "as", "orquestras", "que", "não", "realizam", "apresentações", "?" ], "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", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, 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": "orchestra", "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "WHERE", "Year_of_Founded", "<", "2003", "INTERSECT", "SELECT", "Record_Company", "FROM", "orchestra", "WHERE", "Year_of_Founded", ">", "2003" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "where", "year_of_founded", "<", "value", "intersect", "select", "record_company", "from", "orchestra", "where", "year_of_founded", ">", "value" ], "question": "Mostre as gravadoras compartilhadas por orquestras fundadas antes de 2003 e depois de 2003.", "question_toks": [ "Mostre", "as", "gravadoras", "compartilhadas", "por", "orquestras", "fundadas", "antes", "de", "2003", "e", "depois", "de", "2003", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 10, false ], null ], 2003.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 10, false ], null ], 2003.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", "query_toks": [ "SELECT", "Record_Company", "FROM", "orchestra", "WHERE", "Year_of_Founded", "<", "2003", "INTERSECT", "SELECT", "Record_Company", "FROM", "orchestra", "WHERE", "Year_of_Founded", ">", "2003" ], "query_toks_no_value": [ "select", "record_company", "from", "orchestra", "where", "year_of_founded", "<", "value", "intersect", "select", "record_company", "from", "orchestra", "where", "year_of_founded", ">", "value" ], "question": "Quais são as gravadoras usadas pelas orquestras fundadas antes de 2003 e pelas fundadas depois de 2003?", "question_toks": [ "Quais", "são", "as", "gravadoras", "usadas", "pelas", "orquestras", "fundadas", "antes", "de", "2003", "e", "pelas", "fundadas", "depois", "de", "2003", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 10, false ], null ], 2003.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 10, false ], null ], 2003.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "orchestra", "WHERE", "Major_Record_Format", "=", "``", "CD", "''", "OR", "Major_Record_Format", "=", "``", "DVD", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "orchestra", "where", "major_record_format", "=", "value", "or", "major_record_format", "=", "value" ], "question": "Encontre o número de orquestras cujo formato de gravação é \"CD\" ou \"DVD\".", "question_toks": [ "Encontre", "o", "número", "de", "orquestras", "cujo", "formato", "de", "gravação", "é", "\"", "CD", "\"", "ou", "\"", "DVD", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"CD\"", null ], "or", [ false, 2, [ 0, [ 0, 11, false ], null ], "\"DVD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", "query_toks": [ "SELECT", "COUNT", "(", "*", ")", "FROM", "orchestra", "WHERE", "Major_Record_Format", "=", "``", "CD", "''", "OR", "Major_Record_Format", "=", "``", "DVD", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "orchestra", "where", "major_record_format", "=", "value", "or", "major_record_format", "=", "value" ], "question": "Conte o número de orquestras que têm CD ou DVD como formato de registro.", "question_toks": [ "Conte", "o", "número", "de", "orquestras", "que", "têm", "CD", "ou", "DVD", "como", "formato", "de", "registro", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 11, false ], null ], "\"CD\"", null ], "or", [ false, 2, [ 0, [ 0, 11, false ], null ], "\"DVD\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "Year_of_Founded", "FROM", "orchestra", "AS", "T1", "JOIN", "performance", "AS", "T2", "ON", "T1.Orchestra_ID", "=", "T2.Orchestra_ID", "GROUP", "BY", "T2.Orchestra_ID", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "year_of_founded", "from", "orchestra", "as", "t1", "join", "performance", "as", "t2", "on", "t1", ".", "orchestra_id", "=", "t2", ".", "orchestra_id", "group", "by", "t2", ".", "orchestra_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Mostre os anos em que foram fundadas orquestras que deram mais de uma apresentação.", "question_toks": [ "Mostre", "os", "anos", "em", "que", "foram", "fundadas", "orquestras", "que", "deram", "mais", "de", "uma", "apresentação", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 13, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "orchestra", "query": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "Year_of_Founded", "FROM", "orchestra", "AS", "T1", "JOIN", "performance", "AS", "T2", "ON", "T1.Orchestra_ID", "=", "T2.Orchestra_ID", "GROUP", "BY", "T2.Orchestra_ID", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "year_of_founded", "from", "orchestra", "as", "t1", "join", "performance", "as", "t2", "on", "t1", ".", "orchestra_id", "=", "t2", ".", "orchestra_id", "group", "by", "t2", ".", "orchestra_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "O que são anos de fundação para orquestras que tiveram mais de uma apresentação?", "question_toks": [ "O", "que", "são", "anos", "de", "fundação", "para", "orquestras", "que", "tiveram", "mais", "de", "uma", "apresentação", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 13, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 13, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Highschooler", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "highschooler" ], "question": "Quantos alunos do ensino médio existem?", "question_toks": [ "Quantos", "alunos", "do", "ensino", "médio", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Highschooler", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "highschooler" ], "question": "Conte o número de alunos do ensino médio.", "question_toks": [ "Conte", "o", "número", "de", "alunos", "do", "ensino", "médio", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT name , grade FROM Highschooler", "query_toks": [ "SELECT", "name", ",", "grade", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "name", ",", "grade", "from", "highschooler" ], "question": "Mostre os nomes e as notas de cada aluno do ensino médio.", "question_toks": [ "Mostre", "os", "nomes", "e", "as", "notas", "de", "cada", "aluno", "do", "ensino", "médio", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT name , grade FROM Highschooler", "query_toks": [ "SELECT", "name", ",", "grade", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "name", ",", "grade", "from", "highschooler" ], "question": "Quais são os nomes e as notas de cada aluno do ensino médio?", "question_toks": [ "Quais", "são", "os", "nomes", "e", "as", "notas", "de", "cada", "aluno", "do", "ensino", "médio", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler" ], "question": "Mostre todas as notas dos alunos do ensino médio.", "question_toks": [ "Mostre", "todas", "as", "notas", "dos", "alunos", "do", "ensino", "médio", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler" ], "question": "Qual é a nota de cada aluno do ensino médio?", "question_toks": [ "Qual", "é", "a", "nota", "de", "cada", "aluno", "do", "ensino", "médio", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler WHERE name = \"Kyle\"", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "WHERE", "name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "where", "name", "=", "value" ], "question": "Em que série Kyle está?", "question_toks": [ "Em", "que", "série", "Kyle", "está", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler WHERE name = \"Kyle\"", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "WHERE", "name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "where", "name", "=", "value" ], "question": "Devolva a nota para o aluno do ensino médio chamado Kyle.", "question_toks": [ "Devolva", "a", "nota", "para", "o", "aluno", "do", "ensino", "médio", "chamado", "Kyle", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT name FROM Highschooler WHERE grade = 10", "query_toks": [ "SELECT", "name", "FROM", "Highschooler", "WHERE", "grade", "=", "10" ], "query_toks_no_value": [ "select", "name", "from", "highschooler", "where", "grade", "=", "value" ], "question": "Mostre os nomes de todos os alunos do ensino médio da 10ª série.", "question_toks": [ "Mostre", "os", "nomes", "de", "todos", "os", "alunos", "do", "ensino", "médio", "da", "10ª", "série", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT name FROM Highschooler WHERE grade = 10", "query_toks": [ "SELECT", "name", "FROM", "Highschooler", "WHERE", "grade", "=", "10" ], "query_toks_no_value": [ "select", "name", "from", "highschooler", "where", "grade", "=", "value" ], "question": "Quais são os nomes de todos os alunos do ensino médio na 10ª série?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "todos", "os", "alunos", "do", "ensino", "médio", "na", "10ª", "série", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"", "query_toks": [ "SELECT", "ID", "FROM", "Highschooler", "WHERE", "name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "id", "from", "highschooler", "where", "name", "=", "value" ], "question": "Mostre a identidade de um estudante do ensino médio chamado Kyle.", "question_toks": [ "Mostre", "a", "identidade", "de", "um", "estudante", "do", "ensino", "médio", "chamado", "Kyle", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"", "query_toks": [ "SELECT", "ID", "FROM", "Highschooler", "WHERE", "name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "id", "from", "highschooler", "where", "name", "=", "value" ], "question": "Qual é a id do Kyle?", "question_toks": [ "Qual", "é", "a", "id", "do", "Kyle", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Highschooler", "WHERE", "grade", "=", "9", "OR", "grade", "=", "10" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "highschooler", "where", "grade", "=", "value", "or", "grade", "=", "value" ], "question": "Quantos alunos do ensino médio há na 9ª ou 10ª série?", "question_toks": [ "Quantos", "alunos", "do", "ensino", "médio", "há", "na", "9ª", "ou", "10ª", "série", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 9.0, null ], "or", [ false, 2, [ 0, [ 0, 3, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Highschooler", "WHERE", "grade", "=", "9", "OR", "grade", "=", "10" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "highschooler", "where", "grade", "=", "value", "or", "grade", "=", "value" ], "question": "Conte o número de alunos do ensino médio na 9ª ou 10ª séries.", "question_toks": [ "Conte", "o", "número", "de", "alunos", "do", "ensino", "médio", "na", "9ª", "ou", "10ª", "séries", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 9.0, null ], "or", [ false, 2, [ 0, [ 0, 3, false ], null ], 10.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade , count(*) FROM Highschooler GROUP BY grade", "query_toks": [ "SELECT", "grade", ",", "count", "(", "*", ")", "FROM", "Highschooler", "GROUP", "BY", "grade" ], "query_toks_no_value": [ "select", "grade", ",", "count", "(", "*", ")", "from", "highschooler", "group", "by", "grade" ], "question": "Mostre o número de alunos do ensino médio para cada série.", "question_toks": [ "Mostre", "o", "número", "de", "alunos", "do", "ensino", "médio", "para", "cada", "série", "." ], "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": "network_1", "query": "SELECT grade , count(*) FROM Highschooler GROUP BY grade", "query_toks": [ "SELECT", "grade", ",", "count", "(", "*", ")", "FROM", "Highschooler", "GROUP", "BY", "grade" ], "query_toks_no_value": [ "select", "grade", ",", "count", "(", "*", ")", "from", "highschooler", "group", "by", "grade" ], "question": "Quantos alunos do ensino médio há em cada série?", "question_toks": [ "Quantos", "alunos", "do", "ensino", "médio", "há", "em", "cada", "série", "?" ], "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": "network_1", "query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "GROUP", "BY", "grade", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "group", "by", "grade", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual série tem mais alunos do ensino médio?", "question_toks": [ "Qual", "série", "tem", "mais", "alunos", "do", "ensino", "médio", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "GROUP", "BY", "grade", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "group", "by", "grade", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Retorna a série com o maior número de alunos do ensino médio.", "question_toks": [ "Retorna", "a", "série", "com", "o", "maior", "número", "de", "alunos", "do", "ensino", "médio", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "GROUP", "BY", "grade", "HAVING", "count", "(", "*", ")", ">", "=", "4" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "group", "by", "grade", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Mostre-me todas as notas com pelo menos 4 alunos.", "question_toks": [ "Mostre-me", "todas", "as", "notas", "com", "pelo", "menos", "4", "alunos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 4.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", "query_toks": [ "SELECT", "grade", "FROM", "Highschooler", "GROUP", "BY", "grade", "HAVING", "count", "(", "*", ")", ">", "=", "4" ], "query_toks_no_value": [ "select", "grade", "from", "highschooler", "group", "by", "grade", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais séries têm 4 ou mais alunos do ensino médio?", "question_toks": [ "Quais", "séries", "têm", "4", "ou", "mais", "alunos", "do", "ensino", "médio", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 4.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id , count(*) FROM Friend GROUP BY student_id", "query_toks": [ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Friend", "GROUP", "BY", "student_id" ], "query_toks_no_value": [ "select", "student_id", ",", "count", "(", "*", ")", "from", "friend", "group", "by", "student_id" ], "question": "Mostre as IDs dos alunos e os números de amigos correspondentes a cada um.", "question_toks": [ "Mostre", "as", "IDs", "dos", "alunos", "e", "os", "números", "de", "amigos", "correspondentes", "a", "cada", "um", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id , count(*) FROM Friend GROUP BY student_id", "query_toks": [ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Friend", "GROUP", "BY", "student_id" ], "query_toks_no_value": [ "select", "student_id", ",", "count", "(", "*", ")", "from", "friend", "group", "by", "student_id" ], "question": "Quantos amigos cada aluno tem?", "question_toks": [ "Quantos", "amigos", "cada", "aluno", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ], "question": "Mostre os nomes dos alunos do ensino médio e seu número correspondente de amigos.", "question_toks": [ "Mostre", "os", "nomes", "dos", "alunos", "do", "ensino", "médio", "e", "seu", "número", "correspondente", "de", "amigos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ], "question": "Quais são os nomes dos alunos do ensino médio e quantos amigos cada um tem?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "alunos", "do", "ensino", "médio", "e", "quantos", "amigos", "cada", "um", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome do colegial que tem o maior número de amigos?", "question_toks": [ "Qual", "é", "o", "nome", "do", "colegial", "que", "tem", "o", "maior", "número", "de", "amigos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, 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": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Retorne o nome do aluno do ensino médio com mais amigos.", "question_toks": [ "Retorne", "o", "nome", "do", "aluno", "do", "ensino", "médio", "com", "mais", "amigos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, 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": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "3" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Mostre os nomes de alunos do ensino médio que tenham pelo menos 3 amigos.", "question_toks": [ "Mostre", "os", "nomes", "de", "alunos", "do", "ensino", "médio", "que", "tenham", "pelo", "menos", "3", "amigos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "3" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são os nomes de alunos do ensino médio que têm 3 ou mais amigos?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "alunos", "do", "ensino", "médio", "que", "têm", "3", "ou", "mais", "amigos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 3.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "T3.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "JOIN", "Highschooler", "AS", "T3", "ON", "T1.friend_id", "=", "T3.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "t3", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "join", "highschooler", "as", "t3", "on", "t1", ".", "friend_id", "=", "t3", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Mostre os nomes de todos os amigos do colegial Kyle.", "question_toks": [ "Mostre", "os", "nomes", "de", "todos", "os", "amigos", "do", "colegial", "Kyle", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "T3.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "JOIN", "Highschooler", "AS", "T3", "ON", "T1.friend_id", "=", "T3.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "t3", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "join", "highschooler", "as", "t3", "on", "t1", ".", "friend_id", "=", "t3", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Retorne os nomes dos amigos do estudante Kyle.", "question_toks": [ "Retorne", "os", "nomes", "dos", "amigos", "do", "estudante", "Kyle", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Quantos amigos o estudante do ensino médio Kyle tem?", "question_toks": [ "Quantos", "amigos", "o", "estudante", "do", "ensino", "médio", "Kyle", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Conte quantos amigos Kyle tem.", "question_toks": [ "Conte", "quantos", "amigos", "Kyle", "tem", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", "query_toks": [ "SELECT", "id", "FROM", "Highschooler", "EXCEPT", "SELECT", "student_id", "FROM", "Friend" ], "query_toks_no_value": [ "select", "id", "from", "highschooler", "except", "select", "student_id", "from", "friend" ], "question": "Mostre ids de todos os alunos que não têm amigos.", "question_toks": [ "Mostre", "ids", "de", "todos", "os", "alunos", "que", "não", "têm", "amigos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "network_1", "query": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", "query_toks": [ "SELECT", "id", "FROM", "Highschooler", "EXCEPT", "SELECT", "student_id", "FROM", "Friend" ], "query_toks_no_value": [ "select", "id", "from", "highschooler", "except", "select", "student_id", "from", "friend" ], "question": "Quais são os ids dos alunos do ensino médio que não têm amigos?", "question_toks": [ "Quais", "são", "os", "ids", "dos", "alunos", "do", "ensino", "médio", "que", "não", "têm", "amigos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "network_1", "query": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", "query_toks": [ "SELECT", "name", "FROM", "Highschooler", "EXCEPT", "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id" ], "query_toks_no_value": [ "select", "name", "from", "highschooler", "except", "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id" ], "question": "Mostre os nomes de todos os alunos do ensino médio que não têm amigos.", "question_toks": [ "Mostre", "os", "nomes", "de", "todos", "os", "alunos", "do", "ensino", "médio", "que", "não", "têm", "amigos", "." ], "sql": { "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": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "network_1", "query": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", "query_toks": [ "SELECT", "name", "FROM", "Highschooler", "EXCEPT", "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id" ], "query_toks_no_value": [ "select", "name", "from", "highschooler", "except", "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id" ], "question": "Quais são os nomes dos alunos que não têm amigos?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "alunos", "que", "não", "têm", "amigos", "?" ], "sql": { "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": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "network_1", "query": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", "query_toks": [ "SELECT", "student_id", "FROM", "Friend", "INTERSECT", "SELECT", "liked_id", "FROM", "Likes" ], "query_toks_no_value": [ "select", "student_id", "from", "friend", "intersect", "select", "liked_id", "from", "likes" ], "question": "Mostre as identidades de alunos do ensino médio que têm amigos e também são queridos por outras pessoas.", "question_toks": [ "Mostre", "as", "identidades", "de", "alunos", "do", "ensino", "médio", "que", "têm", "amigos", "e", "também", "são", "queridos", "por", "outras", "pessoas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", "query_toks": [ "SELECT", "student_id", "FROM", "Friend", "INTERSECT", "SELECT", "liked_id", "FROM", "Likes" ], "query_toks_no_value": [ "select", "student_id", "from", "friend", "intersect", "select", "liked_id", "from", "likes" ], "question": "Quais são os ids dos alunos que têm amigos e são apreciados?", "question_toks": [ "Quais", "são", "os", "ids", "dos", "alunos", "que", "têm", "amigos", "e", "são", "apreciados", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "INTERSECT", "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.liked_id", "=", "T2.id" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "intersect", "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "liked_id", "=", "t2", ".", "id" ], "question": "Mostre o nome de todos os alunos que têm amigos e também são queridos por outra pessoa.", "question_toks": [ "Mostre", "o", "nome", "de", "todos", "os", "alunos", "que", "têm", "amigos", "e", "também", "são", "queridos", "por", "outra", "pessoa", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "INTERSECT", "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.liked_id", "=", "T2.id" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "intersect", "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "liked_id", "=", "t2", ".", "id" ], "question": "Quais são os nomes de alunos do ensino médio que têm amigos e são queridos?", "question_toks": [ "Quais", "são", "os", "nomes", "de", "alunos", "do", "ensino", "médio", "que", "têm", "amigos", "e", "são", "queridos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 7, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "query_toks": [ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Likes", "GROUP", "BY", "student_id" ], "query_toks_no_value": [ "select", "student_id", ",", "count", "(", "*", ")", "from", "likes", "group", "by", "student_id" ], "question": "Conte o número de curtidas para cada id de aluno.", "question_toks": [ "Conte", "o", "número", "de", "curtidas", "para", "cada", "id", "de", "aluno", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "query_toks": [ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Likes", "GROUP", "BY", "student_id" ], "query_toks_no_value": [ "select", "student_id", ",", "count", "(", "*", ")", "from", "likes", "group", "by", "student_id" ], "question": "Quantas curtidas correspondem a cada id de aluno?", "question_toks": [ "Quantas", "curtidas", "correspondem", "a", "cada", "id", "de", "aluno", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ], "question": "Mostre os nomes dos alunos do ensino médio que curtiram e o número de curtidas de cada um.", "question_toks": [ "Mostre", "os", "nomes", "dos", "alunos", "do", "ensino", "médio", "que", "curtiram", "e", "o", "número", "de", "curtidas", "de", "cada", "um", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "query_toks": [ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ], "query_toks_no_value": [ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ], "question": "Quais são os nomes dos alunos do ensino médio que têm curtidas e quantas curtidas cada um tem?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "alunos", "do", "ensino", "médio", "que", "têm", "curtidas", "e", "quantas", "curtidas", "cada", "um", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome do aluno do ensino médio que tem o maior número de curtidas?", "question_toks": [ "Qual", "é", "o", "nome", "do", "aluno", "do", "ensino", "médio", "que", "tem", "o", "maior", "número", "de", "curtidas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Dê o nome do aluno que gostou mais.", "question_toks": [ "Dê", "o", "nome", "do", "aluno", "que", "gostou", "mais", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Mostre os nomes dos alunos que têm pelo menos 2 curtidas.", "question_toks": [ "Mostre", "os", "nomes", "dos", "alunos", "que", "têm", "pelo", "menos", "2", "curtidas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são os nomes dos alunos que têm 2 ou mais curtidas?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "alunos", "que", "têm", "2", "ou", "mais", "curtidas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 6, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.grade", ">", "5", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "grade", ">", "value", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Mostre os nomes dos alunos que têm nota superior a 5 e têm pelo menos 2 amigos.", "question_toks": [ "Mostre", "os", "nomes", "dos", "alunos", "que", "têm", "nota", "superior", "a", "5", "e", "têm", "pelo", "menos", "2", "amigos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], 5.0, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.grade", ">", "5", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "grade", ">", "value", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais são os nomes dos alunos do ensino médio que têm nota acima de 5 e têm 2 ou mais amigos?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "alunos", "do", "ensino", "médio", "que", "têm", "nota", "acima", "de", "5", "e", "têm", "2", "ou", "mais", "amigos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], 5.0, null ] ], "groupBy": [ [ 0, 4, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Quantas curtidas o Kyle tem?", "question_toks": [ "Quantas", "curtidas", "o", "Kyle", "tem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ], "question": "Retorne o número de curtidas que o aluno do ensino médio chamado Kyle tem.", "question_toks": [ "Retorne", "o", "número", "de", "curtidas", "que", "o", "aluno", "do", "ensino", "médio", "chamado", "Kyle", "tem", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"Kyle\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "network_1", "query": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "query_toks": [ "SELECT", "avg", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ], "query_toks_no_value": [ "select", "avg", "(", "grade", ")", "from", "highschooler", "where", "id", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ], "question": "Encontre a nota média de todos os alunos que têm alguns amigos.", "question_toks": [ "Encontre", "a", "nota", "média", "de", "todos", "os", "alunos", "que", "têm", "alguns", "amigos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, 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": "network_1", "query": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "query_toks": [ "SELECT", "avg", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ], "query_toks_no_value": [ "select", "avg", "(", "grade", ")", "from", "highschooler", "where", "id", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ], "question": "Qual é a nota média de alunos que têm amigos?", "question_toks": [ "Qual", "é", "a", "nota", "média", "de", "alunos", "que", "têm", "amigos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, 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": "network_1", "query": "SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "query_toks": [ "SELECT", "min", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "NOT", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ], "query_toks_no_value": [ "select", "min", "(", "grade", ")", "from", "highschooler", "where", "id", "not", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ], "question": "Encontre a nota mínima de alunos que não têm amigos.", "question_toks": [ "Encontre", "a", "nota", "mínima", "de", "alunos", "que", "não", "têm", "amigos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, 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": "network_1", "query": "SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "query_toks": [ "SELECT", "min", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "NOT", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ], "query_toks_no_value": [ "select", "min", "(", "grade", ")", "from", "highschooler", "where", "id", "not", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ], "question": "Qual é a nota mais baixa dos alunos que não têm amigos?", "question_toks": [ "Qual", "é", "a", "nota", "mais", "baixa", "dos", "alunos", "que", "não", "têm", "amigos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, 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": "dog_kennels", "query": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals", "query_toks": [ "SELECT", "state", "FROM", "Owners", "INTERSECT", "SELECT", "state", "FROM", "Professionals" ], "query_toks_no_value": [ "select", "state", "from", "owners", "intersect", "select", "state", "from", "professionals" ], "question": "Em quais estados moram proprietários e profissionais?", "question_toks": [ "Em", "quais", "estados", "moram", "proprietários", "e", "profissionais", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals", "query_toks": [ "SELECT", "state", "FROM", "Owners", "INTERSECT", "SELECT", "state", "FROM", "Professionals" ], "query_toks_no_value": [ "select", "state", "from", "owners", "intersect", "select", "state", "from", "professionals" ], "question": "Encontre os estados onde vivem proprietários e profissionais.", "question_toks": [ "Encontre", "os", "estados", "onde", "vivem", "proprietários", "e", "profissionais", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 15, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", "WHERE", "dog_id", "IN", "(", "SELECT", "dog_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "dogs", "where", "dog_id", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "question": "Qual é a idade média dos cães que realizaram algum tratamento?", "question_toks": [ "Qual", "é", "a", "idade", "média", "dos", "cães", "que", "realizaram", "algum", "tratamento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, 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": "dog_kennels", "query": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", "WHERE", "dog_id", "IN", "(", "SELECT", "dog_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "dogs", "where", "dog_id", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "question": "Encontre a idade média dos cães que realizaram o tratamento.", "question_toks": [ "Encontre", "a", "idade", "média", "dos", "cães", "que", "realizaram", "o", "tratamento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, 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": "dog_kennels", "query": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "query_toks": [ "SELECT", "professional_id", ",", "last_name", ",", "cell_number", "FROM", "Professionals", "WHERE", "state", "=", "'Indiana", "'", "UNION", "SELECT", "T1.professional_id", ",", "T1.last_name", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "professional_id", ",", "last_name", ",", "cell_number", "from", "professionals", "where", "state", "=", "value", "union", "select", "t1", ".", "professional_id", ",", "t1", ".", "last_name", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais profissionais residem no estado de Indiana ou já realizaram tratamento em mais de 2 tratamentos? Liste sua identidade, sobrenome e telefone celular.", "question_toks": [ "Quais", "profissionais", "residem", "no", "estado", "de", "Indiana", "ou", "já", "realizaram", "tratamento", "em", "mais", "de", "2", "tratamentos", "?", "Liste", "sua", "identidade", ",", "sobrenome", "e", "telefone", "celular", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Indiana\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "query_toks": [ "SELECT", "professional_id", ",", "last_name", ",", "cell_number", "FROM", "Professionals", "WHERE", "state", "=", "'Indiana", "'", "UNION", "SELECT", "T1.professional_id", ",", "T1.last_name", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "2" ], "query_toks_no_value": [ "select", "professional_id", ",", "last_name", ",", "cell_number", "from", "professionals", "where", "state", "=", "value", "union", "select", "t1", ".", "professional_id", ",", "t1", ".", "last_name", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "value" ], "question": "Encontre a identidade, o sobrenome e o celular dos profissionais que residem no estado de Indiana ou realizaram mais de dois tratamentos.", "question_toks": [ "Encontre", "a", "identidade", ",", "o", "sobrenome", "e", "o", "celular", "dos", "profissionais", "que", "residem", "no", "estado", "de", "Indiana", "ou", "realizaram", "mais", "de", "dois", "tratamentos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Indiana\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } }, { "db_id": "dog_kennels", "query": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )", "query_toks": [ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "1000", ")" ], "query_toks_no_value": [ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "value", ")" ], "question": "Quais cães não custaram ao dono mais do que 1000 para tratamento? Liste os nomes dos cães.", "question_toks": [ "Quais", "cães", "não", "custaram", "ao", "dono", "mais", "do", "que", "1000", "para", "tratamento", "?", "Liste", "os", "nomes", "dos", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 45, false ] ], "having": [ [ false, 3, [ 0, [ 4, 49, false ], null ], 1000.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )", "query_toks": [ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "1000", ")" ], "query_toks_no_value": [ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "value", ")" ], "question": "Quais são os nomes dos cães para os quais o dono não gastou mais de 1000 em tratamento?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "cães", "para", "os", "quais", "o", "dono", "não", "gastou", "mais", "de", "1000", "em", "tratamento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 45, false ] ], "having": [ [ false, 3, [ 0, [ 4, 49, false ], null ], 1000.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", "query_toks": [ "SELECT", "first_name", "FROM", "Professionals", "UNION", "SELECT", "first_name", "FROM", "Owners", "EXCEPT", "SELECT", "name", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "first_name", "from", "professionals", "union", "select", "first_name", "from", "owners", "except", "select", "name", "from", "dogs" ], "question": "Quais nomes próprios são usados para profissionais ou proprietários, mas não são usados como nomes de cães?", "question_toks": [ "Quais", "nomes", "próprios", "são", "usados", "para", "profissionais", "ou", "proprietários", ",", "mas", "não", "são", "usados", "como", "nomes", "de", "cães", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", "query_toks": [ "SELECT", "first_name", "FROM", "Professionals", "UNION", "SELECT", "first_name", "FROM", "Owners", "EXCEPT", "SELECT", "name", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "first_name", "from", "professionals", "union", "select", "first_name", "from", "owners", "except", "select", "name", "from", "dogs" ], "question": "Encontre os primeiros nomes que são usados para profissionais ou proprietários, mas não são usados como nomes de cães.", "question_toks": [ "Encontre", "os", "primeiros", "nomes", "que", "são", "usados", "para", "profissionais", "ou", "proprietários", ",", "mas", "não", "são", "usados", "como", "nomes", "de", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", "query_toks": [ "SELECT", "professional_id", ",", "role_code", ",", "email_address", "FROM", "Professionals", "EXCEPT", "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.email_address", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ], "query_toks_no_value": [ "select", "professional_id", ",", "role_code", ",", "email_address", "from", "professionals", "except", "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "email_address", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ], "question": "Qual profissional não operou nenhum tratamento em cães? Liste a id, a função e o e-mail do profissional.", "question_toks": [ "Qual", "profissional", "não", "operou", "nenhum", "tratamento", "em", "cães", "?", "Liste", "a", "id", ",", "a", "função", "e", "o", "e-mail", "do", "profissional", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "dog_kennels", "query": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", "query_toks": [ "SELECT", "professional_id", ",", "role_code", ",", "email_address", "FROM", "Professionals", "EXCEPT", "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.email_address", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ], "query_toks_no_value": [ "select", "professional_id", ",", "role_code", ",", "email_address", "from", "professionals", "except", "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "email_address", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ], "question": "Indique-me o id, cargo e email dos profissionais que não realizaram nenhum tratamento em cães.", "question_toks": [ "Indique-me", "o", "id", ",", "cargo", "e", "email", "dos", "profissionais", "que", "não", "realizaram", "nenhum", "tratamento", "em", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T2.first_name", ",", "T2.last_name", "FROM", "Dogs", "AS", "T1", "JOIN", "Owners", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t2", ".", "first_name", ",", "t2", ".", "last_name", "from", "dogs", "as", "t1", "join", "owners", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "group", "by", "t1", ".", "owner_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual dono tem mais cachorros? Liste a id do proprietário, nome e sobrenome.", "question_toks": [ "Qual", "dono", "tem", "mais", "cachorros", "?", "Liste", "a", "id", "do", "proprietário", ",", "nome", "e", "sobrenome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 21, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 21, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T2.first_name", ",", "T2.last_name", "FROM", "Dogs", "AS", "T1", "JOIN", "Owners", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t2", ".", "first_name", ",", "t2", ".", "last_name", "from", "dogs", "as", "t1", "join", "owners", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "group", "by", "t1", ".", "owner_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Retorne a identificação do proprietário, nome e sobrenome do proprietário que tem mais cães.", "question_toks": [ "Retorne", "a", "identificação", "do", "proprietário", ",", "nome", "e", "sobrenome", "do", "proprietário", "que", "tem", "mais", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 4 ] ], "conds": [ [ false, 2, [ 0, [ 0, 21, false ], null ], [ 0, 10, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 21, false ], null ] ], [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 21, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.first_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "first_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais profissionais fizeram pelo menos dois tratamentos? Liste a identidade, a função e o nome do profissional.", "question_toks": [ "Quais", "profissionais", "fizeram", "pelo", "menos", "dois", "tratamentos", "?", "Liste", "a", "identidade", ",", "a", "função", "e", "o", "nome", "do", "profissional", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.first_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "first_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Qual é a identidade, função e nome dos profissionais que realizaram dois ou mais tratamentos?", "question_toks": [ "Qual", "é", "a", "identidade", ",", "função", "e", "nome", "dos", "profissionais", "que", "realizaram", "dois", "ou", "mais", "tratamentos", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.breed_name", "FROM", "Breeds", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.breed_code", "=", "T2.breed_code", "GROUP", "BY", "T1.breed_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "breed_name", "from", "breeds", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "breed_code", "=", "t2", ".", "breed_code", "group", "by", "t1", ".", "breed_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é o nome da raça com mais cães?", "question_toks": [ "Qual", "é", "o", "nome", "da", "raça", "com", "mais", "cães", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.breed_name", "FROM", "Breeds", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.breed_code", "=", "T2.breed_code", "GROUP", "BY", "T1.breed_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "breed_name", "from", "breeds", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "breed_code", "=", "t2", ".", "breed_code", "group", "by", "t1", ".", "breed_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual raça a maioria dos cães tem? Dê-me o nome da raça.", "question_toks": [ "Qual", "raça", "a", "maioria", "dos", "cães", "tem", "?", "Dê-me", "o", "nome", "da", "raça", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 23, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ".", "dog_id", "group", "by", "t1", ".", "owner_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual proprietário pagou mais tratamentos em seus cães? Liste a id do proprietário e o sobrenome.", "question_toks": [ "Qual", "proprietário", "pagou", "mais", "tratamentos", "em", "seus", "cães", "?", "Liste", "a", "id", "do", "proprietário", "e", "o", "sobrenome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ".", "dog_id", "group", "by", "t1", ".", "owner_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Diga-me a identidade do dono e o sobrenome do dono que mais gastou no tratamento de seus cães.", "question_toks": [ "Diga-me", "a", "identidade", "do", "dono", "e", "o", "sobrenome", "do", "dono", "que", "mais", "gastou", "no", "tratamento", "de", "seus", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "query_toks": [ "SELECT", "T1.treatment_type_description", "FROM", "Treatment_types", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code", "GROUP", "BY", "T1.treatment_type_code", "ORDER", "BY", "sum", "(", "cost_of_treatment", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "treatment_type_description", "from", "treatment_types", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code", "group", "by", "t1", ".", "treatment_type_code", "order", "by", "sum", "(", "cost_of_treatment", ")", "asc", "limit", "value" ], "question": "Qual é a descrição do tipo de tratamento que custa menos dinheiro no total?", "question_toks": [ "Qual", "é", "a", "descrição", "do", "tipo", "de", "tratamento", "que", "custa", "menos", "dinheiro", "no", "total", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 4, 49, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "query_toks": [ "SELECT", "T1.treatment_type_description", "FROM", "Treatment_types", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code", "GROUP", "BY", "T1.treatment_type_code", "ORDER", "BY", "sum", "(", "cost_of_treatment", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "treatment_type_description", "from", "treatment_types", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code", "group", "by", "t1", ".", "treatment_type_code", "order", "by", "sum", "(", "cost_of_treatment", ")", "asc", "limit", "value" ], "question": "Dê-me a descrição do tipo de tratamento cujo custo total é o mais baixo.", "question_toks": [ "Dê-me", "a", "descrição", "do", "tipo", "de", "tratamento", "cujo", "custo", "total", "é", "o", "mais", "baixo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 8, false ], null ], [ 0, 47, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 4, 49, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T1.zip_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "sum", "(", "T3.cost_of_treatment", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t1", ".", "zip_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ".", "dog_id", "group", "by", "t1", ".", "owner_id", "order", "by", "sum", "(", "t3", ".", "cost_of_treatment", ")", "desc", "limit", "value" ], "question": "Qual proprietário pagou a maior quantia de dinheiro no total por seus cães? Mostre o ID do proprietário e o código postal.", "question_toks": [ "Qual", "proprietário", "pagou", "a", "maior", "quantia", "de", "dinheiro", "no", "total", "por", "seus", "cães", "?", "Mostre", "o", "ID", "do", "proprietário", "e", "o", "código", "postal", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 4, 49, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "query_toks": [ "SELECT", "T1.owner_id", ",", "T1.zip_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "sum", "(", "T3.cost_of_treatment", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "t1", ".", "owner_id", ",", "t1", ".", "zip_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ".", "dog_id", "group", "by", "t1", ".", "owner_id", "order", "by", "sum", "(", "t3", ".", "cost_of_treatment", ")", "desc", "limit", "value" ], "question": "Encontre a identificação do proprietário e o código postal do proprietário que gastou mais dinheiro no total com seus cães.", "question_toks": [ "Encontre", "a", "identificação", "do", "proprietário", "e", "o", "código", "postal", "do", "proprietário", "que", "gastou", "mais", "dinheiro", "no", "total", "com", "seus", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ], "and", [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 0, [ 0, [ 0, 16, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 4, 49, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.professional_id", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "professional_id", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Quais profissionais realizaram pelo menos dois tipos de tratamento? Liste a identificação profissional e o telefone celular.", "question_toks": [ "Quais", "profissionais", "realizaram", "pelo", "menos", "dois", "tipos", "de", "tratamento", "?", "Liste", "a", "identificação", "profissional", "e", "o", "telefone", "celular", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "query_toks": [ "SELECT", "T1.professional_id", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "t1", ".", "professional_id", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Encontre o id e o celular dos profissionais que operam dois ou mais tipos de tratamentos.", "question_toks": [ "Encontre", "o", "id", "e", "o", "celular", "dos", "profissionais", "que", "operam", "dois", "ou", "mais", "tipos", "de", "tratamentos", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 33, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 33, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.last_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "WHERE", "cost_of_treatment", "<", "(", "SELECT", "avg", "(", "cost_of_treatment", ")", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "last_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "where", "cost_of_treatment", "<", "(", "select", "avg", "(", "cost_of_treatment", ")", "from", "treatments", ")" ], "question": "Quais são o nome e o sobrenome dos profissionais que fizeram tratamento com custo abaixo da média?", "question_toks": [ "Quais", "são", "o", "nome", "e", "o", "sobrenome", "dos", "profissionais", "que", "fizeram", "tratamento", "com", "custo", "abaixo", "da", "média", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 49, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 49, 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": "dog_kennels", "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.last_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "WHERE", "cost_of_treatment", "<", "(", "SELECT", "avg", "(", "cost_of_treatment", ")", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "last_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "where", "cost_of_treatment", "<", "(", "select", "avg", "(", "cost_of_treatment", ")", "from", "treatments", ")" ], "question": "Quais profissionais operaram um tratamento que custa menos que a média? Dê-me seus primeiros nomes e sobrenomes.", "question_toks": [ "Quais", "profissionais", "operaram", "um", "tratamento", "que", "custa", "menos", "que", "a", "média", "?", "Dê-me", "seus", "primeiros", "nomes", "e", "sobrenomes", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 40, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 49, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 49, 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": "dog_kennels", "query": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id", "query_toks": [ "SELECT", "T1.date_of_treatment", ",", "T2.first_name", "FROM", "Treatments", "AS", "T1", "JOIN", "Professionals", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ], "query_toks_no_value": [ "select", "t1", ".", "date_of_treatment", ",", "t2", ".", "first_name", "from", "treatments", "as", "t1", "join", "professionals", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ], "question": "Liste a data de cada tratamento, juntamente com o nome do profissional que o operou.", "question_toks": [ "Liste", "a", "data", "de", "cada", "tratamento", ",", "juntamente", "com", "o", "nome", "do", "profissional", "que", "o", "operou", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ], [ "table_unit", 6 ] ], "conds": [ [ false, 2, [ 0, [ 0, 46, false ], null ], [ 0, 33, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 48, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id", "query_toks": [ "SELECT", "T1.date_of_treatment", ",", "T2.first_name", "FROM", "Treatments", "AS", "T1", "JOIN", "Professionals", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ], "query_toks_no_value": [ "select", "t1", ".", "date_of_treatment", ",", "t2", ".", "first_name", "from", "treatments", "as", "t1", "join", "professionals", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ], "question": "Quais são a data e o primeiro nome do operador de cada tratamento?", "question_toks": [ "Quais", "são", "a", "data", "e", "o", "primeiro", "nome", "do", "operador", "de", "cada", "tratamento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ], [ "table_unit", 6 ] ], "conds": [ [ false, 2, [ 0, [ 0, 46, false ], null ], [ 0, 33, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 48, false ], null ] ], [ 0, [ 0, [ 0, 35, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code", "query_toks": [ "SELECT", "T1.cost_of_treatment", ",", "T2.treatment_type_description", "FROM", "Treatments", "AS", "T1", "JOIN", "treatment_types", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code" ], "query_toks_no_value": [ "select", "t1", ".", "cost_of_treatment", ",", "t2", ".", "treatment_type_description", "from", "treatments", "as", "t1", "join", "treatment_types", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code" ], "question": "Liste o custo de cada tratamento e a descrição do tipo de tratamento correspondente.", "question_toks": [ "Liste", "o", "custo", "de", "cada", "tratamento", "e", "a", "descrição", "do", "tipo", "de", "tratamento", "correspondente", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 47, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 49, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code", "query_toks": [ "SELECT", "T1.cost_of_treatment", ",", "T2.treatment_type_description", "FROM", "Treatments", "AS", "T1", "JOIN", "treatment_types", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code" ], "query_toks_no_value": [ "select", "t1", ".", "cost_of_treatment", ",", "t2", ".", "treatment_type_description", "from", "treatments", "as", "t1", "join", "treatment_types", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code" ], "question": "Quais são os custos e a descrição do tipo de tratamento de cada tratamento?", "question_toks": [ "Quais", "são", "os", "custos", "e", "a", "descrição", "do", "tipo", "de", "tratamento", "de", "cada", "tratamento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 47, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 49, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.last_name", ",", "T2.size_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "last_name", ",", "t2", ".", "size_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ], "question": "Liste o nome e o sobrenome de cada dono e o tamanho do nome do cachorro.", "question_toks": [ "Liste", "o", "nome", "e", "o", "sobrenome", "de", "cada", "dono", "e", "o", "tamanho", "do", "nome", "do", "cachorro", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "query_toks": [ "SELECT", "T1.first_name", ",", "T1.last_name", ",", "T2.size_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t1", ".", "last_name", ",", "t2", ".", "size_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ], "question": "Quais são o nome, o sobrenome de cada dono e o tamanho do cachorro?", "question_toks": [ "Quais", "são", "o", "nome", ",", "o", "sobrenome", "de", "cada", "dono", "e", "o", "tamanho", "do", "cachorro", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "query_toks": [ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ], "question": "Liste pares do primeiro nome do proprietário e do nome dos cães.", "question_toks": [ "Liste", "pares", "do", "primeiro", "nome", "do", "proprietário", "e", "do", "nome", "dos", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "query_toks": [ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ], "question": "Qual é o primeiro nome de cada proprietário e o nome de seus cães?", "question_toks": [ "Qual", "é", "o", "primeiro", "nome", "de", "cada", "proprietário", "e", "o", "nome", "de", "seus", "cães", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "query_toks": [ "SELECT", "T1.name", ",", "T2.date_of_treatment", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id", "WHERE", "T1.breed_code", "=", "(", "SELECT", "breed_code", "FROM", "Dogs", "GROUP", "BY", "breed_code", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1", ")" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t2", ".", "date_of_treatment", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id", "where", "t1", ".", "breed_code", "=", "(", "select", "breed_code", "from", "dogs", "group", "by", "breed_code", "order", "by", "count", "(", "*", ")", "asc", "limit", "value", ")" ], "question": "Liste os nomes dos cães da raça mais rara e as datas de tratamento deles.", "question_toks": [ "Liste", "os", "nomes", "dos", "cães", "da", "raça", "mais", "rara", "e", "as", "datas", "de", "tratamento", "deles", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 48, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "query_toks": [ "SELECT", "T1.name", ",", "T2.date_of_treatment", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id", "WHERE", "T1.breed_code", "=", "(", "SELECT", "breed_code", "FROM", "Dogs", "GROUP", "BY", "breed_code", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1", ")" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "t2", ".", "date_of_treatment", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id", "where", "t1", ".", "breed_code", "=", "(", "select", "breed_code", "from", "dogs", "group", "by", "breed_code", "order", "by", "count", "(", "*", ")", "asc", "limit", "value", ")" ], "question": "Quais cães são da raça mais rara? Mostre seus nomes e datas de tratamento.", "question_toks": [ "Quais", "cães", "são", "da", "raça", "mais", "rara", "?", "Mostre", "seus", "nomes", "e", "datas", "de", "tratamento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 48, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 23, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 23, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 23, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'", "query_toks": [ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T1.state", "=", "'Virginia", "'" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t1", ".", "state", "=", "value" ], "question": "Quais cães são propriedade de alguém que mora na Virgínia? Liste o primeiro nome do dono e o nome do cachorro.", "question_toks": [ "Quais", "cães", "são", "propriedade", "de", "alguém", "que", "mora", "na", "Virgínia", "?", "Liste", "o", "primeiro", "nome", "do", "dono", "e", "o", "nome", "do", "cachorro", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"Virginia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'", "query_toks": [ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T1.state", "=", "'Virginia", "'" ], "query_toks_no_value": [ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t1", ".", "state", "=", "value" ], "question": "Encontre os primeiros nomes dos proprietários que vivem na Virgínia e os nomes dos cães que possuem.", "question_toks": [ "Encontre", "os", "primeiros", "nomes", "dos", "proprietários", "que", "vivem", "na", "Virgínia", "e", "os", "nomes", "dos", "cães", "que", "possuem", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 25, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 15, false ], null ], "\"Virginia\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "query_toks": [ "SELECT", "DISTINCT", "T1.date_arrived", ",", "T1.date_departed", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "date_arrived", ",", "t1", ".", "date_departed", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id" ], "question": "Quais são as datas de chegada e saída dos cães que passaram por tratamento?", "question_toks": [ "Quais", "são", "as", "datas", "de", "chegada", "e", "saída", "dos", "cães", "que", "passaram", "por", "tratamento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 30, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "query_toks": [ "SELECT", "DISTINCT", "T1.date_arrived", ",", "T1.date_departed", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "date_arrived", ",", "t1", ".", "date_departed", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id" ], "question": "Encontre a data de chegada e a data de partida dos cães que receberam o tratamento.", "question_toks": [ "Encontre", "a", "data", "de", "chegada", "e", "a", "data", "de", "partida", "dos", "cães", "que", "receberam", "o", "tratamento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ], [ "table_unit", 7 ] ], "conds": [ [ false, 2, [ 0, [ 0, 20, false ], null ], [ 0, 45, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 30, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )", "query_toks": [ "SELECT", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T2.age", "=", "(", "SELECT", "max", "(", "age", ")", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t2", ".", "age", "=", "(", "select", "max", "(", "age", ")", "from", "dogs", ")" ], "question": "Liste o sobrenome do dono do cão mais novo.", "question_toks": [ "Liste", "o", "sobrenome", "do", "dono", "do", "cão", "mais", "novo", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 26, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 26, 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": "dog_kennels", "query": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )", "query_toks": [ "SELECT", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T2.age", "=", "(", "SELECT", "max", "(", "age", ")", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t2", ".", "age", "=", "(", "select", "max", "(", "age", ")", "from", "dogs", ")" ], "question": "Quem é o dono do cachorro mais novo? Dê-me seu sobrenome.", "question_toks": [ "Quem", "é", "o", "dono", "do", "cachorro", "mais", "novo", "?", "Dê-me", "seu", "sobrenome", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ], [ "table_unit", 5 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 21, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 26, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 26, 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": "dog_kennels", "query": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'", "query_toks": [ "SELECT", "email_address", "FROM", "Professionals", "WHERE", "state", "=", "'Hawaii", "'", "OR", "state", "=", "'Wisconsin", "'" ], "query_toks_no_value": [ "select", "email_address", "from", "professionals", "where", "state", "=", "value", "or", "state", "=", "value" ], "question": "Liste os e-mails dos profissionais que moram no estado do Havaí ou no estado de Wisconsin.", "question_toks": [ "Liste", "os", "e-mails", "dos", "profissionais", "que", "moram", "no", "estado", "do", "Havaí", "ou", "no", "estado", "de", "Wisconsin", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Hawaii\"", null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Wisconsin\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'", "query_toks": [ "SELECT", "email_address", "FROM", "Professionals", "WHERE", "state", "=", "'Hawaii", "'", "OR", "state", "=", "'Wisconsin", "'" ], "query_toks_no_value": [ "select", "email_address", "from", "professionals", "where", "state", "=", "value", "or", "state", "=", "value" ], "question": "Quais são os e-mails dos profissionais que moram no estado do Havaí ou no estado de Wisconsin?", "question_toks": [ "Quais", "são", "os", "e-mails", "dos", "profissionais", "que", "moram", "no", "estado", "do", "Havaí", "ou", "no", "estado", "de", "Wisconsin", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 41, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Hawaii\"", null ], "or", [ false, 2, [ 0, [ 0, 38, false ], null ], "\"Wisconsin\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT date_arrived , date_departed FROM Dogs", "query_toks": [ "SELECT", "date_arrived", ",", "date_departed", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "date_arrived", ",", "date_departed", "from", "dogs" ], "question": "Quais são as datas de chegada e partida de todos os cães?", "question_toks": [ "Quais", "são", "as", "datas", "de", "chegada", "e", "partida", "de", "todos", "os", "cães", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 30, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT date_arrived , date_departed FROM Dogs", "query_toks": [ "SELECT", "date_arrived", ",", "date_departed", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "date_arrived", ",", "date_departed", "from", "dogs" ], "question": "Liste a data de chegada e a data de saída para todos os cães.", "question_toks": [ "Liste", "a", "data", "de", "chegada", "e", "a", "data", "de", "saída", "para", "todos", "os", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 30, false ], null ] ], [ 0, [ 0, [ 0, 32, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(DISTINCT dog_id) FROM Treatments", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "dog_id", ")", "FROM", "Treatments" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "dog_id", ")", "from", "treatments" ], "question": "Quantos cães passaram por algum tratamento?", "question_toks": [ "Quantos", "cães", "passaram", "por", "algum", "tratamento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 45, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(DISTINCT dog_id) FROM Treatments", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "dog_id", ")", "FROM", "Treatments" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "dog_id", ")", "from", "treatments" ], "question": "Conte o número de cães que passaram por um tratamento.", "question_toks": [ "Conte", "o", "número", "de", "cães", "que", "passaram", "por", "um", "tratamento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 45, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(DISTINCT professional_id) FROM Treatments", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "professional_id", ")", "FROM", "Treatments" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "professional_id", ")", "from", "treatments" ], "question": "Quantos profissionais já realizaram algum tratamento em cães?", "question_toks": [ "Quantos", "profissionais", "já", "realizaram", "algum", "tratamento", "em", "cães", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 46, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(DISTINCT professional_id) FROM Treatments", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "professional_id", ")", "FROM", "Treatments" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "professional_id", ")", "from", "treatments" ], "question": "Encontre o número de profissionais que já trataram de cães.", "question_toks": [ "Encontre", "o", "número", "de", "profissionais", "que", "já", "trataram", "de", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 46, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'", "query_toks": [ "SELECT", "role_code", ",", "street", ",", "city", ",", "state", "FROM", "professionals", "WHERE", "city", "LIKE", "'", "%", "West", "%", "'" ], "query_toks_no_value": [ "select", "role_code", ",", "street", ",", "city", ",", "state", "from", "professionals", "where", "city", "like", "value" ], "question": "Quais profissionais moram em uma cidade que contém a substring 'Oeste'? Liste sua função, rua, cidade e estado.", "question_toks": [ "Quais", "profissionais", "moram", "em", "uma", "cidade", "que", "contém", "a", "substring", "'", "Oeste", "'", "?", "Liste", "sua", "função", ",", "rua", ",", "cidade", "e", "estado", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 37, false ], null ], "\"%West%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'", "query_toks": [ "SELECT", "role_code", ",", "street", ",", "city", ",", "state", "FROM", "professionals", "WHERE", "city", "LIKE", "'", "%", "West", "%", "'" ], "query_toks_no_value": [ "select", "role_code", ",", "street", ",", "city", ",", "state", "from", "professionals", "where", "city", "like", "value" ], "question": "Encontre a função, rua, cidade e estado dos profissionais que vivem em uma cidade que contém o substring 'Oeste'.", "question_toks": [ "Encontre", "a", "função", ",", "rua", ",", "cidade", "e", "estado", "dos", "profissionais", "que", "vivem", "em", "uma", "cidade", "que", "contém", "o", "substring", "'", "Oeste", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 34, false ], null ] ], [ 0, [ 0, [ 0, 36, false ], null ] ], [ 0, [ 0, [ 0, 37, false ], null ] ], [ 0, [ 0, [ 0, 38, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 37, false ], null ], "\"%West%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "query_toks": [ "SELECT", "first_name", ",", "last_name", ",", "email_address", "FROM", "Owners", "WHERE", "state", "LIKE", "'", "%", "North", "%", "'" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", ",", "email_address", "from", "owners", "where", "state", "like", "value" ], "question": "Quais proprietários vivem no estado cujo nome contém a substring 'Norte'? Liste seu nome, sobrenome e e-mail.", "question_toks": [ "Quais", "proprietários", "vivem", "no", "estado", "cujo", "nome", "contém", "a", "substring", "'", "Norte", "'", "?", "Liste", "seu", "nome", ",", "sobrenome", "e", "e-mail", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 15, false ], null ], "\"%North%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "query_toks": [ "SELECT", "first_name", ",", "last_name", ",", "email_address", "FROM", "Owners", "WHERE", "state", "LIKE", "'", "%", "North", "%", "'" ], "query_toks_no_value": [ "select", "first_name", ",", "last_name", ",", "email_address", "from", "owners", "where", "state", "like", "value" ], "question": "Retorne o nome, o sobrenome e o e-mail dos proprietários que vivem em um estado cujo nome contém a substring 'Norte'.", "question_toks": [ "Retorne", "o", "nome", ",", "o", "sobrenome", "e", "o", "e-mail", "dos", "proprietários", "que", "vivem", "em", "um", "estado", "cujo", "nome", "contém", "a", "substring", "'", "Norte", "'", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ], [ 0, [ 0, [ 0, 17, false ], null ] ] ] ], "where": [ [ false, 9, [ 0, [ 0, 15, false ], null ], "\"%North%\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Dogs", "WHERE", "age", "<", "(", "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "age", "<", "(", "select", "avg", "(", "age", ")", "from", "dogs", ")" ], "question": "Quantos cães têm idade abaixo da média?", "question_toks": [ "Quantos", "cães", "têm", "idade", "abaixo", "da", "média", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 26, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, 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": "dog_kennels", "query": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Dogs", "WHERE", "age", "<", "(", "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "age", "<", "(", "select", "avg", "(", "age", ")", "from", "dogs", ")" ], "question": "Conte o número de cães de uma idade abaixo da média.", "question_toks": [ "Conte", "o", "número", "de", "cães", "de", "uma", "idade", "abaixo", "da", "média", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 26, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, 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": "dog_kennels", "query": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", "query_toks": [ "SELECT", "cost_of_treatment", "FROM", "Treatments", "ORDER", "BY", "date_of_treatment", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "cost_of_treatment", "from", "treatments", "order", "by", "date_of_treatment", "desc", "limit", "value" ], "question": "Quanto custa o tratamento mais recente?", "question_toks": [ "Quanto", "custa", "o", "tratamento", "mais", "recente", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 49, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 48, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", "query_toks": [ "SELECT", "cost_of_treatment", "FROM", "Treatments", "ORDER", "BY", "date_of_treatment", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "cost_of_treatment", "from", "treatments", "order", "by", "date_of_treatment", "desc", "limit", "value" ], "question": "Mostre-me o custo do tratamento realizado mais recentemente.", "question_toks": [ "Mostre-me", "o", "custo", "do", "tratamento", "realizado", "mais", "recentemente", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 49, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 48, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Dogs", "WHERE", "dog_id", "NOT", "IN", "(", "SELECT", "dog_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "question": "Quantos cães não passaram por nenhum tratamento?", "question_toks": [ "Quantos", "cães", "não", "passaram", "por", "nenhum", "tratamento", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, 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": "dog_kennels", "query": "select count(*) from dogs where dog_id not in ( select dog_id from treatments )", "query_toks": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", ")" ], "question": "Diga-me quantos cães não receberam nenhum tratamento.", "question_toks": [ "Diga-me", "quantos", "cães", "não", "receberam", "nenhum", "tratamento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 20, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 45, 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": "dog_kennels", "query": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Owners", "WHERE", "owner_id", "NOT", "IN", "(", "SELECT", "owner_id", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "owners", "where", "owner_id", "not", "in", "(", "select", "owner_id", "from", "dogs", ")" ], "question": "Quantos proprietários temporariamente não têm cães?", "question_toks": [ "Quantos", "proprietários", "temporariamente", "não", "têm", "cães", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 10, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 21, 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": "dog_kennels", "query": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Owners", "WHERE", "owner_id", "NOT", "IN", "(", "SELECT", "owner_id", "FROM", "Dogs", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "owners", "where", "owner_id", "not", "in", "(", "select", "owner_id", "from", "dogs", ")" ], "question": "Encontre o número de proprietários que não possuem nenhum cachorro no momento.", "question_toks": [ "Encontre", "o", "número", "de", "proprietários", "que", "não", "possuem", "nenhum", "cachorro", "no", "momento", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 4 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 10, false ], null ], { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 21, 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": "dog_kennels", "query": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Professionals", "WHERE", "professional_id", "NOT", "IN", "(", "SELECT", "professional_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "professionals", "where", "professional_id", "not", "in", "(", "select", "professional_id", "from", "treatments", ")" ], "question": "Quantos profissionais não operaram nenhum tratamento em cães?", "question_toks": [ "Quantos", "profissionais", "não", "operaram", "nenhum", "tratamento", "em", "cães", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 33, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 46, 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": "dog_kennels", "query": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Professionals", "WHERE", "professional_id", "NOT", "IN", "(", "SELECT", "professional_id", "FROM", "Treatments", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "professionals", "where", "professional_id", "not", "in", "(", "select", "professional_id", "from", "treatments", ")" ], "question": "Encontre o número de profissionais que não trataram nenhum cão.", "question_toks": [ "Encontre", "o", "número", "de", "profissionais", "que", "não", "trataram", "nenhum", "cão", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 33, false ], null ], { "from": { "table_units": [ [ "table_unit", 7 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 46, 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": "dog_kennels", "query": "SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1", "query_toks": [ "SELECT", "name", ",", "age", ",", "weight", "FROM", "Dogs", "WHERE", "abandoned_yn", "=", "1" ], "query_toks_no_value": [ "select", "name", ",", "age", ",", "weight", "from", "dogs", "where", "abandoned_yn", "=", "value" ], "question": "Liste o nome do cão, idade e peso dos cães que foram abandonados? 1 significa sim e 0 significa não.", "question_toks": [ "Liste", "o", "nome", "do", "cão", ",", "idade", "e", "peso", "dos", "cães", "que", "foram", "abandonados", "?", "1", "significa", "sim", "e", "0", "significa", "não", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 26, false ], null ] ], [ 0, [ 0, [ 0, 29, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1", "query_toks": [ "SELECT", "name", ",", "age", ",", "weight", "FROM", "Dogs", "WHERE", "abandoned_yn", "=", "1" ], "query_toks_no_value": [ "select", "name", ",", "age", ",", "weight", "from", "dogs", "where", "abandoned_yn", "=", "value" ], "question": "Qual é o nome do cão, idade e peso dos cães que foram abandonados? Observe que 1 significa sim e 0 significa não nas tabelas.", "question_toks": [ "Qual", "é", "o", "nome", "do", "cão", ",", "idade", "e", "peso", "dos", "cães", "que", "foram", "abandonados", "?", "Observe", "que", "1", "significa", "sim", "e", "0", "significa", "não", "nas", "tabelas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 25, false ], null ] ], [ 0, [ 0, [ 0, 26, false ], null ] ], [ 0, [ 0, [ 0, 29, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 22, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT avg(age) FROM Dogs", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "dogs" ], "question": "Qual é a idade média de todos os cães?", "question_toks": [ "Qual", "é", "a", "idade", "média", "de", "todos", "os", "cães", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT avg(age) FROM Dogs", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "dogs" ], "question": "Calcule a idade média de todos os cães.", "question_toks": [ "Calcule", "a", "idade", "média", "de", "todos", "os", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT max(age) FROM Dogs", "query_toks": [ "SELECT", "max", "(", "age", ")", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "max", "(", "age", ")", "from", "dogs" ], "question": "Qual é a idade do cachorro mais velho?", "question_toks": [ "Qual", "é", "a", "idade", "do", "cachorro", "mais", "velho", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT max(age) FROM Dogs", "query_toks": [ "SELECT", "max", "(", "age", ")", "FROM", "Dogs" ], "query_toks_no_value": [ "select", "max", "(", "age", ")", "from", "dogs" ], "question": "Diga-me a idade do cão mais velho.", "question_toks": [ "Diga-me", "a", "idade", "do", "cão", "mais", "velho", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 26, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT charge_type , charge_amount FROM Charges", "query_toks": [ "SELECT", "charge_type", ",", "charge_amount", "FROM", "Charges" ], "query_toks_no_value": [ "select", "charge_type", ",", "charge_amount", "from", "charges" ], "question": "Quanto custa cada tipo de cobrança? Liste o tipo e o valor da cobrança.", "question_toks": [ "Quanto", "custa", "cada", "tipo", "de", "cobrança", "?", "Liste", "o", "tipo", "e", "o", "valor", "da", "cobrança", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT charge_type , charge_amount FROM Charges", "query_toks": [ "SELECT", "charge_type", ",", "charge_amount", "FROM", "Charges" ], "query_toks_no_value": [ "select", "charge_type", ",", "charge_amount", "from", "charges" ], "question": "Liste cada tipo de cobrança e seu valor.", "question_toks": [ "Liste", "cada", "tipo", "de", "cobrança", "e", "seu", "valor", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT max(charge_amount) FROM Charges", "query_toks": [ "SELECT", "max", "(", "charge_amount", ")", "FROM", "Charges" ], "query_toks_no_value": [ "select", "max", "(", "charge_amount", ")", "from", "charges" ], "question": "Quanto custa o tipo de cobrança mais caro?", "question_toks": [ "Quanto", "custa", "o", "tipo", "de", "cobrança", "mais", "caro", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT max(charge_amount) FROM Charges", "query_toks": [ "SELECT", "max", "(", "charge_amount", ")", "FROM", "Charges" ], "query_toks_no_value": [ "select", "max", "(", "charge_amount", ")", "from", "charges" ], "question": "Qual é o valor da cobrança do tipo de cobrança mais caro?", "question_toks": [ "Qual", "é", "o", "valor", "da", "cobrança", "do", "tipo", "de", "cobrança", "mais", "caro", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT email_address , cell_number , home_phone FROM professionals", "query_toks": [ "SELECT", "email_address", ",", "cell_number", ",", "home_phone", "FROM", "professionals" ], "query_toks_no_value": [ "select", "email_address", ",", "cell_number", ",", "home_phone", "from", "professionals" ], "question": "Liste o e-mail, telefone celular e telefone residencial de todos os profissionais.", "question_toks": [ "Liste", "o", "e-mail", ",", "telefone", "celular", "e", "telefone", "residencial", "de", "todos", "os", "profissionais", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 41, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ], [ 0, [ 0, [ 0, 42, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT email_address , cell_number , home_phone FROM professionals", "query_toks": [ "SELECT", "email_address", ",", "cell_number", ",", "home_phone", "FROM", "professionals" ], "query_toks_no_value": [ "select", "email_address", ",", "cell_number", ",", "home_phone", "from", "professionals" ], "question": "Quais são o e-mail, celular e telefone residencial de cada profissional?", "question_toks": [ "Quais", "são", "o", "e-mail", ",", "celular", "e", "telefone", "residencial", "de", "cada", "profissional", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 41, false ], null ] ], [ 0, [ 0, [ 0, 43, false ], null ] ], [ 0, [ 0, [ 0, 42, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT breed_code , size_code FROM dogs", "query_toks": [ "SELECT", "DISTINCT", "breed_code", ",", "size_code", "FROM", "dogs" ], "query_toks_no_value": [ "select", "distinct", "breed_code", ",", "size_code", "from", "dogs" ], "question": "Quais são todas as combinações possíveis de tipo de raça e tipo de tamanho?", "question_toks": [ "Quais", "são", "todas", "as", "combinações", "possíveis", "de", "tipo", "de", "raça", "e", "tipo", "de", "tamanho", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ], [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT breed_code , size_code FROM dogs", "query_toks": [ "SELECT", "DISTINCT", "breed_code", ",", "size_code", "FROM", "dogs" ], "query_toks_no_value": [ "select", "distinct", "breed_code", ",", "size_code", "from", "dogs" ], "question": "Encontre o tipo distinto de raça e combinações de tipo de tamanho para cães.", "question_toks": [ "Encontre", "o", "tipo", "distinto", "de", "raça", "e", "combinações", "de", "tipo", "de", "tamanho", "para", "cães", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 5 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 23, false ], null ] ], [ 0, [ 0, [ 0, 24, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T3.treatment_type_description", "FROM", "professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "JOIN", "Treatment_types", "AS", "T3", "ON", "T2.treatment_type_code", "=", "T3.treatment_type_code" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t3", ".", "treatment_type_description", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "join", "treatment_types", "as", "t3", "on", "t2", ".", "treatment_type_code", "=", "t3", ".", "treatment_type_code" ], "question": "Liste o primeiro nome de todos os profissionais junto com a descrição do tratamento que realizaram.", "question_toks": [ "Liste", "o", "primeiro", "nome", "de", "todos", "os", "profissionais", "junto", "com", "a", "descrição", "do", "tratamento", "que", "realizaram", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ], "and", [ false, 2, [ 0, [ 0, 47, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "dog_kennels", "query": "SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code", "query_toks": [ "SELECT", "DISTINCT", "T1.first_name", ",", "T3.treatment_type_description", "FROM", "professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "JOIN", "Treatment_types", "AS", "T3", "ON", "T2.treatment_type_code", "=", "T3.treatment_type_code" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "first_name", ",", "t3", ".", "treatment_type_description", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "join", "treatment_types", "as", "t3", "on", "t2", ".", "treatment_type_code", "=", "t3", ".", "treatment_type_code" ], "question": "Qual o primeiro nome de cada profissional e a descrição do tratamento realizado?", "question_toks": [ "Qual", "o", "primeiro", "nome", "de", "cada", "profissional", "e", "a", "descrição", "do", "tratamento", "realizado", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 6 ], [ "table_unit", 7 ], [ "table_unit", 3 ] ], "conds": [ [ false, 2, [ 0, [ 0, 33, false ], null ], [ 0, 46, false ], null ], "and", [ false, 2, [ 0, [ 0, 47, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 35, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT count(*) FROM singer", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "singer" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "singer" ], "question": "Quantos cantores existem?", "question_toks": [ "Quantos", "cantores", "existem", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT count(*) FROM singer", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "singer" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "singer" ], "question": "Qual é a contagem de cantores?", "question_toks": [ "Qual", "é", "a", "contagem", "de", "cantores", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC", "query_toks": [ "SELECT", "Name", "FROM", "singer", "ORDER", "BY", "Net_Worth_Millions", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "singer", "order", "by", "net_worth_millions", "asc" ], "question": "Liste os nomes dos cantores em ordem crescente de patrimônio líquido.", "question_toks": [ "Liste", "os", "nomes", "dos", "cantores", "em", "ordem", "crescente", "de", "patrimônio", "líquido", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC", "query_toks": [ "SELECT", "Name", "FROM", "singer", "ORDER", "BY", "Net_Worth_Millions", "ASC" ], "query_toks_no_value": [ "select", "name", "from", "singer", "order", "by", "net_worth_millions", "asc" ], "question": "Quais são os nomes dos cantores ordenados por patrimônio líquido crescente?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "cantores", "ordenados", "por", "patrimônio", "líquido", "crescente", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Birth_Year , Citizenship FROM singer", "query_toks": [ "SELECT", "Birth_Year", ",", "Citizenship", "FROM", "singer" ], "query_toks_no_value": [ "select", "birth_year", ",", "citizenship", "from", "singer" ], "question": "Quais são o ano de nascimento e a cidadania dos cantores?", "question_toks": [ "Quais", "são", "o", "ano", "de", "nascimento", "e", "a", "cidadania", "dos", "cantores", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Birth_Year , Citizenship FROM singer", "query_toks": [ "SELECT", "Birth_Year", ",", "Citizenship", "FROM", "singer" ], "query_toks_no_value": [ "select", "birth_year", ",", "citizenship", "from", "singer" ], "question": "Quais são os anos de nascimento e a cidadania dos cantores?", "question_toks": [ "Quais", "são", "os", "anos", "de", "nascimento", "e", "a", "cidadania", "dos", "cantores", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ], [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Citizenship != \"France\"", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Citizenship", "!", "=", "``", "France", "''" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "citizenship", "!", "=", "value" ], "question": "Liste o nome de cantores cuja cidadania não seja \"França\".", "question_toks": [ "Liste", "o", "nome", "de", "cantores", "cuja", "cidadania", "não", "seja", "\"", "França", "\"", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 5, false ], null ], "\"France\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Citizenship != \"France\"", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Citizenship", "!", "=", "``", "France", "''" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "citizenship", "!", "=", "value" ], "question": "Quais são os nomes dos cantores que não são cidadãos franceses?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "cantores", "que", "não", "são", "cidadãos", "franceses", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 7, [ 0, [ 0, 5, false ], null ], "\"France\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Birth_Year", "=", "1948", "OR", "Birth_Year", "=", "1949" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "birth_year", "=", "value", "or", "birth_year", "=", "value" ], "question": "Mostre o nome dos cantores cujo ano de nascimento é 1948 ou 1949?", "question_toks": [ "Mostre", "o", "nome", "dos", "cantores", "cujo", "ano", "de", "nascimento", "é", "1948", "ou", "1949", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 1948.0, null ], "or", [ false, 2, [ 0, [ 0, 3, false ], null ], 1949.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Birth_Year", "=", "1948", "OR", "Birth_Year", "=", "1949" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "birth_year", "=", "value", "or", "birth_year", "=", "value" ], "question": "Quais são os nomes dos cantores cujos anos de nascimento são 1948 ou 1949?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "cantores", "cujos", "anos", "de", "nascimento", "são", "1948", "ou", "1949", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 3, false ], null ], 1948.0, null ], "or", [ false, 2, [ 0, [ 0, 3, false ], null ], 1949.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "singer", "ORDER", "BY", "Net_Worth_Millions", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "singer", "order", "by", "net_worth_millions", "desc", "limit", "value" ], "question": "Qual é o nome da cantora com maior patrimônio líquido?", "question_toks": [ "Qual", "é", "o", "nome", "da", "cantora", "com", "maior", "patrimônio", "líquido", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1", "query_toks": [ "SELECT", "Name", "FROM", "singer", "ORDER", "BY", "Net_Worth_Millions", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "name", "from", "singer", "order", "by", "net_worth_millions", "desc", "limit", "value" ], "question": "Qual é o nome da cantora que mais vale?", "question_toks": [ "Qual", "é", "o", "nome", "da", "cantora", "que", "mais", "vale", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [ "desc", [ [ 0, [ 0, 4, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship", "query_toks": [ "SELECT", "Citizenship", ",", "COUNT", "(", "*", ")", "FROM", "singer", "GROUP", "BY", "Citizenship" ], "query_toks_no_value": [ "select", "citizenship", ",", "count", "(", "*", ")", "from", "singer", "group", "by", "citizenship" ], "question": "Mostre as diferentes cidadanias dos cantores e o número de cantores de cada cidadania.", "question_toks": [ "Mostre", "as", "diferentes", "cidadanias", "dos", "cantores", "e", "o", "número", "de", "cantores", "de", "cada", "cidadania", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship", "query_toks": [ "SELECT", "Citizenship", ",", "COUNT", "(", "*", ")", "FROM", "singer", "GROUP", "BY", "Citizenship" ], "query_toks_no_value": [ "select", "citizenship", ",", "count", "(", "*", ")", "from", "singer", "group", "by", "citizenship" ], "question": "Para cada cidadania, quantos cantores são desse país?", "question_toks": [ "Para", "cada", "cidadania", ",", "quantos", "cantores", "são", "desse", "país", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Citizenship", "FROM", "singer", "GROUP", "BY", "Citizenship", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "citizenship", "from", "singer", "group", "by", "citizenship", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Por favor, mostre a cidadania mais comum dos cantores.", "question_toks": [ "Por", "favor", ",", "mostre", "a", "cidadania", "mais", "comum", "dos", "cantores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "select citizenship from singer group by citizenship order by count(*) desc limit 1", "query_toks": [ "select", "citizenship", "from", "singer", "group", "by", "citizenship", "order", "by", "count", "(", "*", ")", "desc", "limit", "1" ], "query_toks_no_value": [ "select", "citizenship", "from", "singer", "group", "by", "citizenship", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Qual é a cidadania cantora mais comum?", "question_toks": [ "Qual", "é", "a", "cidadania", "cantora", "mais", "comum", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship", "query_toks": [ "SELECT", "Citizenship", ",", "max", "(", "Net_Worth_Millions", ")", "FROM", "singer", "GROUP", "BY", "Citizenship" ], "query_toks_no_value": [ "select", "citizenship", ",", "max", "(", "net_worth_millions", ")", "from", "singer", "group", "by", "citizenship" ], "question": "Mostre diferentes nacionalidades e o patrimônio líquido máximo dos cantores de cada cidadania.", "question_toks": [ "Mostre", "diferentes", "nacionalidades", "e", "o", "patrimônio", "líquido", "máximo", "dos", "cantores", "de", "cada", "cidadania", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 1, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship", "query_toks": [ "SELECT", "Citizenship", ",", "max", "(", "Net_Worth_Millions", ")", "FROM", "singer", "GROUP", "BY", "Citizenship" ], "query_toks_no_value": [ "select", "citizenship", ",", "max", "(", "net_worth_millions", ")", "from", "singer", "group", "by", "citizenship" ], "question": "Para cada cidadania, qual é o patrimônio líquido máximo?", "question_toks": [ "Para", "cada", "cidadania", ",", "qual", "é", "o", "patrimônio", "líquido", "máximo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ], [ 1, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 5, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID", "query_toks": [ "SELECT", "T2.Title", ",", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID" ], "query_toks_no_value": [ "select", "t2", ".", "title", ",", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id" ], "question": "Mostre os títulos das canções e os nomes dos cantores.", "question_toks": [ "Mostre", "os", "títulos", "das", "canções", "e", "os", "nomes", "dos", "cantores", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID", "query_toks": [ "SELECT", "T2.Title", ",", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID" ], "query_toks_no_value": [ "select", "t2", ".", "title", ",", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id" ], "question": "Quais são os títulos das músicas e os nomes dos cantores?", "question_toks": [ "Quais", "são", "os", "títulos", "das", "músicas", "e", "os", "nomes", "dos", "cantores", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000", "query_toks": [ "SELECT", "DISTINCT", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "WHERE", "T2.Sales", ">", "300000" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "where", "t2", ".", "sales", ">", "value" ], "question": "Mostre nomes distintos de cantores que possuem músicas com vendas acima de 300.000.", "question_toks": [ "Mostre", "nomes", "distintos", "de", "cantores", "que", "possuem", "músicas", "com", "vendas", "acima", "de", "300.000", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], 300000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000", "query_toks": [ "SELECT", "DISTINCT", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "WHERE", "T2.Sales", ">", "300000" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "where", "t2", ".", "sales", ">", "value" ], "question": "quais são os diferentes nomes dos cantores que têm vendas acima de 300.000?", "question_toks": [ "quais", "são", "os", "diferentes", "nomes", "dos", "cantores", "que", "têm", "vendas", "acima", "de", "300.000", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 9, false ], null ], 300000.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "GROUP", "BY", "T1.Name", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t1", ".", "name", "having", "count", "(", "*", ")", ">", "value" ], "question": "Mostre os nomes dos cantores que possuem mais de uma música.", "question_toks": [ "Mostre", "os", "nomes", "dos", "cantores", "que", "possuem", "mais", "de", "uma", "música", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1", "query_toks": [ "SELECT", "T1.Name", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "GROUP", "BY", "T1.Name", "HAVING", "COUNT", "(", "*", ")", ">", "1" ], "query_toks_no_value": [ "select", "t1", ".", "name", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t1", ".", "name", "having", "count", "(", "*", ")", ">", "value" ], "question": "Quais são os nomes dos cantores que possuem mais de uma música?", "question_toks": [ "Quais", "são", "os", "nomes", "dos", "cantores", "que", "possuem", "mais", "de", "uma", "música", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [ [ false, 3, [ 0, [ 3, 0, false ], null ], 1.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", "query_toks": [ "SELECT", "T1.Name", ",", "sum", "(", "T2.Sales", ")", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "GROUP", "BY", "T1.Name" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "sum", "(", "t2", ".", "sales", ")", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t1", ".", "name" ], "question": "Mostre os nomes dos cantores e as vendas totais de suas músicas.", "question_toks": [ "Mostre", "os", "nomes", "dos", "cantores", "e", "as", "vendas", "totais", "de", "suas", "músicas", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 4, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", "query_toks": [ "SELECT", "T1.Name", ",", "sum", "(", "T2.Sales", ")", "FROM", "singer", "AS", "T1", "JOIN", "song", "AS", "T2", "ON", "T1.Singer_ID", "=", "T2.Singer_ID", "GROUP", "BY", "T1.Name" ], "query_toks_no_value": [ "select", "t1", ".", "name", ",", "sum", "(", "t2", ".", "sales", ")", "from", "singer", "as", "t1", "join", "song", "as", "t2", "on", "t1", ".", "singer_id", "=", "t2", ".", "singer_id", "group", "by", "t1", ".", "name" ], "question": "Para cada nome de cantor, qual é o total de vendas de suas músicas?", "question_toks": [ "Para", "cada", "nome", "de", "cantor", ",", "qual", "é", "o", "total", "de", "vendas", "de", "suas", "músicas", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 8, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 4, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Singer_ID", "NOT", "IN", "(", "SELECT", "Singer_ID", "FROM", "song", ")" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "singer_id", "not", "in", "(", "select", "singer_id", "from", "song", ")" ], "question": "Liste o nome dos cantores que não possuem nenhuma música.", "question_toks": [ "Liste", "o", "nome", "dos", "cantores", "que", "não", "possuem", "nenhuma", "música", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, 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": "singer", "query": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)", "query_toks": [ "SELECT", "Name", "FROM", "singer", "WHERE", "Singer_ID", "NOT", "IN", "(", "SELECT", "Singer_ID", "FROM", "song", ")" ], "query_toks_no_value": [ "select", "name", "from", "singer", "where", "singer_id", "not", "in", "(", "select", "singer_id", "from", "song", ")" ], "question": "Qual é a armadilha de cada canto que não tem nenhuma canção?", "question_toks": [ "Qual", "é", "a", "armadilha", "de", "cada", "canto", "que", "não", "tem", "nenhuma", "canção", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 1, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, 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": "singer", "query": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "query_toks": [ "SELECT", "Citizenship", "FROM", "singer", "WHERE", "Birth_Year", "<", "1945", "INTERSECT", "SELECT", "Citizenship", "FROM", "singer", "WHERE", "Birth_Year", ">", "1955" ], "query_toks_no_value": [ "select", "citizenship", "from", "singer", "where", "birth_year", "<", "value", "intersect", "select", "citizenship", "from", "singer", "where", "birth_year", ">", "value" ], "question": "Mostre a cidadania compartilhada por cantores com ano de nascimento anterior a 1945 e posterior a 1955.", "question_toks": [ "Mostre", "a", "cidadania", "compartilhada", "por", "cantores", "com", "ano", "de", "nascimento", "anterior", "a", "1945", "e", "posterior", "a", "1955", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 3, false ], null ], 1945.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], 1955.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "singer", "query": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "query_toks": [ "SELECT", "Citizenship", "FROM", "singer", "WHERE", "Birth_Year", "<", "1945", "INTERSECT", "SELECT", "Citizenship", "FROM", "singer", "WHERE", "Birth_Year", ">", "1955" ], "query_toks_no_value": [ "select", "citizenship", "from", "singer", "where", "birth_year", "<", "value", "intersect", "select", "citizenship", "from", "singer", "where", "birth_year", ">", "value" ], "question": "Quais são as cidadanias compartilhadas por cantores com um ano de nascimento antes de 1945 e depois de 1955?", "question_toks": [ "Quais", "são", "as", "cidadanias", "compartilhadas", "por", "cantores", "com", "um", "ano", "de", "nascimento", "antes", "de", "1945", "e", "depois", "de", "1955", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 4, [ 0, [ 0, 3, false ], null ], 1945.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 3, false ], null ], 1955.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null } }, { "db_id": "real_estate_properties", "query": "SELECT count(*) FROM Other_Available_Features", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Other_Available_Features" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "other_available_features" ], "question": "Quantos recursos disponíveis existem no total?", "question_toks": [ "Quantos", "recursos", "disponíveis", "existem", "no", "total", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "real_estate_properties", "query": "SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = \"AirCon\"", "query_toks": [ "SELECT", "T2.feature_type_name", "FROM", "Other_Available_Features", "AS", "T1", "JOIN", "Ref_Feature_Types", "AS", "T2", "ON", "T1.feature_type_code", "=", "T2.feature_type_code", "WHERE", "T1.feature_name", "=", "``", "AirCon", "''" ], "query_toks_no_value": [ "select", "t2", ".", "feature_type_name", "from", "other_available_features", "as", "t1", "join", "ref_feature_types", "as", "t2", "on", "t1", ".", "feature_type_code", "=", "t2", ".", "feature_type_code", "where", "t1", ".", "feature_name", "=", "value" ], "question": "Qual é o nome do tipo de recurso do recurso AirCon?", "question_toks": [ "Qual", "é", "o", "nome", "do", "tipo", "de", "recurso", "do", "recurso", "AirCon", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 6, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"AirCon\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "real_estate_properties", "query": "SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code", "query_toks": [ "SELECT", "T2.property_type_description", "FROM", "Properties", "AS", "T1", "JOIN", "Ref_Property_Types", "AS", "T2", "ON", "T1.property_type_code", "=", "T2.property_type_code", "GROUP", "BY", "T1.property_type_code" ], "query_toks_no_value": [ "select", "t2", ".", "property_type_description", "from", "properties", "as", "t1", "join", "ref_property_types", "as", "t2", "on", "t1", ".", "property_type_code", "=", "t2", ".", "property_type_code", "group", "by", "t1", ".", "property_type_code" ], "question": "Mostre as descrições de tipo de propriedade das propriedades pertencentes a esse código.", "question_toks": [ "Mostre", "as", "descrições", "de", "tipo", "de", "propriedade", "das", "propriedades", "pertencentes", "a", "esse", "código", "." ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 10, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "real_estate_properties", "query": "SELECT property_name FROM Properties WHERE property_type_code = \"House\" UNION SELECT property_name FROM Properties WHERE property_type_code = \"Apartment\" AND room_count > 1", "query_toks": [ "SELECT", "property_name", "FROM", "Properties", "WHERE", "property_type_code", "=", "``", "House", "''", "UNION", "SELECT", "property_name", "FROM", "Properties", "WHERE", "property_type_code", "=", "``", "Apartment", "''", "AND", "room_count", ">", "1" ], "query_toks_no_value": [ "select", "property_name", "from", "properties", "where", "property_type_code", "=", "value", "union", "select", "property_name", "from", "properties", "where", "property_type_code", "=", "value", "and", "room_count", ">", "value" ], "question": "Quais são os nomes das propriedades que são casas ou apartamentos com mais de 1 cômodo?", "question_toks": [ "Quais", "são", "os", "nomes", "das", "propriedades", "que", "são", "casas", "ou", "apartamentos", "com", "mais", "de", "1", "cômodo", "?" ], "sql": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"House\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": { "from": { "table_units": [ [ "table_unit", 3 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 13, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 10, false ], null ], "\"Apartment\"", null ], "and", [ false, 3, [ 0, [ 0, 15, false ], null ], 1.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "except": null } } ]