diff --git "a/dev.json" "b/dev.json" --- "a/dev.json" +++ "b/dev.json" @@ -1,103597 +1,6206 @@ [ { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM AIRLINES", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "airlines", - "?" - ], - "utterance": "What are all the airlines?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", - "utterance_toks": [ - "Of", - "these", - ",", - "which", - "is", - "Jetblue", - "Airways", - "?" - ], - "utterance": "Of these, which is Jetblue Airways?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"JetBlue Airways\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", - "utterance_toks": [ - "What", - "is", - "the", - "country", - "corresponding", - "it", - "?" - ], - "utterance": "What is the country corresponding it?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"JetBlue Airways\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", - "utterance": "What country is Jetblue Airways affiliated with?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT Abbreviation FROM AIRLINES", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "abbreviations", - "?" - ], - "utterance": "What are all the abbreviations?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", - "utterance_toks": [ - "What", - "is", - "the", - "abbreviation", - "for", - "Jetblue", - "Airways", - "?" - ], - "utterance": "What is the abbreviation for Jetblue Airways?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"JetBlue Airways\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", - "utterance": "Which abbreviation corresponds to Jetblue Airways?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT Airline , Abbreviation FROM AIRLINES", - "utterance_toks": [ - "List", - "all", - "airline", - "names", - "and", - "their", - "abbreviations", - "." - ], - "utterance": "List all airline names and their abbreviations.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"", - "utterance_toks": [ - "Of", - "these", - ",", - "list", - "only", - "those", - "in", - "the", - "USA", - "." - ], - "utterance": "Of these, list only those in the USA.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"USA\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"", - "utterance": "What are the airline names and abbreviations for airlines in the USA?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM AIRPORTS WHERE city = \"Anthony\"", - "utterance_toks": [ - "Find", - "all", - "information", - "about", - "the", - "airport", - "in", - "the", - "city", - "Anthony", - "." - ], - "utterance": "Find all information about the airport in the city Anthony.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Anthony\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"", - "utterance_toks": [ - "What", - "is", - "the", - "airport", - "code", - "and", - "airport", - "name", - "?" - ], - "utterance": "What is the airport code and airport name?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Anthony\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"", - "utterance": "Give the airport code and airport name corresonding to the city Anthony." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM AIRLINES", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "airlines", - "?" - ], - "utterance": "What are all the airlines?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM AIRLINES", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM AIRLINES", - "utterance": "What is the total number of airlines?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM AIRPORTS", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "airports", - "?" - ], - "utterance": "What are all the airports?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM AIRPORTS", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM AIRPORTS", - "utterance": "Return the number of airports." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM FLIGHTS", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flights", - "?" - ], - "utterance": "What are all the flights?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM FLIGHTS", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM FLIGHTS", - "utterance": "Return the number of flights." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT Airline FROM AIRLINES", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "airline", - "names", - "?" - ], - "utterance": "What are all the airline names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"", - "utterance_toks": [ - "Of", - "this", - ",", - "which", - "has", - "the", - "abbreviation", - "'UAL", - "'", - "?" - ], - "utterance": "Of this, which has the abbreviation 'UAL'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - "\"UAL\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"", - "utterance": "Give the airline with abbreviation 'UAL'." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT airline FROM AIRLINES WHERE Country = \"USA\"", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "airlines", - "in", - "the", - "USA", - "?" - ], - "utterance": "What are the names of the airlines in the USA?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"USA\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"USA\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"", - "utterance": "Return the number of airlines in the USA." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT City , Country FROM AIRPORTS", - "utterance_toks": [ - "What", - "are", - "the", - "city", - "and", - "country", - "for", - "all", - "airports", - "?" - ], - "utterance": "What are the city and country for all airports?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", - "utterance_toks": [ - "Of", - "these", - ",", - "what", - "are", - "the", - "city", - "and", - "country", - "for", - "Alton", - "airport", - "?" - ], - "utterance": "Of these, what are the city and country for Alton airport?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"Alton\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", - "utterance": "Give the city and country for the Alton airport." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT AirportName FROM AIRPORTS", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "airport", - "names", - "?" - ], - "utterance": "What are all the airport names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", - "utterance_toks": [ - "Of", - "these", - ",", - "which", - "has", - "code", - "'AKO", - "'", - "?" - ], - "utterance": "Of these, which has code 'AKO'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - "\"AKO\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", - "utterance": "Return the name of the airport with code 'AKO'." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT AirportName FROM AIRPORTS", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "airport", - "names", - "?" - ], - "utterance": "What are all the airport names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"", - "utterance_toks": [ - "Which", - "is", - "in", - "Aberdeen", - "?" - ], - "utterance": "Which is in Aberdeen?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"", - "utterance": "What are the names of airports in Aberdeen?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM FLIGHTS WHERE SourceAirport = \"APG\"", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flights", - "departing", - "from", - "'APG", - "'", - "?" - ], - "utterance": "What are all the flights departing from 'APG'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"APG\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"APG\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", - "utterance": "Count the number of flights departing from 'APG'." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM FLIGHTS WHERE DestAirport = \"ATO\"", - "utterance_toks": [ - "What", - "flights", - "land", - "in", - "ATO", - "?" - ], - "utterance": "What flights land in ATO?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - "\"ATO\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - "\"ATO\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", - "utterance": "Count the number of flights into ATO." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flights", - "derparting", - "from", - "Aberdeen", - "?" - ], - "utterance": "What are all the flights derparting from Aberdeen?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance": "Return the number of flights departing from Aberdeen." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flights", - "arriving", - "in", - "Aberdeen", - "." - ], - "utterance": "What are all the flights arriving in Aberdeen.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance": "Return the number of flights arriving in Aberdeen." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flights", - "that", - "leave", - "from", - "Aberdeen", - "?" - ], - "utterance": "What are all the flights that leave from Aberdeen?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * 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\"", - "utterance_toks": [ - "Of", - "those", - ",", - "which", - "land", - "in", - "Ashley", - "?" - ], - "utterance": "Of those, which land in Ashley?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Ashley\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Ashley\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "How many flights fly from Aberdeen to Ashley?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flights", - "on", - "Jetblue", - "Airways", - "?" - ], - "utterance": "What are all the flights on Jetblue Airways?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"JetBlue Airways\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"JetBlue Airways\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", - "utterance": "Give the number of Jetblue Airways flights." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM AIRLINES WHERE Airline = \"United Airlines\"", - "utterance_toks": [ - "What", - "are", - "the", - "United", - "Airlines", - "flights", - "?" - ], - "utterance": "What are the United Airlines flights?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"United Airlines\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM AIRLINES WHERE Airline = \"United Airlines\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"United Airlines\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "How", - "many", - "land", - "in", - "ASY", - "Airport", - "?" - ], - "utterance": "How many land in ASY Airport?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"United Airlines\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - "\"ASY\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Count the number of United Airlines flights arriving in ASY Airport." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM AIRLINES WHERE Airline = \"United Airlines\"", - "utterance_toks": [ - "What", - "are", - "the", - "United", - "Airlines", - "flights", - "?" - ], - "utterance": "What are the United Airlines flights?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"United Airlines\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", - "utterance_toks": [ - "Which", - "ones", - "leave", - "from", - "AHD", - "?" - ], - "utterance": "Which ones leave from AHD?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"United Airlines\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"AHD\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"United Airlines\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"AHD\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Return the number of United Airlines flights leaving from AHD Airport." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * 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\"", - "utterance_toks": [ - "Which", - "United", - "Airlines", - "flights", - "fly", - "into", - "Aberdeen", - "?" - ], - "utterance": "Which United Airlines flights fly into Aberdeen?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"United Airlines\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"United Airlines\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Count the number of United Airlines flights that arrive in Aberdeen." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport", - "utterance_toks": [ - "Name", - "all", - "cities", - "that", - "have", - "destination", - "airports", - "." - ], - "utterance": "Name all cities that have destination airports.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Order", - "them", - "by", - "number", - "of", - "arriving", - "flights", - "." - ], - "utterance": "Order them by number of arriving flights.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "most", - "?" - ], - "utterance": "Which one has the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which city has the most frequent destination airport?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport", - "utterance_toks": [ - "Name", - "all", - "cities", - "that", - "have", - "source", - "airports", - "." - ], - "utterance": "Name all cities that have source airports.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 12, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Order", - "them", - "by", - "number", - "of", - "departing", - "flights", - "." - ], - "utterance": "Order them by number of departing flights.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 12, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "most", - "?" - ], - "utterance": "Which one has the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 12, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which city is the most frequent source airport?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport", - "utterance_toks": [ - "What", - "are", - "airport", - "codes", - "of", - "any", - "airport", - "with", - "a", - "arriving", - "flight", - "?" - ], - "utterance": "What are airport codes of any airport with a arriving flight?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport", - "utterance_toks": [ - "Also", - "include", - "codes", - "of", - "airports", - "with", - "departure", - "flights", - "." - ], - "utterance": "Also include codes of airports with departure flights.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "highest", - "number", - "of", - "flights", - "?" - ], - "utterance": "Which one has the highest number of flights?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the airport code of the airport with the most flights?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport", - "utterance_toks": [ - "What", - "are", - "airport", - "codes", - "of", - "any", - "airport", - "with", - "a", - "arriving", - "flight", - "?" - ], - "utterance": "What are airport codes of any airport with a arriving flight?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport", - "utterance_toks": [ - "Also", - "include", - "codes", - "of", - "airports", - "with", - "departure", - "flights", - "." - ], - "utterance": "Also include codes of airports with departure flights.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "least", - "number", - "of", - "flights", - "?" - ], - "utterance": "Which one has the least number of flights?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Give the code of the airport with the least flights." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT count(*) , T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline", - "utterance_toks": [ - "Count", - "the", - "number", - "of", - "flights", - "by", - "airline", - "." - ], - "utterance": "Count the number of flights by airline.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "airline", - "has", - "the", - "most", - "?" - ], - "utterance": "Which airline has the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What airline serves the most flights?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT Abbreviation , Country FROM AIRLINES", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "airline", - "abbreviations", - "and", - "what", - "countries", - "are", - "they", - "in", - "?" - ], - "utterance": "What are all the airline abbreviations and what countries are they in?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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(*)", - "utterance_toks": [ - "Order", - "them", - "by", - "the", - "number", - "of", - "flights", - "that", - "they", - "have", - "." - ], - "utterance": "Order them by the number of flights that they have.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "fewest", - "?" - ], - "utterance": "Which one has the fewest?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the abbreviation of the airilne has the fewest flights and what country is it in?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM FLIGHTS WHERE SourceAirport = \"AHD\"", - "utterance_toks": [ - "Which", - "flights", - "leave", - "from", - "AHD", - "?" - ], - "utterance": "Which flights leave from AHD?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"AHD\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", - "utterance_toks": [ - "What", - "are", - "their", - "airlines", - "?" - ], - "utterance": "What are their airlines?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"AHD\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", - "utterance": "Which airlines have a flight with source airport AHD?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM FLIGHTS WHERE DestAirport = \"AHD\"", - "utterance_toks": [ - "Which", - "flights", - "arrive", - "in", - "AHD", - "?" - ], - "utterance": "Which flights arrive in AHD?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - "\"AHD\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", - "utterance_toks": [ - "What", - "are", - "their", - "airlines", - "?" - ], - "utterance": "What are their airlines?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - "\"AHD\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", - "utterance": "Which airlines have a flight with destination airport AHD?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", - "utterance_toks": [ - "Which", - "airlines", - "have", - "flights", - "departing", - "from", - "APG", - "?" - ], - "utterance": "Which airlines have flights departing from APG?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"APG\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Of", - "those", - ",", - "which", - "also", - "have", - "flights", - "from", - "CVO", - "?" - ], - "utterance": "Of those, which also have flights from CVO?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"CVO\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"APG\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Which airlines have departing flights from both APG and CVO airports?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", - "utterance_toks": [ - "Which", - "airlines", - "have", - "flights", - "from", - "CVO", - "?" - ], - "utterance": "Which airlines have flights from CVO?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"CVO\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Of", - "these", - ",", - "which", - "do", - "not", - "have", - "flights", - "from", - "APG", - "?" - ], - "utterance": "Of these, which do not have flights from APG?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"APG\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - }, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"CVO\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Which airlines have departures from CVO but not from APG airports?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT DISTINCT Airline FROM AIRLINES", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "airlines", - "?" - ], - "utterance": "What are all the airlines?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", - "utterance_toks": [ - "Which", - "ones", - "have", - "more", - "than", - "10", - "flights", - "?" - ], - "utterance": "Which ones have more than 10 flights?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 10.0, - null - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", - "utterance": "Which airlines have at least 10 flights?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT DISTINCT Airline FROM AIRLINES", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "airlines", - "?" - ], - "utterance": "What are all the airlines?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", - "utterance_toks": [ - "Which", - "ones", - "have", - "less", - "than", - "200", - "flights", - "?" - ], - "utterance": "Which ones have less than 200 flights?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [ - [ - false, - 4, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 200.0, - null - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", - "utterance": "Which airlines have less than 200 flights?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT FlightNo FROM FLIGHTS", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flight", - "numbers", - "?" - ], - "utterance": "What are all the flight numbers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", - "utterance_toks": [ - "Which", - "belong", - "to", - "United", - "Airlines", - "?" - ], - "utterance": "Which belong to United Airlines?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"United Airlines\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", - "utterance": "Which flight numbers correspond to United Airlines flights?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT FlightNo FROM FLIGHTS", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flight", - "numbers", - "?" - ], - "utterance": "What are all the flight numbers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", - "utterance_toks": [ - "Of", - "these", - ",", - "which", - "correspond", - "to", - "flights", - "leaving", - "from", - "APG", - "?" - ], - "utterance": "Of these, which correspond to flights leaving from APG?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"APG\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", - "utterance": "Give the flight numbers of flights leaving from APG." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT FlightNo FROM FLIGHTS", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flight", - "numbers", - "?" - ], - "utterance": "What are all the flight numbers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", - "utterance_toks": [ - "Also", - ",", - "which", - "numbers", - "are", - "for", - "flights", - "that", - "land", - "in", - "APG", - "?" - ], - "utterance": "Also, which numbers are for flights that land in APG?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - "\"APG\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", - "utterance": "Give the flight numbers of flights landing at APG." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT FlightNo FROM FLIGHTS", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flight", - "numbers", - "?" - ], - "utterance": "What are all the flight numbers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode", - "utterance_toks": [ - "Of", - "these", - ",", - "which", - "are", - "departure", - "flights", - "?" - ], - "utterance": "Of these, which are departure flights?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance_toks": [ - "Which", - "leave", - "from", - "Aberdeen", - "?" - ], - "utterance": "Which leave from Aberdeen?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance": "Give the flight numbers of flights leaving from Aberdeen." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT FlightNo FROM FLIGHTS", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "flight", - "numbers", - "?" - ], - "utterance": "What are all the flight numbers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode", - "utterance_toks": [ - "Of", - "these", - ",", - "which", - "are", - "arrival", - "flights", - "?" - ], - "utterance": "Of these, which are arrival flights?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance_toks": [ - "Which", - "land", - "in", - "Aberdeen", - "?" - ], - "utterance": "Which land in Aberdeen?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", - "utterance": "Give the flight numbers of flights arriving in Aberdeen." - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT * FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\"", - "utterance_toks": [ - "What", - "flights", - "land", - "in", - "Aberdeen", - "?" - ], - "utterance": "What flights land in Aberdeen?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", - "utterance_toks": [ - "Also", - "include", - "flights", - "that", - "land", - "in", - "Abilene", - "." - ], - "utterance": "Also include flights that land in Abilene.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Abilene\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Aberdeen\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Abilene\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", - "utterance": "How many flights land in Aberdeen or Abilene?" - } - }, - { - "database_id": "flight_2", - "interaction": [ - { - "query": "SELECT SourceAirport FROM Flights", - "utterance_toks": [ - "What", - "are", - "the", - "source", - "airports", - "?" - ], - "utterance": "What are the source airports?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights", - "utterance_toks": [ - "Also", - "include", - "the", - "destination", - "airports", - "." - ], - "utterance": "Also include the destination airports.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - }, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", - "utterance_toks": [ - "Which", - "airports", - "are", - "not", - "included", - "?" - ], - "utterance": "Which airports are not included?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - }, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", - "utterance": "Which airports do not have departing or arriving flights?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM pets", - "utterance_toks": [ - "What", - "information", - "is", - "there", - "on", - "pets", - "?" - ], - "utterance": "What information is there on pets?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM pets WHERE weight > 10", - "utterance_toks": [ - "Which", - "pets", - "weigh", - "more", - "than", - "10", - "?" - ], - "utterance": "Which pets weigh more than 10?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - 10.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM pets WHERE weight > 10", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - 10.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM pets WHERE weight > 10", - "utterance": "How many pets have a greater weight than 10?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM pets ORDER BY pet_age", - "utterance_toks": [ - "Order", - "the", - "pets", - "by", - "age" - ], - "utterance": "Order the pets by age", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT weight FROM pets ORDER BY pet_age", - "utterance_toks": [ - "How", - "much", - "does", - "each", - "one", - "weigh", - "?" - ], - "utterance": "How much does each one weigh?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1", - "utterance_toks": [ - "What", - "about", - "the", - "first", - "one", - "?" - ], - "utterance": "What about the first one?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1", - "utterance": "How much does the youngest dog weigh?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT DISTINCT petType FROM pets", - "utterance_toks": [ - "What", - "are", - "the", - "different", - "types", - "of", - "pets", - "?" - ], - "utterance": "What are the different types of pets?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(weight) , petType FROM pets GROUP BY petType", - "utterance_toks": [ - "For", - "each", - "of", - "those", - "types", - ",", - "what", - "is", - "the", - "maximum", - "weight", - "?" - ], - "utterance": "For each of those types, what is the maximum weight?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 12, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT max(weight) , petType FROM pets GROUP BY petType", - "utterance": "List the maximum weight and type for each type of pet." - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", - "utterance_toks": [ - "Which", - "pets", - "are", - "owned", - "by", - "students", - "older", - "than", - "20", - "?" - ], - "utterance": "Which pets are owned by students older than 20?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 20.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 20.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", - "utterance": "How many pets are owned by students that have an age greater than 20?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM student WHERE sex = 'F'", - "utterance_toks": [ - "Who", - "are", - "the", - "female", - "students", - "?" - ], - "utterance": "Who are the female students?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"F\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.sex = 'F'", - "utterance_toks": [ - "Of", - "those", - ",", - "who", - "has", - "a", - "pet", - "?" - ], - "utterance": "Of those, who has a pet?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"F\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "How", - "many", - "of", - "those", - "have", - "dogs", - "?" - ], - "utterance": "How many of those have dogs?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"F\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"dog\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "How many dog pets are raised by female students?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT DISTINCT pettype FROM pets", - "utterance_toks": [ - "What", - "are", - "the", - "different", - "pet", - "types", - "?" - ], - "utterance": "What are the different pet types?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(DISTINCT pettype) FROM pets", - "utterance_toks": [ - "How", - "many", - "exist", - "?" - ], - "utterance": "How many exist?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 12, - true - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(DISTINCT pettype) FROM pets", - "utterance": "How many different types of pet are there?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT DISTINCT T1.Fname FROM student AS T1", - "utterance_toks": [ - "what", - "is", - "the", - "first", - "name", - "of", - "every", - "student", - "?" - ], - "utterance": "what is the first name of every student?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Of", - "those", - "names", - ",", - "which", - "ones", - "correspond", - "to", - "somebody", - "who", - "has", - "a", - "cat", - "?" - ], - "utterance": "Of those names, which ones correspond to somebody who has a cat?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Also", - ",", - "combine", - "those", - "names", - "with", - "those", - "who", - "have", - "a", - "dog", - "." - ], - "utterance": "Also, combine those names with those who have a dog.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"dog\"", - null - ] - ], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "What are the first names of every student who has a cat or dog as a pet?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * 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'", - "utterance_toks": [ - "Which", - "students", - "have", - "a", - "dog", - "as", - "their", - "type", - "of", - "pet", - "?" - ], - "utterance": "Which students have a dog as their type of pet?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"dog\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * 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 * 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'", - "utterance_toks": [ - "Who", - "also", - "has", - "a", - "cat", - "?" - ], - "utterance": "Who also has a cat?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"dog\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "What", - "are", - "their", - "first", - "names", - "?" - ], - "utterance": "What are their first names?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"dog\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "What are the students' first names who have both cats and dogs as pets?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * 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')", - "utterance_toks": [ - "Which", - "students", - "have", - "a", - "cat", - "as", - "their", - "pets", - "?" - ], - "utterance": "Which students have a cat as their pets?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT major 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')", - "utterance_toks": [ - "What", - "are", - "they", - "majoring", - "in", - "?" - ], - "utterance": "What are they majoring in?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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')", - "utterance_toks": [ - "Also", - ",", - "how", - "old", - "are", - "they", - "?" - ], - "utterance": "Also, how old are they?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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')", - "utterance": "What major is every student who does not own a cat as a pet, and also how old are they?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT stuid FROM student", - "utterance_toks": [ - "What", - "is", - "every", - "student", - "'s", - "id", - "?" - ], - "utterance": "What is every student's id?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "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'", - "utterance_toks": [ - "Of", - "those", - "ids", - ",", - "which", - "correspond", - "to", - "those", - "who", - "own", - "cats", - "as", - "pets", - "?" - ], - "utterance": "Of those ids, which correspond to those who own cats as pets?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "List", - "all", - "the", - "other", - "ids", - "." - ], - "utterance": "List all the other ids.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - }, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "What are the ids of the students who do not own cats as pets?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * 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'", - "utterance_toks": [ - "Which", - "students", - "have", - "dogs", - "?" - ], - "utterance": "Which students have dogs?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"dog\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * 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' EXCEPT SELECT * 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'", - "utterance_toks": [ - "Of", - "those", - ",", - "who", - "does", - "not", - "own", - "a", - "cat", - "?" - ], - "utterance": "Of those, who does not own a cat?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - }, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"dog\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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' EXCEPT 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 = 'cat'", - "utterance_toks": [ - "What", - "are", - "their", - "first", - "names", - "and", - "ages", - "?" - ], - "utterance": "What are their first names and ages?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - }, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"dog\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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')", - "utterance": "What is the first name of every student who has a dog but does not have a cat?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM pets ORDER BY pet_age LIMIT 1", - "utterance_toks": [ - "Who", - "is", - "the", - "youngest", - "pet", - "?" - ], - "utterance": "Who is the youngest pet?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT pettype FROM pets ORDER BY pet_age LIMIT 1", - "utterance_toks": [ - "What", - "type", - "are", - "they", - "?" - ], - "utterance": "What type are they?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", - "utterance_toks": [ - "Also", - ",", - "how", - "much", - "do", - "they", - "weigh", - "?" - ], - "utterance": "Also, how much do they weigh?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", - "utterance": "What type of pet is the youngest animal, and how much does it weigh?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT petid FROM pets", - "utterance_toks": [ - "What", - "are", - "ids", - "of", - "every", - "pet", - "?" - ], - "utterance": "What are ids of every pet?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT petid FROM pets WHERE pet_age > 1", - "utterance_toks": [ - "For", - "those", - ",", - "which", - "refer", - "to", - "pets", - "older", - "than", - "1", - "?" - ], - "utterance": "For those, which refer to pets older than 1?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 1.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT petid , weight FROM pets WHERE pet_age > 1", - "utterance_toks": [ - "Also", - ",", - "how", - "much", - "do", - "they", - "weigh", - "?" - ], - "utterance": "Also, how much do they weigh?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 1.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT petid , weight FROM pets WHERE pet_age > 1", - "utterance": "What is the id and weight of every pet who is older than 1?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT DISTINCT pettype FROM pets", - "utterance_toks": [ - "What", - "are", - "the", - "different", - "pet", - "types", - "?" - ], - "utterance": "What are the different pet types?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(pet_age) , pettype FROM pets GROUP BY pettype", - "utterance_toks": [ - "For", - "each", - "of", - "those", - ",", - "what", - "is", - "the", - "maximum", - "age", - "?" - ], - "utterance": "For each of those, what is the maximum age?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 12, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(pet_age) , pettype FROM pets GROUP BY pettype", - "utterance_toks": [ - "What", - "about", - "the", - "average", - "age", - "?" - ], - "utterance": "What about the average age?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 12, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype", - "utterance": "What is the average and maximum age for each pet type?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM pets", - "utterance_toks": [ - "What", - "information", - "is", - "there", - "on", - "pets", - "?" - ], - "utterance": "What information is there on pets?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype", - "utterance_toks": [ - "For", - "each", - "pet", - "type", - ",", - "what", - "is", - "the", - "average", - "weight", - "?" - ], - "utterance": "For each pet type, what is the average weight?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 12, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype", - "utterance": "What is the average weight for each type of pet?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", - "utterance_toks": [ - "Which", - "students", - "have", - "pets", - "?" - ], - "utterance": "Which students have pets?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT T1.fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", - "utterance_toks": [ - "What", - "are", - "the", - "different", - "first", - "names", - "?" - ], - "utterance": "What are the different first names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", - "utterance_toks": [ - "Also", - ",", - "what", - "are", - "their", - "ages", - "?" - ], - "utterance": "Also, what are their ages?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", - "utterance": "What are the different first names and ages of the students who do have pets?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", - "utterance_toks": [ - "Which", - "students", - "have", - "pets", - "?" - ], - "utterance": "Which students have pets?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", - "utterance_toks": [ - "Of", - "those", - ",", - "whose", - "last", - "name", - "is", - "smith", - "?" - ], - "utterance": "Of those, whose last name is smith?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Smith\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", - "utterance_toks": [ - "What", - "is", - "their", - "pet", - "'s", - "id", - "?" - ], - "utterance": "What is their pet's id?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Smith\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", - "utterance": "What is the id of the pet owned by the student whose last name is 'Smith'?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", - "utterance_toks": [ - "Which", - "of", - "the", - "students", - "have", - "pets", - "?" - ], - "utterance": "Which of the students have pets?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", - "utterance_toks": [ - "How", - "many", - "pets", - "does", - "each", - "of", - "them", - "have", - "?" - ], - "utterance": "How many pets does each of them have?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", - "utterance": "For students who have pets, how many pets does each student have?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT T1.fname , T1.sex FROM student AS T1", - "utterance_toks": [ - "What", - "is", - "the", - "first", - "name", - "and", - "sex", - "of", - "each", - "student", - "?" - ], - "utterance": "What is the first name and sex of each student?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "of", - "those", - "belong", - "to", - "somebody", - "who", - "has", - "more", - "than", - "one", - "pet", - "?" - ], - "utterance": "Which of those belong to somebody who has more than one pet?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the first name and gender of the all the students who have more than one pet?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT petid FROM pets WHERE pet_age = 3 AND pettype = 'cat'", - "utterance_toks": [ - "What", - "is", - "the", - "id", - "of", - "the", - "three-year", - "old", - "cat", - "?" - ], - "utterance": "What is the id of the three-year old cat?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 3.0, - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * 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'", - "utterance_toks": [ - "Who", - "is", - "the", - "owner", - "of", - "that", - "cat", - "?" - ], - "utterance": "Who is the owner of that cat?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 3.0, - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "What", - "is", - "their", - "last", - "name", - "?" - ], - "utterance": "What is their last name?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 3.0, - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"cat\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "What is the last name of the student who has a cat that is 3 years old?" - } - }, - { - "database_id": "pets_1", - "interaction": [ - { - "query": "SELECT * FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid)", - "utterance_toks": [ - "Which", - "students", - "do", - "not", - "own", - "any", - "pets", - "?" - ], - "utterance": "Which students do not own any pets?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid)", - "utterance_toks": [ - "What", - "is", - "their", - "average", - "age", - "?" - ], - "utterance": "What is their average age?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid)", - "utterance": "What is the average age for all students who do not own any pets?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Name FROM country", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "the", - "countries", - "?" - ], - "utterance": "What are the names of all the countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM country WHERE IndepYear > 1950", - "utterance_toks": [ - "Give", - "the", - "names", - "of", - "the", - "ones", - "that", - "became", - "independent", - "after", - "1950", - "." - ], - "utterance": "Give the names of the ones that became independent after 1950.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 1950.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM country WHERE IndepYear > 1950", - "utterance": "Give the names of the nations that were founded after 1950." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT count(*) FROM country", - "utterance_toks": [ - "How", - "many", - "countries", - "are", - "there", - "?" - ], - "utterance": "How many countries are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", - "utterance_toks": [ - "Out", - "of", - "those", - ",", - "how", - "many", - "have", - "a", - "republic", - "as", - "their", - "form", - "of", - "government", - "?" - ], - "utterance": "Out of those, how many have a republic as their form of government?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - "\"Republic\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", - "utterance": "How many countries have governments that are republics?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country WHERE Region = \"Caribbean\"", - "utterance_toks": [ - "What", - "are", - "the", - "countries", - "in", - "the", - "Carribean", - "region", - "?" - ], - "utterance": "What are the countries in the Carribean region?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Caribbean\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT SurfaceArea FROM country WHERE Region = \"Caribbean\"", - "utterance_toks": [ - "What", - "is", - "the", - "surface", - "area", - "of", - "each", - "of", - "those", - "countries", - "?" - ], - "utterance": "What is the surface area of each of those countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Caribbean\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", - "utterance_toks": [ - "Find", - "the", - "total", - "surface", - "area", - "of", - "the", - "above", - "." - ], - "utterance": "Find the total surface area of the above.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Caribbean\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", - "utterance": "How much surface area do the countires in the Carribean cover together?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Continent FROM country", - "utterance_toks": [ - "What", - "continent", - "does", - "each", - "country", - "belong", - "to", - "?" - ], - "utterance": "What continent does each country belong to?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", - "utterance_toks": [ - "Which", - "one", - "does", - "Anguila", - "belong", - "to", - "?" - ], - "utterance": "Which one does Anguila belong to?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Anguilla\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", - "utterance": "What is the continent name which Anguilla belongs to?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Region FROM country", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "the", - "regions", - "?" - ], - "utterance": "What are the names of all the regions?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", - "utterance_toks": [ - "Which", - "of", - "those", - "is", - "the", - "city", - "Kabul", - "located", - "in", - "?" - ], - "utterance": "Which of those is the city Kabul located in?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kabul\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", - "utterance": "What region is Kabul in?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT LANGUAGE FROM countrylanguage", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "languages", - "?" - ], - "utterance": "What are all the languages?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", - "utterance_toks": [ - "What", - "are", - "the", - "languages", - "spoken", - "in", - "Aruba", - "?" - ], - "utterance": "What are the languages spoken in Aruba?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Aruba\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "is", - "the", - "most", - "popular", - "?" - ], - "utterance": "Which one is the most popular?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Aruba\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What language is predominantly spoken in Aruba?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Population , LifeExpectancy FROM country", - "utterance_toks": [ - "What", - "are", - "the", - "population", - "and", - "life", - "expectancies", - "for", - "all", - "countries", - "?" - ], - "utterance": "What are the population and life expectancies for all countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", - "utterance_toks": [ - "Of", - "those", - ",", - "which", - "ones", - "are", - "for", - "the", - "country", - "Brazil", - "?" - ], - "utterance": "Of those, which ones are for the country Brazil?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Brazil\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", - "utterance": "Give me Brazil\u2019s population and life expectancies." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Region FROM country WHERE Name = \"Angola\"", - "utterance_toks": [ - "Which", - "region", - "is", - "Angola", - "in", - "?" - ], - "utterance": "Which region is Angola in?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Angola\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Population FROM country WHERE Name = \"Angola\"", - "utterance_toks": [ - "For", - "that", - "country", - ",", - "what", - "is", - "its", - "population", - "?" - ], - "utterance": "For that country, what is its population?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Angola\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", - "utterance": "What region does Angola belong to and what is its population?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT LifeExpectancy FROM country", - "utterance_toks": [ - "What", - "are", - "the", - "life", - "expectancies", - "for", - "all", - "the", - "countries", - "?" - ], - "utterance": "What are the life expectancies for all the countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT LifeExpectancy FROM country WHERE Region = \"Central Africa\"", - "utterance_toks": [ - "What", - "are", - "the", - "life", - "expectancies", - "for", - "the", - "countries", - "in", - "the", - "region", - "of", - "Central", - "Africa", - "?" - ], - "utterance": "What are the life expectancies for the countries in the region of Central Africa?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Central Africa\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "of", - "those", - "?" - ], - "utterance": "What is the average of those?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Central Africa\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", - "utterance": "How long is the people\u2019s average life expectancy in Central Africa?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Name FROM country WHERE Continent = \"Asia\"", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "countries", - "in", - "Asia", - "?" - ], - "utterance": "What are the names of the countries in Asia?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "shortest", - "life", - "expectancy", - "?" - ], - "utterance": "Which one has the shortest life expectancy?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", - "utterance": "Give the name of the country in Asia with the lowest life expectancy." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT sum(Population) FROM country WHERE Continent = \"Asia\"", - "utterance_toks": [ - "How", - "many", - "people", - "live", - "in", - "Asia", - "?" - ], - "utterance": "How many people live in Asia?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(GNP) FROM country WHERE Continent = \"Asia\"", - "utterance_toks": [ - "What", - "about", - "the", - "largest", - "GNP", - "among", - "them", - "?" - ], - "utterance": "What about the largest GNP among them?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", - "utterance": "How many people live in Asia, and what is the largest GNP among them?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country WHERE Continent = \"Africa\"", - "utterance_toks": [ - "Which", - "countries", - "are", - "in", - "Africa", - "?" - ], - "utterance": "Which countries are in Africa?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Africa\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", - "utterance_toks": [ - "Which", - "countries", - "are", - "also", - "republics", - "?" - ], - "utterance": "Which countries are also republics?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Africa\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - "\"Republic\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "of", - "their", - "life", - "expectancies", - "?" - ], - "utterance": "What is the average of their life expectancies?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Africa\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - "\"Republic\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", - "utterance": "Give the average life expectancy for countries in Africa which are republics?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", - "utterance_toks": [ - "What", - "are", - "the", - "countries", - "in", - "the", - "continents", - "of", - "Asia", - "or", - "Europe", - "?" - ], - "utterance": "What are the countries in the continents of Asia or Europe?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT SurfaceArea FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", - "utterance_toks": [ - "What", - "is", - "the", - "surface", - "area", - "of", - "each", - "country", - "?" - ], - "utterance": "What is the surface area of each country?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", - "utterance_toks": [ - "What", - "is", - "the", - "total", - "surface", - "area", - "summed", - "up", - "?" - ], - "utterance": "What is the total surface area summed up?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", - "utterance": "Give the total surface area covered by countries in Asia or Europe." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Population FROM city WHERE District = \"Gelderland\"", - "utterance_toks": [ - "What", - "are", - "the", - "populations", - "of", - "each", - "city", - "in", - "the", - "district", - "of", - "Gelderland", - "?" - ], - "utterance": "What are the populations of each city in the district of Gelderland?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Gelderland\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", - "utterance_toks": [ - "What", - "is", - "the", - "total", - "population", - "in", - "that", - "district", - "?" - ], - "utterance": "What is the total population in that district?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Gelderland\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", - "utterance": "What is the total population of Gelderland district?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "nations", - "?" - ], - "utterance": "What are all the nations?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM country WHERE GovernmentForm = \"US Territory\"", - "utterance_toks": [ - "Which", - "of", - "those", - "have", - "a", - "government", - "that", - "is", - "a", - "US", - "territory", - "?" - ], - "utterance": "Which of those have a government that is a US territory?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - "\"US Territory\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", - "utterance_toks": [ - "For", - "those", - ",", - "what", - "is", - "the", - "average", - "GNP", - "and", - "total", - "population", - "?" - ], - "utterance": "For those, what is the average GNP and total population?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - "\"US Territory\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", - "utterance": "Give the mean GNP and total population of nations which are considered US territory." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT DISTINCT LANGUAGE FROM countrylanguage", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "distinct", - "languages", - "used", - "around", - "the", - "world", - "?" - ], - "utterance": "What are all the distinct languages used around the world?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 24, - true - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", - "utterance": "What is the number of distinct languages used around the world?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT DISTINCT GovernmentForm FROM country WHERE Continent = \"Africa\"", - "utterance_toks": [ - "What", - "are", - "the", - "distinct", - "forms", - "of", - "government", - "in", - "the", - "continent", - "of", - "Africa", - "?" - ], - "utterance": "What are the distinct forms of government in the continent of Africa?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Africa\"", - null - ] - ], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Africa\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 19, - true - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", - "utterance": "How many different forms of governments are there in Africa?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country WHERE Name = \"Aruba\"", - "utterance_toks": [ - "What", - "is", - "the", - "information", - "about", - "the", - "country", - "Aruba", - "?" - ], - "utterance": "What is the information about the country Aruba?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Aruba\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", - "utterance_toks": [ - "What", - "are", - "the", - "languages", - "used", - "in", - "Aruba", - "?" - ], - "utterance": "What are the languages used in Aruba?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Aruba\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Aruba\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", - "utterance": "How many languages are spoken in Aruba?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\"", - "utterance_toks": [ - "What", - "are", - "the", - "languages", - "used", - "in", - "Afghanistan", - "?" - ], - "utterance": "What are the languages used in Afghanistan?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Afghanistan\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", - "utterance_toks": [ - "Of", - "those", - ",", - "how", - "many", - "are", - "the", - "official", - "languages", - "?" - ], - "utterance": "Of those, how many are the official languages?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Afghanistan\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", - "utterance": "How many official languages are spoken in Afghanistan?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT count(*) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name", - "utterance_toks": [ - "How", - "many", - "languages", - "are", - "spoken", - "in", - "each", - "country", - "?" - ], - "utterance": "How many languages are spoken in each country?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "country", - "speaks", - "the", - "most", - "?" - ], - "utterance": "Which country speaks the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Give the name of the nation that uses the greatest amount of languages." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT COUNT(*) , T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent", - "utterance_toks": [ - "How", - "many", - "languages", - "are", - "spoken", - "on", - "each", - "continent", - "?" - ], - "utterance": "How many languages are spoken on each continent?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "speaks", - "the", - "most", - "languages", - "?" - ], - "utterance": "Which one speaks the most languages?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which continent speaks the most languages?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", - "utterance_toks": [ - "What", - "are", - "the", - "countries", - "that", - "speak", - "English", - "?" - ], - "utterance": "What are the countries that speak English?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 = \"Dutch\"", - "utterance_toks": [ - "Which", - "of", - "those", - "also", - "speak", - "Dutch", - "?" - ], - "utterance": "Which of those also speak Dutch?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"Dutch\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\")", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "are", - "there", - "?" - ], - "utterance": "How many of them are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "sql", - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"Dutch\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\")", - "utterance": "What is the number of nations that use English and Dutch?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "countries", - "which", - "speak", - "English", - "?" - ], - "utterance": "What are the names of countries which speak English?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Of", - "those", - "countries", - ",", - "what", - "are", - "the", - "names", - "of", - "the", - "nations", - "that", - "speak", - "French", - "as", - "well", - "?" - ], - "utterance": "Of those countries, what are the names of the nations that speak French as well?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"French\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Give the names of nations that speak both English and French." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = \"T\"", - "utterance_toks": [ - "What", - "are", - "the", - "official", - "languages", - "of", - "each", - "country", - "?" - ], - "utterance": "What are the official languages of each country?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Of", - "those", - "countries", - ",", - "give", - "the", - "names", - "of", - "the", - "ones", - "that", - "have", - "English", - "as", - "one", - "of", - "the", - "official", - "languages", - "." - ], - "utterance": "Of those countries, give the names of the ones that have English as one of the official languages.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Of", - "those", - ",", - "which", - "also", - "have", - "French", - "as", - "another", - "official", - "language", - "?" - ], - "utterance": "Of those, which also have French as another official language?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"French\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "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 - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Give the names of countries with English and French as official languages." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", - "utterance_toks": [ - "In", - "which", - "countries", - "is", - "Chinese", - "spoken", - "?" - ], - "utterance": "In which countries is Chinese spoken?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"Chinese\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", - "utterance_toks": [ - "Which", - "distinct", - "continents", - "are", - "they", - "in", - "?" - ], - "utterance": "Which distinct continents are they in?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"Chinese\"", - null - ] - ], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "are", - "there", - "?" - ], - "utterance": "How many of them are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"Chinese\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 10, - true - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", - "utterance": "How many continents speak Chinese?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT DISTINCT Region FROM country", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "different", - "regions", - "?" - ], - "utterance": "What are all the different regions?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Which", - "of", - "those", - "speak", - "Dutch", - "or", - "English", - "?" - ], - "utterance": "Which of those speak Dutch or English?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"Dutch\"", - null - ] - ], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Which regions speak Dutch or English?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T2.Language , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IsOfficial = \"T\"", - "utterance_toks": [ - "What", - "are", - "the", - "official", - "languages", - "for", - "each", - "country", - "?" - ], - "utterance": "What are the official languages for each country?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Which", - "of", - "these", - "countries", - "have", - "English", - "or", - "Dutch", - "?" - ], - "utterance": "Which of these countries have English or Dutch?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"Dutch\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - }, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Which countries have either English or Dutch as an official language?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT DISTINCT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\"", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "different", - "languages", - "used", - "in", - "the", - "continent", - "of", - "Asia", - "?" - ], - "utterance": "What are all the different languages used in the continent of Asia?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "is", - "used", - "by", - "the", - "largest", - "number", - "of", - "Asian", - "countries", - "?" - ], - "utterance": "Which one is used by the largest number of Asian countries?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 24, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the language that is used by the largest number of Asian nations?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country WHERE GovernmentForm = \"Republic\"", - "utterance_toks": [ - "Which", - "countries", - "have", - "republics", - "as", - "their", - "form", - "of", - "government", - "?" - ], - "utterance": "Which countries have republics as their form of government?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - "\"Republic\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "language", - "is", - "spoken", - "by", - "only", - "one", - "of", - "those", - "countries", - "?" - ], - "utterance": "Which language is spoken by only one of those countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 24, - false - ] - ], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - "\"Republic\"", - null - ] - ], - "having": [ - [ - false, - 2, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What languages are only used by a single country with a republic government?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T1.Name FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\"", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "the", - "cities", - "that", - "use", - "English", - "?" - ], - "utterance": "What are the names of all the cities that use English?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "of", - "those", - "has", - "the", - "largest", - "population", - "?" - ], - "utterance": "Which of those has the largest population?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the most populace city that speaks English?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\"", - "utterance_toks": [ - "What", - "are", - "the", - "names", - ",", - "population", - ",", - "and", - "life", - "expectancy", - "for", - "all", - "the", - "countries", - "in", - "Asia", - "?" - ], - "utterance": "What are the names, population, and life expectancy for all the countries in Asia?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", - "utterance_toks": [ - "Of", - "those", - ",", - "which", - "belong", - "to", - "the", - "country", - "with", - "the", - "largest", - "surface", - "area", - "?" - ], - "utterance": "Of those, which belong to the country with the largest surface area?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", - "utterance": "What are the name, population, and life expectancy of the largest Asian country by land?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T2.Language , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = \"T\"", - "utterance_toks": [ - "What", - "are", - "the", - "official", - "languages", - "of", - "each", - "country", - "?" - ], - "utterance": "What are the official languages of each country?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * 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\")", - "utterance_toks": [ - "Which", - "countries", - "do", - "not", - "have", - "English", - "as", - "the", - "official", - "language", - "?" - ], - "utterance": "Which countries do not have English as the official language?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\")", - "utterance_toks": [ - "In", - "those", - "countries", - ",", - "what", - "is", - "the", - "average", - "life", - "expectancy", - "?" - ], - "utterance": "In those countries, what is the average life expectancy?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\")", - "utterance": "Give the mean life expectancy of countries in which English is not the official language." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Name 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\")", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "each", - "country", - "that", - "does", - "not", - "speak", - "English", - "?" - ], - "utterance": "What are the names of each country that does not speak English?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\")", - "utterance_toks": [ - "How", - "many", - "people", - "live", - "in", - "those", - "countries", - "?" - ], - "utterance": "How many people live in those countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\")", - "utterance": "How many people live in countries that do not speak English?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\"", - "utterance_toks": [ - "Which", - "country", - "has", - "a", - "head", - "of", - "state", - "named", - "Beatrix", - "?" - ], - "utterance": "Which country has a head of state named Beatrix?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Beatrix\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\"", - "utterance_toks": [ - "What", - "languages", - "are", - "spoken", - "in", - "that", - "country", - "?" - ], - "utterance": "What languages are spoken in that country?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Beatrix\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Which", - "of", - "those", - "languages", - "is", - "the", - "official", - "one", - "?" - ], - "utterance": "Which of those languages is the official one?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Beatrix\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "What is the official language used in the country the name of whose head of state is Beatrix." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T1.Name FROM country AS t1", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "the", - "countries", - "?" - ], - "utterance": "What are the names of all the countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Name FROM country AS t1 WHERE IndepYear < 1930", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "those", - "countries", - "that", - "were", - "founded", - "after", - "1930", - "?" - ], - "utterance": "What are the names of those countries that were founded after 1930?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 1930.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "For", - "those", - "countries", - ",", - "how", - "many", - "unique", - "official", - "languages", - "are", - "spoken", - "in", - "total", - "?" - ], - "utterance": "For those countries, how many unique official languages are spoken in total?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 1930.0, - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 24, - true - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "For the countries founded before 1930, what is the total number of distinct official languages?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country WHERE Continent = \"Europe\"", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "information", - "about", - "European", - "countries", - "?" - ], - "utterance": "What are all the information about European countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\"", - "utterance_toks": [ - "Of", - "those", - "countries", - ",", - "What", - "is", - "the", - "minimum", - "surface", - "area", - "?" - ], - "utterance": "Of those countries, What is the minimum surface area?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", - "utterance_toks": [ - "What", - "are", - "the", - "countries", - "that", - "have", - "a", - "greater", - "surface", - "area", - "than", - "that", - "?" - ], - "utterance": "What are the countries that have a greater surface area than that?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", - "utterance": "Which countries have greater area than that of any country in Europe?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT min(population) FROM country WHERE Continent = \"Asia\"", - "utterance_toks": [ - "What", - "is", - "the", - "maximum", - "population", - "of", - "a", - "country", - "in", - "Asia", - "?" - ], - "utterance": "What is the maximum population of a country in Asia?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT max(population) FROM country WHERE Continent = \"Asia\")", - "utterance_toks": [ - "Which", - "countries", - "in", - "Africa", - "have", - "a", - "population", - "smaller", - "than", - "that", - "?" - ], - "utterance": "Which countries in Africa have a population smaller than that?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Africa\"", - null - ], - "and", - [ - false, - 4, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT max(population) FROM country WHERE Continent = \"Asia\")", - "utterance": "Which African countries have a smaller population than that of any country in Asia?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT min(population) FROM country WHERE Continent = \"Africa\"", - "utterance_toks": [ - "What", - "is", - "the", - "smallest", - "population", - "of", - "a", - "country", - "in", - "Africa", - "?" - ], - "utterance": "What is the smallest population of a country in Africa?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Africa\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT min(population) FROM country WHERE Continent = \"Africa\")", - "utterance_toks": [ - "Which", - "Asian", - "countries", - "have", - "a", - "greater", - "population", - "than", - "that", - "?" - ], - "utterance": "Which Asian countries have a greater population than that?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ], - "and", - [ - false, - 3, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Africa\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT min(population) FROM country WHERE Continent = \"Africa\")", - "utterance": "What are the Asian countries which have a population larger than that of any country in Africa?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT CountryCode FROM countrylanguage", - "utterance_toks": [ - "What", - "are", - "the", - "country", - "codes", - "of", - "all", - "the", - "countries", - "?" - ], - "utterance": "What are the country codes of all the countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", - "utterance_toks": [ - "Of", - "those", - "countries", - ",", - "give", - "the", - "country", - "codes", - "for", - "those", - "which", - "do", - "not", - "speak", - "English", - "." - ], - "utterance": "Of those countries, give the country codes for those which do not speak English.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - }, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", - "utterance": "Return the country codes for countries that do not speak English." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT DISTINCT CountryCode FROM countrylanguage", - "utterance_toks": [ - "What", - "are", - "the", - "country", - "codes", - "of", - "all", - "the", - "countries", - "?" - ], - "utterance": "What are the country codes of all the countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE ! = \"English\"", - "utterance_toks": [ - "Of", - "those", - ",", - "which", - "do", - "not", - "speak", - "English", - "?" - ], - "utterance": "Of those, which do not speak English?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE ! = \"English\"", - "utterance": "Give the country codes for countries in which people speak langauges that are not English." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Code FROM country WHERE GovernmentForm ! = \"Republic\"", - "utterance_toks": [ - "What", - "are", - "the", - "country", - "codes", - "for", - "countries", - "which", - "are", - "not", - "republics", - "?" - ], - "utterance": "What are the country codes for countries which are not republics?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - "\"Republic\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Code FROM country WHERE GovernmentForm ! = \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", - "utterance_toks": [ - "Of", - "those", - ",", - "which", - "do", - "not", - "speak", - "English", - "?" - ], - "utterance": "Of those, which do not speak English?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - }, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - "\"Republic\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Code FROM country WHERE GovernmentForm ! = \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", - "utterance": "Return the codes of countries that do not speak English and do not have Republics for governments." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'English'", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "countries", - "where", - "English", - "is", - "the", - "official", - "language", - "?" - ], - "utterance": "What are the names of the countries where English is the official language?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM country WHERE Continent = 'Europe' AND Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'English')", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "countries", - "in", - "Europe", - "that", - "are", - "not", - "one", - "of", - "those", - "?" - ], - "utterance": "What are the names of the countries in Europe that are not one of those?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ], - "and", - [ - true, - 8, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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')", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "cities", - "in", - "those", - "countries", - "?" - ], - "utterance": "What are the names of the cities in those countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ], - "and", - [ - true, - 8, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 25, - false - ], - null - ], - "\"T\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"English\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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')", - "utterance": "What are the names of cities in Europe for which English is not the official language?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", - "utterance_toks": [ - "What", - "are", - "the", - "countries", - "in", - "Asia", - "where", - "Chinese", - "is", - "spoken", - "?" - ], - "utterance": "What are the countries in Asia where Chinese is spoken?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 24, - false - ], - null - ], - "\"Chinese\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", - "utterance_toks": [ - "Of", - "those", - ",", - "which", - "have", - "Chinese", - "as", - "the", - "official", - "language", - "?" - ], - "utterance": "Of those, which have Chinese as the official language?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": 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 - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "What", - "are", - "the", - "different", - "cities", - "in", - "those", - "countries", - "?" - ], - "utterance": "What are the different cities in those countries?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": 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 - ] - ], - "having": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Return the different names of cities that are in Asia and for which Chinese is the official language." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country ORDER BY Population LIMIT 1", - "utterance_toks": [ - "Which", - "country", - "has", - "the", - "smallest", - "population", - "?" - ], - "utterance": "Which country has the smallest population?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1", - "utterance_toks": [ - "What", - "is", - "its", - "name", - ",", - "independence", - "year", - ",", - "and", - "surface", - "area", - "?" - ], - "utterance": "What is its name, independence year, and surface area?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1", - "utterance": "Give the name, year of independence, and surface area of the country that has the lowest population." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country ORDER BY SurfaceArea DESC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "the", - "country", - "with", - "the", - "largest", - "surface", - "area", - "?" - ], - "utterance": "What is the country with the largest surface area?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "its", - "population", - ",", - "name", - "and", - "leader", - "?" - ], - "utterance": "What is its population, name and leader?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", - "utterance": "Give the name, population, and head of state for the country that has the largest area." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Name FROM country", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "countries", - "?" - ], - "utterance": "What are the names of the countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2", - "utterance_toks": [ - "Which", - "of", - "them", - "speak", - "at", - "least", - "three", - "languages", - "?" - ], - "utterance": "Which of them speak at least three languages?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Also", - ",", - "how", - "many", - "languages", - "are", - "spoken", - "in", - "each", - "of", - "those", - "countries", - "?" - ], - "utterance": "Also, how many languages are spoken in each of those countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What are the names of countries that speak more than 2 languages, as well as how many languages they speak?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT avg(Population) FROM city", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "city", - "population", - "for", - "each", - "city", - "?" - ], - "utterance": "What is the average city population for each city?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", - "utterance_toks": [ - "For", - "each", - "district", - ",", - "count", - "how", - "many", - "cities", - "have", - "a", - "population", - "greater", - "than", - "the", - "average", - "." - ], - "utterance": "For each district, count how many cities have a population greater than the average.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", - "utterance": "How many cities in each district have a population that is above the average population across all cities?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", - "utterance_toks": [ - "The", - "countries", - "with", - "which", - "government", - "form", - "have", - "an", - "average", - "life", - "expectancy", - "greater", - "than", - "age", - "72", - "?" - ], - "utterance": "The countries with which government form have an average life expectancy greater than age 72?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 19, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [ - [ - false, - 3, - [ - 0, - [ - 5, - 15, - false - ], - null - ], - 72.0, - null - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", - "utterance_toks": [ - "For", - "those", - ",", - "list", - "the", - "total", - "population", - "and", - "government", - "form", - "name", - "." - ], - "utterance": "For those, list the total population and government form name.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 19, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [ - [ - false, - 3, - [ - 0, - [ - 5, - 15, - false - ], - null - ], - 72.0, - null - ] - ], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", - "utterance": "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?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", - "utterance_toks": [ - "Which", - "continents", - "have", - "an", - "average", - "life", - "expectancy", - "less", - "than", - "age", - "72", - "?" - ], - "utterance": "Which continents have an average life expectancy less than age 72?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [ - [ - false, - 4, - [ - 0, - [ - 5, - 15, - false - ], - null - ], - 72.0, - null - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", - "utterance_toks": [ - "Give", - "their", - "average", - "life", - "expectancy", - "and", - "total", - "population", - "." - ], - "utterance": "Give their average life expectancy and total population.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "limit": null, - "intersect": null, - "where": [], - "having": [ - [ - false, - 4, - [ - 0, - [ - 5, - 15, - false - ], - null - ], - 72.0, - null - ] - ], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 5, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", - "utterance": "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?" - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country ORDER BY SurfaceArea DESC LIMIT 5", - "utterance_toks": [ - "What", - "are", - "the", - "countries", - "with", - "the", - "top", - "5", - "largest", - "surface", - "areas", - "?" - ], - "utterance": "What are the countries with the top 5 largest surface areas?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 5, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", - "utterance_toks": [ - "What", - "are", - "the", - "surface", - "areas", - "and", - "names", - "of", - "those", - "countries", - "?" - ], - "utterance": "What are the surface areas and names of those countries?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 5, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", - "utterance": "Return the names and surface areas of the 5 largest countries." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country ORDER BY Population DESC", - "utterance_toks": [ - "Order", - "the", - "countries", - "by", - "descending", - "population", - "size", - "." - ], - "utterance": "Order the countries by descending population size.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", - "utterance_toks": [ - "Give", - "the", - "names", - "of", - "the", - "3", - "countries", - "which", - "have", - "the", - "most", - "." - ], - "utterance": "Give the names of the 3 countries which have the most.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 3, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", - "utterance": "Return the names of the 3 most populated countries." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country ORDER BY Population", - "utterance_toks": [ - "Order", - "the", - "countries", - "by", - "increasing", - "population", - "." - ], - "utterance": "Order the countries by increasing population.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", - "utterance_toks": [ - "Give", - "the", - "names", - "of", - "the", - "3", - "countries", - "with", - "the", - "lowest", - "." - ], - "utterance": "Give the names of the 3 countries with the lowest.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": 3, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", - "utterance": "Return the names of the 3 countries with the fewest people." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country WHERE continent = \"Asia\"", - "utterance_toks": [ - "What", - "are", - "the", - "countries", - "in", - "the", - "continent", - "of", - "Asia", - "?" - ], - "utterance": "What are the countries in the continent of Asia?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM country WHERE continent = \"Asia\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Asia\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM country WHERE continent = \"Asia\"", - "utterance": "Count the number of countries in Asia." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country WHERE continent = \"Europe\"", - "utterance_toks": [ - "Which", - "countries", - "are", - "in", - "the", - "continent", - "of", - "Europe", - "?" - ], - "utterance": "Which countries are in the continent of Europe?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", - "utterance_toks": [ - "Of", - "those", - ",", - "what", - "are", - "the", - "names", - "of", - "those", - "that", - "have", - "a", - "population", - "of", - "80000", - "?" - ], - "utterance": "Of those, what are the names of those that have a population of 80000?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"Europe\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"80000\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM country WHERE WHERE continent = \"Europe\" AND Population = \"80000\"", - "utterance": "Give the names of countries that are in Europe and have a population equal to 80000." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT * FROM country WHERE Continent = \"North America\"", - "utterance_toks": [ - "What", - "countries", - "are", - "in", - "North", - "America", - "?" - ], - "utterance": "What countries are in North America?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"North America\"", - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM country WHERE Continent = \"North America\" AND SurfaceArea > 3000", - "utterance_toks": [ - "Of", - "those", - ",", - "which", - "have", - "surface", - "area", - "greater", - "than", - "3000", - "?" - ], - "utterance": "Of those, which have surface area greater than 3000?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"North America\"", - null - ], - "and", - [ - false, - 3, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - 3000.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT sum(Population) , avg(SurfaceArea) FROM country WHERE Continent = \"North America\" AND SurfaceArea > 3000", - "utterance_toks": [ - "What", - "is", - "the", - "total", - "population", - "and", - "average", - "surface", - "area", - "of", - "those", - "countries", - "?" - ], - "utterance": "What is the total population and average surface area of those countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"North America\"", - null - ], - "and", - [ - false, - 3, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - 3000.0, - null - ] - ], - "having": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 5, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT sum(Population) , avg(SurfaceArea) FROM country WHERE Continent = \"North America\" AND SurfaceArea > 3000", - "utterance": "Give the total population and average surface area corresponding to countries in Noth America that have a surface area greater than 3000." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT name FROM city", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "the", - "cities", - "?" - ], - "utterance": "What are the names of all the cities?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM city WHERE Population BETWEEN 160000 AND 90000", - "utterance_toks": [ - "Which", - "of", - "those", - "have", - "a", - "population", - "between", - "160000", - "and", - "900000", - "?" - ], - "utterance": "Which of those have a population between 160000 and 900000?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 1, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - 160000.0, - 90000.0 - ] - ], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM city WHERE Population BETWEEN 160000 AND 90000", - "utterance": "Return the names of cities that have a population between 160000 and 900000." - } - }, - { - "database_id": "world_1", - "interaction": [ - { - "query": "SELECT LANGUAGE FROM countrylanguage", - "utterance_toks": [ - "What", - "are", - "the", - "different", - "languages", - "?" - ], - "utterance": "What are the different languages?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [], - "limit": null, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Which", - "one", - "is", - "spoken", - "in", - "the", - "most", - "countries", - "?" - ], - "utterance": "Which one is spoken in the most countries?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "groupBy": [ - [ - 0, - 24, - false - ] - ], - "limit": 1, - "intersect": null, - "where": [], - "having": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", - "utterance": "Give the language that is spoken in the most countries." - } - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Directed_by FROM Cartoon WHERE Title = \"Day of the Dark Knight!\"", - "utterance_toks": [ - "Tell", - "me\ufeff", - "the", - "director", - "of", - "the", - "cartoon", - "named", - "``", - "Day", - "of", - "the", - "Dark", - "Knight", - "!", - "``", - "." - ], - "utterance": "Tell me\ufeff the director of the cartoon named \"Day of the Dark Knight!\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Day of the Dark Knight!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Channel FROM Cartoon WHERE Title = \"Day of the Dark Knight!\"", - "utterance_toks": [ - "What", - "is", - "the", - "channel", - "of", - "this", - "cartoon", - "?" - ], - "utterance": "What is the channel of this cartoon?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Day of the Dark Knight!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"", - "utterance_toks": [ - "Give", - "me", - "the", - "titles", - "of", - "all", - "cartoon", - "directed", - "by", - "``", - "Ben", - "Jones", - "''", - "or", - "``", - "Brandon", - "Vietti", - "''", - "?" - ], - "utterance": "Give me the titles of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - "\"Ben Jones\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - "\"Brandon Vietti\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";", - "utterance": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\"." - }, - "interaction_id": 0 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT * FROM TV_Channel WHERE Country = \"Italy\"", - "utterance_toks": [ - "Show", - "me", - "all", - "the", - "information", - "about", - "the", - "Italian", - "TV", - "Channels", - "." - ], - "utterance": "Show me all the information about the Italian TV Channels.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - "\"Italy\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM TV_Channel WHERE Country = \"Poland\"", - "utterance_toks": [ - "How", - "about", - "the", - "Polish", - "TV", - "Channels", - "?" - ], - "utterance": "How about the Polish TV Channels?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - "\"Poland\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Which", - "country", - "has", - "the", - "most", - "of", - "TV", - "Channels", - "?", - "List", - "the", - "country", - "and", - "number", - "of", - "TV", - "Channels", - "it", - "has", - "." - ], - "utterance": "Which country has the most of TV Channels? List the country and number of TV Channels it has.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;", - "utterance": "Which country has the most of TV Channels? List the country and number of TV Channels it has." - }, - "interaction_id": 1 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Channel FROM Cartoon WHERE Title = \"The Eyes of Despero!\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "TV", - "Channel", - "of", - "the", - "cartoon", - "titled", - "``", - "The", - "Eyes", - "of", - "Despero", - "!", - "``", - "." - ], - "utterance": "Tell me the TV Channel of the cartoon titled \"The Eyes of Despero!\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"The Eyes of Despero!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT series_name FROM TV_Channel WHERE id IN (SELECT Channel FROM Cartoon WHERE Title = \"The Eyes of Despero!\")", - "utterance_toks": [ - "How", - "about", - "this", - "channel", - "'s", - "series", - "name", - "?" - ], - "utterance": "How about this channel's series name?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"The Eyes of Despero!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel", - "utterance_toks": [ - "Tell", - "me", - "the", - "number", - "of", - "different", - "series", - "names", - "and", - "contents", - "in", - "the", - "TV", - "Channel", - "table", - "." - ], - "utterance": "Tell me the number of different series names and contents in the TV Channel table.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 2, - true - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 5, - true - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;", - "utterance": "List the number of different series names and contents in the TV Channel table." - }, - "interaction_id": 2 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Rock TV\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "package", - "option", - "for", - "the", - "series", - "named", - "``", - "Rock", - "TV", - "''", - "." - ], - "utterance": "Tell me the package option for the series named \"Rock TV\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Rock TV\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Language FROM TV_Channel WHERE series_name = \"Rock TV\"", - "utterance_toks": [ - "tell", - "me", - "the", - "language", - "of", - "this", - "series", - "." - ], - "utterance": "tell me the language of this series.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Rock TV\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1", - "utterance_toks": [ - "List", - "the", - "language", - "used", - "least", - "number", - "of", - "TV", - "Channel", - ".", - "List", - "language", - "and", - "number", - "of", - "TV", - "Channel", - "." - ], - "utterance": "List the language used least number of TV Channel. List language and number of TV Channel.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;", - "utterance": "List the language used least number of TV Channel. List language and number of TV Channel." - }, - "interaction_id": 3 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Written_by FROM Cartoon WHERE Title = \"The Rise of the Blue Beetle!\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "author", - "of", - "the", - "cartoon", - "``", - "The", - "Rise", - "of", - "the", - "Blue", - "Beetle", - "!", - "''" - ], - "utterance": "Tell me the author of the cartoon \"The Rise of the Blue Beetle!\"", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"The Rise of the Blue Beetle!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Directed_by FROM Cartoon WHERE Title = \"The Rise of the Blue Beetle!\"", - "utterance_toks": [ - "How", - "about", - "its", - "director", - "?" - ], - "utterance": "How about its director?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"The Rise of the Blue Beetle!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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!\"", - "utterance_toks": [ - "What", - "is", - "its", - "TV", - "Channel", - "?" - ], - "utterance": "What is its TV Channel?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 25, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"The Rise of the Blue Beetle!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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!\";", - "utterance": "What is the TV Channel that shows the cartoon \"The Rise of the Blue Beetle!\"? List the TV Channel's series name." - }, - "interaction_id": 4 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Country FROM TV_Channel WHERE series_name = \"Sky Radio\"", - "utterance_toks": [ - "tell", - "me", - "the", - "country", - "of", - "the", - "TV", - "Channel", - "for", - "the", - "series", - "named", - "``", - "Sky", - "Radio", - "''", - "." - ], - "utterance": "tell me the country of the TV Channel for the series named \"Sky Radio\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Sky Radio\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\"", - "utterance_toks": [ - "How", - "about", - "its", - "content", - "?" - ], - "utterance": "How about its content?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Sky Radio\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\"", - "utterance_toks": [ - "I", - "want", - "to", - "know", - "the", - "title", - "of", - "all", - "Cartoons", - "showed", - "on", - "TV", - "Channel", - "with", - "series", - "name", - "``", - "Sky", - "Radio", - "''", - "." - ], - "utterance": "I want to know the title of all Cartoons showed on TV Channel with series name \"Sky Radio\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 25, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Sky Radio\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", - "utterance": "List the title of all Cartoons showed on TV Channel with series name \"Sky Radio\"." - }, - "interaction_id": 5 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Rating FROM TV_series WHERE Episode = \"Double Down\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "rating", - "of", - "the", - "episode", - "named", - "``", - "Double", - "Down", - "''", - "." - ], - "utterance": "Tell me the rating of the episode named \"Double Down\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Double Down\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Rating FROM TV_series WHERE Episode = \"Keepers\"", - "utterance_toks": [ - "How", - "about", - "the", - "rating", - "of", - "the", - "episode", - "named", - "``", - "Keepers", - "''", - "." - ], - "utterance": "How about the rating of the episode named \"Keepers\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Keepers\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3", - "utterance_toks": [ - "Okay", - ",", - "I", - "want", - "to", - "know", - "the", - "top", - "3", - "highest", - "Rating", - "TV", - "series", - ".", - "List", - "the", - "TV", - "series", - "'s", - "Episode", - "and", - "Rating", - "." - ], - "utterance": "Okay, I want to know the top 3 highest Rating TV series. List the TV series's Episode and Rating.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 3, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;", - "utterance": "List top 3 highest Rating TV series. List the TV series's Episode and Rating." - }, - "interaction_id": 6 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"Emily\"", - "utterance_toks": [ - "tell", - "me", - "the", - "weekly", - "rank", - "of", - "the", - "episode", - "named", - "``", - "Emily", - "''", - "." - ], - "utterance": "tell me the weekly rank of the episode named \"Emily\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Emily\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Share FROM TV_series WHERE Episode = \"Emily\"", - "utterance_toks": [ - "How", - "about", - "its", - "share", - "?" - ], - "utterance": "How about its share?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Emily\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(SHARE) , min(SHARE) FROM TV_series", - "utterance_toks": [ - "tell", - "me", - "the", - "minimum", - "and", - "maximum", - "share", - "of", - "TV", - "series", - "." - ], - "utterance": "tell me the minimum and maximum share of TV series.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT max(SHARE) , min(SHARE) FROM TV_series;", - "utterance": "What is minimum and maximum share of TV series?" - }, - "interaction_id": 7 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Rating FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "rating", - "of", - "the", - "episode", - "titled", - "``", - "A", - "Love", - "of", - "a", - "Lifetime", - "''", - "." - ], - "utterance": "Tell me the rating of the episode titled \"A Love of a Lifetime\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"A Love of a Lifetime\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", - "utterance_toks": [ - "How", - "about", - "its", - "weekly", - "rank", - "?" - ], - "utterance": "How about its weekly rank?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"A Love of a Lifetime\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "And", - "What", - "is", - "its", - "TV", - "Channel", - "?" - ], - "utterance": "And What is its TV Channel?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 18, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"A Love of a Lifetime\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\";", - "utterance": "What is the TV Channel of TV series with Episode \"A Love of a Lifetime\"? List the TV Channel's series name." - }, - "interaction_id": 8 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\"", - "utterance_toks": [ - "tell", - "me", - "the", - "content", - "of", - "TV", - "Channel", - "with", - "the", - "series", - "named", - "``", - "Sky", - "Radio", - "''", - "." - ], - "utterance": "tell me the content of TV Channel with the series named \"Sky Radio\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Sky Radio\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Language FROM TV_Channel WHERE series_name = \"Sky Radio\"", - "utterance_toks": [ - "How", - "about", - "its", - "language", - "?" - ], - "utterance": "How about its language?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Sky Radio\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Okay", - ",", - "now", - "I", - "want", - "to", - "know", - "the", - "Episode", - "of", - "all", - "TV", - "series", - "showed", - "on", - "TV", - "Channel", - "with", - "series", - "name", - "``", - "Sky", - "Radio", - "''", - "." - ], - "utterance": "Okay, now I want to know the Episode of all TV series showed on TV Channel with series name \"Sky Radio\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 18, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Sky Radio\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\";", - "utterance": "List the Episode of all TV series showed on TV Channel with series name \"Sky Radio\"." - }, - "interaction_id": 9 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Original_air_date FROM Cartoon WHERE Title = \"Fall of the Blue Beetle!\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "air", - "date", - "of", - "the", - "cartoon", - "titled", - "``", - "Fall", - "of", - "the", - "Blue", - "Beetle", - "!", - "``", - "." - ], - "utterance": "Tell me the air date of the cartoon titled \"Fall of the Blue Beetle!\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Fall of the Blue Beetle!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Production_code FROM Cartoon WHERE Title = \"Fall of the Blue Beetle!\"", - "utterance_toks": [ - "What", - "is", - "its", - "production", - "code", - "?" - ], - "utterance": "What is its production code?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Fall of the Blue Beetle!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT production_code , channel FROM cartoon ORDER BY original_air_date LIMIT 1", - "utterance_toks": [ - "tell", - "me", - "the", - "production", - "code", - "and", - "channel", - "of", - "the", - "most", - "recently", - "aired", - "cartoon", - "." - ], - "utterance": "tell me the production code and channel of the most recently aired cartoon.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT production_code , channel FROM cartoon ORDER BY original_air_date LIMIT 1", - "utterance": "Find the production code and channel of the most recently aired cartoon." - }, - "interaction_id": 10 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "cartoons", - "directed", - "by", - "Ben", - "Jone", - "." - ], - "utterance": "Tell me the cartoons directed by Ben Jone.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - "\"Ben Jones\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Title FROM Cartoon WHERE Written_by = \"Todd Casey\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "cartoons", - "written", - "by", - "Todd", - "Casey", - "." - ], - "utterance": "Tell me the cartoons written by Todd Casey.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 22, - false - ], - null - ], - "\"Todd Casey\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = 'Todd Casey'", - "utterance_toks": [ - "Which", - "countries", - "'", - "tv", - "channels", - "are", - "playing", - "some", - "cartoon", - "written", - "by", - "Todd", - "Casey", - "?" - ], - "utterance": "Which countries' tv channels are playing some cartoon written by Todd Casey?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 25, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 22, - false - ], - null - ], - "\"Todd Casey\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = 'Todd Casey'", - "utterance": "which countries' tv channels are playing some cartoon written by Todd Casey?" - }, - "interaction_id": 11 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = 'Steven Melching'", - "utterance_toks": [ - "which", - "countries", - "'", - "tv", - "channels", - "are", - "playing", - "some", - "cartoon", - "written", - "by", - "Steven", - "Melching", - "?" - ], - "utterance": "which countries' tv channels are playing some cartoon written by Steven Melching?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 25, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 22, - false - ], - null - ], - "\"Steven Melching\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "which", - "countries", - "'", - "tv", - "channels", - "are", - "not", - "playing", - "any", - "cartoon", - "written", - "by", - "Todd", - "Casey", - "?" - ], - "utterance": "which countries' tv channels are not playing any cartoon written by Todd Casey?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 25, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 22, - false - ], - null - ], - "\"Todd Casey\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "which countries' tv channels are not playing any cartoon written by Todd Casey?" - }, - "interaction_id": 12 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Directed_by FROM Cartoon WHERE Title = \"Deep Cover for Batman!\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "director", - "of", - "the", - "cartoon", - "titled", - "``", - "Deep", - "Cover", - "for", - "Batman", - "!", - "``", - "." - ], - "utterance": "Tell me the director of the cartoon titled \"Deep Cover for Batman!\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Deep Cover for Batman!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Production_code FROM Cartoon WHERE Title = \"Deep Cover for Batman!\"", - "utterance_toks": [ - "I", - "want", - "to", - "know", - "this", - "cartoon", - "'s", - "production", - "code", - "." - ], - "utterance": "I want to know this cartoon's production code.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Deep Cover for Batman!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 24, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Tell", - "me", - "the", - "series", - "name", - "and", - "country", - "of", - "the", - "tv", - "channel", - "that", - "is", - "playing", - "some", - "cartoons", - "directed", - "by", - "Ben", - "Jones", - "and", - "Michael", - "Chang", - "." - ], - "utterance": "Tell me the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 25, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 25, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - "\"Ben Jones\"", - null - ] - ], - "groupBy": [], - "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": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?" - }, - "interaction_id": 13 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Country FROM TV_Channel WHERE series_name = \"MTV Music\"", - "utterance_toks": [ - "tell", - "me", - "the", - "country", - "of", - "the", - "TV", - "channel", - "with", - "series", - "named", - "``", - "MTV", - "Music", - "''" - ], - "utterance": "tell me the country of the TV channel with series named \"MTV Music\"", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"MTV Music\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(*) FROM TV_Channel WHERE Country = \"Italy\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "number", - "of", - "Italian", - "channels", - "." - ], - "utterance": "Tell me the number of Italian channels.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - "\"Italy\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", - "utterance_toks": [ - "find", - "id", - "of", - "the", - "tv", - "channels", - "that", - "from", - "the", - "countries", - "where", - "have", - "more", - "than", - "two", - "tv", - "channels", - "." - ], - "utterance": "find id of the tv channels that from the countries where have more than two tv channels.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", - "utterance": "find id of the tv channels that from the countries where have more than two tv channels." - }, - "interaction_id": 14 - }, - { - "database_id": "tvshow", - "interaction": [ - { - "query": "SELECT Directed_by FROM Cartoon WHERE Title = \"Return of the Fearsome Fangs!\"", - "utterance_toks": [ - "Who", - "is", - "the", - "director", - "of", - "the", - "cartoon", - "titled", - "``", - "Return", - "of", - "the", - "Fearsome", - "Fangs", - "!", - "``", - "?" - ], - "utterance": "Who is the director of the cartoon titled \"Return of the Fearsome Fangs!\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Return of the Fearsome Fangs!\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\"", - "utterance_toks": [ - "Tell", - "me", - "the", - "cartoons", - "directed", - "by", - "Ben", - "Jones", - "." - ], - "utterance": "Tell me the cartoons directed by Ben Jones.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - "\"Ben Jones\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", - "utterance_toks": [ - "Find", - "the", - "id", - "of", - "tv", - "channels", - "that", - "do", - "not", - "play", - "any", - "cartoon", - "directed", - "by", - "Ben", - "Jones", - "." - ], - "utterance": "Find the id of tv channels that do not play any cartoon directed by Ben Jones.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - "\"Ben Jones\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", - "utterance": "find the id of tv channels that do not play any cartoon directed by Ben Jones." - }, - "interaction_id": 15 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT * FROM poker_player", - "utterance_toks": [ - "Show", - "all", - "the", - "poker", - "players", - "." - ], - "utterance": "Show all the poker players.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM poker_player", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM poker_player", - "utterance": "How many poker players are there?" - }, - "interaction_id": 0 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT Earnings FROM poker_player", - "utterance_toks": [ - "What", - "is", - "the", - "earnings", - "of", - "each", - "poker", - "player", - "?" - ], - "utterance": "What is the earnings of each poker player?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC", - "utterance_toks": [ - "Sort", - "them", - "in", - "descending", - "order", - "." - ], - "utterance": "Sort them in descending order.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC", - "utterance": "List the earnings of poker players in descending order." - }, - "interaction_id": 1 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT * FROM poker_player", - "utterance_toks": [ - "Show", - "all", - "the", - "information", - "about", - "each", - "poker", - "player", - "." - ], - "utterance": "Show all the information about each poker player.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Final_Table_Made FROM poker_player", - "utterance_toks": [ - "What", - "are", - "their", - "final", - "table", - "mades", - "?" - ], - "utterance": "What are their final table mades?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Final_Table_Made , Best_Finish FROM poker_player", - "utterance_toks": [ - "What", - "are", - "their", - "final", - "table", - "mades", - "and", - "best", - "finishes", - "?" - ], - "utterance": "What are their final table mades and best finishes?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Final_Table_Made , Best_Finish FROM poker_player", - "utterance": "List the final tables made and the best finishes of poker players." - }, - "interaction_id": 2 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT Earnings FROM poker_player", - "utterance_toks": [ - "What", - "is", - "the", - "earnings", - "of", - "each", - "poker", - "player", - "?" - ], - "utterance": "What is the earnings of each poker player?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(Earnings) FROM poker_player", - "utterance_toks": [ - "Give", - "me", - "the", - "average", - "." - ], - "utterance": "Give me the average.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(Earnings) FROM poker_player", - "utterance": "What is the average earnings of poker players?" - }, - "interaction_id": 3 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT Money_Rank FROM poker_player", - "utterance_toks": [ - "What", - "is", - "the", - "money", - "rank", - "of", - "each", - "poker", - "player", - "?" - ], - "utterance": "What is the money rank of each poker player?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC", - "utterance_toks": [ - "Sort", - "them", - "in", - "the", - "decreasing", - "order", - "." - ], - "utterance": "Sort them in the decreasing order.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1", - "utterance_toks": [ - "Return", - "the", - "top", - "one", - "." - ], - "utterance": "Return the top one.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1", - "utterance": "What is the money rank of the poker player with the highest earnings?" - }, - "interaction_id": 4 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT * FROM poker_player WHERE Earnings < 200000", - "utterance_toks": [ - "Which", - "poker", - "player", - "has", - "earnings", - "less", - "than", - "200000", - "?" - ], - "utterance": "Which poker player has earnings less than 200000?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - 200000.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000", - "utterance_toks": [ - "Among", - "them", - ",", - "what", - "is", - "the", - "maximum", - "number", - "of", - "final", - "tables", - "made", - "?" - ], - "utterance": "Among them, what is the maximum number of final tables made?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - 200000.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000", - "utterance": "What is the maximum number of final tables made among poker players with earnings less than 200000?" - }, - "interaction_id": 5 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT * FROM poker_player", - "utterance_toks": [ - "Show", - "all", - "the", - "poker", - "players", - "." - ], - "utterance": "Show all the poker players.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", - "utterance": "What are the names of poker players?" - }, - "interaction_id": 6 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT * FROM poker_player WHERE Earnings > 300000", - "utterance_toks": [ - "Which", - "poker", - "players", - "have", - "earnings", - "higher", - "than", - "300000", - "?" - ], - "utterance": "Which poker players have earnings higher than 300000?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - 300000.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - 300000.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000", - "utterance": "What are the names of poker players whose earnings is higher than 300000?" - }, - "interaction_id": 7 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "poker", - "players", - "?" - ], - "utterance": "What are the names of all poker players?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Sort", - "them", - "in", - "the", - "ascending", - "order", - "of", - "the", - "final", - "tables", - "made", - "." - ], - "utterance": "Sort them in the ascending order of the final tables made.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "List the names of poker players ordered by the final tables made in ascending order." - }, - "interaction_id": 8 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", - "utterance_toks": [ - "What", - "is", - "the", - "birth", - "date", - "of", - "each", - "poker", - "player", - "?" - ], - "utterance": "What is the birth date of each poker player?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Sort", - "the", - "list", - "by", - "the", - "poker", - "player", - "'s", - "earnings", - "." - ], - "utterance": "Sort the list by the poker player's earnings.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Give", - "me", - "the", - "result", - "for", - "the", - "player", - "with", - "the", - "lowest", - "earnings", - "." - ], - "utterance": "Give me the result for the player with the lowest earnings.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the birth date of the poker player with the lowest earnings?" - }, - "interaction_id": 9 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT Height FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", - "utterance_toks": [ - "What", - "is", - "the", - "height", - "of", - "each", - "poker", - "player", - "?" - ], - "utterance": "What is the height of each poker player?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", - "utterance_toks": [ - "Who", - "has", - "the", - "largest", - "height", - "?" - ], - "utterance": "Who has the largest height?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "is", - "his", - "or", - "her", - "money", - "rank", - "?" - ], - "utterance": "What is his or her money rank?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the money rank of the tallest poker player?" - }, - "interaction_id": 10 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT Height FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", - "utterance_toks": [ - "What", - "is", - "the", - "height", - "of", - "each", - "poker", - "player", - "?" - ], - "utterance": "What is the height of each poker player?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200", - "utterance_toks": [ - "Who", - "all", - "have", - "heights", - "greater", - "than", - "200", - "?" - ], - "utterance": "Who all have heights greater than 200?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - 200.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "earnings", - "among", - "them", - "?" - ], - "utterance": "What is the average earnings among them?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - 200.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the average earnings of poker players with height higher than 200?" - }, - "interaction_id": 11 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT * FROM poker_player ORDER BY Earnings DESC", - "utterance_toks": [ - "Sort", - "all", - "the", - "poker", - "players", - "in", - "descending", - "order", - "of", - "earnings", - "." - ], - "utterance": "Sort all the poker players in descending order of earnings.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "poker", - "players", - "in", - "descending", - "order", - "of", - "earnings", - "?" - ], - "utterance": "What are the names of poker players in descending order of earnings?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 2, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What are the names of poker players in descending order of earnings?" - }, - "interaction_id": 12 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT Nationality FROM people", - "utterance_toks": [ - "Show", - "the", - "nationality", - "of", - "each", - "person", - "." - ], - "utterance": "Show the nationality of each person.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM people GROUP BY Nationality", - "utterance_toks": [ - "Group", - "people", - "by", - "their", - "nationality", - "." - ], - "utterance": "Group people by their nationality.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality", - "utterance_toks": [ - "For", - "each", - "of", - "the", - "result", - ",", - "show", - "the", - "corresponding", - "number", - "of", - "people", - "of", - "that", - "nationality", - "?" - ], - "utterance": "For each of the result, show the corresponding number of people of that nationality?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality", - "utterance": "What are different nationalities of people and the corresponding number of people from each nation?" - }, - "interaction_id": 13 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT Nationality FROM people", - "utterance_toks": [ - "Show", - "the", - "nationality", - "of", - "each", - "person", - "." - ], - "utterance": "Show the nationality of each person.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(*) FROM people GROUP BY Nationality", - "utterance_toks": [ - "Count", - "the", - "number", - "of", - "people", - "for", - "each", - "nationality", - "." - ], - "utterance": "Count the number of people for each nationality.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "the", - "most", - "common", - "nationality", - "of", - "people", - "?" - ], - "utterance": "What is the most common nationality of people?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", - "utterance": "What is the most common nationality of people?" - }, - "interaction_id": 14 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT COUNT(*) FROM people GROUP BY Nationality", - "utterance_toks": [ - "Count", - "the", - "number", - "of", - "people", - "for", - "each", - "nationality", - "." - ], - "utterance": "Count the number of people for each nationality.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2", - "utterance_toks": [ - "Which", - "nationalities", - "are", - "held", - "by", - "at", - "least", - "two", - "people", - "?" - ], - "utterance": "Which nationalities are held by at least two people?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2", - "utterance": "What are the nationalities that are shared by at least two people?" - }, - "interaction_id": 15 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT Name , Birth_Date FROM people", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "and", - "birth", - "dates", - "of", - "people", - "?" - ], - "utterance": "What are the names and birth dates of people?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC", - "utterance_toks": [ - "Sort", - "the", - "results", - "in", - "ascending", - "alphabetical", - "order", - "of", - "name", - "." - ], - "utterance": "Sort the results in ascending alphabetical order of name.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC", - "utterance": "List the names and birth dates of people in ascending alphabetical order of name." - }, - "interaction_id": 16 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT Name FROM people", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "people", - "?" - ], - "utterance": "What are the names of all people?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM people WHERE Nationality != \"Russia\"", - "utterance_toks": [ - "What", - "about", - "people", - "whose", - "nationality", - "is", - "not", - "``", - "Russia", - "''", - "?" - ], - "utterance": "What about people whose nationality is not \"Russia\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - "\"Russia\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM people WHERE Nationality != \"Russia\"", - "utterance": "Show names of people whose nationality is not \"Russia\"." - }, - "interaction_id": 17 - }, - { - "database_id": "poker_player", - "interaction": [ - { - "query": "SELECT * FROM poker_player", - "utterance_toks": [ - "Show", - "all", - "the", - "poker", - "players", - "." - ], - "utterance": "Show all the poker players.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", - "utterance_toks": [ - "Show", - "all", - "people", - "who", - "are", - "not", - "poker", - "players", - "." - ], - "utterance": "Show all people who are not poker players.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", - "utterance_toks": [ - "Give", - "me", - "their", - "names", - "." - ], - "utterance": "Give me their names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", - "utterance": "List the names of people that are not poker players." - }, - "interaction_id": 18 - }, - { - "database_id": "battle_death", - "interaction": [ - { - "query": "SELECT killed FROM death", - "utterance_toks": [ - "What", - "are", - "the", - "death", - "tolls", - "each", - "time", - "?" - ], - "utterance": "What are the death tolls each time?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(killed) FROM death", - "utterance_toks": [ - "What", - "is", - "the", - "maximum", - "number", - "of", - "deaths", - "in", - "any", - "one", - "time", - "?" - ], - "utterance": "What is the maximum number of deaths in any one time?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT min(killed) FROM death", - "utterance_toks": [ - "What", - "about", - "the", - "minimum", - "?" - ], - "utterance": "What about the minimum?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(killed) , min(killed) FROM death", - "utterance_toks": [ - "Give", - "me", - "the", - "maximum", - "and", - "also", - "the", - "minimum", - "." - ], - "utterance": "Give me the maximum and also the minimum.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ], - [ - 2, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT max(killed) , min(killed) FROM death", - "utterance": "What is maximum and minimum death toll caused each time?" - }, - "interaction_id": 0 - }, - { - "database_id": "battle_death", - "interaction": [ - { - "query": "SELECT * FROM death as T1 JOIN ship as T2 ON T1.caused_by_ship_id = T2.id", - "utterance_toks": [ - "Show", - "me", - "information", - "about", - "deaths", - "caused", - "by", - "ships", - "." - ], - "utterance": "Show me information about deaths caused by ships.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM death AS T1 JOIN ship AS T2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'", - "utterance_toks": [ - "Only", - "ships", - "with", - "tonnage", - "'t", - "'", - "." - ], - "utterance": "Only ships with tonnage 't'.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"t\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Only", - "return", - "the", - "death", - "and", - "injury", - "information", - "for", - "those", - "ships", - "." - ], - "utterance": "Only return the death and injury information for those ships.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"t\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "What are the death and injury situations caused by the ship with tonnage 't'?" - }, - "interaction_id": 1 - }, - { - "database_id": "battle_death", - "interaction": [ - { - "query": "SELECT id, name FROM battle", - "utterance_toks": [ - "What", - "are", - "the", - "ids", - "and", - "names", - "of", - "the", - "battles", - "?" - ], - "utterance": "What are the ids and names of the battles?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle", - "utterance_toks": [ - "Only", - "show", - "those", - "that", - "ships", - "were", - "lost", - "in", - "." - ], - "utterance": "Only show those that ships were lost in.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Please", - ",", - "just", - "the", - "ones", - "with", - "'Brig", - "'", - "ship", - "type", - "." - ], - "utterance": "Please, just the ones with 'Brig' ship type.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Brig\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "What are the different ids and names of the battles that lost any 'Brig' type ships?" - }, - "interaction_id": 2 - }, - { - "database_id": "battle_death", - "interaction": [ - { - "query": "SELECT T1.id , T1.name, sum(T3.killed), sum(T3.injured) 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", - "utterance_toks": [ - "How", - "many", - "people", - "were", - "killed", - "or", - "injured", - "in", - "each", - "battle", - "?" - ], - "utterance": "How many people were killed or injured in each battle?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Only", - "show", - "the", - "deaths", - "for", - "those", - "battles", - "that", - "produced", - "at", - "least", - "ten", - "deaths", - "." - ], - "utterance": "Only show the deaths for those battles that produced at least ten deaths.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 4, - 17, - false - ], - null - ], - 10.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What are the ids and names of the battles that led to more than 10 people killed in total." - }, - "interaction_id": 3 - }, - { - "database_id": "battle_death", - "interaction": [ - { - "query": "SELECT T2.id , T2.name, sum(T1.injured) FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id", - "utterance_toks": [ - "List", - "the", - "injuries", - "caused", - "by", - "each", - "ship", - "(", - "give", - "ship", - "id", - "and", - "name", - "please", - ")", - "." - ], - "utterance": "List the injuries caused by each ship (give ship id and name please).", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.id , T2.name, sum(T1.injured) FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY sum(T1.injured)", - "utterance_toks": [ - "Sort", - "it", - "by", - "decreasing", - "number", - "of", - "injuries", - "." - ], - "utterance": "Sort it by decreasing number of injuries.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 4, - 18, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 sum(T1.injured) DESC LIMIT 1", - "utterance_toks": [ - "Only", - "show", - "the", - "ship", - "id", - "and", - "name", - "that", - "caused", - "the", - "most", - "total", - "injuries", - "." - ], - "utterance": "Only show the ship id and name that caused the most total injuries.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 4, - 18, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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 sum(T1.injured) DESC LIMIT 1", - "utterance": "What is the ship id and name that caused most total injuries?" - }, - "interaction_id": 4 - }, - { - "database_id": "battle_death", - "interaction": [ - { - "query": "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan'", - "utterance_toks": [ - "Which", - "battles", - "did", - "the", - "bulgarian", - "commander", - "'Kaloyan", - "'", - "fight", - "in", - "?" - ], - "utterance": "Which battles did the bulgarian commander 'Kaloyan' fight in?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Kaloyan\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM battle WHERE latin_commander = 'Baldwin I'", - "utterance_toks": [ - "How", - "about", - "the", - "latin", - "commander", - "'Baldwin", - "I", - "'", - "?" - ], - "utterance": "How about the latin commander 'Baldwin I'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Baldwin I\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'", - "utterance_toks": [ - "Just", - "the", - "ones", - "where", - "they", - "were", - "fighting", - "one", - "another", - ",", - "please", - "." - ], - "utterance": "Just the ones where they were fighting one another, please.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Kaloyan\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"Baldwin I\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'", - "utterance": "What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?" - }, - "interaction_id": 5 - }, - { - "database_id": "battle_death", - "interaction": [ - { - "query": "SELECT lost_in_battle FROM ship WHERE tonnage = '225'", - "utterance_toks": [ - "Which", - "battle", - "ids", - "lost", - "ships", - "with", - "tonnage", - "'225", - "'", - "?" - ], - "utterance": "Which battle ids lost ships with tonnage '225'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"225\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.id, T2.name from ship AS T1 join battle AS T2 ON T1.lost_in_battle = T2.id WHERE tonnage = '225'", - "utterance_toks": [ - "Give", - "the", - "names", - "of", - "these", - "battles", - ",", - "too", - "." - ], - "utterance": "Give the names of these battles, too.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"225\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT id, name FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );", - "utterance_toks": [ - "Which", - "battle", - "ids", - "and", - "names", - "did", - "not", - "lose", - "any", - "ship", - "with", - "tonnage", - "'225", - "'", - "?" - ], - "utterance": "Which battle ids and names did not lose any ship with tonnage '225'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"225\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );", - "utterance_toks": [ - "How", - "many", - "is", - "that", - "?" - ], - "utterance": "How many is that?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"225\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );", - "utterance": "How many battles did not lose any ship with tonnage '225'?" - }, - "interaction_id": 6 - }, - { - "database_id": "battle_death", - "interaction": [ - { - "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'", - "utterance_toks": [ - "List", - "the", - "name", - "and", - "date", - "of", - "the", - "battle", - "that", - "has", - "lost", - "the", - "ship", - "named", - "'Lettice", - "'" - ], - "utterance": "List the name and date of the battle that has lost the ship named 'Lettice'", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"Lettice\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atlanta'", - "utterance_toks": [ - "Same", - "for", - "'HMS", - "Atlanta", - "'", - ",", - "please", - "." - ], - "utterance": "Same for 'HMS Atlanta', please.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"HMS Atlanta\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Can", - "you", - "intersect", - "those", - "?" - ], - "utterance": "Can you intersect those?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - "\"HMS Atalanta\"", - null - ] - ], - "groupBy": [], - "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": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "List the name and date of the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'" - }, - "interaction_id": 7 - }, - { - "database_id": "battle_death", - "interaction": [ - { - "query": "SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'", - "utterance_toks": [ - "Which", - "battle", - "ids", - "and", - "names", - "lost", - "ships", - "in", - "the", - "'English", - "Channel", - "'", - "?" - ], - "utterance": "Which battle ids and names lost ships in the 'English Channel'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"English Channel\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.id, T1.name FROM battle EXCEPT SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'", - "utterance_toks": [ - "Which", - "did", - "not", - "?" - ], - "utterance": "Which did not?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"English Channel\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "For", - "these", - "ones", - ",", - "show", - "their", - "names", - ",", - "results", - ",", - "and", - "bulgarian", - "commanders", - "." - ], - "utterance": "For these ones, show their names, results, and bulgarian commanders.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"English Channel\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'." - }, - "interaction_id": 8 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT count(*) FROM CONTINENTS;", - "utterance_toks": [ - "How", - "many", - "continents", - "are", - "there", - "?" - ], - "utterance": "How many continents are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT ContId , Continent FROM CONTINENTS;", - "utterance_toks": [ - "Show", - "all", - "their", - "ids", - "and", - "names", - "!" - ], - "utterance": "Show all their ids and names!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.ContId , T1.Continent , * FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent;", - "utterance_toks": [ - "What", - "countries", - "do", - "they", - "each", - "have", - "?" - ], - "utterance": "What countries do they each have?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 5, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;", - "utterance_toks": [ - "Count", - "how", - "many", - "there", - "are", - "for", - "each", - "continent", - "name", - "and", - "id", - "!" - ], - "utterance": "Count how many there are for each continent name and id!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 5, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;", - "utterance": "How many countries does each continent have? List the continent id, continent name and the number of countries." - }, - "interaction_id": 0 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "Select FullName, ID From CAR_MAKERS;", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "and", - "ids", - "of", - "the", - "different", - "car", - "makers", - "?" - ], - "utterance": "What are the names and ids of the different car makers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "Select Country, FullName, ID From CAR_MAKERS;", - "utterance_toks": [ - "What", - "countries", - "are", - "they", - "each", - "from", - "?" - ], - "utterance": "What countries are they each from?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*), T1.Country, T1.FullName, T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", - "utterance_toks": [ - "For", - "each", - ",", - "how", - "many", - "models", - "do", - "they", - "each", - "produce", - "?" - ], - "utterance": "For each, how many models do they each produce?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "Can", - "actually", - "just", - "show", - "the", - "name", - ",", - "id", - "and", - "the", - "number", - "of", - "models", - "?" - ], - "utterance": "Can actually just show the name, id and the number of models?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "How many models does each car maker produce? List maker full name, id and the number." - }, - "interaction_id": 1 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "Select avg(horsepower) FROM CARS_DATA;", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "horsepower", - "of", - "all", - "cars", - "?" - ], - "utterance": "What is the average horsepower of all cars?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.horsepower FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower DESC LIMIT 1;", - "utterance_toks": [ - "How", - "about", - "the", - "maximum", - "?" - ], - "utterance": "How about the maximum?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.horsepower FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;", - "utterance_toks": [ - "What", - "about", - "the", - "minimum", - "?" - ], - "utterance": "What about the minimum?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "What", - "is", - "the", - "model", - "of", - "the", - "car", - "with", - "this", - "horsepower", - "?" - ], - "utterance": "What is the model of the car with this horsepower?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "Which model of the car has the minimum horsepower?" - }, - "interaction_id": 2 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT avg(Weight) FROM CARS_DATA", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "weight", - "of", - "all", - "the", - "cars", - "?" - ], - "utterance": "What is the average weight of all the cars?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight > (SELECT avg(Weight) FROM CARS_DATA)", - "utterance_toks": [ - "List", - "all", - "the", - "car", - "information", - "with", - "weights", - "above", - "this", - "?" - ], - "utterance": "List all the car information with weights above this?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)", - "utterance_toks": [ - "How", - "about", - "below", - "this", - "?" - ], - "utterance": "How about below this?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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)", - "utterance_toks": [ - "Please", - ",", - "show", - "just", - "their", - "model", - "names", - "!" - ], - "utterance": "Please, show just their model names!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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)", - "utterance": "Find the model of the car whose weight is below the average weight." - }, - "interaction_id": 3 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "Select T1.id, T2.model from cars_data as T1 join car_names as T2 on T1.id = T2.MakeId where T1.year = '1970';", - "utterance_toks": [ - "What", - "are", - "the", - "ids", - ",", - "and", - "models", - "of", - "the", - "cars", - "were", - "made", - "in", - "1970", - "?" - ], - "utterance": "What are the ids, and models of the cars were made in 1970?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - "\"1970\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "Select T1.horsepower, T1.mpg, T1.id, T2.model from cars_data as T1 join car_names as T2 on T1.id = T2.MakeId where T1.year = '1970';", - "utterance_toks": [ - "Show", - "their", - "horsepower", - "and", - "MPG", - "as", - "well", - "?" - ], - "utterance": "Show their horsepower and MPG as well?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - "\"1970\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Maker, T4.horsepower, T4.mpg, T4.id, T2.model 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';", - "utterance_toks": [ - "Also", - "provide", - "the", - "names", - "of", - "their", - "makers", - "!" - ], - "utterance": "Also provide the names of their makers!", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - "\"1970\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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';", - "utterance_toks": [ - "Just", - "show", - "a", - "unique", - "list", - "of", - "all", - "these", - "different", - "makers", - "." - ], - "utterance": "Just show a unique list of all these different makers.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - "\"1970\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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';", - "utterance": "Find the name of the makers that produced some cars in the year of 1970?" - }, - "interaction_id": 4 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT Make , Model from Car_Names;", - "utterance_toks": [ - "Show", - "me", - "the", - "makes", - "and", - "models", - "of", - "each", - "car", - "!" - ], - "utterance": "Show me the makes and models of each car!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.Make , T2.Model, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId;", - "utterance_toks": [ - "Also", - "provide", - "which", - "the", - "year", - "they", - "were", - "produced", - "?" - ], - "utterance": "Also provide which the year they were produced?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.Make , T2.Model, 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);", - "utterance_toks": [ - "Which", - "ones", - "been", - "produce", - "in", - "the", - "earliest", - "year", - "?" - ], - "utterance": "Which ones been produce in the earliest year?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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);", - "utterance_toks": [ - "Show", - "just", - "the", - "make", - "and", - "year", - "!" - ], - "utterance": "Show just the make and year!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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);", - "utterance": "Find the make and production time of the cars that were produced in the earliest year?" - }, - "interaction_id": 5 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT DISTINCT model FROM MODEL_LIST;", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "different", - "car", - "models", - "?" - ], - "utterance": "What are all the different car models?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.model, T2.Make, T3.Year 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;", - "utterance_toks": [ - "Show", - "also", - "all", - "the", - "car", - "makes", - "and", - "the", - "years", - "that", - "they", - "were", - "produced", - "!" - ], - "utterance": "Show also all the car makes and the years that they were produced!", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.model, T2.Make, T3.Year 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;", - "utterance_toks": [ - "Show", - "only", - "those", - "that", - "were", - "made", - "after", - "1980", - "!" - ], - "utterance": "Show only those that were made after 1980!", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1980.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "What", - "are", - "the", - "distinct", - "car", - "models", - "for", - "these", - "?" - ], - "utterance": "What are the distinct car models for these?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1980.0, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "Which distinct car models are the produced after 1980?" - }, - "interaction_id": 6 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "Select T1.Maker, T2.CountryName from Car_Makers as T1 JOIN Countries as T2 on T1.Country = T2.CountryId;", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "and", - "country", - "name", - "of", - "each", - "car", - "maker", - "?" - ], - "utterance": "What are the names and country name of each car maker?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Continent, T3.Maker, T2.CountryName FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country;", - "utterance_toks": [ - "Also", - "provide", - "the", - "continent", - "name", - "for", - "each", - "!" - ], - "utterance": "Also provide the continent name for each!", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "How", - "many", - "car", - "makers", - "are", - "there", - "per", - "continent", - "?" - ], - "utterance": "How many car makers are there per continent?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "How many car makers are there in each continents? List the continent name and the count." - }, - "interaction_id": 7 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT count(*) from Countries;", - "utterance_toks": [ - "How", - "many", - "countries", - "are", - "there", - "?" - ], - "utterance": "How many countries are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT *, count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country;", - "utterance_toks": [ - "How", - "many", - "car", - "makers", - "belong", - "to", - "each", - "one", - "?" - ], - "utterance": "How many car makers belong to each one?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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(*) ASC LIMIT 1;", - "utterance_toks": [ - "What", - "is", - "the", - "name", - "of", - "the", - "country", - "that", - "has", - "the", - "least", - "number", - "?" - ], - "utterance": "What is the name of the country that has the least number?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "How", - "about", - "the", - "most", - "?" - ], - "utterance": "How about the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "Which of the countries has the most car makers? List the country name." - }, - "interaction_id": 8 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "Select Count(*) FROM CAR_MAKERS;", - "utterance_toks": [ - "How", - "many", - "makers", - "are", - "there", - "?" - ], - "utterance": "How many makers are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT FullName, id FROM CAR_MAKERS;", - "utterance_toks": [ - "What", - "are", - "their", - "full", - "names", - "and", - "ids", - "?" - ], - "utterance": "What are their full names and ids?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Model , T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id;", - "utterance_toks": [ - "What", - "models", - "have", - "they", - "each", - "produced", - "?" - ], - "utterance": "What models have they each produced?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "Count", - "how", - "many", - "modes", - "there", - "are", - "per", - "maker", - "." - ], - "utterance": "Count how many modes there are per maker.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Count(*) , T2.FullName FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id;", - "utterance": "How many car models are produced by each maker? List the count and the maker full name." - }, - "interaction_id": 9 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT T1.ID FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", - "utterance_toks": [ - "Show", - "all", - "the", - "car", - "ids", - "with", - "the", - "make", - "amc", - "hornet", - "sporabout", - "(", - "sw", - ")", - "?" - ], - "utterance": "Show all the car ids with the make amc hornet sporabout (sw)?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"amc hornet sportabout (sw)\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Horsepower FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", - "utterance_toks": [ - "What", - "is", - "its", - "horsepower", - "?" - ], - "utterance": "What is its horsepower?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"amc hornet sportabout (sw)\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.MPG FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", - "utterance_toks": [ - "How", - "about", - "its", - "MPG", - "?" - ], - "utterance": "How about its MPG?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"amc hornet sportabout (sw)\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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)';", - "utterance_toks": [ - "How", - "about", - "its", - "accelerate", - "?" - ], - "utterance": "How about its accelerate?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"amc hornet sportabout (sw)\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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)';", - "utterance": "What is the accelerate of the car make amc hornet sportabout (sw)?" - }, - "interaction_id": 10 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT distinct Maker FROM CAR_MAKERS;", - "utterance_toks": [ - "Show", - "all", - "the", - "different", - "car", - "makers", - "?" - ], - "utterance": "Show all the different car makers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Maker, T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId;", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "countries", - "they", - "belong", - "to", - "?" - ], - "utterance": "What are the names of the countries they belong to?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Maker FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", - "utterance_toks": [ - "Show", - "just", - "the", - "car", - "makers", - "from", - "France", - "!" - ], - "utterance": "Show just the car makers from France!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"france\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"france\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", - "utterance": "How many car makers are there in france?" - }, - "interaction_id": 11 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT count(*) FROM MODEL_LIST;", - "utterance_toks": [ - "How", - "many", - "car", - "models", - "are", - "produced", - "in", - "total", - "?" - ], - "utterance": "How many car models are produced in total?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 = 'Germany';", - "utterance_toks": [ - "How", - "many", - "in", - "Germany", - "?" - ], - "utterance": "How many in Germany?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Germany\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 = 'japan';", - "utterance_toks": [ - "How", - "about", - "in", - "Japan", - "?" - ], - "utterance": "How about in Japan?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"japan\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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';", - "utterance_toks": [ - "How", - "about", - "the", - "USA", - "?" - ], - "utterance": "How about the USA?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"usa\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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';", - "utterance": "How many car models are produced in the usa?" - }, - "interaction_id": 12 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT * FROM CARS_DATA WHERE YEAR = 1974;", - "utterance_toks": [ - "What", - "is", - "all", - "the", - "car", - "information", - "for", - "cars", - "produced", - "in", - "1974", - "?" - ], - "utterance": "What is all the car information for cars produced in 1974?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1974.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Weight, Cylinders FROM CARS_DATA WHERE YEAR = 1974;", - "utterance_toks": [ - "Now", - ",", - "show", - "me", - "just", - "the", - "weight", - "and", - "cylinders", - "of", - "these", - "cars", - "." - ], - "utterance": "Now, show me just the weight and cylinders of these cars.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1974.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Weight, Cylinders FROM CARS_DATA WHERE Cylinders = 8 AND YEAR = 1974;", - "utterance_toks": [ - "List", - "just", - "those", - "with", - "8", - "cylinders", - "!" - ], - "utterance": "List just those with 8 cylinders!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 8.0, - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1974.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 8 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1;", - "utterance_toks": [ - "What", - "is", - "the", - "smallest", - "weight", - "?" - ], - "utterance": "What is the smallest weight?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 8.0, - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1974.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 8 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1;", - "utterance": "What is the smallest weight of the car produced with 8 cylinders in 1974?" - }, - "interaction_id": 13 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "Select CountryName FROM COUNTRIES;", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "different", - "country", - "names", - "?" - ], - "utterance": "What are all the different country names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "Select CountryName FROM COUNTRIES where CountryID not in (Select Country from CAR_MAKERS);", - "utterance_toks": [ - "Which", - "ones", - "have", - "no", - "car", - "makers", - "?" - ], - "utterance": "Which ones have no car makers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;", - "utterance_toks": [ - "Which", - "ones", - "have", - "at", - "least", - "one", - "?" - ], - "utterance": "Which ones have at least one?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "Also", - "provide", - "the", - "country", - "id", - "!" - ], - "utterance": "Also provide the country id!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "What are the countries having at least one car maker? List name and id." - }, - "interaction_id": 14 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT T3.Maker, 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;", - "utterance_toks": [ - "Show", - "all", - "the", - "car", - "makers", - "and", - "their", - "country", - "name", - "?" - ], - "utterance": "Show all the car makers and their country name?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.CountryName, count(*) FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country GROUP BY T1.CountryName;", - "utterance_toks": [ - "Count", - "how", - "many", - "there", - "are", - "per", - "country", - "name", - "?" - ], - "utterance": "Count how many there are per country name?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.CountryName, count(*) 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;", - "utterance_toks": [ - "Show", - "just", - "those", - "from", - "countries", - "in", - "the", - "continent", - "Europe", - "." - ], - "utterance": "Show just those from countries in the continent Europe.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"europe\"", - null - ] - ], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "List", - "the", - "country", - "names", - "of", - "those", - "with", - "at", - "least", - "3", - "manufacturers", - "!" - ], - "utterance": "List the country names of those with at least 3 manufacturers!", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 3.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"europe\"", - null - ] - ], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "Which countries in europe have at least 3 car manufacturers?" - }, - "interaction_id": 15 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id;", - "utterance_toks": [ - "What", - "is", - "the", - "horsepower", - ",", - "make", - "for", - "each", - "car", - "!" - ], - "utterance": "What is the horsepower, make for each car!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 8;", - "utterance_toks": [ - "Show", - "those", - "with", - "8", - "cylinders", - "!" - ], - "utterance": "Show those with 8 cylinders!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 8.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "How", - "about", - "3", - "?" - ], - "utterance": "How about 3?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 3.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "Show", - "the", - "one", - "with", - "the", - "maximum", - "horsepower", - "." - ], - "utterance": "Show the one with the maximum horsepower.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 3.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "What is the maximum horsepower and the make of the car models with 3 cylinders?" - }, - "interaction_id": 16 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT id FROM CARS_DATA ORDER BY horsepower DESC LIMIT 1;", - "utterance_toks": [ - "What", - "is", - "id", - "of", - "the", - "car", - "with", - "the", - "max", - "horsepower", - "?" - ], - "utterance": "What is id of the car with the max horsepower?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT id FROM CARS_DATA ORDER BY mpg DESC LIMIT 1;", - "utterance_toks": [ - "How", - "about", - "with", - "the", - "max", - "MPG", - "?" - ], - "utterance": "How about with the max MPG?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1;", - "utterance_toks": [ - "Show", - "its", - "make", - "!" - ], - "utterance": "Show its make!", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "Now", - "show", - "its", - "model", - "!" - ], - "utterance": "Now show its model!", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon." - }, - "interaction_id": 17 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT avg(edispl) FROM CARS_DATA;", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "edispl", - "of", - "all", - "cars", - "?" - ], - "utterance": "What is the average edispl of all cars?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Make, avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id group by T1.Make;", - "utterance_toks": [ - "Can", - "you", - "show", - "the", - "average", - "per", - "car", - "make", - "?" - ], - "utterance": "Can you show the average per car make?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 5, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Model, avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id group by T1.Model;", - "utterance_toks": [ - "How", - "about", - "per", - "car", - "model", - "?" - ], - "utterance": "How about per car model?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 14, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 5, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", - "utterance_toks": [ - "Show", - "the", - "average", - "for", - "the", - "model", - "volvo", - "!" - ], - "utterance": "Show the average for the model volvo!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"volvo\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", - "utterance": "What is the average edispl of the cars of model volvo?" - }, - "interaction_id": 18 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT distinct Model from CAR_NAMES;", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "different", - "models", - "for", - "each", - "car", - "?" - ], - "utterance": "What are all the different models for each car?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Model, Make FROM CAR_NAMES;", - "utterance_toks": [ - "What", - "are", - "the", - "makes", - "for", - "each", - "?" - ], - "utterance": "What are the makes for each?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Model, count(*) FROM CAR_NAMES GROUP BY Model;", - "utterance_toks": [ - "How", - "many", - "makes", - "are", - "there", - "for", - "each", - "?" - ], - "utterance": "How many makes are there for each?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 14, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;", - "utterance_toks": [ - "What", - "is", - "the", - "model", - "name", - "with", - "the", - "most", - "makes", - "?" - ], - "utterance": "What is the model name with the most makes?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 14, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;", - "utterance": "Which model has the most version(make) of cars?" - }, - "interaction_id": 19 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT FullName FROM CAR_MAKERS;", - "utterance_toks": [ - "Show", - "the", - "full", - "names", - "of", - "all", - "the", - "different", - "car", - "makers", - "?" - ], - "utterance": "Show the full names of all the different car makers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.FullName, T2.Model FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker;", - "utterance_toks": [ - "Also", - "include", - "the", - "car", - "models", - "produced", - "by", - "each", - "!" - ], - "utterance": "Also include the car models produced by each!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.FullName, T2.Model FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", - "utterance_toks": [ - "Show", - "me", - "just", - "those", - "produced", - "by", - "the", - "maker", - "with", - "full", - "name", - "American", - "Motor", - "Company", - "!" - ], - "utterance": "Show me just those produced by the maker with full name American Motor Company!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - "\"American Motor Company\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - "\"American Motor Company\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", - "utterance": "How many car models were produced by the maker with full name American Motor Company?" - }, - "interaction_id": 20 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT * FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker;", - "utterance_toks": [ - "What", - "is", - "all", - "the", - "information", - "for", - "the", - "makers", - "that", - "have", - "designed", - "at", - "least", - "1", - "car", - "model", - "!" - ], - "utterance": "What is all the information for the makers that have designed at least 1 car model!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 1;", - "utterance_toks": [ - "Which", - "ones", - "have", - "designed", - "more", - "than", - "1", - "?" - ], - "utterance": "Which ones have designed more than 1?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;", - "utterance_toks": [ - "How", - "about", - "more", - "than", - "3", - "?" - ], - "utterance": "How about more than 3?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 3.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "List", - "just", - "the", - "full", - "name", - "and", - "id", - "!" - ], - "utterance": "List just the full name and id!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 3.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "Which makers designed more than 3 car models? List full name and the id." - }, - "interaction_id": 21 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT count(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 WHERE T3.FullName = 'General Motors';", - "utterance_toks": [ - "How", - "many", - "different", - "models", - "has", - "maker", - "with", - "full", - "name", - "General", - "Motors", - "produced", - "?" - ], - "utterance": "How many different models has maker with full name General Motors produced?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 12, - false - ], - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - "\"General Motors\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 12, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(DISTINCT T2.Model) FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T1.MakeId = T3.Id WHERE T3.weight > 3500;", - "utterance_toks": [ - "How", - "many", - "different", - "models", - "weigh", - "over", - "3500", - "pounds", - "?" - ], - "utterance": "How many different models weigh over 3500 pounds?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 3 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 12, - false - ], - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - 3500.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 12, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(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;", - "utterance_toks": [ - "How", - "many", - "models", - "have", - "either", - "of", - "these", - "features", - "?" - ], - "utterance": "How many models have either of these features?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - "\"General Motors\"", - null - ], - "or", - [ - false, - 3, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - 3500.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 12, - true - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "Show", - "me", - "the", - "distinct", - "list", - "of", - "their", - "model", - "names", - "!" - ], - "utterance": "Show me the distinct list of their model names!", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - "\"General Motors\"", - null - ], - "or", - [ - false, - 3, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - 3500.0, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?" - }, - "interaction_id": 22 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT Year, weight FROM CARS_DATA;", - "utterance_toks": [ - "Show", - "the", - "years", - "and", - "weight", - "of", - "all", - "the", - "cars", - "!" - ], - "utterance": "Show the years and weight of all the cars!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT Year FROM CARS_DATA AS T1 WHERE Weight > 3000;", - "utterance_toks": [ - "Show", - "distinct", - "years", - "that", - "the", - "cars", - "that", - "weigh", - "more", - "than", - "3000", - "were", - "produced", - "!" - ], - "utterance": "Show distinct years that the cars that weigh more than 3000 were produced!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - 3000.0, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT Year FROM CARS_DATA AS T1 WHERE Weight < 4000;", - "utterance_toks": [ - "How", - "about", - "the", - "different", - "years", - "for", - "those", - "that", - "weight", - "less", - "than", - "4000", - "." - ], - "utterance": "How about the different years for those that weight less than 4000.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - 4000.0, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT Year FROM CARS_DATA WHERE Weight > 3000 AND Weight < 4000;", - "utterance_toks": [ - "What", - "are", - "the", - "distinct", - "years", - ",", - "for", - "the", - "cars", - "that", - "are", - "both", - "?" - ], - "utterance": "What are the distinct years, for the cars that are both?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - 3000.0, - null - ], - "and", - [ - false, - 4, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - 4000.0, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT DISTINCT T1.Year FROM CARS_DATA AS T1 WHERE T1.Weight > 3000 AND T1.weight < 4000;", - "utterance": "In which years cars were produced weighing no less than 3000 and no more than 4000?" - }, - "interaction_id": 23 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT accelerate FROM CARS_DATA ORDER BY accelerate ASC LIMIT 1;", - "utterance_toks": [ - "What", - "is", - "the", - "lowest", - "accelerate", - "for", - "any", - "car", - "?" - ], - "utterance": "What is the lowest accelerate for any car?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT accelerate FROM CARS_DATA ORDER BY accelerate DESC LIMIT 1;", - "utterance_toks": [ - "How", - "about", - "the", - "highest", - "?" - ], - "utterance": "How about the highest?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.ID, T2.Make, T2.Model FROM CARS_DATA as T1 JOIN CAR_NAMES as T2 ON T1.ID = T2.MakeID ORDER BY T1.accelerate DESC LIMIT 1;", - "utterance_toks": [ - "What", - "is", - "the", - "ID", - ",", - "Make", - "and", - "Model", - "of", - "this", - "car", - "?" - ], - "utterance": "What is the ID, Make and Model of this car?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT horsepower FROM CARS_DATA ORDER BY accelerate DESC LIMIT 1;", - "utterance_toks": [ - "Show", - "just", - "its", - "horsepower", - "." - ], - "utterance": "Show just its horsepower.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;", - "utterance": "What is the horsepower of the car with the largest accelerate?" - }, - "interaction_id": 24 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT * FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo';", - "utterance_toks": [ - "Show", - "all", - "the", - "car", - "information", - "for", - "any", - "car", - "of", - "the", - "model", - "volvo", - "!" - ], - "utterance": "Show all the car information for any car of the model volvo!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"volvo\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * 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;", - "utterance_toks": [ - "What", - "is", - "the", - "car", - "with", - "the", - "least", - "accelerate", - "?" - ], - "utterance": "What is the car with the least accelerate?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"volvo\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.horsepower 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;", - "utterance_toks": [ - "What", - "is", - "its", - "horsepower", - "?" - ], - "utterance": "What is its horsepower?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"volvo\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "What", - "about", - "its", - "number", - "of", - "cylinders", - "?" - ], - "utterance": "What about its number of cylinders?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"volvo\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "For model volvo, how many cylinders does the car with the least accelerate have?" - }, - "interaction_id": 25 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT horsepower FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "largest", - "horsepower", - "of", - "all", - "cars", - "?" - ], - "utterance": "What is largest horsepower of all cars?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "the", - "accelerate", - "of", - "the", - "car", - "with", - "this", - "horsepower", - "?" - ], - "utterance": "What is the accelerate of the car with this horsepower?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT id FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", - "utterance_toks": [ - "What", - "are", - "the", - "car", - "ids", - "of", - "the", - "cars", - "with", - "a", - "greater", - "accelerate", - "than", - "this", - "?" - ], - "utterance": "What are the car ids of the cars with a greater accelerate than this?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 22, - false - ], - null - ], - { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 22, - false - ], - null - ], - { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", - "utterance": "How many cars have a larger accelerate than the car with the largest horsepower?" - }, - "interaction_id": 26 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT CountryName FROM COUNTRIES where CountryId not in (SELECT T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country);", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "countries", - "that", - "have", - "no", - "car", - "makers", - "?" - ], - "utterance": "What are the names of the countries that have no car makers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT distinct T1.CountryName FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country;", - "utterance_toks": [ - "Show", - "me", - "all", - "the", - "names", - "of", - "all", - "the", - "different", - "countries", - "outside", - "of", - "those", - "!" - ], - "utterance": "Show me all the names of all the different countries outside of those!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 1 );", - "utterance_toks": [ - "How", - "many", - "of", - "these", - "have", - "more", - "than", - "1", - "car", - "maker", - "?" - ], - "utterance": "How many of these have more than 1 car maker?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "sql", - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 2 );", - "utterance_toks": [ - "How", - "about", - "more", - "than", - "2", - "?" - ], - "utterance": "How about more than 2?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "sql", - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 2 );", - "utterance": "How many countries has more than 2 car makers?" - }, - "interaction_id": 27 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT T1.Model, T2.horsepower FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id;", - "utterance_toks": [ - "Show", - "all", - "models", - "and", - "horsepowers", - "of", - "all", - "cars", - "!" - ], - "utterance": "Show all models and horsepowers of all cars!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Model, T2.horsepower FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4;", - "utterance_toks": [ - "Now", - "show", - "just", - "the", - "ones", - "with", - "4", - "cylinders", - "." - ], - "utterance": "Now show just the ones with 4 cylinders.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 4.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 ASC LIMIT 1;", - "utterance_toks": [ - "What", - "is", - "the", - "model", - "of", - "that", - "with", - "the", - "lowest", - "horsepower", - "?" - ], - "utterance": "What is the model of that with the lowest horsepower?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 4.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "How", - "about", - "the", - "greatest", - "horsepower", - "?" - ], - "utterance": "How about the greatest horsepower?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - [ - 0, - 16, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 4.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "For the cars with 4 cylinders, which model has the largest horsepower?" - }, - "interaction_id": 28 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT min(Horsepower) FROM CARS_DATA;", - "utterance_toks": [ - "What", - "is", - "the", - "lowest", - "horsepower", - "of", - "all", - "cars", - "?" - ], - "utterance": "What is the lowest horsepower of all cars?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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);", - "utterance_toks": [ - "Show", - "all", - "the", - "ids", - "and", - "makes", - "of", - "those", - "with", - "a", - "horsepower", - "greater", - "than", - "this", - "!" - ], - "utterance": "Show all the ids and makes of those with a horsepower greater than this!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 <= 5;", - "utterance_toks": [ - "Which", - "ones", - "have", - "5", - "cylinders", - "or", - "less", - "?" - ], - "utterance": "Which ones have 5 cylinders or less?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - }, - null - ], - "and", - [ - false, - 6, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 5.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "How", - "about", - "3", - "or", - "less", - "?" - ], - "utterance": "How about 3 or less?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - [ - 0, - 13, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - }, - null - ], - "and", - [ - false, - 6, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 3.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name." - }, - "interaction_id": 29 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT mpg, horsepower, accelerate FROM CARS_DATA WHERE YEAR < 1980;", - "utterance_toks": [ - "Show", - "me", - "the", - "mpg", - ",", - "horsepower", - "and", - "accelerate", - "for", - "all", - "the", - "cars", - "that", - "were", - "produced", - "before", - "1980", - "!" - ], - "utterance": "Show me the mpg, horsepower and accelerate for all the cars that were produced before 1980!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1980.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT mpg, horsepower, accelerate FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980;", - "utterance_toks": [ - "Also", - "include", - "the", - "cars", - "that", - "have", - "8", - "cylinders", - "!" - ], - "utterance": "Also include the cars that have 8 cylinders!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 8.0, - null - ], - "or", - [ - false, - 4, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1980.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT accelerate FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY accelerate DESC LIMIT 1;", - "utterance_toks": [ - "What", - "is", - "the", - "max", - "horsepower", - "for", - "this", - "group", - "?" - ], - "utterance": "What is the max horsepower for this group?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 8.0, - null - ], - "or", - [ - false, - 4, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1980.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 22, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1;", - "utterance_toks": [ - "how", - "about", - "the", - "max", - "mpg", - "?" - ], - "utterance": "how about the max mpg?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - 8.0, - null - ], - "or", - [ - false, - 4, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - 1980.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1;", - "utterance": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980?" - }, - "interaction_id": 30 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id where T2.FullName = 'Ford Motor Company';", - "utterance_toks": [ - "Show", - "all", - "the", - "models", - "that", - "were", - "built", - "by", - "the", - "Ford", - "Motor", - "Company", - "." - ], - "utterance": "Show all the models that were built by the Ford Motor Company.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - "\"Ford Motor Company\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id where T2.FullName != 'Ford Motor Company';", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "models", - "except", - "those", - "!" - ], - "utterance": "What are all the models except those!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - "\"Ford Motor Company\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.model, T2.Make, T3.weight 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'", - "utterance_toks": [ - "Also", - "provide", - "the", - "weights", - "for", - "all", - "different", - "makes", - "for", - "each", - "of", - "these", - "models", - "." - ], - "utterance": "Also provide the weights for all different makes for each of these models.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": 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": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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';", - "utterance_toks": [ - "List", - "all", - "the", - "different", - "models", - "from", - "these", - "that", - "have", - "makes", - "that", - "are", - "lighter", - "than", - "3500", - "!" - ], - "utterance": "List all the different models from these that have makes that are lighter than 3500!", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": 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": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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';", - "utterance": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'?" - }, - "interaction_id": 31 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT CountryName FROM countries;", - "utterance_toks": [ - "What", - "are", - "all", - "the", - "names", - "of", - "countries", - "?" - ], - "utterance": "What are all the names of countries?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT distinct T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", - "utterance_toks": [ - "Which", - "ones", - "have", - "at", - "least", - "one", - "car", - "maker", - "?" - ], - "utterance": "Which ones have at least one car maker?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", - "utterance_toks": [ - "Show", - "me", - "all", - "of", - "car", - "names", - "other", - "than", - "these", - "!" - ], - "utterance": "Show me all of car names other than these!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", - "utterance": "What are the name of the countries where there is not a single car maker?" - }, - "interaction_id": 32 - }, - { - "database_id": "car_1", - "interaction": [ - { - "query": "SELECT T1.Id , T1.Maker, T2.Model FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker;", - "utterance_toks": [ - "Show", - "all", - "the", - "car", - "maker", - "id", - ",", - "names", - ",", - "the", - "models", - "and", - "makes", - "they", - "produce", - "!" - ], - "utterance": "Show all the car maker id, names, the models and makes they produce!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Id , T1.Maker, count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", - "utterance_toks": [ - "How", - "many", - "model", - "does", - "each", - "car", - "maker", - "produce", - "?", - "List", - "the", - "id", - "and", - "maker", - "!" - ], - "utterance": "How many model does each car maker produce? List the id and maker!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "Show", - "me", - "those", - "that", - "produce", - "at", - "least", - "2", - "!" - ], - "utterance": "Show me those that produce at least 2!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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;", - "utterance_toks": [ - "For", - "each", - "of", - "these", - ",", - "only", - "show", - "those", - "that", - "have", - "more", - "than", - "3", - "car", - "makes", - "!" - ], - "utterance": "For each of these, only show those that have more than 3 car makes!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 11, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 3.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - }, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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;", - "utterance": "Which are the car makers which produce at least 2 models and more than 3 car makes? List the id and the maker." - }, - "interaction_id": 33 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(*) FROM matches", - "utterance_toks": [ - "How", - "many", - "matches", - "are", - "there", - "?" - ], - "utterance": "How many matches are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(minutes) FROM matches", - "utterance_toks": [ - "What", - "was", - "the", - "maximum", - "length", - "in", - "minutes", - "for", - "the", - "matches", - "?" - ], - "utterance": "What was the maximum length in minutes for the matches?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(minutes) FROM matches", - "utterance_toks": [ - "Average", - "?" - ], - "utterance": "Average?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(loser_age) , avg(winner_age) FROM matches", - "utterance_toks": [ - "How", - "about", - "for", - "the", - "age", - "of", - "losers", - "and", - "winners", - "?" - ], - "utterance": "How about for the age of losers and winners?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 5, - [ - 0, - [ - 0, - 28, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(loser_age) , avg(winner_age) FROM matches", - "utterance": "Find the average age of losers and winners of all matches." - }, - "interaction_id": 0 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(DISTINCT tourney_name) FROM matches", - "utterance_toks": [ - "How", - "many", - "distinct", - "tourney", - "names", - "are", - "there", - "?" - ], - "utterance": "How many distinct tourney names are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 27, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 20", - "utterance_toks": [ - "Which", - "ones", - "have", - "more", - "than", - "20", - "matches", - "?" - ], - "utterance": "Which ones have more than 20 matches?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 20.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 27, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 27, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10", - "utterance_toks": [ - "More", - "than", - "10", - "?" - ], - "utterance": "More than 10?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 10.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 27, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 27, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10", - "utterance": "Find the name of tourney that has more than 10 matches." - }, - "interaction_id": 1 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE year = 2013", - "utterance_toks": [ - "How", - "many", - "distinct", - "winners", - "played", - "in", - "2013", - "?" - ], - "utterance": "How many distinct winners played in 2013?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - 2013.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 34, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM (SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016)", - "utterance_toks": [ - "Of", - "those", - ",", - "how", - "many", - "also", - "played", - "in", - "2016", - "." - ], - "utterance": "Of those, how many also played in 2016.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "sql", - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - 2016.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - 2013.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ] - ] - ] - } - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - 2016.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - 2013.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", - "utterance": "List the names of all winners who played in both 2013 and 2016." - }, - "interaction_id": 2 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(*) FROM matches", - "utterance_toks": [ - "How", - "many", - "matches", - "were", - "played", - "?" - ], - "utterance": "How many matches were played?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM matches WHERE loser_hand = \"L\"", - "utterance_toks": [ - "How", - "many", - "where", - "the", - "loser", - "hand", - "is", - "L", - "?" - ], - "utterance": "How many where the loser hand is L?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"L\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", - "utterance_toks": [ - "How", - "many", - "played", - "in", - "year", - "2013", - "or", - "2016", - "?" - ], - "utterance": "How many played in year 2013 or 2016?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - 2013.0, - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - 2016.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", - "utterance": "List the number of all matches who played in years of 2013 or 2016." - }, - "interaction_id": 3 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(*) FROM players", - "utterance_toks": [ - "How", - "many", - "players", - "are", - "there", - "?" - ], - "utterance": "How many players are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.last_name, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships'", - "utterance_toks": [ - "Which", - "ones", - "won", - "in", - "the", - "tourney", - "WTA", - "Championships", - "?", - "Give", - "their", - "last", - "name", - "and", - "birth", - "date", - "." - ], - "utterance": "Which ones won in the tourney WTA Championships? Give their last name and birth date.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 32, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 27, - false - ], - null - ], - "\"WTA Championships\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Give", - "first", - "name", - "and", - "country", - "code", - "instead", - "." - ], - "utterance": "Give first name and country code instead.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 32, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 27, - false - ], - null - ], - "\"WTA Championships\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Which", - "ones", - "also", - "won", - "in", - "the", - "Australian", - "Open", - "?" - ], - "utterance": "Which ones also won in the Australian Open?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 32, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 32, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 27, - false - ], - null - ], - "\"Australian Open\"", - null - ] - ], - "groupBy": [], - "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": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?" - }, - "interaction_id": 4 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT birth_date FROM players ORDER BY birth_date DESC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "the", - "birth", - "date", - "of", - "the", - "oldest", - "player", - "?" - ], - "utterance": "What is the birth date of the oldest player?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT player_id , last_name FROM players ORDER BY birth_date LIMIT 1", - "utterance_toks": [ - "Give", - "the", - "player", - "id", - "and", - "last", - "name", - "instead", - "." - ], - "utterance": "Give the player id and last name instead.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", - "utterance_toks": [ - "Give", - "the", - "first", - "name", - "and", - "country", - "code", - "instead", - "." - ], - "utterance": "Give the first name and country code instead.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", - "utterance": "Find the first name and country code of the oldest player." - }, - "interaction_id": 5 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(*) FROM players WHERE hand = 'R'", - "utterance_toks": [ - "How", - "many", - "players", - "have", - "right", - "/", - "R", - "hand", - "?" - ], - "utterance": "How many players have right / R hand?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"R\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM players WHERE hand = 'L'", - "utterance_toks": [ - "Left", - "/", - "L", - "hand", - "?" - ], - "utterance": "Left / L hand?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"L\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT country_code , birth_date FROM players WHERE hand = 'L'", - "utterance_toks": [ - "Give", - "their", - "country", - "code", - "and", - "birth", - "date", - "." - ], - "utterance": "Give their country code and birth date.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"L\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", - "utterance_toks": [ - "Order", - "by", - "their", - "birth", - "date", - ",", - "and", - "give", - "the", - "first", - "and", - "last", - "name", - "instead", - "." - ], - "utterance": "Order by their birth date, and give the first and last name instead.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"L\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", - "utterance": "List the first and last name of all players who are left / L hand in the order of birth date." - }, - "interaction_id": 6 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(*) FROM players", - "utterance_toks": [ - "How", - "many", - "players", - "are", - "there", - "?" - ], - "utterance": "How many players are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.tours FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours ASC LIMIT 1", - "utterance_toks": [ - "How", - "many", - "tours", - "did", - "the", - "player", - "who", - "did", - "the", - "least", - "number", - "of", - "tours", - "do", - "?" - ], - "utterance": "How many tours did the player who did the least number of tours do?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 41, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.tours FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", - "utterance_toks": [ - "Most", - "number", - "of", - "tours", - "?" - ], - "utterance": "Most number of tours?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 41, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Give", - "the", - "first", - "name", - "and", - "country", - "code", - "instead", - "." - ], - "utterance": "Give the first name and country code instead.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 41, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Find the first name and country code of the player who did the most number of tours." - }, - "interaction_id": 7 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(*) FROM matches", - "utterance_toks": [ - "How", - "many", - "matches", - "are", - "there", - "?" - ], - "utterance": "How many matches are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT surface FROM matches GROUP BY surface ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Find", - "the", - "surface", - "that", - "has", - "the", - "most", - "number", - "." - ], - "utterance": "Find the surface that has the most number.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 23, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "What", - "about", - "the", - "year", - "?" - ], - "utterance": "What about the year?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 38, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 38, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", - "utterance": "Find the year that has the most number of matches." - }, - "interaction_id": 8 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT loser_name FROM matches GROUP BY loser_name ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Find", - "the", - "name", - "of", - "the", - "loser", - "who", - "lost", - "the", - "most", - "times", - "." - ], - "utterance": "Find the name of the loser who lost the most times.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT loser_name, loser_rank_points FROM matches GROUP BY loser_name ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Give", - "the", - "rank", - "points", - "as", - "well", - "." - ], - "utterance": "Give the rank points as well.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Give", - "the", - "same", - ",", - "but", - "for", - "the", - "winner", - "who", - "won", - "the", - "most", - "times", - "." - ], - "utterance": "Give the same, but for the winner who won the most times.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 34, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 36, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", - "utterance": "Find the name and rank points of the winner who won the most times." - }, - "interaction_id": 9 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT loser_name FROM matches ORDER BY loser_rank_points DESC LIMIT 1", - "utterance_toks": [ - "Give", - "the", - "name", - "of", - "the", - "loser", - "who", - "has", - "the", - "highest", - "rank", - "points", - "." - ], - "utterance": "Give the name of the loser who has the highest rank points.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT loser_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY loser_rank_points DESC LIMIT 1", - "utterance_toks": [ - "Do", - "the", - "same", - "but", - "for", - "the", - "Australian", - "Open", - "tourney", - "." - ], - "utterance": "Do the same but for the Australian Open tourney.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 27, - false - ], - null - ], - "\"Australian Open\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", - "utterance_toks": [ - "Give", - "the", - "winner", - "name", - "instead", - "." - ], - "utterance": "Give the winner name instead.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 36, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 27, - false - ], - null - ], - "\"Australian Open\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", - "utterance": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney." - }, - "interaction_id": 10 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT minutes FROM matches ORDER BY minutes ASC LIMIT 1", - "utterance_toks": [ - "Give", - "the", - "length", - "of", - "the", - "match", - "in", - "minutes", - "of", - "the", - "shortest", - "match", - "." - ], - "utterance": "Give the length of the match in minutes of the shortest match.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT minutes FROM matches ORDER BY minutes DESC LIMIT 1", - "utterance_toks": [ - "Longest", - "match", - "?" - ], - "utterance": "Longest match?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", - "utterance_toks": [ - "Give", - "the", - "winner", - "and", - "loser", - "name", - "instead", - "." - ], - "utterance": "Give the winner and loser name instead.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", - "utterance": "find the names of loser and winner who played in the match with greatest number of minutes." - }, - "interaction_id": 11 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT birth_date FROM players", - "utterance_toks": [ - "Find", - "the", - "birth", - "dates", - "of", - "each", - "of", - "the", - "players", - "." - ], - "utterance": "Find the birth dates of each of the players.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.tours, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", - "utterance_toks": [ - "Find", - "tours", - "and", - "first", - "name", - "instead", - "." - ], - "utterance": "Find tours and first name instead.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 41, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Give", - "the", - "average", - "ranking", - "instead", - "of", - "the", - "tours", - "." - ], - "utterance": "Give the average ranking instead of the tours.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 41, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 40, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Find the average ranking for each player and their first name." - }, - "interaction_id": 12 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT tours FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", - "utterance_toks": [ - "Give", - "the", - "number", - "of", - "tours", - "for", - "each", - "player", - "." - ], - "utterance": "Give the number of tours for each player.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 41, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Give", - "the", - "average", - "rank", - "points", - "and", - "first", - "name", - "." - ], - "utterance": "Give the average rank points and first name.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 41, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 40, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Find", - "the", - "total", - "ranking", - "points", - "instead", - "." - ], - "utterance": "Find the total ranking points instead.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 41, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 42, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Find the total ranking points for each player and their first name." - }, - "interaction_id": 13 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(*) FROM players GROUP BY country_code", - "utterance_toks": [ - "Find", - "the", - "number", - "of", - "players", - "for", - "each", - "country", - "." - ], - "utterance": "Find the number of players for each country.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) ASC LIMIT 1", - "utterance_toks": [ - "Which", - "country", - "has", - "the", - "least", - "number", - "of", - "players", - "?", - "Give", - "the", - "country", - "code", - "." - ], - "utterance": "Which country has the least number of players? Give the country code.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Greatest", - "number", - "?" - ], - "utterance": "Greatest number?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1", - "utterance": "find the code of the country where has the greatest number of players." - }, - "interaction_id": 14 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(*), hand FROM players GROUP BY hand", - "utterance_toks": [ - "What", - "is", - "the", - "number", - "of", - "players", - "for", - "each", - "hand", - "type", - "?", - "Give", - "the", - "hand", - "type", - "as", - "well", - "." - ], - "utterance": "What is the number of players for each hand type? Give the hand type as well.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*), country_code FROM players GROUP BY country_code", - "utterance_toks": [ - "For", - "each", - "country", - "?" - ], - "utterance": "For each country?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*), country_code FROM players GROUP BY country_code HAVING count(*) > 50", - "utterance_toks": [ - "Give", - "the", - "ones", - "that", - "have", - "more", - "than", - "50", - "players", - "." - ], - "utterance": "Give the ones that have more than 50 players.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 50.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", - "utterance_toks": [ - "Give", - "the", - "country", - "code", - "only", - "." - ], - "utterance": "Give the country code only.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 50.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", - "utterance": "Find the codes of countries that have more than 50 players." - }, - "interaction_id": 15 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT DISTINCT loser_name FROM matches ORDER BY loser_age DESC LIMIT 3", - "utterance_toks": [ - "Give", - "the", - "name", - "of", - "the", - "3", - "oldest", - "losers", - "across", - "all", - "matches", - "." - ], - "utterance": "Give the name of the 3 oldest losers across all matches.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 3, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT winner_name FROM matches ORDER BY winner_age DESC LIMIT 3", - "utterance_toks": [ - "How", - "about", - "the", - "3", - "oldest", - "winners", - "." - ], - "utterance": "How about the 3 oldest winners.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 28, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 3, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", - "utterance_toks": [ - "Youngest", - "?", - "Give", - "the", - "rank", - "as", - "well", - "." - ], - "utterance": "Youngest? Give the rank as well.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 28, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 3, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", - "utterance": "Find the name and rank of the 3 youngest winners across all matches." - }, - "interaction_id": 16 - }, - { - "database_id": "wta_1", - "interaction": [ - { - "query": "SELECT count(DISTINCT loser_name) FROM matches WHERE tourney_name = 'Australian Open'", - "utterance_toks": [ - "How", - "many", - "different", - "losers", - "participated", - "in", - "the", - "Australian", - "Open", - "?" - ], - "utterance": "How many different losers participated in the Australian Open?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 27, - false - ], - null - ], - "\"Australian Open\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 15, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'Australian Open'", - "utterance_toks": [ - "Winners", - "?" - ], - "utterance": "Winners?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 27, - false - ], - null - ], - "\"Australian Open\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 34, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", - "utterance_toks": [ - "How", - "about", - "in", - "the", - "WTA", - "Championships", - ",", - "and", - "were", - "also", - "left", - "handed", - "?" - ], - "utterance": "How about in the WTA Championships, and were also left handed?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 27, - false - ], - null - ], - "\"WTA Championships\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 30, - false - ], - null - ], - "\"L\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 34, - true - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", - "utterance": "How many different winners both participated in the WTA Championships and were left handed?" - }, - "interaction_id": 17 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT * FROM conductor", - "utterance_toks": [ - "List", - "all", - "conductor", - "information", - "." - ], - "utterance": "List all conductor information.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM conductor", - "utterance_toks": [ - "How", - "many", - "conductors", - "are", - "there", - "?" - ], - "utterance": "How many conductors are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM conductor", - "utterance": "How many conductors are there?" - }, - "interaction_id": 0 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Name FROM conductor", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "conductors", - "?" - ], - "utterance": "What are the names of the conductors?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Age FROM conductor", - "utterance_toks": [ - "What", - "are", - "the", - "ages", - "of", - "the", - "conductors", - "?" - ], - "utterance": "What are the ages of the conductors?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM conductor ORDER BY Age ASC", - "utterance_toks": [ - "List", - "the", - "names", - "of", - "conductors", - "in", - "ascending", - "order", - "of", - "age", - "." - ], - "utterance": "List the names of conductors in ascending order of age.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM conductor ORDER BY Age ASC", - "utterance": "List the names of conductors in ascending order of age." - }, - "interaction_id": 1 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Name FROM conductor", - "utterance_toks": [ - "List", - "the", - "names", - "of", - "conductors" - ], - "utterance": "List the names of conductors", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM conductor WHERE Nationality != 'USA'", - "utterance_toks": [ - "Among", - "these", - "conductors", - ",", - "which", - "of", - "them", - "are", - "not", - "from", - "the", - "USA", - "?" - ], - "utterance": "Among these conductors, which of them are not from the USA?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"USA\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM conductor WHERE Nationality != 'USA'", - "utterance": "What are the names of conductors whose nationalities are not \"USA\"?" - }, - "interaction_id": 2 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Record_Company FROM orchestra", - "utterance_toks": [ - "List", - "the", - "information", - "of", - "record", - "companies", - "." - ], - "utterance": "List the information of record companies.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Record_Company, Year_of_Founded FROM orchestra", - "utterance_toks": [ - "When", - "were", - "they", - "founded", - "?" - ], - "utterance": "When were they founded?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC", - "utterance_toks": [ - "Please", - "list", - "the", - "record", - "companies", - "of", - "orchestras", - "in", - "descending", - "order", - "of", - "years", - "in", - "which", - "they", - "were", - "founded", - "." - ], - "utterance": "Please list the record companies of orchestras in descending order of years in which they were founded.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC", - "utterance": "What are the record companies of orchestras in descending order of years in which they were founded?" - }, - "interaction_id": 3 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Attendance FROM SHOW", - "utterance_toks": [ - "What", - "is", - "the", - "attendance", - "of", - "each", - "show", - "?" - ], - "utterance": "What is the attendance of each show?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(Attendance) FROM SHOW", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "attendance", - "?" - ], - "utterance": "What is the average attendance?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(Attendance) FROM SHOW", - "utterance": "What is the average attendance of shows?" - }, - "interaction_id": 4 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT SHARE FROM performance", - "utterance_toks": [ - "What", - "are", - "the", - "shares", - "of", - "performances", - "?" - ], - "utterance": "What are the shares of performances?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT SHARE FROM performance WHERE TYPE != \"Live final\"", - "utterance_toks": [ - "What", - "are", - "the", - "shares", - "of", - "performances", - "whose", - "type", - "is", - "not", - "``", - "Live", - "final", - "''", - "?" - ], - "utterance": "What are the shares of performances whose type is not \"Live final\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"Live final\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"", - "utterance_toks": [ - "What", - "are", - "the", - "maximum", - "and", - "the", - "minimum", - "of", - "these", - "values", - "?" - ], - "utterance": "What are the maximum and the minimum of these values?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"Live final\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ], - [ - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"", - "utterance": "What are the maximum and minimum share of performances whose type is not \"Live final\"." - }, - "interaction_id": 5 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Nationality FROM conductor", - "utterance_toks": [ - "List", - "the", - "nationalities", - "of", - "conductors", - "." - ], - "utterance": "List the nationalities of conductors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(DISTINCT Nationality) FROM conductor", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 4, - true - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(DISTINCT Nationality) FROM conductor", - "utterance": "How many different nationalities do conductors have?" - }, - "interaction_id": 6 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Name FROM conductor", - "utterance_toks": [ - "List", - "the", - "names", - "of", - "conductors", - "." - ], - "utterance": "List the names of conductors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Year_of_Work FROM conductor", - "utterance_toks": [ - "List", - "years", - "of", - "work", - "of", - "conductors", - "." - ], - "utterance": "List years of work of conductors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", - "utterance_toks": [ - "List", - "names", - "of", - "conductors", - "in", - "descending", - "order", - "of", - "years", - "of", - "work", - "." - ], - "utterance": "List names of conductors in descending order of years of work.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", - "utterance": "List names of conductors in descending order of years of work." - }, - "interaction_id": 7 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Name FROM conductor", - "utterance_toks": [ - "List", - "the", - "names", - "of", - "the", - "conductors", - "." - ], - "utterance": "List the names of the conductors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Year_of_Work FROM conductor", - "utterance_toks": [ - "List", - "years", - "of", - "work", - "of", - "conductors", - "." - ], - "utterance": "List years of work of conductors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", - "utterance_toks": [ - "List", - "the", - "name", - "of", - "the", - "conductor", - "with", - "the", - "most", - "years", - "of", - "work", - "." - ], - "utterance": "List the name of the conductor with the most years of work.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", - "utterance": "List the name of the conductor with the most years of work." - }, - "interaction_id": 8 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Name FROM conductor", - "utterance_toks": [ - "Show", - "the", - "names", - "of", - "conductors", - "." - ], - "utterance": "Show the names of conductors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", - "utterance_toks": [ - "Please", - "list", - "these", - "names", - "with", - "the", - "orchestras", - "they", - "have", - "conducted", - "." - ], - "utterance": "Please list these names with the orchestras they have conducted.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", - "utterance": "Show the names of conductors and the orchestras they have conducted." - }, - "interaction_id": 9 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Name FROM conductor", - "utterance_toks": [ - "Please", - "show", - "the", - "names", - "of", - "the", - "conductors", - "." - ], - "utterance": "Please show the names of the conductors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "of", - "them", - "have", - "conducted", - "more", - "than", - "one", - "orchestras", - "?" - ], - "utterance": "Which of them have conducted more than one orchestras?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the names of conductors that have conducted more than one orchestras." - }, - "interaction_id": 10 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Name FROM conductor", - "utterance_toks": [ - "Please", - "show", - "the", - "names", - "of", - "the", - "conductors", - "." - ], - "utterance": "Please show the names of the conductors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Who", - "has", - "conducted", - "the", - "most", - "orchestras", - "?" - ], - "utterance": "Who has conducted the most orchestras?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the name of the conductor that has conducted the most number of orchestras." - }, - "interaction_id": 11 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Name FROM conductor", - "utterance_toks": [ - "Please", - "show", - "the", - "names", - "of", - "the", - "conductors", - "." - ], - "utterance": "Please show the names of the conductors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", - "utterance_toks": [ - "Who", - "has", - "conducted", - "orchestras", - "founded", - "after", - "2008", - "?" - ], - "utterance": "Who has conducted orchestras founded after 2008?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - 2008.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", - "utterance": "Please show the name of the conductor that has conducted orchestras founded after 2008." - }, - "interaction_id": 12 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company", - "utterance_toks": [ - "Please", - "show", - "the", - "record", - "companies", - "without", - "duplicates", - "." - ], - "utterance": "Please show the record companies without duplicates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", - "utterance_toks": [ - "Please", - "also", - "show", - "their", - "corresponding", - "number", - "of", - "orchestras", - "." - ], - "utterance": "Please also show their corresponding number of orchestras.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", - "utterance": "Please show the different record companies and the corresponding number of orchestras." - }, - "interaction_id": 13 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Major_Record_Format FROM orchestra", - "utterance_toks": [ - "Please", - "show", - "the", - "record", - "formats", - "of", - "orchestras", - "." - ], - "utterance": "Please show the record formats of orchestras.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", - "utterance_toks": [ - "Please", - "list", - "them", - "in", - "ascending", - "order", - "of", - "count", - "." - ], - "utterance": "Please list them in ascending order of count.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 11, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", - "utterance": "Please show the record formats of orchestras in ascending order of count." - }, - "interaction_id": 14 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Record_Company FROM orchestra", - "utterance_toks": [ - "List", - "the", - "information", - "of", - "all", - "record", - "companies", - "." - ], - "utterance": "List the information of all record companies.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1", - "utterance_toks": [ - "Which", - "one", - "is", - "shared", - "by", - "the", - "most", - "orchestras", - "?" - ], - "utterance": "Which one is shared by the most orchestras?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1", - "utterance": "List the record company shared by the most number of orchestras." - }, - "interaction_id": 15 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Orchestra FROM orchestra", - "utterance_toks": [ - "List", - "the", - "names", - "of", - "orchestras", - "." - ], - "utterance": "List the names of orchestras.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)", - "utterance_toks": [ - "Which", - "of", - "them", - "have", - "had", - "no", - "performances", - "?" - ], - "utterance": "Which of them have had no performances?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)", - "utterance": "List the names of orchestras that have no performance." - }, - "interaction_id": 16 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT Record_Company FROM orchestra", - "utterance_toks": [ - "Please", - "list", - "the", - "record", - "companies", - "." - ], - "utterance": "Please list the record companies.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003", - "utterance_toks": [ - "Which", - "of", - "them", - "are", - "shared", - "by", - "orchestras", - "founded", - "before", - "2003", - "?" - ], - "utterance": "Which of them are shared by orchestras founded before 2003?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - 2003.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", - "utterance_toks": [ - "Which", - "of", - "them", - "are", - "shared", - "by", - "orchestras", - "founded", - "after", - "2003", - "?" - ], - "utterance": "Which of them are shared by orchestras founded after 2003?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - 2003.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", - "utterance_toks": [ - "Which", - "of", - "them", - "are", - "shared", - "by", - "orchestras", - "founded", - "before", - "2003", - "and", - "after", - "2003", - "?" - ], - "utterance": "Which of them are shared by orchestras founded before 2003 and after 2003?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - 2003.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - 2003.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", - "utterance": "Show the record companies shared by orchestras founded before 2003 and after 2003." - }, - "interaction_id": 17 - }, - { - "database_id": "orchestra", - "interaction": [ - { - "query": "SELECT * FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", - "utterance_toks": [ - "List", - "the", - "orchestras", - "whose", - "record", - "format", - "is", - "``", - "CD", - "''", - "or", - "``", - "DVD", - "''", - "." - ], - "utterance": "List the orchestras whose record format is \"CD\" or \"DVD\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"CD\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"DVD\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", - "utterance_toks": [ - "How", - "many", - "of", - "these", - "orchestras", - "are", - "there", - "?" - ], - "utterance": "How many of these orchestras are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"CD\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"DVD\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", - "utterance": "Find the number of orchestras whose record format is \"CD\" or \"DVD\"." - }, - "interaction_id": 18 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT * FROM Documents", - "utterance_toks": [ - "Show", - "information", - "for", - "all", - "documents", - "." - ], - "utterance": "Show information for all documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id FROM Documents", - "utterance_toks": [ - "Show", - "their", - "ids", - "." - ], - "utterance": "Show their ids.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id , document_name , document_description FROM Documents", - "utterance_toks": [ - "Also", - "show", - "their", - "document", - "names", - "and", - "document", - "descriptions", - "." - ], - "utterance": "Also show their document names and document descriptions.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT document_id , document_name , document_description FROM Documents", - "utterance": "List document IDs, document names, and document descriptions for all documents." - }, - "interaction_id": 0 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_name FROM Documents", - "utterance_toks": [ - "Show", - "the", - "document", - "name", - "for", - "all", - "documents", - "." - ], - "utterance": "Show the document name for all documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_name, Document_Description FROM Documents", - "utterance_toks": [ - "Also", - "show", - "their", - "description", - "." - ], - "utterance": "Also show their description.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_name FROM Documents WHERE Document_Description LIKE \"%w%\"", - "utterance_toks": [ - "Which", - "one", - "has", - "description", - "with", - "the", - "letter", - "'w", - "'", - "in", - "it", - "?" - ], - "utterance": "Which one has description with the letter 'w' in it?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 9, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"%w%\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", - "utterance_toks": [ - "Show", - "its", - "name", - "and", - "template", - "id", - "." - ], - "utterance": "Show its name and template id.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 9, - [ - 0, - [ - 0, - 12, - false - ], - null - ], - "\"%w%\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", - "utterance": "What is the document name and template id for document with description with the letter 'w' in it?" - }, - "interaction_id": 1 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_name from Documents", - "utterance_toks": [ - "Show", - "the", - "the", - "document", - "name", - "for", - "all", - "documents", - "." - ], - "utterance": "Show the the document name for all documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id FROM Documents WHERE document_name = \"Robbin CV\"", - "utterance_toks": [ - "Show", - "the", - "document", - "id", - "for", - "the", - "one", - "named", - "``", - "Robbin", - "CV", - "''", - "?" - ], - "utterance": "Show the document id for the one named \"Robbin CV\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Robbin CV\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", - "utterance_toks": [ - "Also", - "show", - "its", - "template", - "id", - "and", - "description", - "." - ], - "utterance": "Also show its template id and description.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Robbin CV\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", - "utterance": "What is the document id, template id and description for document named \"Robbin CV\"?" - }, - "interaction_id": 2 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_id FROM Documents", - "utterance_toks": [ - "Show", - "the", - "template", - "id", - "for", - "all", - "documents", - "." - ], - "utterance": "Show the template id for all documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT template_id FROM Documents", - "utterance_toks": [ - "Show", - "all", - "distinct", - "results", - "." - ], - "utterance": "Show all distinct results.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(DISTINCT template_id) FROM Documents", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 10, - true - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(DISTINCT template_id) FROM Documents", - "utterance": "How many different templates do all document use?" - }, - "interaction_id": 3 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_id FROM Documents", - "utterance_toks": [ - "Show", - "the", - "document", - "ids", - "." - ], - "utterance": "Show the document ids.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.document_id, T2.Template_ID, T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID", - "utterance_toks": [ - "Also", - "show", - "their", - "template", - "id", - "and", - "template", - "type", - "code", - "." - ], - "utterance": "Also show their template id and template type code.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.document_id FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID where T2.Template_Type_Code = 'PPT'", - "utterance_toks": [ - "Which", - "documents", - "are", - "using", - "the", - "template", - "with", - "type", - "code", - "'PPT", - "'", - "?" - ], - "utterance": "Which documents are using the template with type code 'PPT'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"PPT\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"PPT\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", - "utterance": "How many documents are using the template with type code 'PPT'?" - }, - "interaction_id": 4 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_id FROM Documents", - "utterance_toks": [ - "Show", - "the", - "template", - "id", - "for", - "all", - "documents", - "." - ], - "utterance": "Show the template id for all documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_id , count(*) FROM Documents GROUP BY template_id", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "show", - "the", - "number", - "of", - "documents", - "using", - "it", - "." - ], - "utterance": "For each of them, show the number of documents using it.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_id , count(*) FROM Documents GROUP BY template_id", - "utterance": "Show all template ids and number of documents using each template." - }, - "interaction_id": 5 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_id FROM Documents", - "utterance_toks": [ - "Show", - "the", - "template", - "id", - "for", - "all", - "Documents", - "." - ], - "utterance": "Show the template id for all Documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id", - "utterance_toks": [ - "Also", - "show", - "its", - "template", - "type", - "code", - "." - ], - "utterance": "Also show its template type code.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*), 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", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "show", - "the", - "number", - "of", - "documents", - "using", - "it", - "." - ], - "utterance": "For each of them, show the number of documents using it.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "most", - "?" - ], - "utterance": "Which one has the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the id and type code for the template used by the most documents?" - }, - "interaction_id": 6 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_id FROM Documents", - "utterance_toks": [ - "Show", - "the", - "template", - "id", - "for", - "all", - "documents", - "." - ], - "utterance": "Show the template id for all documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_id, count(*) FROM Documents GROUP BY template_id", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "show", - "the", - "number", - "of", - "documents", - "." - ], - "utterance": "For each of them, show the number of documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1", - "utterance_toks": [ - "Which", - "of", - "them", - "are", - "used", - "by", - "more", - "than", - "one", - "document", - "?" - ], - "utterance": "Which of them are used by more than one document?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1", - "utterance": "Show ids for all templates that are used by more than one document." - }, - "interaction_id": 7 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_id FROM Documents", - "utterance_toks": [ - "Show", - "template", - "ids", - "used", - "by", - "some", - "document", - "." - ], - "utterance": "Show template ids used by some document.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_id FROM Templates", - "utterance_toks": [ - "Show", - "all", - "template", - "ids", - "." - ], - "utterance": "Show all template ids.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents", - "utterance_toks": [ - "Which", - "of", - "them", - "are", - "not", - "used", - "by", - "any", - "document", - "?" - ], - "utterance": "Which of them are not used by any document?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents", - "utterance": "Show ids for all templates not used by any document." - }, - "interaction_id": 8 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT * FROM Templates", - "utterance_toks": [ - "Show", - "info", - "for", - "all", - "templates", - "." - ], - "utterance": "Show info for all templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Templates", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Templates", - "utterance": "How many templates do we have?" - }, - "interaction_id": 9 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_id FROM Templates", - "utterance_toks": [ - "Show", - "template", - "ids", - "for", - "all", - "templates", - "." - ], - "utterance": "Show template ids for all templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_id , version_number , template_type_code FROM Templates", - "utterance_toks": [ - "Also", - "show", - "their", - "version", - "numbers", - "and", - "template", - "type", - "codes", - "." - ], - "utterance": "Also show their version numbers and template type codes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_id , version_number , template_type_code FROM Templates", - "utterance": "Show template ids, version numbers, and template type codes for all templates." - }, - "interaction_id": 10 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Templates", - "utterance_toks": [ - "Show", - "all", - "template", - "type", - "codes", - "for", - "all", - "templates", - "." - ], - "utterance": "Show all template type codes for all templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT template_type_code FROM Templates", - "utterance_toks": [ - "Filter", - "out", - "duplicates", - "." - ], - "utterance": "Filter out duplicates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT DISTINCT template_type_code FROM Templates", - "utterance": "Show all distinct template type codes for all templates." - }, - "interaction_id": 11 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_id FROM Templates", - "utterance_toks": [ - "Show", - "the", - "template", - "ids", - "for", - "all", - "templates", - "." - ], - "utterance": "Show the template ids for all templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"", - "utterance_toks": [ - "How", - "about", - "the", - "ids", - "with", - "template", - "type", - "code", - "PP", - "or", - "PPT", - "?" - ], - "utterance": "How about the ids with template type code PP or PPT?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"PP\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"PPT\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"", - "utterance": "What are the ids of templates with template type code PP or PPT?" - }, - "interaction_id": 12 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Templates", - "utterance_toks": [ - "Show", - "the", - "template", - "type", - "codes", - "for", - "all", - "templates", - "." - ], - "utterance": "Show the template type codes for all templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "have", - "template", - "type", - "code", - "CV", - "?" - ], - "utterance": "How many of them have template type code CV?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"CV\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", - "utterance": "How many templates have template type code CV?" - }, - "interaction_id": 13 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT version_number FROM Templates", - "utterance_toks": [ - "What", - "is", - "the", - "version", - "number", - "for", - "all", - "template", - "?" - ], - "utterance": "What is the version number for all template?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT version_number FROM Templates WHERE version_number > 5", - "utterance_toks": [ - "Only", - "show", - "those", - "with", - "version", - "number", - "later", - "than", - "5", - "." - ], - "utterance": "Only show those with version number later than 5.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 5.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", - "utterance_toks": [ - "Also", - "show", - "their", - "template", - "type", - "code", - "." - ], - "utterance": "Also show their template type code.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 5.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", - "utterance": "What is the version number and template type code for the template with version number later than 5?" - }, - "interaction_id": 14 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Templates", - "utterance_toks": [ - "Show", - "the", - "template", - "type", - "code", - "for", - "all", - "templates", - "." - ], - "utterance": "Show the template type code for all templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "count", - "the", - "number", - "of", - "templates" - ], - "utterance": "For each of them, count the number of templates", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code", - "utterance": "Show all template type codes and number of templates for each." - }, - "interaction_id": 15 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Templates", - "utterance_toks": [ - "Show", - "all", - "type", - "codes", - "for", - "templates", - "." - ], - "utterance": "Show all type codes for templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_code, count(*) FROM Templates GROUP BY template_type_code", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "how", - "many", - "templates", - "do", - "they", - "contain", - "?" - ], - "utterance": "For each of them, how many templates do they contain?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Which", - "of", - "them", - "contains", - "the", - "most", - "templates", - "?" - ], - "utterance": "Which of them contains the most templates?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1", - "utterance": "Which template type code has most number of templates?" - }, - "interaction_id": 16 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Templates", - "utterance_toks": [ - "Show", - "all", - "template", - "type", - "codes", - "." - ], - "utterance": "Show all template type codes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_code, count(*) FROM Templates GROUP BY template_type_code", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "show", - "the", - "count", - "of", - "templates", - "." - ], - "utterance": "For each of them, show the count of templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3", - "utterance_toks": [ - "Which", - "of", - "them", - "have", - "fewer", - "than", - "three", - "templates", - "?" - ], - "utterance": "Which of them have fewer than three templates?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 4, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 3.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3", - "utterance": "Show all template type codes with less than three templates." - }, - "interaction_id": 17 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT Version_Number FROM Templates", - "utterance_toks": [ - "Show", - "the", - "version", - "number", - "for", - "all", - "templates", - "." - ], - "utterance": "Show the version number for all templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT min(Version_Number) FROM Templates", - "utterance_toks": [ - "What", - "is", - "the", - "smallest", - "value", - "?" - ], - "utterance": "What is the smallest value?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT min(Version_Number) , template_type_code FROM Templates", - "utterance_toks": [ - "Also", - "show", - "its", - "template", - "type", - "code", - "." - ], - "utterance": "Also show its template type code.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT min(Version_Number) , template_type_code FROM Templates", - "utterance": "What the smallest version number and its template type code?" - }, - "interaction_id": 18 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Templates", - "utterance_toks": [ - "What", - "is", - "the", - "template", - "type", - "code", - "of", - "the", - "template", - "." - ], - "utterance": "What is the template type code of the template.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.template_type_code, T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", - "utterance_toks": [ - "Also", - "show", - "the", - "names", - "of", - "all", - "documents", - "using", - "each", - "template", - "." - ], - "utterance": "Also show the names of all documents using each template.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Which", - "of", - "the", - "template", - "type", - "codes", - "is", - "used", - "by", - "document", - "with", - "the", - "name", - "``", - "Data", - "base", - "''", - "?" - ], - "utterance": "Which of the template type codes is used by document with the name \"Data base\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Data base\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "What is the template type code of the template used by document with the name \"Data base\"?" - }, - "interaction_id": 19 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_name FROM Documents", - "utterance_toks": [ - "Show", - "all", - "document", - "names", - "." - ], - "utterance": "Show all document names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.document_name, T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", - "utterance_toks": [ - "Also", - "show", - "their", - "template", - "type", - "codes", - "." - ], - "utterance": "Also show their template type codes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Which", - "of", - "the", - "documents", - "are", - "using", - "templates", - "with", - "template", - "type", - "code", - "BK", - "?" - ], - "utterance": "Which of the documents are using templates with template type code BK?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - "\"BK\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Show all document names using templates with template type code BK." - }, - "interaction_id": 20 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Templates", - "utterance_toks": [ - "Show", - "all", - "template", - "type", - "codes", - "." - ], - "utterance": "Show all template type codes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.template_type_code , T2.document_id FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", - "utterance_toks": [ - "Also", - "show", - "the", - "document", - "ids", - "using", - "each", - "template", - "." - ], - "utterance": "Also show the document ids using each template.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "For", - "each", - "type", - "code", - ",", - "how", - "many", - "documents", - "are", - "using", - "that", - "template", - "?" - ], - "utterance": "For each type code, how many documents are using that template?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show all template type codes and the number of documents using each type." - }, - "interaction_id": 21 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Templates", - "utterance_toks": [ - "Show", - "the", - "type", - "codes", - "for", - "all", - "templates", - "." - ], - "utterance": "Show the type codes for all templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "For", - "each", - ",", - "how", - "many", - "documents", - "are", - "using", - "this", - "template", - "?" - ], - "utterance": "For each, how many documents are using this template?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Order", - "the", - "template", - "type", - "codes", - "in", - "descending", - "order", - "by", - "this", - "number", - "." - ], - "utterance": "Order the template type codes in descending order by this number.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "of", - "them", - "has", - "the", - "most", - "?" - ], - "utterance": "Which of them has the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which template type code is used by most number of documents?" - }, - "interaction_id": 22 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Templates", - "utterance_toks": [ - "Show", - "all", - "template", - "type", - "codes", - "." - ], - "utterance": "Show all template type codes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", - "utterance_toks": [ - "Show", - "all", - "template", - "type", - "codes", - "that", - "are", - "used", - "by", - "some", - "document", - "." - ], - "utterance": "Show all template type codes that are used by some document.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "How", - "about", - "those", - "that", - "are", - "not", - "used", - "by", - "any", - "document", - "?" - ], - "utterance": "How about those that are not used by any document?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show all template type codes that are not used by any document." - }, - "interaction_id": 23 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Ref_template_types", - "utterance_toks": [ - "Show", - "all", - "template", - "type", - "codes", - "." - ], - "utterance": "Show all template type codes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_code , template_type_description FROM Ref_template_types", - "utterance_toks": [ - "Also", - "show", - "their", - "descriptions", - "." - ], - "utterance": "Also show their descriptions.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_type_code , template_type_description FROM Ref_template_types", - "utterance": "Show all template type codes and descriptions." - }, - "interaction_id": 24 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code , template_type_description FROM Ref_template_types", - "utterance_toks": [ - "Show", - "all", - "template", - "type", - "codes", - "and", - "descriptions", - "." - ], - "utterance": "Show all template type codes and descriptions.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", - "utterance_toks": [ - "What", - "is", - "the", - "description", - "for", - "template", - "type", - "code", - "``", - "AD", - "''", - "?" - ], - "utterance": "What is the description for template type code \"AD\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - "\"AD\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", - "utterance": "What is the template type descriptions for template type code \"AD\"." - }, - "interaction_id": 25 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_type_code FROM Ref_template_types", - "utterance_toks": [ - "Show", - "all", - "template", - "type", - "codes", - "." - ], - "utterance": "Show all template type codes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_code , template_type_description FROM Ref_template_types", - "utterance_toks": [ - "Also", - "show", - "descriptions", - "." - ], - "utterance": "Also show descriptions.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", - "utterance_toks": [ - "Which", - "code", - "has", - "template", - "type", - "description", - "``", - "Book", - "''", - "?" - ], - "utterance": "Which code has template type description \"Book\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Book\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", - "utterance": "What is the template type code for template type description \"Book\"." - }, - "interaction_id": 26 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "select Template_ID from Documents", - "utterance_toks": [ - "Show", - "the", - "template", - "ids", - "used", - "by", - "any", - "document", - "." - ], - "utterance": "Show the template ids used by any document.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "select T2.Template_ID, T1.template_type_code from Templates AS T1 JOIN Documents AS T2 ON T1.Template_ID = T2.template_ID", - "utterance_toks": [ - "Also", - "show", - "the", - "template", - "type", - "code", - "for", - "those", - "ids", - "." - ], - "utterance": "Also show the template type code for those ids.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT 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", - "utterance_toks": [ - "How", - "about", - "their", - "template", - "type", - "descriptions", - "?" - ], - "utterance": "How about their template type descriptions?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "the", - "distinct", - "values", - "among", - "them", - "." - ], - "utterance": "Show the distinct values among them.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What are the distinct template type descriptions for the templates ever used by any document?" - }, - "interaction_id": 27 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT template_id from Templates", - "utterance_toks": [ - "Show", - "the", - "template", - "id", - "for", - "all", - "templates", - "." - ], - "utterance": "Show the template id for all templates.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.template_id, T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code", - "utterance_toks": [ - "Also", - "show", - "their", - "template", - "type", - "description", - "." - ], - "utterance": "Also show their template type description.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 5, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "What", - "are", - "the", - "template", - "ids", - "with", - "description", - "``", - "Presentation", - "''", - "?" - ], - "utterance": "What are the template ids with description \"Presentation\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 5, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Presentation\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "What are the template ids with template type description \"Presentation\"." - }, - "interaction_id": 28 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT * FROM Paragraphs", - "utterance_toks": [ - "Show", - "the", - "info", - "for", - "all", - "paragraphs", - "." - ], - "utterance": "Show the info for all paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Paragraphs", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Paragraphs", - "utterance": "How many paragraphs in total?" - }, - "interaction_id": 29 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT paragraph_id FROM Paragraphs", - "utterance_toks": [ - "Show", - "the", - "id", - "for", - "all", - "paragraphs", - "." - ], - "utterance": "Show the id for all paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.paragraph_id, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID", - "utterance_toks": [ - "Also", - "show", - "their", - "document", - "names", - "." - ], - "utterance": "Also show their document names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.paragraph_id FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", - "utterance_toks": [ - "Only", - "show", - "the", - "id", - "for", - "all", - "paragraphs", - "in", - "the", - "document", - "named", - "'Summer", - "Show", - "'", - "." - ], - "utterance": "Only show the id for all paragraphs in the document named 'Summer Show'.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Summer Show\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", - "utterance_toks": [ - "How", - "many", - "such", - "paragraphs", - "are", - "there", - "?" - ], - "utterance": "How many such paragraphs are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Summer Show\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", - "utterance": "How many paragraphs for the document with name 'Summer Show'?" - }, - "interaction_id": 30 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT paragraph_text FROM Paragraphs", - "utterance_toks": [ - "Show", - "the", - "parapraph", - "text", - "for", - "all", - "paragraphs", - "." - ], - "utterance": "Show the parapraph text for all paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Other_Details, paragraph_text FROM Paragraphs", - "utterance_toks": [ - "Also", - "show", - "their", - "paragraph", - "details", - "." - ], - "utterance": "Also show their paragraph details.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea'", - "utterance_toks": [ - "What", - "are", - "the", - "details", - "for", - "the", - "paragraph", - "containing", - "'Korea", - "'", - "?" - ], - "utterance": "What are the details for the paragraph containing 'Korea'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 16, - false - ], - null - ], - "\"Korea\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea'", - "utterance": "Show paragraph details for paragraph with text 'Korea'." - }, - "interaction_id": 31 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT paragraph_id , paragraph_text FROM Paragraphs", - "utterance_toks": [ - "Show", - "all", - "paragraph", - "ids", - "and", - "texts", - "." - ], - "utterance": "Show all paragraph ids and texts.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.paragraph_id , T1.paragraph_text, T2.Document_Name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "also", - "show", - "their", - "document", - "name", - "." - ], - "utterance": "For each of them, also show their document name.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "What", - "are", - "the", - "ids", - "and", - "texts", - "for", - "the", - "paragraph", - "in", - "the", - "document", - "with", - "name", - "'Welcome", - "to", - "NY", - "'", - "?" - ], - "utterance": "What are the ids and texts for the paragraph in the document with name 'Welcome to NY'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Welcome to NY\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "Show all paragraph ids and texts for the document with name 'Welcome to NY'." - }, - "interaction_id": 32 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT paragraph_text FROM Paragraphs", - "utterance_toks": [ - "Show", - "all", - "paragraph", - "text", - "." - ], - "utterance": "Show all paragraph text.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.paragraph_text, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "also", - "show", - "the", - "document", - "name", - "." - ], - "utterance": "For each of them, also show the document name.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "What", - "is", - "the", - "text", - "for", - "the", - "document", - "``", - "Customer", - "reviews", - "''", - "?" - ], - "utterance": "What is the text for the document \"Customer reviews\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"Customer reviews\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Show all paragraph texts for the document \"Customer reviews\"." - }, - "interaction_id": 33 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_id FROM Paragraphs", - "utterance_toks": [ - "Show", - "the", - "document", - "id", - "for", - "all", - "paragraphs", - "." - ], - "utterance": "Show the document id for all paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id", - "utterance_toks": [ - "For", - "each", - "id", - ",", - "show", - "the", - "number", - "of", - "paragraphs", - "." - ], - "utterance": "For each id, show the number of paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", - "utterance_toks": [ - "Order", - "by", - "document", - "id", - "." - ], - "utterance": "Order by document id.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", - "utterance": "Show all document ids and the number of paragraphs in each document. Order by document id." - }, - "interaction_id": 34 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_id , document_name FROM Documents", - "utterance_toks": [ - "Show", - "all", - "document", - "ids", - "and", - "names", - "." - ], - "utterance": "Show all document ids and names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "count", - "the", - "number", - "of", - "paragraphs", - "in", - "each", - "document", - "." - ], - "utterance": "For each of them, count the number of paragraphs in each document.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show all document ids, names and the number of paragraphs in each document." - }, - "interaction_id": 35 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_id FROM Paragraphs", - "utterance_toks": [ - "Show", - "the", - "document", - "id", - "for", - "all", - "paragraphs", - "." - ], - "utterance": "Show the document id for all paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id, count(*) FROM Paragraphs GROUP BY document_id", - "utterance_toks": [ - "For", - "each", - "of", - "these", - "document", - "ids", - ",", - "count", - "the", - "number", - "of", - "paragraphs", - "." - ], - "utterance": "For each of these document ids, count the number of paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", - "utterance_toks": [ - "Which", - "of", - "them", - "have", - "at", - "least", - "two", - "paragraphs", - "?" - ], - "utterance": "Which of them have at least two paragraphs?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", - "utterance": "List all document ids with at least two paragraphs." - }, - "interaction_id": 36 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_id , document_name FROM Documents", - "utterance_toks": [ - "Show", - "the", - "id", - "number", - "and", - "name", - "for", - "all", - "documents", - "." - ], - "utterance": "Show the id number and name for all documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.document_id , T2.document_name , T1.paragraph_id FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id", - "utterance_toks": [ - "Also", - "show", - "the", - "paragraph", - "id", - "for", - "those", - "documents", - "." - ], - "utterance": "Also show the paragraph id for those documents.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 14, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "For", - "each", - "of", - "these", - "results", - ",", - "count", - "the", - "number", - "of", - "paragraphs", - "." - ], - "utterance": "For each of these results, count the number of paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "of", - "them", - "is", - "the", - "longest", - "?" - ], - "utterance": "Which of them is the longest?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the document id and name with greatest number of paragraphs?" - }, - "interaction_id": 37 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_id FROM Paragraphs", - "utterance_toks": [ - "Show", - "the", - "document", - "id", - "for", - "all", - "paragraphs", - "." - ], - "utterance": "Show the document id for all paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "count", - "the", - "number", - "of", - "paragraphs", - "." - ], - "utterance": "For each of them, count the number of paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*)", - "utterance_toks": [ - "Sort", - "them", - "by", - "these", - "counts", - "." - ], - "utterance": "Sort them by these counts.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", - "utterance_toks": [ - "Which", - "has", - "the", - "fewest", - "?" - ], - "utterance": "Which has the fewest?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", - "utterance": "What is the document id with least number of paragraphs?" - }, - "interaction_id": 38 - }, - { - "database_id": "cre_Doc_Template_Mgt", - "interaction": [ - { - "query": "SELECT document_id FROM Paragraphs", - "utterance_toks": [ - "Show", - "the", - "document", - "id", - "for", - "all", - "paragraphs", - "." - ], - "utterance": "Show the document id for all paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id, count(*) FROM Paragraphs GROUP BY document_id", - "utterance_toks": [ - "For", - "each", - "of", - "these", - "ids", - ",", - "show", - "the", - "number", - "of", - "paragraphs", - "." - ], - "utterance": "For each of these ids, show the number of paragraphs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2", - "utterance_toks": [ - "Which", - "of", - "them", - "have", - "between", - "1", - "and", - "2", - "paragraphs", - "?" - ], - "utterance": "Which of them have between 1 and 2 paragraphs?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 1, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - 2.0 - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2", - "utterance": "What is the document id with 1 to 2 paragraphs?" - }, - "interaction_id": 39 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT * FROM singer", - "utterance_toks": [ - "Show", - "information", - "for", - "all", - "singers", - "." - ], - "utterance": "Show information for all singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM singer", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM singer", - "utterance": "How many singers do we have?" - }, - "interaction_id": 0 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT name FROM singer", - "utterance_toks": [ - "Show", - "names", - "of", - "all", - "singers", - "." - ], - "utterance": "Show names of all singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name , country , age FROM singer", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "also", - "show", - "country", - "and", - "age", - "." - ], - "utterance": "For each of them, also show country and age.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name , country , age FROM singer ORDER BY age DESC", - "utterance_toks": [ - "List", - "the", - "results", - "in", - "descending", - "order", - "of", - "their", - "age", - "." - ], - "utterance": "List the results in descending order of their age.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name , country , age FROM singer ORDER BY age DESC", - "utterance": "Show name, country, age for all singers ordered by age from the oldest to the youngest." - }, - "interaction_id": 1 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "select age from singer", - "utterance_toks": [ - "Show", - "age", - "for", - "all", - "singers", - "." - ], - "utterance": "Show age for all singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "select age from singer WHERE country = 'France'", - "utterance_toks": [ - "What", - "about", - "age", - "for", - "those", - "from", - "France", - "?" - ], - "utterance": "What about age for those from France?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"France\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'", - "utterance_toks": [ - "What", - "is", - "the", - "average", - ",", - "minimum", - ",", - "and", - "maximum", - "age", - "for", - "those", - "?" - ], - "utterance": "What is the average, minimum, and maximum age for those?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - "\"France\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ], - [ - 2, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ], - [ - 1, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'", - "utterance": "What is the average, minimum, and maximum age of all singers from France?" - }, - "interaction_id": 2 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "select song_name from singer", - "utterance_toks": [ - "Show", - "the", - "names", - "of", - "all", - "songs", - "." - ], - "utterance": "Show the names of all songs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT song_name , song_release_year FROM singer", - "utterance_toks": [ - "Also", - "show", - "the", - "release", - "year", - "for", - "each", - "of", - "them", - "." - ], - "utterance": "Also show the release year for each of them.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT song_name , song_release_year FROM singer ORDER BY age", - "utterance_toks": [ - "Order", - "the", - "result", - "by", - "the", - "age", - "of", - "their", - "singers", - "." - ], - "utterance": "Order the result by the age of their singers.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1", - "utterance_toks": [ - "What", - "is", - "the", - "result", - "for", - "the", - "song", - "by", - "the", - "yongest", - "?" - ], - "utterance": "What is the result for the song by the yongest?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1", - "utterance": "Show the name and the release year of the song by the youngest singer." - }, - "interaction_id": 3 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT country FROM singer", - "utterance_toks": [ - "Show", - "country", - "for", - "all", - "singers", - "." - ], - "utterance": "Show country for all singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT country FROM singer WHERE age > 20", - "utterance_toks": [ - "Only", - "show", - "the", - "results", - "for", - "those", - "above", - "20", - "." - ], - "utterance": "Only show the results for those above 20.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 20.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT country FROM singer WHERE age > 20", - "utterance_toks": [ - "What", - "are", - "all", - "distinct", - "countries", - "for", - "them", - "?" - ], - "utterance": "What are all distinct countries for them?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 20.0, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT DISTINCT country FROM singer WHERE age > 20", - "utterance": "What are all distinct countries where singers above age 20 are from?" - }, - "interaction_id": 4 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT country FROM singer", - "utterance_toks": [ - "Show", - "the", - "country", - "for", - "all", - "singers", - "." - ], - "utterance": "Show the country for all singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT country , count(*) FROM singer GROUP BY country", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "what", - "is", - "the", - "number", - "of", - "singers", - "?" - ], - "utterance": "For each of them, what is the number of singers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT country , count(*) FROM singer GROUP BY country", - "utterance": "Show all countries and the number of singers in each country." - }, - "interaction_id": 5 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT avg(age) FROM singer", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "age", - "for", - "all", - "singers", - "?" - ], - "utterance": "What is the average age for all singers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", - "utterance_toks": [ - "Show", - "the", - "name", - "for", - "songs", - "by", - "singers", - "older", - "than", - "that", - "." - ], - "utterance": "Show the name for songs by singers older than that.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 13, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", - "utterance": "List all song names by singers above the average age." - }, - "interaction_id": 6 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT name FROM stadium", - "utterance_toks": [ - "Show", - "the", - "name", - "for", - "all", - "stadiums", - "." - ], - "utterance": "Show the name for all stadiums.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", - "utterance_toks": [ - "What", - "about", - "those", - "with", - "a", - "capacity", - "between", - "5000", - "and", - "10000", - "?" - ], - "utterance": "What about those with a capacity between 5000 and 10000?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 1, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 5000.0, - 10000.0 - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", - "utterance_toks": [ - "Also", - "list", - "the", - "location", - "for", - "them", - "." - ], - "utterance": "Also list the location for them.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 1, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 5000.0, - 10000.0 - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", - "utterance": "Show location and name for all stadiums with a capacity between 5000 and 10000." - }, - "interaction_id": 7 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "select capacity FROM stadium", - "utterance_toks": [ - "Show", - "the", - "capacity", - "for", - "all", - "stadiums", - "." - ], - "utterance": "Show the capacity for all stadiums.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(capacity) FROM stadium", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "of", - "them", - "?" - ], - "utterance": "What is the average of them?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(capacity) , max(capacity) FROM stadium", - "utterance_toks": [ - "Also", - "show", - "the", - "maximum", - "." - ], - "utterance": "Also show the maximum.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 1, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(capacity) , max(capacity) FROM stadium", - "utterance": "What is the average and the maximum capacity of all stadiums?" - }, - "interaction_id": 8 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT name , capacity FROM stadium", - "utterance_toks": [ - "Show", - "the", - "name", - "and", - "capacity", - "for", - "all", - "stadiums", - "." - ], - "utterance": "Show the name and capacity for all stadiums.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name , capacity FROM stadium ORDER BY average DESC", - "utterance_toks": [ - "Show", - "the", - "result", - "in", - "descending", - "order", - "of", - "their", - "average", - "attendance", - "." - ], - "utterance": "Show the result in descending order of their average attendance.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "highest", - "?" - ], - "utterance": "Which one has the highest?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", - "utterance": "What is the name and capacity for the stadium with highest average attendance?" - }, - "interaction_id": 9 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT * FROM concert WHERE YEAR = 2014", - "utterance_toks": [ - "Show", - "the", - "concert", - "information", - "in", - "year", - "2014", - "." - ], - "utterance": "Show the concert information in year 2014.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2014.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM concert WHERE YEAR = 2014 OR YEAR = 2015", - "utterance_toks": [ - "Also", - "show", - "those", - "in", - "year", - "2015", - "." - ], - "utterance": "Also show those in year 2015.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2014.0, - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2015.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "in", - "total", - "?" - ], - "utterance": "How many are there in total?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2014.0, - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2015.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", - "utterance": "How many concerts are there in year 2014 or 2015?" - }, - "interaction_id": 10 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT name from stadium", - "utterance_toks": [ - "Show", - "the", - "names", - "of", - "stadiums", - "." - ], - "utterance": "Show the names of stadiums.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "also", - "show", - "the", - "number", - "of", - "concerts", - "." - ], - "utterance": "For each of them, also show the number of concerts.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 18, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the stadium name and the number of concerts in each stadium." - }, - "interaction_id": 11 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT name , capacity FROM stadium", - "utterance_toks": [ - "Show", - "all", - "stadium", - "names", - "and", - "their", - "capacities", - "." - ], - "utterance": "Show all stadium names and their capacities.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Order", - "the", - "results", - "in", - "descending", - "order", - "of", - "the", - "number", - "of", - "concerts", - "in", - "year", - "2014", - "or", - "after", - "." - ], - "utterance": "Order the results in descending order of the number of concerts in year 2014 or after.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 5, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2014.0, - null - ] - ], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "most", - "?" - ], - "utterance": "Which one has the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [ - [ - false, - 5, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2014.0, - null - ] - ], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the stadium name and capacity with most number of concerts in year 2014 or after." - }, - "interaction_id": 12 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT YEAR FROM concert", - "utterance_toks": [ - "Show", - "the", - "year", - "for", - "all", - "concerts", - "." - ], - "utterance": "Show the year for all concerts.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC", - "utterance_toks": [ - "Order", - "them", - "in", - "descending", - "order", - "of", - "the", - "number", - "of", - "concerts" - ], - "utterance": "Order them in descending order of the number of concerts", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 19, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Which", - "year", - "has", - "the", - "most", - "?" - ], - "utterance": "Which year has the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 19, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", - "utterance": "Which year has most number of concerts?" - }, - "interaction_id": 13 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT stadium_id FROM concert", - "utterance_toks": [ - "Show", - "all", - "stadium", - "ids", - "of", - "concerts", - "." - ], - "utterance": "Show all stadium ids of concerts.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)", - "utterance_toks": [ - "Show", - "the", - "stadium", - "names", - "without", - "any", - "concert", - "." - ], - "utterance": "Show the stadium names without any concert.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)", - "utterance": "Show the stadium names without any concert." - }, - "interaction_id": 14 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT country FROM singer", - "utterance_toks": [ - "Show", - "the", - "country", - "for", - "all", - "singers", - "." - ], - "utterance": "Show the country for all singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT country FROM singer WHERE age > 40", - "utterance_toks": [ - "How", - "about", - "those", - "for", - "singers", - "above", - "age", - "40", - "?" - ], - "utterance": "How about those for singers above age 40?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 40.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT country FROM singer WHERE age < 30", - "utterance_toks": [ - "How", - "about", - "those", - "for", - "singers", - "below", - "30", - "?" - ], - "utterance": "How about those for singers below 30?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 30.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30", - "utterance_toks": [ - "How", - "about", - "countries", - "with", - "both", - "?" - ], - "utterance": "How about countries with both?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 30.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 13, - false - ], - null - ], - 40.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30", - "utterance": "Show countries where a singer above age 40 and a singer below 30 are from." - }, - "interaction_id": 15 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014", - "utterance_toks": [ - "Show", - "name", - "for", - "stadiums", - "that", - "had", - "a", - "concert", - "in", - "year", - "2014", - "." - ], - "utterance": "Show name for stadiums that had a concert in year 2014.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2014.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "names", - "for", - "all", - "stadiums", - "except", - "for", - "those", - "." - ], - "utterance": "Show names for all stadiums except for those.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2014.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show names for all stadiums except for stadiums having a concert in year 2014." - }, - "interaction_id": 16 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT concert_name , theme from concert", - "utterance_toks": [ - "Show", - "the", - "name", - "and", - "theme", - "for", - "all", - "concerts", - "." - ], - "utterance": "Show the name and theme for all concerts.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "For", - "each", - "of", - "those", - ",", - "also", - "show", - "the", - "number", - "of", - "singers", - "." - ], - "utterance": "For each of those, also show the number of singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - [ - 0, - 15, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the name and theme for all concerts and the number of singers in each concert." - }, - "interaction_id": 17 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT name FROM singer", - "utterance_toks": [ - "Show", - "the", - "name", - "for", - "all", - "singers", - "." - ], - "utterance": "Show the name for all singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "For", - "each", - "of", - "them", - ",", - "also", - "show", - "the", - "number", - "of", - "concerts" - ], - "utterance": "For each of them, also show the number of concerts", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "List singer names and number of concerts for each singer." - }, - "interaction_id": 18 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "select name from singer", - "utterance_toks": [ - "List", - "all", - "singer", - "names", - "." - ], - "utterance": "List all singer names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "How", - "about", - "those", - "performing", - "concerts", - "in", - "year", - "2014", - "?" - ], - "utterance": "How about those performing concerts in year 2014?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2014.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "List all singer names in concerts in year 2014." - }, - "interaction_id": 19 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT name FROM singer", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "singers", - "?" - ], - "utterance": "What are the names of all singers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM singer WHERE song_name LIKE '%Hey%'", - "utterance_toks": [ - "Show", - "the", - "names", - "for", - "those", - "having", - "a", - "song", - "having", - "'Hey", - "'", - "in", - "its", - "name", - "." - ], - "utterance": "Show the names for those having a song having 'Hey' in its name.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 9, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"%Hey%\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", - "utterance_toks": [ - "Also", - "show", - "the", - "nation", - "for", - "those", - "singers", - "." - ], - "utterance": "Also show the nation for those singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 9, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - "\"%Hey%\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", - "utterance": "what is the name and nation of the singer who have a song having 'Hey' in its name?" - }, - "interaction_id": 20 - }, - { - "database_id": "concert_singer", - "interaction": [ - { - "query": "SELECT name , location FROM stadium", - "utterance_toks": [ - "Show", - "the", - "name", - "and", - "location", - "for", - "the", - "stadiums", - "." - ], - "utterance": "Show the name and location for the stadiums.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "How", - "about", - "those", - "with", - "some", - "concerts", - "happened", - "in", - "the", - "year", - "2014", - "?" - ], - "utterance": "How about those with some concerts happened in the year 2014?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2014.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Among", - "those", - ",", - "what", - "are", - "stadiums", - "also", - "holding", - "some", - "concerts", - "in", - "the", - "year", - "2015", - "?" - ], - "utterance": "Among those, what are stadiums also holding some concerts in the year 2015?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - 2015.0, - null - ] - ], - "groupBy": [], - "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": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015." - }, - "interaction_id": 21 - }, - { - "database_id": "singer", - "interaction": [ - { - "query": "SELECT Name, Birth_Year from singer", - "utterance_toks": [ - "Show", - "the", - "names", - "and", - "birth", - "years", - "of", - "singers" - ], - "utterance": "Show the names and birth years of singers", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name, Birth_Year from singer WHERE Birth_Year = 1948", - "utterance_toks": [ - "Only", - "for", - "the", - "ones", - "born", - "in", - "1948", - "." - ], - "utterance": "Only for the ones born in 1948.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 1948.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", - "utterance_toks": [ - "Show", - "the", - "name", - "of", - "singers", - "whose", - "birth", - "year", - "is", - "either", - "1948", - "or", - "1949", - "?" - ], - "utterance": "Show the name of singers whose birth year is either 1948 or 1949?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 1948.0, - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 1949.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", - "utterance": "Show the name of singers whose birth year is either 1948 or 1949?" - }, - "interaction_id": 0 - }, - { - "database_id": "singer", - "interaction": [ - { - "query": "SELECT Name, Net_Worth_Millions FROM singer", - "utterance_toks": [ - "Show", - "the", - "name", - "and", - "net", - "worth", - "of", - "the", - "singers", - "." - ], - "utterance": "Show the name and net worth of the singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC", - "utterance_toks": [ - "Order", - "by", - "richest", - "first", - "." - ], - "utterance": "Order by richest first.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "the", - "name", - "of", - "the", - "singer", - "with", - "the", - "largest", - "net", - "worth", - "?" - ], - "utterance": "What is the name of the singer with the largest net worth?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1", - "utterance": "What is the name of the singer with the largest net worth?" - }, - "interaction_id": 1 - }, - { - "database_id": "singer", - "interaction": [ - { - "query": "SELECT Name, Citizenship FROM singer", - "utterance_toks": [ - "Show", - "the", - "names", - "and", - "citizenships", - "of", - "singers", - "." - ], - "utterance": "Show the names and citizenships of singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Citizenship, COUNT(*) FROM singer GROUP BY Citizenship", - "utterance_toks": [ - "Show", - "citizenship", - "counts", - "." - ], - "utterance": "Show citizenship counts.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC", - "utterance_toks": [ - "Sort", - "that", - "by", - "most", - "common", - "first", - "." - ], - "utterance": "Sort that by most common first.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1", - "utterance_toks": [ - "Limit", - "it", - "to", - "one", - "." - ], - "utterance": "Limit it to one.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1", - "utterance": "Please show the most common citizenship of singers." - }, - "interaction_id": 2 - }, - { - "database_id": "singer", - "interaction": [ - { - "query": "SELECT t1.name, t2.title from singer as t1 join song as t2 on t1.Singer_ID = t2.Singer_ID", - "utterance_toks": [ - "Join", - "singer", - "names", - "with", - "their", - "song", - "titles", - "." - ], - "utterance": "Join singer names with their song titles.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT t1.name, t2.title from singer as t1 join song as t2 on t1.Singer_ID = t2.Singer_ID WHERE t2.Sales > 300000", - "utterance_toks": [ - "Limit", - "the", - "entries", - "to", - "where", - "song", - "sales", - "exceed", - "300000", - "." - ], - "utterance": "Limit the entries to where song sales exceed 300000.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - 300000.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000", - "utterance_toks": [ - "Which", - "are", - "the", - "distinct", - "names", - "in", - "that", - "list", - "?" - ], - "utterance": "Which are the distinct names in that list?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - 300000.0, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000", - "utterance": "Show distinct names of singers that have songs with sales more than 300000." - }, - "interaction_id": 3 - }, - { - "database_id": "singer", - "interaction": [ - { - "query": "SELECT T1.Name, COUNT(*) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", - "utterance_toks": [ - "Show", - "the", - "names", - "and", - "song", - "counts", - "of", - "singers", - "." - ], - "utterance": "Show the names and song counts of singers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "the", - "names", - "of", - "singers", - "that", - "have", - "more", - "than", - "one", - "song", - "." - ], - "utterance": "Show the names of singers that have more than one song.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the names of singers that have more than one song." - }, - "interaction_id": 4 - }, - { - "database_id": "singer", - "interaction": [ - { - "query": "SELECT title, Sales from song", - "utterance_toks": [ - "Show", - "the", - "songs", - "and", - "sale", - "amounts", - "." - ], - "utterance": "Show the songs and sale amounts.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "the", - "names", - "of", - "singers", - "and", - "the", - "total", - "sales", - "of", - "their", - "songs", - "." - ], - "utterance": "Show the names of singers and the total sales of their songs.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the names of singers and the total sales of their songs." - }, - "interaction_id": 5 - }, - { - "database_id": "singer", - "interaction": [ - { - "query": "SELECT DISTINCT Singer_ID from song", - "utterance_toks": [ - "Which", - "singer", - "ids", - "have", - "at", - "least", - "one", - "song", - "?" - ], - "utterance": "Which singer ids have at least one song?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)", - "utterance_toks": [ - "Which", - "singer", - "names", - "do", - "not", - "?" - ], - "utterance": "Which singer names do not?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)", - "utterance": "List the name of singers that do not have any song." - }, - "interaction_id": 6 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT * FROM employee WHERE age < 30", - "utterance_toks": [ - "find", - "all", - "employees", - "who", - "are", - "under", - "age", - "30", - "." - ], - "utterance": "find all employees who are under age 30.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 30.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT city FROM employee WHERE age < 30", - "utterance_toks": [ - "Which", - "cities", - "did", - "they", - "come", - "from", - "?" - ], - "utterance": "Which cities did they come from?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 30.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1", - "utterance_toks": [ - "show", - "the", - "cities", - "from", - "which", - "more", - "than", - "one", - "employee", - "originated", - "." - ], - "utterance": "show the cities from which more than one employee originated.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 30.0, - null - ] - ], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1", - "utterance": "Which cities do more than one employee under age 30 come from?" - }, - "interaction_id": 0 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT * FROM shop", - "utterance_toks": [ - "show", - "all", - "shops", - "." - ], - "utterance": "show all shops.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT sum(number_products) FROM shop", - "utterance_toks": [ - "what", - "is", - "the", - "total", - "number", - "of", - "products", - "they", - "are", - "selling", - "?" - ], - "utterance": "what is the total number of products they are selling?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM shop ORDER BY number_products DESC LIMIT 1", - "utterance_toks": [ - "find", - "the", - "name", - "of", - "the", - "shop", - "with", - "the", - "greatest", - "number", - "of", - "products", - "." - ], - "utterance": "find the name of the shop with the greatest number of products.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", - "utterance_toks": [ - "what", - "are", - "its", - "manager", - "name", - "and", - "district", - "?" - ], - "utterance": "what are its manager name and district?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", - "utterance": "Find the manager name and district of the shop whose number of products is the largest." - }, - "interaction_id": 1 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT avg(Number_products) FROM shop", - "utterance_toks": [ - "find", - "the", - "average", - "number", - "of", - "products", - "of", - "all", - "stores", - "." - ], - "utterance": "find the average number of products of all stores.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT min(Number_products) , max(Number_products) FROM shop", - "utterance_toks": [ - "how", - "about", - "the", - "minimum", - "and", - "maximum", - "?" - ], - "utterance": "how about the minimum and maximum?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 1, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT min(Number_products) , max(Number_products) FROM shop", - "utterance": "find the minimum and maximum number of products of all stores." - }, - "interaction_id": 2 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT name, number_products FROM shop", - "utterance_toks": [ - "show", - "the", - "name", - "and", - "number", - "of", - "product", - "for", - "all", - "shops", - "." - ], - "utterance": "show the name and number of product for all shops.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(number_products) FROM shop", - "utterance_toks": [ - "what", - "is", - "the", - "average", - "number", - "of", - "products", - "?" - ], - "utterance": "what is the average number of products?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM shop WHERE number_products < (SELECT avg(number_products) FROM shop)", - "utterance_toks": [ - "Find", - "the", - "names", - "of", - "stores", - "whose", - "number", - "products", - "is", - "less", - "than", - "the", - "average", - "." - ], - "utterance": "Find the names of stores whose number products is less than the average.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", - "utterance_toks": [ - "how", - "about", - "more", - "than", - "?" - ], - "utterance": "how about more than?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", - "utterance": "Find the names of stores whose number products is more than the average number of products." - }, - "interaction_id": 3 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT count(*) FROM evaluation", - "utterance_toks": [ - "how", - "many", - "evaluations", - "are", - "there", - "?" - ], - "utterance": "how many evaluations are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Year_awarded FROM evaluation", - "utterance_toks": [ - "what", - "years", - "were", - "they", - "given", - "?" - ], - "utterance": "what years were they given?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "find", - "the", - "name", - "of", - "the", - "employee", - "who", - "received", - "the", - "most", - "evaluation", - "awards", - "." - ], - "utterance": "find the name of the employee who received the most evaluation awards.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 15, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "find the name of employee who was awarded the most times in the evaluation." - }, - "interaction_id": 4 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID", - "utterance_toks": [ - "find", - "the", - "name", - "of", - "the", - "employees", - "who", - "received", - "past", - "evaluation", - "awards", - "." - ], - "utterance": "find the name of the employees who received past evaluation awards.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 15, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "who", - "won", - "the", - "most", - "times", - "?" - ], - "utterance": "who won the most times?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 15, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 15, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "ok", - ",", - "which", - "one", - "received", - "the", - "award", - "with", - "the", - "highest", - "bonus", - "?" - ], - "utterance": "ok, which one received the award with the highest bonus?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 15, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Find the name of the employee who got the highest one time bonus." - }, - "interaction_id": 5 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT count(distinct Employee_ID) FROM evaluation", - "utterance_toks": [ - "find", - "the", - "number", - "of", - "different", - "employees", - "who", - "were", - "awarded", - "in", - "the", - "past", - "evaluations", - "." - ], - "utterance": "find the number of different employees who were awarded in the past evaluations.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 15, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID", - "utterance_toks": [ - "what", - "are", - "their", - "names", - "?" - ], - "utterance": "what are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 15, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", - "utterance_toks": [ - "show", - "the", - "names", - "of", - "the", - "employees", - "who", - "never", - "won", - "." - ], - "utterance": "show the names of the employees who never won.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", - "utterance": "Find the names of employees who never won any award in the evaluation." - }, - "interaction_id": 6 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT count(distinct Shop_ID) FROM hiring", - "utterance_toks": [ - "how", - "many", - "shops", - "are", - "hiring", - "?" - ], - "utterance": "how many shops are hiring?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 11, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id", - "utterance_toks": [ - "what", - "are", - "the", - "shops", - "'", - "names", - "?", - "'" - ], - "utterance": "what are the shops' names?'", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - [ - 0, - 5, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "which", - "one", - "is", - "hiring", - "the", - "largest", - "number", - "of", - "employees", - "?" - ], - "utterance": "which one is hiring the largest number of employees?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - [ - 0, - 5, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 11, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the name of the shop that is hiring the largest number of employees?" - }, - "interaction_id": 7 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT * FROM hiring", - "utterance_toks": [ - "show", - "all", - "hiring", - "info", - "." - ], - "utterance": "show all hiring info.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)", - "utterance_toks": [ - "Find", - "the", - "names", - "of", - "any", - "shops", - "not", - "hiring", - "." - ], - "utterance": "Find the names of any shops not hiring.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)", - "utterance": "Find the name of the shops that do not hire any employee." - }, - "interaction_id": 8 - }, - { - "database_id": "employee_hire_evaluation", - "interaction": [ - { - "query": "SELECT count(*) FROM hiring", - "utterance_toks": [ - "how", - "many", - "employees", - "are", - "being", - "hired", - "in", - "all", - "shops", - "?" - ], - "utterance": "how many employees are being hired in all shops?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", - "utterance_toks": [ - "show", - "the", - "number", - "for", - "each", - "shop", - ".", - "show", - "the", - "shop", - "name", - "as", - "well", - "." - ], - "utterance": "show the number for each shop. show the shop name as well.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 11, - false - ], - null - ], - [ - 0, - 5, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", - "utterance": "Find the number of employees hired in each shop; show the shop name as well." - }, - "interaction_id": 9 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT * FROM visitor", - "utterance_toks": [ - "show", - "all", - "visitors", - "." - ], - "utterance": "show all visitors.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM visitor ORDER BY Level_of_membership DESC", - "utterance_toks": [ - "order", - "them", - "by", - "their", - "membership", - "level", - "from", - "high", - "to", - "low", - "." - ], - "utterance": "order them by their membership level from high to low.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM visitor ORDER BY Level_of_membership DESC", - "utterance_toks": [ - "just", - "show", - "their", - "names", - "." - ], - "utterance": "just show their names.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC", - "utterance_toks": [ - "do", - "not", - "list", - "those", - "whose", - "membership", - "level", - "is", - "lower", - "than", - "or", - "equal", - "to", - "4", - "." - ], - "utterance": "do not list those whose membership level is lower than or equal to 4.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - 4.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC", - "utterance": "Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low." - }, - "interaction_id": 0 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT count(*) FROM visitor WHERE Level_of_membership > 4", - "utterance_toks": [ - "find", - "the", - "number", - "of", - "visitors", - "with", - "a", - "membership", - "level", - "higher", - "than", - "4", - "." - ], - "utterance": "find the number of visitors with a membership level higher than 4.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - 4.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4", - "utterance_toks": [ - "what", - "are", - "their", - "names", - "and", - "membership", - "levels", - "?" - ], - "utterance": "what are their names and membership levels?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - 4.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC", - "utterance_toks": [ - "sort", - "by", - "their", - "age", - "from", - "old", - "to", - "young", - "." - ], - "utterance": "sort by their age from old to young.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - 4.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC", - "utterance": "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." - }, - "interaction_id": 1 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT count(*) FROM museum", - "utterance_toks": [ - "how", - "many", - "museums", - "are", - "in", - "the", - "table", - "?" - ], - "utterance": "how many museums are in the table?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(num_of_staff) FROM museum", - "utterance_toks": [ - "what", - "is", - "the", - "average", - "number", - "of", - "staff", - "working", - "in", - "these", - "museums", - "?" - ], - "utterance": "what is the average number of staff working in these museums?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM museum ORDER BY num_of_staff DESC LIMIT 1", - "utterance_toks": [ - "Find", - "the", - "name", - "of", - "the", - "museum", - "that", - "has", - "the", - "most", - "staff", - "members", - "." - ], - "utterance": "Find the name of the museum that has the most staff members.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT museum_id FROM museum ORDER BY num_of_staff DESC LIMIT 1", - "utterance_toks": [ - "what", - "is", - "its", - "id", - "?" - ], - "utterance": "what is its id?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1", - "utterance": "Find the id and name of the museum that has the most staff members?" - }, - "interaction_id": 2 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT name FROM museum WHERE open_year < 2010", - "utterance_toks": [ - "find", - "the", - "names", - "of", - "museums", - "opened", - "before", - "2010", - "." - ], - "utterance": "find the names of museums opened before 2010.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2010.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM museum WHERE open_year > 2010", - "utterance_toks": [ - "how", - "about", - "after", - "?" - ], - "utterance": "how about after?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2010.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT min(num_of_staff) FROM museum WHERE open_year > 2010", - "utterance_toks": [ - "find", - "the", - "minimum", - "number", - "of", - "staff", - "of", - "those", - "museums", - "." - ], - "utterance": "find the minimum number of staff of those museums.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2010.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)", - "utterance_toks": [ - "find", - "the", - "names", - "of", - "museums", - "which", - "have", - "more", - "staff", - "than", - "that", - "." - ], - "utterance": "find the names of museums which have more staff than that.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2010.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)", - "utterance": "find the names of museums which have more staff than the minimum staff number of all museums opened after 2010." - }, - "interaction_id": 3 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id", - "utterance_toks": [ - "find", - "the", - "names", - "of", - "visitors", - "who", - "visited", - "and", - "who", - "have", - "some", - "museum", - "visit", - "records", - "." - ], - "utterance": "find the names of visitors who visited and who have some museum visit records.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING count(*) > 1", - "utterance_toks": [ - "which", - "of", - "them", - "visited", - "some", - "museums", - "more", - "than", - "once", - "?" - ], - "utterance": "which of them visited some museums more than once?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "also", - "show", - "their", - "ids", - "and", - "ages", - "." - ], - "utterance": "also show their ids and ages.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "find the id, name and age for visitors who visited some museums more than once." - }, - "interaction_id": 4 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT sum(Total_spent) FROM visit", - "utterance_toks": [ - "what", - "is", - "the", - "total", - "spent", - "on", - "all", - "visits", - "?" - ], - "utterance": "what is the total spent on all visits?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT t1.name 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", - "utterance_toks": [ - "find", - "the", - "name", - "of", - "the", - "visitor", - "who", - "has", - "spent", - "the", - "most", - "money", - "for", - "his", - "or", - "her", - "visits", - "." - ], - "utterance": "find the name of the visitor who has spent the most money for his or her visits.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 4, - 12, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "what", - "are", - "his", - "id", - "and", - "membership", - "level", - "?" - ], - "utterance": "what are his id and membership level?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 4, - 12, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?" - }, - "interaction_id": 5 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT Museum_ID, name FROM museum", - "utterance_toks": [ - "show", - "the", - "id", - "and", - "name", - "of", - "all", - "museums", - "." - ], - "utterance": "show the id and name of all museums.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT t2.Museum_ID , t1.name, count(*) FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID", - "utterance_toks": [ - "show", - "the", - "number", - "of", - "tickets", - "sold", - "for", - "each", - "of", - "them", - "." - ], - "utterance": "show the number of tickets sold for each of them.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "which", - "one", - "was", - "visited", - "the", - "most", - "times", - "?" - ], - "utterance": "which one was visited the most times?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 9, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What are the id and name of the museum visited most times?" - }, - "interaction_id": 6 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT count(*) FROM museum", - "utterance_toks": [ - "how", - "many", - "museums", - "are", - "there", - "?" - ], - "utterance": "how many museums are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)", - "utterance_toks": [ - "how", - "many", - "of", - "them", - "have", - "not", - "had", - "any", - "visitors", - "yet", - "?" - ], - "utterance": "how many of them have not had any visitors yet?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)", - "utterance_toks": [ - "what", - "are", - "their", - "names", - "?" - ], - "utterance": "what are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)", - "utterance": "What is the name of the museum that had no visitor yet?" - }, - "interaction_id": 7 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT sum(num_of_ticket) FROM visit", - "utterance_toks": [ - "how", - "many", - "tickets", - "were", - "sold", - "from", - "all", - "of", - "the", - "museums", - "?" - ], - "utterance": "how many tickets were sold from all of the museums?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT visitor_id FROM visit ORDER BY num_of_ticket DESC LIMIT 1", - "utterance_toks": [ - "find", - "the", - "id", - "of", - "the", - "visitor", - "who", - "bought", - "the", - "most", - "tickets", - "at", - "once", - "." - ], - "utterance": "find the id of the visitor who bought the most tickets at once.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Find", - "the", - "name", - "and", - "age", - "of", - "this", - "visitor", - "." - ], - "utterance": "Find the name and age of this visitor.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Find the name and age of the visitor who bought the most tickets at once." - }, - "interaction_id": 8 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT sum(Total_spent) FROM visit", - "utterance_toks": [ - "find", - "the", - "total", - "cost", - "of", - "all", - "visits", - "." - ], - "utterance": "find the total cost of all visits.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(Total_spent) FROM visit", - "utterance_toks": [ - "what", - "was", - "the", - "amount", - "of", - "the", - "largest", - "one", - "time", - "purchase", - "of", - "tickets", - "out", - "of", - "all", - "visits", - "?" - ], - "utterance": "what was the amount of the largest one time purchase of tickets out of all visits?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit", - "utterance_toks": [ - "how", - "about", - "the", - "average", - "and", - "maximum", - "number", - "of", - "tickets", - "purchased", - "?" - ], - "utterance": "how about the average and maximum number of tickets purchased?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 1, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit", - "utterance": "What are the average and maximum number of tickets bought in all visits?" - }, - "interaction_id": 9 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT min(Level_of_membership) FROM visitor", - "utterance_toks": [ - "what", - "is", - "the", - "lowest", - "level", - "of", - "membership", - "?" - ], - "utterance": "what is the lowest level of membership?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM visitor WHERE Level_of_membership = 1", - "utterance_toks": [ - "find", - "the", - "number", - "of", - "visitors", - "whose", - "membership", - "level", - "is", - "1", - "." - ], - "utterance": "find the number of visitors whose membership level is 1.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - 1.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT t2.Total_spent FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1", - "utterance_toks": [ - "show", - "the", - "ticket", - "expenses", - "of", - "all", - "of", - "their", - "museum", - "visits", - "." - ], - "utterance": "show the ticket expenses of all of their museum visits.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - 1.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "what", - "is", - "the", - "total", - "amount", - "of", - "money", - "spent", - "?" - ], - "utterance": "what is the total amount of money spent?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - 1.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 4, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the total ticket expense of the visitors whose membership level is 1?" - }, - "interaction_id": 10 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT name FROM museum WHERE open_year < 2009", - "utterance_toks": [ - "find", - "the", - "names", - "of", - "museums", - "opened", - "before", - "2009", - "." - ], - "utterance": "find the names of museums opened before 2009.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2009.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM museum WHERE open_year > 2011", - "utterance_toks": [ - "what", - "about", - "those", - "opened", - "after", - "2011", - "?" - ], - "utterance": "what about those opened after 2011?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2011.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "is", - "the", - "name", - "of", - "the", - "visitor", - "who", - "visited", - "both", - "groups", - "of", - "museums", - "?" - ], - "utterance": "What is the name of the visitor who visited both groups of museums?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2011.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2009.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?" - }, - "interaction_id": 11 - }, - { - "database_id": "museum_visit", - "interaction": [ - { - "query": "SELECT name FROM museum WHERE open_year > 2010", - "utterance_toks": [ - "find", - "the", - "names", - "of", - "museums", - "opened", - "after", - "2010" - ], - "utterance": "find the names of museums opened after 2010", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2010.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010", - "utterance_toks": [ - "find", - "the", - "number", - "of", - "visits", - "to", - "these", - "museums", - "?" - ], - "utterance": "find the number of visits to these museums?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2010.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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)", - "utterance_toks": [ - "Find", - "the", - "number", - "of", - "visitors", - "who", - "did", - "not", - "visit", - "these", - "museums", - "." - ], - "utterance": "Find the number of visitors who did not visit these museums.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 9, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - 2010.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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)", - "utterance": "Find the number of visitors who did not visit any museum opened after 2010." - }, - "interaction_id": 12 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT count(*) FROM Highschooler", - "utterance_toks": [ - "How", - "many", - "high", - "schoolers", - "are", - "there", - "?" - ], - "utterance": "How many high schoolers are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Highschooler WHERE grade = 11 OR grade = 12", - "utterance_toks": [ - "How", - "many", - "in", - "each", - "grade", - "11", - "or", - "12", - "?" - ], - "utterance": "How many in each grade 11 or 12?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 11.0, - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 12.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10", - "utterance_toks": [ - "How", - "many", - "in", - "grade", - "9", - "or", - "10", - "?" - ], - "utterance": "How many in grade 9 or 10?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 9.0, - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 10.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10", - "utterance": "How many high schoolers are there in grade 9 or 10?" - }, - "interaction_id": 0 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT count(distinct grade) FROM Highschooler", - "utterance_toks": [ - "How", - "many", - "distinct", - "grades", - "are", - "there", - "?" - ], - "utterance": "How many distinct grades are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 3, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT distinct grade FROM Highschooler", - "utterance_toks": [ - "What", - "are", - "they", - "?" - ], - "utterance": "What are they?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) ASC LIMIT 1", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "least", - "number", - "of", - "highschoolers", - "?" - ], - "utterance": "Which one has the least number of highschoolers?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "most", - "?" - ], - "utterance": "Which one has the most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1", - "utterance": "Which grade has the most high schoolers?" - }, - "interaction_id": 1 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT count(*) FROM Highschooler", - "utterance_toks": [ - "How", - "many", - "highschoolers", - "are", - "there", - "in", - "total", - "?" - ], - "utterance": "How many highschoolers are there in total?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT grade, count(*) FROM Highschooler GROUP BY grade", - "utterance_toks": [ - "How", - "many", - "per", - "grade", - "?" - ], - "utterance": "How many per grade?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 10", - "utterance_toks": [ - "What", - "grades", - "have", - "at", - "least", - "10", - "students", - "?" - ], - "utterance": "What grades have at least 10 students?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 10.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", - "utterance_toks": [ - "How", - "about", - "at", - "least", - "4", - "?" - ], - "utterance": "How about at least 4?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 4.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", - "utterance": "Show me all grades that have at least 4 students." - }, - "interaction_id": 2 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT name FROM highschooler", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "the", - "high", - "school", - "students", - "?" - ], - "utterance": "What are the names of all the high school students?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.name, T3.name FROM friend as T1 join highschooler as T2 on friend_id = T2.ID join highschooler as T3 on student_id = T3.ID", - "utterance_toks": [ - "Show", - "the", - "names", - "of", - "the", - "friends", - "for", - "each", - "one", - "." - ], - "utterance": "Show the names of the friends for each one.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 5, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.name, count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", - "utterance_toks": [ - "How", - "many", - "friends", - "does", - "each", - "student", - "each", - "have", - "?" - ], - "utterance": "How many friends does each student each have?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T2.name, count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", - "utterance": "Show the names of high school students and their corresponding number of friends." - }, - "interaction_id": 3 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT name FROM highschooler", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "the", - "high", - "schoolers", - "?" - ], - "utterance": "What are the names of all the high schoolers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.name, count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", - "utterance_toks": [ - "Show", - "me", - "the", - "number", - "of", - "friends", - "for", - "each", - "one", - "." - ], - "utterance": "Show me the number of friends for each one.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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(*) ASC LIMIT 1", - "utterance_toks": [ - "Which", - "one", - "has", - "the", - "least", - "number", - "of", - "friends", - "?" - ], - "utterance": "Which one has the least number of friends?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "How", - "about", - "the", - "greatest", - "?" - ], - "utterance": "How about the greatest?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the name of the high schooler who has the greatest number of friends?" - }, - "interaction_id": 4 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT count(*) FROM (SELECT * FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) > 5)", - "utterance_toks": [ - "How", - "many", - "highschoolers", - "have", - "more", - "than", - "5", - "?" - ], - "utterance": "How many highschoolers have more than 5?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "sql", - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 5.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM (SELECT * FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3)", - "utterance_toks": [ - "at", - "least", - "3", - "?" - ], - "utterance": "at least 3?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "sql", - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 3.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 3.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the names of high schoolers who have at least 3 friends." - }, - "interaction_id": 5 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT * FROM highschooler where name = \"Kyle\"", - "utterance_toks": [ - "Show", - "me", - "information", - "on", - "the", - "high", - "schooler", - "named", - "``", - "Kyle", - ".", - "''" - ], - "utterance": "Show me information on the high schooler named \"Kyle.\"", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) 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\"", - "utterance_toks": [ - "How", - "many", - "friends", - "does", - "he", - "have", - "?" - ], - "utterance": "How many friends does he have?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Show the names of all of the high schooler Kyle's friends." - }, - "interaction_id": 6 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT * FROM highschooler where name = \"Kyle\"", - "utterance_toks": [ - "Is", - "there", - "a", - "highschooler", - "named", - "Kyle", - "?" - ], - "utterance": "Is there a highschooler named Kyle?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T3.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.liked_id = T3.id WHERE T2.name = \"Kyle\"", - "utterance_toks": [ - "Who", - "does", - "he", - "like", - "?" - ], - "utterance": "Who does he like?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "his", - "friends", - "?" - ], - "utterance": "What are the names of his friends?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) 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\"", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", - "utterance": "How many friends does the high school student Kyle have?" - }, - "interaction_id": 7 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT ID FROM highschooler", - "utterance_toks": [ - "Show", - "me", - "all", - "the", - "high", - "school", - "student", - "ids", - "." - ], - "utterance": "Show me all the high school student ids.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT student_id, count(*) FROM friend group by student_id", - "utterance_toks": [ - "How", - "many", - "friends", - "do", - "each", - "of", - "them", - "have", - "?" - ], - "utterance": "How many friends do each of them have?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT student_id FROM Friend", - "utterance_toks": [ - "Which", - "ones", - "have", - "at", - "least", - "1", - "?" - ], - "utterance": "Which ones have at least 1?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", - "utterance_toks": [ - "Which", - "ones", - "have", - "none", - "?" - ], - "utterance": "Which ones have none?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", - "utterance": "Show ids of all students who do not have any friends." - }, - "interaction_id": 8 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT name FROM highschooler", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "all", - "the", - "highshcool", - "students", - "?" - ], - "utterance": "What are the names of all the highshcool students?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM (SELECT * FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 5)", - "utterance_toks": [ - "Which", - "ones", - "have", - "at", - "least", - "5", - "friends", - "?" - ], - "utterance": "Which ones have at least 5 friends?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "sql", - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 5.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT distinct T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", - "utterance_toks": [ - "how", - "about", - "at", - "least", - "1", - "?" - ], - "utterance": "how about at least 1?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", - "utterance_toks": [ - "how", - "about", - "0", - "?" - ], - "utterance": "how about 0?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", - "utterance": "Show names of all high school students who do not have any friends." - }, - "interaction_id": 9 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT student_id FROM Friend", - "utterance_toks": [ - "Show", - "me", - "the", - "ids", - "of", - "all", - "highschoolers", - "who", - "have", - "friends", - "?" - ], - "utterance": "Show me the ids of all highschoolers who have friends?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT distinct T1.student_id, T2.liked_id FROM Friend as T1 JOIN Likes as T2 ON T1.student_id = T2.student_id", - "utterance_toks": [ - "Also", - "show", - ",", - "for", - "each", - ",", - "the", - "ids", - "of", - "the", - "people", - "they", - "like", - "?" - ], - "utterance": "Also show, for each, the ids of the people they like?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT distinct T1.student_id, T2.liked_id FROM Friend as T1 JOIN Likes as T2 ON T1.student_id = T2.student_id where T1.student_id in (SELECT liked_id FROM Likes)", - "utterance_toks": [ - "Now", - "only", - "show", - "those", - "who", - "are", - "liked", - "by", - "someone", - "else", - "!" - ], - "utterance": "Now only show those who are liked by someone else!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 8, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", - "utterance_toks": [ - "Show", - "me", - "just", - "their", - "ids", - "!" - ], - "utterance": "Show me just their ids!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - }, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", - "utterance": "Show the ids of high schoolers who have friends and are also liked by someone else." - }, - "interaction_id": 10 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", - "utterance_toks": [ - "How", - "many", - "high", - "schoolers", - "are", - "liked", - "by", - "someone", - "else", - "?" - ], - "utterance": "How many high schoolers are liked by someone else?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count (*) FROM (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)", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "have", - "friends", - "?" - ], - "utterance": "How many of them have friends?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "sql", - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - }, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Who", - "are", - "they", - "?" - ], - "utterance": "Who are they?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - }, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show name of all students who have some friends and also are liked by someone else." - }, - "interaction_id": 11 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT name FROM Highschooler where ID not in (SELECT student_id FROM Likes)", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "highschoolers", - "who", - "do", - "n't", - "like", - "anyone", - "?" - ], - "utterance": "What are the names of the highschoolers who don't like anyone?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", - "utterance_toks": [ - "How", - "about", - "those", - "who", - "like", - "others", - "?" - ], - "utterance": "How about those who like others?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", - "utterance_toks": [ - "How", - "many", - "people", - "do", - "they", - "each", - "like", - "?" - ], - "utterance": "How many people do they each like?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", - "utterance": "Show the names of high schoolers who have likes, and numbers of likes for each." - }, - "interaction_id": 12 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT count(distinct student_id) FROM likes", - "utterance_toks": [ - "How", - "many", - "high", - "schoolers", - "like", - "somebody", - "else", - "?" - ], - "utterance": "How many high schoolers like somebody else?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 6, - true - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) 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", - "utterance_toks": [ - "what", - "is", - "the", - "greatest", - "number", - "of", - "likes", - "anyone", - "has", - "?" - ], - "utterance": "what is the greatest number of likes anyone has?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "who", - "has", - "the", - "greatest", - "number", - "of", - "likes", - "?" - ], - "utterance": "who has the greatest number of likes?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the name of the high schooler who has the greatest number of likes?" - }, - "interaction_id": 13 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT name FROM highschooler", - "utterance_toks": [ - "Show", - "me", - "the", - "names", - "of", - "all", - "students", - "?" - ], - "utterance": "Show me the names of all students?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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(*) >= 1", - "utterance_toks": [ - "How", - "about", - "those", - "who", - "like", - "at", - "least", - "one", - "other", - "person", - "!" - ], - "utterance": "How about those who like at least one other person!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "How", - "about", - "those", - "who", - "like", - "at", - "least", - "two", - "other", - "students", - "!" - ], - "utterance": "How about those who like at least two other students!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 6, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the names of students who have at least 2 likes." - }, - "interaction_id": 14 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", - "utterance_toks": [ - "What", - "are", - "the", - "names", - "of", - "the", - "students", - "who", - "have", - "some", - "friends", - "?" - ], - "utterance": "What are the names of the students who have some friends?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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(*) >= 2", - "utterance_toks": [ - "How", - "about", - "those", - "have", - "at", - "least", - "2", - "friends", - "?" - ], - "utterance": "How about those have at least 2 friends?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.name, T2.grade FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", - "utterance_toks": [ - "What", - "grades", - "are", - "they", - "each", - "in", - "?" - ], - "utterance": "What grades are they each in?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "me", - "the", - "names", - "of", - "only", - "those", - "who", - "are", - "in", - "a", - "grade", - "higher", - "than", - "5", - "!" - ], - "utterance": "Show me the names of only those who are in a grade higher than 5!", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 3, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - 5.0, - null - ] - ], - "groupBy": [ - [ - 0, - 4, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the names of students who have a grade higher than 5 and have at least 2 friends." - }, - "interaction_id": 15 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT grade FROM highschooler where name = \"Kyle\"", - "utterance_toks": [ - "What", - "grade", - "is", - "the", - "student", - "named", - "Kyle", - "in", - "?" - ], - "utterance": "What grade is the student named Kyle in?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id WHERE T2.name = \"Kyle\"", - "utterance_toks": [ - "How", - "many", - "other", - "students", - "like", - "him", - "?" - ], - "utterance": "How many other students like him?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T3.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id JOIN Highschooler as T3 on T3.ID = T1.student_id WHERE T2.name = \"Kyle\"", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 6, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", - "utterance_toks": [ - "How", - "many", - "other", - "students", - "does", - "he", - "like", - "?" - ], - "utterance": "How many other students does he like?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - "\"Kyle\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", - "utterance": "How many likes does Kyle have?" - }, - "interaction_id": 16 - }, - { - "database_id": "network_1", - "interaction": [ - { - "query": "SELECT id, grade FROM highschooler", - "utterance_toks": [ - "Show", - "me", - "the", - "student_id", - "and", - "the", - "grade", - "for", - "all", - "students", - "." - ], - "utterance": "Show me the student_id and the grade for all students.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(grade) FROM highschooler", - "utterance_toks": [ - "What", - "is", - "the", - "average", - "grade", - "?" - ], - "utterance": "What is the average grade?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(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)", - "utterance_toks": [ - "How", - "about", - "for", - "students", - "who", - "have", - "no", - "friends", - "?" - ], - "utterance": "How about for students who have no friends?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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)", - "utterance_toks": [ - "How", - "about", - "for", - "those", - "who", - "have", - "some", - "friends", - "?" - ], - "utterance": "How about for those who have some friends?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 8, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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)", - "utterance": "Find the average grade of all students who have some friends." - }, - "interaction_id": 17 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT * FROM teacher", - "utterance_toks": [ - "Show", - "all", - "the", - "teachers", - "." - ], - "utterance": "Show all the teachers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM teacher", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM teacher", - "utterance": "How many teachers are there?" - }, - "interaction_id": 0 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT Name FROM teacher", - "utterance_toks": [ - "What", - "is", - "the", - "name", - "of", - "each", - "teacher", - "?" - ], - "utterance": "What is the name of each teacher?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM teacher ORDER BY Age ASC", - "utterance_toks": [ - "Sort", - "them", - "in", - "ascending", - "order", - "of", - "age", - "." - ], - "utterance": "Sort them in ascending order of age.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM teacher ORDER BY Age ASC", - "utterance": "List the names of teachers in ascending order of age." - }, - "interaction_id": 1 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT Hometown FROM teacher", - "utterance_toks": [ - "What", - "is", - "the", - "age", - "of", - "each", - "teacher", - "?" - ], - "utterance": "What is the age of each teacher?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Age , Hometown FROM teacher", - "utterance_toks": [ - "Also", - "show", - "the", - "hometown", - "for", - "each", - "." - ], - "utterance": "Also show the hometown for each.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Age , Hometown FROM teacher", - "utterance": "What are the age and hometown of teachers?" - }, - "interaction_id": 2 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT Hometown FROM teacher", - "utterance_toks": [ - "What", - "is", - "the", - "hometown", - "of", - "each", - "teacher", - "?" - ], - "utterance": "What is the hometown of each teacher?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM teacher WHERE Hometown != \"Little Lever Urban Distric\"", - "utterance_toks": [ - "Which", - "teacher", - "'s", - "hometown", - "is", - "not", - "``", - "Little", - "Lever", - "Urban", - "District", - "''", - "?" - ], - "utterance": "Which teacher's hometown is not \"Little Lever Urban District\"?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"Little Lever Urban Distric\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM teacher WHERE Hometown != \"Little Lever Urban Distric\"", - "utterance_toks": [ - "Give", - "me", - "their", - "names", - "." - ], - "utterance": "Give me their names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"Little Lever Urban Distric\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM teacher WHERE Hometown != \"Little Lever Urban Distric\"", - "utterance": "List the name of teachers whose hometown is not \"Little Lever Urban District\"." - }, - "interaction_id": 3 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT Age FROM teacher", - "utterance_toks": [ - "What", - "are", - "the", - "ages", - "of", - "all", - "the", - "teachers", - "?" - ], - "utterance": "What are the ages of all the teachers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM teacher WHERE Age = 32", - "utterance_toks": [ - "Which", - "teachers", - "are", - "age", - "32", - "?" - ], - "utterance": "Which teachers are age 32?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - 32.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM teacher WHERE Age = 32 OR Age = 33", - "utterance_toks": [ - "Which", - "teachers", - "are", - "age", - "32", - "or", - "33", - "?" - ], - "utterance": "Which teachers are age 32 or 33?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - 32.0, - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - 33.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - 32.0, - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - 33.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33", - "utterance": "Show the name of teachers aged either 32 or 33?" - }, - "interaction_id": 4 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT * FROM teacher ORDER BY Age", - "utterance_toks": [ - "Sort", - "all", - "the", - "teachers", - "by", - "their", - "age", - "." - ], - "utterance": "Sort all the teachers by their age.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM teacher ORDER BY Age ASC LIMIT 1", - "utterance_toks": [ - "Which", - "teacher", - "is", - "the", - "youngest", - "?" - ], - "utterance": "Which teacher is the youngest?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "his", - "or", - "her", - "hometown", - "?" - ], - "utterance": "What is his or her hometown?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1", - "utterance": "What is the hometown of the youngest teacher?" - }, - "interaction_id": 5 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT Hometown FROM teacher", - "utterance_toks": [ - "What", - "is", - "the", - "hometown", - "of", - "each", - "teacher", - "?" - ], - "utterance": "What is the hometown of each teacher?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM teacher order BY Hometown", - "utterance_toks": [ - "Can", - "you", - "order", - "teachers", - "by", - "their", - "hometowns", - "?" - ], - "utterance": "Can you order teachers by their hometowns?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown", - "utterance_toks": [ - "Show", - "the", - "number", - "of", - "teachers", - "from", - "each", - "hometown", - "." - ], - "utterance": "Show the number of teachers from each hometown.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 7, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown", - "utterance": "Show different hometown of teachers and the number of teachers from each hometown." - }, - "interaction_id": 6 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT COUNT(*) FROM teacher", - "utterance_toks": [ - "How", - "many", - "teachers", - "are", - "there", - "?" - ], - "utterance": "How many teachers are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(*) FROM teacher GROUP BY Hometown", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "for", - "each", - "hometown", - "?" - ], - "utterance": "How many are there for each hometown?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 7, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1", - "utterance_toks": [ - "Find", - "the", - "most", - "common", - "hometown", - "of", - "teachers", - "." - ], - "utterance": "Find the most common hometown of teachers.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 7, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1", - "utterance": "List the most common hometown of teachers." - }, - "interaction_id": 7 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT COUNT(*) FROM teacher", - "utterance_toks": [ - "How", - "many", - "teachers", - "are", - "there", - "?" - ], - "utterance": "How many teachers are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT COUNT(*) FROM teacher GROUP BY Hometown", - "utterance_toks": [ - "How", - "many", - "teachers", - "are", - "there", - "for", - "each", - "hometown", - "?" - ], - "utterance": "How many teachers are there for each hometown?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 7, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2", - "utterance_toks": [ - "Which", - "hometowns", - "are", - "shared", - "by", - "at", - "least", - "two", - "teachers", - "?" - ], - "utterance": "Which hometowns are shared by at least two teachers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 7, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2", - "utterance": "Show the hometowns shared by at least two teachers." - }, - "interaction_id": 8 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT * FROM course_arrange", - "utterance_toks": [ - "Find", - "all", - "the", - "course", - "arrangements", - "." - ], - "utterance": "Find all the course arrangements.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "For", - "each", - "of", - "the", - "courses", - ",", - "show", - "the", - "teacher", - "who", - "teaches", - "it", - "." - ], - "utterance": "For each of the courses, show the teacher who teaches it.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show names of teachers and the courses they are arranged to teach." - }, - "interaction_id": 9 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT * FROM course_arrange", - "utterance_toks": [ - "Find", - "all", - "the", - "course", - "arrangements", - "." - ], - "utterance": "Find all the course arrangements.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "names", - "of", - "teachers", - "and", - "the", - "courses", - "they", - "are", - "arranged", - "to", - "teach", - "." - ], - "utterance": "Show names of teachers and the courses they are arranged to teach.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Sort", - "the", - "results", - "by", - "teacher", - "'s", - "name" - ], - "utterance": "Sort the results by teacher's name", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name." - }, - "interaction_id": 10 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT * FROM course_arrange", - "utterance_toks": [ - "Find", - "all", - "the", - "course", - "arrangements", - "." - ], - "utterance": "Find all the course arrangements.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "names", - "of", - "teachers", - "and", - "the", - "courses", - "they", - "are", - "arranged", - "to", - "teach", - "." - ], - "utterance": "Show names of teachers and the courses they are arranged to teach.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "Which", - "teachers", - "teach", - "the", - "math", - "course", - "?", - "Give", - "me", - "their", - "names", - "." - ], - "utterance": "Which teachers teach the math course? Give me their names.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - "\"Math\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "Show the name of the teacher for the math course." - }, - "interaction_id": 11 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT Name FROM teacher", - "utterance_toks": [ - "Show", - "all", - "the", - "teacher", - "names", - "." - ], - "utterance": "Show all the teacher names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "names", - "of", - "teachers", - "and", - "the", - "number", - "of", - "courses", - "they", - "teach", - "." - ], - "utterance": "Show names of teachers and the number of courses they teach.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 4, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show names of teachers and the number of courses they teach." - }, - "interaction_id": 12 - }, - { - "database_id": "course_teach", - "interaction": [ - { - "query": "SELECT Name FROM teacher", - "utterance_toks": [ - "Show", - "all", - "the", - "teacher", - "names", - "." - ], - "utterance": "Show all the teacher names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "names", - "of", - "teachers", - "and", - "the", - "number", - "of", - "courses", - "they", - "teach", - "." - ], - "utterance": "Show names of teachers and the number of courses they teach.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 4, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "the", - "names", - "of", - "teachers", - "who", - "teach", - "at", - "least", - "two", - "courses", - "." - ], - "utterance": "Show the names of teachers who teach at least two courses.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 9, - false - ], - null - ], - [ - 0, - 4, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 5, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show names of teachers that teach at least two courses." - }, - "interaction_id": 13 - }, - { - "database_id": "real_estate_properties", - "interaction": [ - { - "query": "SELECT * FROM Other_Available_Features", - "utterance_toks": [ - "Show", - "all", - "the", - "available", - "features", - "." - ], - "utterance": "Show all the available features.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Other_Available_Features", - "utterance_toks": [ - "How", - "many", - "available", - "features", - "are", - "there", - "?" - ], - "utterance": "How many available features are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Other_Available_Features", - "utterance": "How many available features are there in total?" - }, - "interaction_id": 0 - }, - { - "database_id": "real_estate_properties", - "interaction": [ - { - "query": "SELECT * FROM Other_Available_Features WHERE feature_name = \"AirCon\"", - "utterance_toks": [ - "Find", - "the", - "available", - "features", - "with", - "feature", - "name", - "``", - "AirCon", - "''", - "." - ], - "utterance": "Find the available features with feature name \"AirCon\".", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"AirCon\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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\"", - "utterance_toks": [ - "What", - "is", - "the", - "feature", - "type", - "name", - "?" - ], - "utterance": "What is the feature type name?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 6, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"AirCon\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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\"", - "utterance": "What is the feature type name of feature AirCon?" - }, - "interaction_id": 1 - }, - { - "database_id": "real_estate_properties", - "interaction": [ - { - "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", - "utterance_toks": [ - "What", - "is", - "the", - "property", - "type", - "description", - "of", - "each", - "property", - "?" - ], - "utterance": "What is the property type description of each property?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "the", - "property", - "type", - "descriptions", - "of", - "properties", - "for", - "each", - "property", - "type", - "code", - "." - ], - "utterance": "Show the property type descriptions of properties for each property type code.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 1 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 3, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the property type descriptions of properties belonging to that code." - }, - "interaction_id": 2 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM area_code_state", - "utterance_toks": [ - "Show", - "all", - "area", - "codes", - "and", - "states", - "." - ], - "utterance": "Show all area codes and states.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM area_code_state", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM area_code_state", - "utterance": "How many states are there?" - }, - "interaction_id": 0 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM contestants", - "utterance_toks": [ - "Show", - "all", - "info", - "about", - "contestants", - "." - ], - "utterance": "Show all info about contestants.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT contestant_name FROM contestants", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT contestant_number , contestant_name FROM contestants", - "utterance_toks": [ - "Can", - "you", - "also", - "show", - "contestant", - "numbers", - "?" - ], - "utterance": "Can you also show contestant numbers?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC", - "utterance_toks": [ - "Can", - "you", - "sort", - "them", - "ordered", - "in", - "descending", - "order", - "of", - "contestant", - "name", - "?" - ], - "utterance": "Can you sort them ordered in descending order of contestant name?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC", - "utterance": "List the contestant numbers and names, ordered by contestant name descending." - }, - "interaction_id": 1 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT state FROM votes", - "utterance_toks": [ - "Show", - "all", - "info", - "about", - "votes", - "." - ], - "utterance": "Show all info about votes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT vote_id, state FROM votes", - "utterance_toks": [ - "Also", - "provide", - "vote", - "ids", - "." - ], - "utterance": "Also provide vote ids.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT vote_id , phone_number , state FROM votes", - "utterance_toks": [ - "Also", - "show", - "phone", - "numbers", - "." - ], - "utterance": "Also show phone numbers.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 5, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT vote_id , phone_number , state FROM votes", - "utterance": "List the vote ids, phone numbers and states of all votes." - }, - "interaction_id": 2 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT area_code FROM area_code_state", - "utterance_toks": [ - "Show", - "all", - "area", - "codes", - "." - ], - "utterance": "Show all area codes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(area_code) FROM area_code_state", - "utterance_toks": [ - "What", - "is", - "the", - "largest", - "one", - "?" - ], - "utterance": "What is the largest one?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT min(area_code) FROM area_code_state", - "utterance_toks": [ - "How", - "about", - "smallest", - "one", - "?" - ], - "utterance": "How about smallest one?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(area_code) , min(area_code) FROM area_code_state", - "utterance_toks": [ - "Give", - "me", - "both", - "." - ], - "utterance": "Give me both.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT max(area_code) , min(area_code) FROM area_code_state", - "utterance": "What are the maximum and minimum values of area codes?" - }, - "interaction_id": 3 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM votes", - "utterance_toks": [ - "Show", - "all", - "votes", - "." - ], - "utterance": "Show all votes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM votes WHERE state = 'CA'", - "utterance_toks": [ - "Which", - "ones", - "are", - "from", - "the", - "state", - "'CA", - "'", - "?" - ], - "utterance": "Which ones are from the state 'CA'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"CA\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(created) FROM votes WHERE state = 'CA'", - "utterance_toks": [ - "Among", - "those", - ",", - "can", - "you", - "give", - "me", - "the", - "last", - "date", - "created", - "?" - ], - "utterance": "Among those, can you give me the last date created?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"CA\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT max(created) FROM votes WHERE state = 'CA'", - "utterance": "What is last date created of votes from the state 'CA'?" - }, - "interaction_id": 4 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM contestants", - "utterance_toks": [ - "Show", - "all", - "contestants", - "." - ], - "utterance": "Show all contestants.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT contestant_name FROM contestants", - "utterance_toks": [ - "What", - "are", - "their", - "names", - "?" - ], - "utterance": "What are their names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'", - "utterance_toks": [ - "Can", - "you", - "not", - "include", - "the", - "name", - "'Jessie", - "Alloway", - "'", - "?" - ], - "utterance": "Can you not include the name 'Jessie Alloway'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 7, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Jessie Alloway\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'", - "utterance": "What are the names of the contestants whose names are not 'Jessie Alloway'" - }, - "interaction_id": 5 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM votes", - "utterance_toks": [ - "Show", - "all", - "votes", - "?" - ], - "utterance": "Show all votes?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT state FROM votes", - "utterance_toks": [ - "Among", - "these", - ",", - "what", - "is", - "the", - "list", - "of", - "states", - "?" - ], - "utterance": "Among these, what is the list of states?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT state , created FROM votes", - "utterance_toks": [ - "What", - "are", - "the", - "distinct", - "states", - "and", - "create", - "time", - "?" - ], - "utterance": "What are the distinct states and create time?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT DISTINCT state , created FROM votes", - "utterance": "What are the distinct states and create time of all votes?" - }, - "interaction_id": 6 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM contestants", - "utterance_toks": [ - "Show", - "all", - "the", - "contestants", - "." - ], - "utterance": "Show all the contestants.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM votes", - "utterance_toks": [ - "Show", - "all", - "the", - "votes", - "." - ], - "utterance": "Show all the votes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2", - "utterance_toks": [ - "Can", - "you", - "show", - "contestants", - "with", - "at", - "least", - "two", - "votes", - "?" - ], - "utterance": "Can you show contestants with at least two votes?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "are", - "their", - "contestant", - "numbers", - "and", - "names", - "?" - ], - "utterance": "What are their contestant numbers and names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What are the contestant numbers and names of the contestants who had at least two votes?" - }, - "interaction_id": 7 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM contestants", - "utterance_toks": [ - "Show", - "all", - "the", - "contestants", - "." - ], - "utterance": "Show all the contestants.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM votes", - "utterance_toks": [ - "Show", - "all", - "the", - "votes", - "." - ], - "utterance": "Show all the votes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * 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", - "utterance_toks": [ - "Can", - "you", - "show", - "the", - "contestant", - "with", - "the", - "least", - "votes", - "?" - ], - "utterance": "Can you show the contestant with the least votes?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "is", - "his", - "or", - "her", - "contestant", - "number", - "and", - "contestant", - "name", - "?" - ], - "utterance": "What is his or her contestant number and contestant name?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 3, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 4, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?" - }, - "interaction_id": 8 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM votes", - "utterance_toks": [ - "Show", - "all", - "votes", - "." - ], - "utterance": "Show all votes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM votes WHERE state = 'NY' OR state = 'CA'", - "utterance_toks": [ - "What", - "about", - "those", - "from", - "state", - "'NY", - "'", - "or", - "'CA", - "'", - "?" - ], - "utterance": "What about those from state 'NY' or 'CA'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"NY\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"CA\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'", - "utterance_toks": [ - "Give", - "me", - "the", - "count", - "of", - "these", - "votes", - "." - ], - "utterance": "Give me the count of these votes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"NY\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"CA\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'", - "utterance": "What are the number of votes from state 'NY' or 'CA'?" - }, - "interaction_id": 9 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM contestants", - "utterance_toks": [ - "Show", - "all", - "contestants" - ], - "utterance": "Show all contestants", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )", - "utterance_toks": [ - "Which", - "contestants", - "did", - "not", - "get", - "any", - "votes", - "?" - ], - "utterance": "Which contestants did not get any votes?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 8, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )", - "utterance": "How many contestants did not get voted?" - }, - "interaction_id": 10 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM area_code_state", - "utterance_toks": [ - "Show", - "all", - "area", - "codes", - "and", - "states", - "." - ], - "utterance": "Show all area codes and states.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM votes", - "utterance_toks": [ - "Show", - "all", - "votes", - "." - ], - "utterance": "Show all votes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM AREA_CODE_STATE AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code", - "utterance_toks": [ - "Get", - "the", - "count", - "of", - "votes", - "for", - "each", - "area", - "code", - "." - ], - "utterance": "Get the count of votes for each area code.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "is", - "the", - "area", - "code", - "in", - "which", - "the", - "most", - "voters", - "voted", - "?" - ], - "utterance": "What is the area code in which the most voters voted?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 2, - false - ], - null - ], - [ - 0, - 7, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the area code in which the most voters voted?" - }, - "interaction_id": 11 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM votes", - "utterance_toks": [ - "Show", - "all", - "votes", - "." - ], - "utterance": "Show all votes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'", - "utterance_toks": [ - "Show", - "those", - "that", - "were", - "for", - "the", - "contestant", - "named", - "'Tabatha", - "Gehling", - "'", - "." - ], - "utterance": "Show those that were for the contestant named 'Tabatha Gehling'.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Tabatha Gehling\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "What", - "are", - "the", - "create", - "dates", - ",", - "states", - ",", - "and", - "phone", - "numbers", - "of", - "these", - "votes", - "?" - ], - "utterance": "What are the create dates, states, and phone numbers of these votes?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 3, - false - ], - null - ], - [ - 0, - 8, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Tabatha Gehling\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 7, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 6, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?" - }, - "interaction_id": 12 - }, - { - "database_id": "voter_1", - "interaction": [ - { - "query": "SELECT * FROM area_code_state", - "utterance_toks": [ - "Show", - "all", - "area", - "codes", - "." - ], - "utterance": "Show all area codes.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Can", - "you", - "tell", - "me", - "area", - "codes", - "in", - "which", - "voters", - "voted", - "for", - "the", - "contestant", - "'Tabatha", - "Gehling", - "'", - "?" - ], - "utterance": "Can you tell me area codes in which voters voted for the contestant 'Tabatha Gehling'?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Tabatha Gehling\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "How", - "about", - "both", - "the", - "contestant", - "'Tabatha", - "Gehling", - "'", - "and", - "the", - "contestant", - "'Kelly", - "Clauss", - "'", - "?" - ], - "utterance": "How about both the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Kelly Clauss\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 4, - false - ], - null - ], - "\"Tabatha Gehling\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'." - }, - "interaction_id": 13 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT T2.department_description , 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", - "utterance_toks": [ - "Give", - "me", - "the", - "description", - "of", - "the", - "department", - "that", - "offers", - "the", - "most", - "number", - "of", - "degrees", - "." - ], - "utterance": "Give me the description of the department that offers the most number of degrees.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - [ - 0, - 14, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 19, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "'s", - "the", - "name", - "and", - "id", - "of", - "that", - "department", - "?" - ], - "utterance": "What's the name and id of that department?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 2 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 19, - false - ], - null - ], - [ - 0, - 14, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 19, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 19, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which department offers the most number of degrees? List department name and id." - }, - "interaction_id": 0 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT * FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", - "utterance_toks": [ - "Show", - "me", - "all", - "the", - "degrees", - "offered", - "by", - "the", - "engineering", - "department", - "." - ], - "utterance": "Show me all the degrees offered by the engineering department.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 19, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"engineer\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", - "utterance_toks": [ - "How", - "many", - "are", - "there", - "?" - ], - "utterance": "How many are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ], - [ - "table_unit", - 3 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - [ - 0, - 19, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"engineer\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", - "utterance": "How many degrees does the engineering department offer?" - }, - "interaction_id": 1 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT * FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) = 2", - "utterance_toks": [ - "Show", - "me", - "courses", - "that", - "have", - "exactly", - "2", - "sections", - "." - ], - "utterance": "Show me courses that have exactly 2 sections.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 24, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 2, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "me", - "names", - "and", - "ids", - "for", - "courses", - "that", - "have", - "at", - "most", - "2", - "sections", - "." - ], - "utterance": "Show me names and ids for courses that have at most 2 sections.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 24, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 6, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What are the names and id of courses having at most 2 sections?" - }, - "interaction_id": 2 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "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(*) ASC LIMIT 1", - "utterance_toks": [ - "Which", - "semester", - "did", - "the", - "least", - "number", - "of", - "students", - "register", - "?", - "Give", - "me", - "its", - "name", - "and", - "id", - "." - ], - "utterance": "Which semester did the least number of students register? Give me its name and id.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 28, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 28, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 29, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 28, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "How", - "about", - "the", - "semester", - "that", - "most", - "number", - "of", - "students", - "registered", - "?" - ], - "utterance": "How about the semester that most number of students registered?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 28, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 28, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 29, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 28, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the semester which most student registered in? Show both the name and the id." - }, - "interaction_id": 3 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT * FROM Departments WHERE department_name LIKE '%computer%'", - "utterance_toks": [ - "Show", - "me", - "all", - "department", - "names", - "that", - "contain", - "the", - "word", - "``", - "computer", - "''" - ], - "utterance": "Show me all department names that contain the word \"computer\"", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 9, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"%computer%\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'", - "utterance_toks": [ - "Show", - "me", - "their", - "descriptions", - "." - ], - "utterance": "Show me their descriptions.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 2 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 9, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"%computer%\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'", - "utterance": "What is the description of the department whose name has the substring the computer?" - }, - "interaction_id": 4 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT count(*) FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", - "utterance_toks": [ - "How", - "many", - "people", - "are", - "enrolled", - "in", - "2", - "degree", - "programs", - "in", - "one", - "semester", - "?" - ], - "utterance": "How many people are enrolled in 2 degree programs in one semester?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 32, - false - ], - null - ], - [ - 0, - 47, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 2, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 32, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "me", - "their", - "first", - ",", - "middle", - ",", - "and", - "last", - "names", - "." - ], - "utterance": "Show me their first, middle, and last names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 32, - false - ], - null - ], - [ - 0, - 47, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 2, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 32, - false - ] - ], - "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 - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id." - }, - "interaction_id": 5 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT DISTINCT count(*) 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'", - "utterance_toks": [ - "How", - "many", - "people", - "are", - "enrolled", - "in", - "the", - "Bachelor", - "degree", - "program", - "?" - ], - "utterance": "How many people are enrolled in the Bachelor degree program?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Bachelor\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "What", - "are", - "their", - "first", - ",", - "middle", - ",", - "and", - "last", - "names", - "?" - ], - "utterance": "What are their first, middle, and last names?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Bachelor\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 36, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 37, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "Who is enrolled in a Bachelor degree program? List the first name, middle name, last name." - }, - "interaction_id": 6 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT T1.degree_summary_description 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 3", - "utterance_toks": [ - "Show", - "me", - "the", - "descriptions", - "of", - "programs", - "with", - "3", - "highest", - "number", - "of", - "enrolled", - "students", - "." - ], - "utterance": "Show me the descriptions of programs with 3 highest number of enrolled students.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 3, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 20, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "me", - "the", - "name", - "of", - "program", - "with", - "the", - "most", - "enrolled", - "students", - "." - ], - "utterance": "Show me the name of program with the most enrolled students.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 20, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Find the kind of program which most number of students are enrolled in?" - }, - "interaction_id": 7 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT T1.degree_summary_description 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(*) ASC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "the", - "description", - "of", - "the", - "program", - "that", - "has", - "the", - "least", - "number", - "of", - "enrolled", - "students", - "?" - ], - "utterance": "What is the description of the program that has the least number of enrolled students?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 18, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.degree_summary_description 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", - "utterance_toks": [ - "How", - "about", - "the", - "program", - "that", - "has", - "the", - "most", - "number", - "of", - "enrolled", - "students", - "?" - ], - "utterance": "How about the program that has the most number of enrolled students?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 18, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "me", - "the", - "id", - "and", - "summary", - "." - ], - "utterance": "Show me the id and summary.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 18, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 18, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 20, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Find the program which most number of students are enrolled in. List both the id and the summary." - }, - "interaction_id": 8 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "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 3", - "utterance_toks": [ - "Show", - "me", - "the", - "id", - ",", - "first", - "and", - "last", - "names", - "of", - "top", - "3", - "students", - "who", - "have", - "enrolled", - "for", - "the", - "most", - "times", - "in", - "any", - "program", - "." - ], - "utterance": "Show me the id, first and last names of top 3 students who have enrolled for the most times in any program.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 32, - false - ], - null - ], - [ - 0, - 47, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 3, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 32, - false - ] - ], - "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 - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "me", - "just", - "the", - "top", - "1", - "." - ], - "utterance": "Show me just the top 1.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 32, - false - ], - null - ], - [ - 0, - 47, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 32, - false - ] - ], - "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 - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "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." - }, - "interaction_id": 9 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT semester_description FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", - "utterance_toks": [ - "Give", - "me", - "the", - "description", - "of", - "a", - "semester", - "with", - "no", - "enrolled", - "students", - "." - ], - "utterance": "Give me the description of a semester with no enrolled students.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 28, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 46, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 30, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", - "utterance_toks": [ - "What", - "'s", - "the", - "name", - "of", - "that", - "semester", - "?" - ], - "utterance": "What's the name of that semester?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 28, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 46, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 29, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", - "utterance": "Which semesters do not have any student enrolled? List the semester name." - }, - "interaction_id": 10 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "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(*) ASC LIMIT 1", - "utterance_toks": [ - "What", - "'s", - "the", - "name", - "of", - "the", - "course", - "with", - "the", - "least", - "number", - "of", - "enrollments", - "?" - ], - "utterance": "What's the name of the course with the least number of enrollments?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 8 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 50, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 11, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) 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", - "utterance_toks": [ - "How", - "many", - "enrollments", - "does", - "the", - "course", - "with", - "most", - "enrollments", - "have", - "?" - ], - "utterance": "How many enrollments does the course with most enrollments have?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 8 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 50, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 11, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "'s", - "the", - "name", - "of", - "that", - "course", - "?" - ], - "utterance": "What's the name of that course?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 1 - ], - [ - "table_unit", - 8 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 50, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 11, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What's the name of the course with most number of enrollments?" - }, - "interaction_id": 11 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT count(*) FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina'", - "utterance_toks": [ - "How", - "many", - "students", - "currently", - "live", - "in", - "North", - "Carolina", - "?" - ], - "utterance": "How many students currently live in North Carolina?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"NorthCarolina\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) 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", - "utterance_toks": [ - "How", - "many", - "of", - "those", - "students", - "have", - "not", - "registered", - "in", - "any", - "degree", - "program", - "?" - ], - "utterance": "How many of those students have not registered in any degree program?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 32, - false - ], - null - ], - [ - 0, - 47, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 37, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"NorthCarolina\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "are", - "their", - "last", - "names", - "?" - ], - "utterance": "What are their last names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 0 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 1, - false - ], - null - ] - ] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 32, - false - ], - null - ], - [ - 0, - 47, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 37, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 7, - false - ], - null - ], - "\"NorthCarolina\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 37, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program." - }, - "interaction_id": 12 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "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", - "utterance_toks": [ - "Show", - "me", - "date", - "and", - "id", - "of", - "transcripts", - "with", - "exactly", - "2", - "course", - "results", - "." - ], - "utterance": "Show me date and id of transcripts with exactly 2 course results.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 10 - ], - [ - "table_unit", - 9 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 56, - false - ], - null - ], - [ - 0, - 52, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 2, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 56, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 56, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "How", - "about", - "transcripts", - "with", - "at", - "least", - "2", - "course", - "results", - "?" - ], - "utterance": "How about transcripts with at least 2 course results?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 10 - ], - [ - "table_unit", - 9 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 56, - false - ], - null - ], - [ - 0, - 52, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 56, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 56, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the date and id of the transcript with at least 2 course results." - }, - "interaction_id": 13 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT current_address_id FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'", - "utterance_toks": [ - "What", - "is", - "the", - "address", - "of", - "the", - "student", - "with", - "first", - "name", - "Timothy", - "and", - "last", - "name", - "Ward", - "?" - ], - "utterance": "What is the address of the student with first name Timothy and last name Ward?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 35, - false - ], - null - ], - "\"Timmothy\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 37, - false - ], - null - ], - "\"Ward\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'", - "utterance_toks": [ - "What", - "'s", - "his", - "phone", - "number", - "?" - ], - "utterance": "What's his phone number?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 35, - false - ], - null - ], - "\"Timmothy\"", - null - ], - "and", - [ - false, - 2, - [ - 0, - [ - 0, - 37, - false - ], - null - ], - "\"Ward\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 38, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'", - "utterance": "What is the phone number of the man with the first name Timmothy and the last name Ward?" - }, - "interaction_id": 14 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered DESC LIMIT 1", - "utterance_toks": [ - "Who", - "was", - "the", - "last", - "student", - "to", - "register", - "?", - "Show", - "me", - "the", - "first", - ",", - "middle", - ",", - "and", - "last", - "names", - "of", - "that", - "student", - "." - ], - "utterance": "Who was the last student to register? Show me the first, middle, and last names of that student.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 41, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 36, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 37, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", - "utterance_toks": [ - "Who", - "was", - "the", - "first", - "to", - "register", - "?" - ], - "utterance": "Who was the first to register?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 41, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 36, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 37, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", - "utterance": "Who is the first student to register? List the first name, middle name and last name." - }, - "interaction_id": 15 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left DESC LIMIT 1", - "utterance_toks": [ - "Who", - "is", - "the", - "least", - "recent", - "graduate", - "of", - "the", - "school", - "?", - "List", - "the", - "first", - ",", - "middle", - ",", - "and", - "last", - "names", - "." - ], - "utterance": "Who is the least recent graduate of the school? List the first, middle, and last names.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 42, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 36, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 37, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1", - "utterance_toks": [ - "Who", - "is", - "the", - "earliest", - "graduate", - "of", - "the", - "school", - "?" - ], - "utterance": "Who is the earliest graduate of the school?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 42, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 36, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 37, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1", - "utterance": "Who is the earliest graduate of the school? List the first name, middle name and last name." - }, - "interaction_id": 16 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT T1.address_id 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", - "utterance_toks": [ - "Give", - "me", - "the", - "id", - "of", - "the", - "address", - "that", - "holds", - "the", - "most", - "number", - "of", - "students", - "?" - ], - "utterance": "Give me the id of the address that holds the most number of students?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 6 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 33, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) 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", - "utterance_toks": [ - "How", - "many", - "students", - "live", - "there", - "?" - ], - "utterance": "How many students live there?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 6 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 33, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Give", - "me", - "all", - "the", - "lines", - "as", - "well", - "as", - "the", - "id", - "of", - "that", - "address", - "." - ], - "utterance": "Give me all the lines as well as the id of that address.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 6 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 33, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 1, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 1, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 3, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which address holds the most number of students currently? List the address id and all lines." - }, - "interaction_id": 17 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", - "utterance_toks": [ - "Give", - "me", - "details", - "of", - "the", - "first", - "transcript", - "released", - "." - ], - "utterance": "Give me details of the first transcript released.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 9 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 54, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", - "utterance_toks": [ - "Tell", - "me", - "when", - "it", - "was", - "released", - "as", - "well", - ",", - "along", - "with", - "its", - "details", - "." - ], - "utterance": "Tell me when it was released as well, along with its details.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 9 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 54, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", - "utterance": "When is the first transcript released? List the date and details." - }, - "interaction_id": 18 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", - "utterance_toks": [ - "What", - "is", - "the", - "oldest", - "transcript", - "release", - "date", - "?" - ], - "utterance": "What is the oldest transcript release date?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 9 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1", - "utterance_toks": [ - "How", - "about", - "the", - "latest", - "?" - ], - "utterance": "How about the latest?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 9 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1", - "utterance": "What is the last transcript release date?" - }, - "interaction_id": 19 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) ASC LIMIT 1", - "utterance_toks": [ - "How", - "many", - "times", - ",", - "at", - "minimum", - ",", - "can", - "a", - "course", - "enrollment", - "result", - "show", - "in", - "different", - "transcript", - "?", - "Show", - "me", - "the", - "course", - "enrollment", - "id", - "." - ], - "utterance": "How many times, at minimum, can a course enrollment result show in different transcript? Show me the course enrollment id.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 10 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 55, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 55, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "How", - "many", - "times", - "at", - "most", - "?" - ], - "utterance": "How many times at most?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 10 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 55, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 55, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", - "utterance": "How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id." - }, - "interaction_id": 20 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "query": "SELECT T2.other_details 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", - "utterance_toks": [ - "Show", - "other", - "details", - "of", - "the", - "transcript", - "with", - "least", - "number", - "of", - "results", - "." - ], - "utterance": "Show other details of the transcript with least number of results.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 10 - ], - [ - "table_unit", - 9 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 56, - false - ], - null - ], - [ - 0, - 52, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 56, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 54, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "me", - "the", - "date", - "and", - "id", - "of", - "that", - "transcript", - "." - ], - "utterance": "Show me the date and id of that transcript.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 10 - ], - [ - "table_unit", - 9 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 56, - false - ], - null - ], - [ - 0, - 52, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 56, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 53, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 56, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Show the date of the transcript which shows the least number of results, also list the id." - }, - "interaction_id": 21 - }, - { - "database_id": "student_transcripts_tracking", - "interaction": [ - { - "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'", - "utterance_toks": [ - "Find", - "a", - "semester", - "when", - "there", - "was", - "a", - "Master", - "student", - "enrolled", - "." - ], - "utterance": "Find a semester when there was a Master student enrolled.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Master\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 46, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 = 'Bachelor'", - "utterance_toks": [ - "How", - "about", - "a", - "semester", - "when", - "there", - "was", - "a", - "Bachelor", - "student", - "enrolled", - "?" - ], - "utterance": "How about a semester when there was a Bachelor student enrolled?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Bachelor\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 46, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "Find", - "a", - "semester", - "that", - "both", - "types", - "of", - "students", - "were", - "enrolled", - "in", - "." - ], - "utterance": "Find a semester that both types of students were enrolled in.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 18, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Bachelor\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 46, - false - ], - null - ] - ] - ] - ] - }, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - "\"Master\"", - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 46, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "Find the semester when both Master students and Bachelor students got enrolled in." - }, - "interaction_id": 22 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT * FROM Owners", - "utterance_toks": [ - "List", - "all", - "the", - "information", - "about", - "the", - "owners", - "." - ], - "utterance": "List all the information about the owners.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM Professionals", - "utterance_toks": [ - "What", - "about", - "the", - "Professionals", - "?" - ], - "utterance": "What about the Professionals?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT state FROM Professionals", - "utterance_toks": [ - "Now", - "show", - "the", - "states", - "of", - "them", - "." - ], - "utterance": "Now show the states of them.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 38, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals", - "utterance_toks": [ - "Which", - "of", - "them", - "have", - "both", - "owners", - "and", - "professionals", - "living", - "there", - "?" - ], - "utterance": "Which of them have both owners and professionals living there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 38, - false - ], - null - ] - ] - ] - ] - }, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals", - "utterance": "Which states have both owners and professionals living there?" - }, - "interaction_id": 0 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT age FROM Dogs", - "utterance_toks": [ - "Show", - "all", - "the", - "dog", - "ages", - "." - ], - "utterance": "Show all the dog ages.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT max(age), min(age) FROM Dogs", - "utterance_toks": [ - "What", - "is", - "the", - "maximum", - "and", - "minimum", - "value", - "?" - ], - "utterance": "What is the maximum and minimum value?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ], - [ - 2, - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", - "utterance_toks": [ - "Which", - "of", - "the", - "dogs", - "have", - "gone", - "through", - "treatments", - "?" - ], - "utterance": "Which of the dogs have gone through treatments?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 8, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 45, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", - "utterance_toks": [ - "What", - "about", - "the", - "average", - "age", - "of", - "them", - "?" - ], - "utterance": "What about the average age of them?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 8, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 45, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", - "utterance": "What is the average age of the dogs who have gone through any treatments?" - }, - "interaction_id": 1 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT * FROM Professionals WHERE role_code = 'Employee'", - "utterance_toks": [ - "List", - "all", - "the", - "professionals", - "who", - "are", - "Employees", - "." - ], - "utterance": "List all the professionals who are Employees.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 34, - false - ], - null - ], - "\"Employee\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Professionals WHERE state = 'Connecticut'", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "live", - "in", - "Connecticut", - "?" - ], - "utterance": "How many of them live in Connecticut?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - "\"Connecticut\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Professionals WHERE state = 'Indiana'", - "utterance_toks": [ - "What", - "about", - "in", - "Indiana", - "?" - ], - "utterance": "What about in Indiana?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - "\"Indiana\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT * FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) = 1", - "utterance_toks": [ - "Among", - "all", - "the", - "professionals", - ",", - "which", - "have", - "done", - "treatment", - "only", - "1", - "treatments", - "?" - ], - "utterance": "Among all the professionals, which have done treatment only 1 treatments?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 2, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "List", - "the", - "id", - ",", - "last", - "name", - "and", - "cell", - "phone", - "of", - "the", - "professionals", - "who", - "live", - "in", - "the", - "state", - "of", - "Indiana", - "or", - "have", - "done", - "treatment", - "on", - "more", - "than", - "2", - "treatments", - "?" - ], - "utterance": "List the id, last name and cell phone of the professionals who live in the state of Indiana or have done treatment on more than 2 treatments?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 40, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ] - ] - }, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - "\"Indiana\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 40, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "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." - }, - "interaction_id": 2 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT name, sum(cost_of_treatment) FROM Treatments AS T1 JOIN dogs AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id", - "utterance_toks": [ - "Show", - "the", - "dog", - "name", - "and", - "total", - "cost", - "of", - "each", - "dog", - "." - ], - "utterance": "Show the dog name and total cost of each dog.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 45, - false - ], - null - ], - [ - 0, - 20, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 45, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM Treatments AS T1 JOIN dogs AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id Having sum(cost_of_treatment) > 500", - "utterance_toks": [ - "Which", - "of", - "them", - "cost", - "over", - "500", - "?" - ], - "utterance": "Which of them cost over 500?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 45, - false - ], - null - ], - [ - 0, - 20, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 4, - 49, - false - ], - null - ], - 500.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 45, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 )", - "utterance_toks": [ - "What", - "about", - "more", - "than", - "1000", - "?" - ], - "utterance": "What about more than 1000?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 4, - 49, - false - ], - null - ], - 1000.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 45, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 45, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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 )", - "utterance": "Which dogs have not cost their owner more than 1000 for treatment? List the dog names." - }, - "interaction_id": 3 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners", - "utterance_toks": [ - "List", - "all", - "the", - "names", - "of", - "both", - "Professionals", - "and", - "Owners", - "." - ], - "utterance": "List all the names of both Professionals and Owners.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - }, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT name FROM Dogs", - "utterance_toks": [ - "What", - "about", - "the", - "dog", - "names", - "?" - ], - "utterance": "What about the dog names?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", - "utterance_toks": [ - "Which", - "human", - "names", - "are", - "not", - "used", - "as", - "dog", - "names", - "." - ], - "utterance": "Which human names are not used as dog names.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ] - ] - ] - }, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", - "utterance": "Which first names are used for professionals or owners but are not used as dog names?" - }, - "interaction_id": 4 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT T1.first_name, T2.treatment_type_code FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", - "utterance_toks": [ - "Show", - "the", - "professional", - "first", - "names", - "and", - "the", - "corresponding", - "treatment", - "type", - "codes", - "for", - "the", - "treatment", - "." - ], - "utterance": "Show the professional first names and the corresponding treatment type codes for the treatment.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 47, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.professional_id , T1.role_code , T1.email_address, T2.treatment_type_code FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", - "utterance_toks": [ - "What", - "about", - "each", - "professional", - "'s", - "id", - ",", - "role", - ",", - "email", - "and", - "the", - "treatment", - "type", - "code", - "?" - ], - "utterance": "What about each professional's id, role, email and the treatment type code?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 41, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 47, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Which", - "professional", - "did", - "not", - "provide", - "any", - "treatment", - "?", - "Keep", - "the", - "id", - ",", - "role", - "and", - "email", - "." - ], - "utterance": "Which professional did not provide any treatment? Keep the id, role and email.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 41, - false - ], - null - ] - ] - ] - ] - }, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 41, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which professional did not operate any treatment on dogs? List the professional's id, role and email." - }, - "interaction_id": 5 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT T1.owner_id ,count(*) FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id", - "utterance_toks": [ - "Show", - "the", - "number", - "of", - "dogs", - "for", - "each", - "owner", - ",", - "keep", - "the", - "owner", - "id", - "." - ], - "utterance": "Show the number of dogs for each owner, keep the owner id.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 21, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.owner_id , T2.first_name , T2.last_name, count(*) FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id Having count(*) = 2", - "utterance_toks": [ - "Which", - "one", - "has", - "2", - "dogs", - "?" - ], - "utterance": "Which one has 2 dogs?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 2, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 21, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "about", - "the", - "one", - "with", - "the", - "most", - "dogs", - "?" - ], - "utterance": "What about the one with the most dogs?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 4 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 21, - false - ], - null - ], - [ - 0, - 10, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 21, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which owner owns the most dogs? List the owner id, first name and last name." - }, - "interaction_id": 6 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT T1.professional_id , count(*) FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id", - "utterance_toks": [ - "How", - "many", - "treatment", - "does", - "each", - "professional", - "finished", - "?" - ], - "utterance": "How many treatment does each professional finished?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT 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(*) = 1", - "utterance_toks": [ - "Show", - "the", - "first", - "name", - "of", - "the", - "professionals", - "who", - "did", - "only", - "1", - "treatment", - "." - ], - "utterance": "Show the first name of the professionals who did only 1 treatment.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 2, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT 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", - "utterance_toks": [ - "What", - "about", - "at", - "least", - "two", - "treatments", - "?" - ], - "utterance": "What about at least two treatments?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Show", - "the", - "id", - ",", - "role", - ",", - "and", - "first", - "name", - "of", - "each", - "from", - "the", - "above", - "." - ], - "utterance": "Show the id, role, and first name of each from the above.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 34, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which professionals have done at least two treatments? List the professional's id, role, and first name." - }, - "interaction_id": 7 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code", - "utterance_toks": [ - "How", - "many", - "dogs", - "for", - "each", - "breed", - "code", - "?" - ], - "utterance": "How many dogs for each breed code?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 23, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code limit 2", - "utterance_toks": [ - "Which", - "breed", - "codes", - "are", - "the", - "most", - "popular", - "two", - "?" - ], - "utterance": "Which breed codes are the most popular two?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 2, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 23, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code limit 1", - "utterance_toks": [ - "What", - "about", - "the", - "most", - "common", - "1", - "?" - ], - "utterance": "What about the most common 1?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 23, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "name", - "is", - "the", - "breed", - "?" - ], - "utterance": "What name is the breed?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 0 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 1, - false - ], - null - ], - [ - 0, - 23, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 2, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 2, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the name of the breed with the most dogs?" - }, - "interaction_id": 8 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT name, sum(cost_of_treatment) FROM Treatments AS T1 JOIN dogs AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id", - "utterance_toks": [ - "Show", - "the", - "dog", - "name", - "and", - "total", - "cost", - "of", - "each", - "dog", - "." - ], - "utterance": "Show the dog name and total cost of each dog.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 45, - false - ], - null - ], - [ - 0, - 20, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 45, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.owner_id, T3.cost_of_treatment 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", - "utterance_toks": [ - "What", - "are", - "the", - "owner", - "names", - "and", - "the", - "cost", - "from", - "their", - "dogs", - "." - ], - "utterance": "What are the owner names and the cost from their dogs.", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "Who", - "has", - "paid", - "for", - "the", - "most", - "treatments", - "on", - "the", - "dogs", - "?", - "Keep", - "owner", - "IDs", - "and", - "last", - "names", - "." - ], - "utterance": "Who has paid for the most treatments on the dogs? Keep owner IDs and last names.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which owner has paid for the most treatments on his or her dogs? List the owner id and last name." - }, - "interaction_id": 9 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT * FROM Treatment_Types", - "utterance_toks": [ - "List", - "the", - "treatment", - "type", - "code", - "and", - "the", - "description", - "." - ], - "utterance": "List the treatment type code and the description.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT treatment_type_code, sum(cost_of_treatment) FROM Treatments group by treatment_type_code order by sum(cost_of_treatment) desc", - "utterance_toks": [ - "For", - "each", - "treatment", - "type", - ",", - "calculate", - "the", - "sum", - "of", - "costs", - ",", - "and", - "order", - "them", - "in", - "descending", - "order", - "." - ], - "utterance": "For each treatment type, calculate the sum of costs, and order them in descending order.", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 4, - 49, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 47, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 47, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T2.treatment_type_code, T1.treatment_type_description, sum(cost_of_treatment) 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", - "utterance_toks": [ - "Show", - "the", - "treatment", - "type", - "description", - "also", - "." - ], - "utterance": "Show the treatment type description also.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 4, - 49, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 47, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 47, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "So", - "what", - "is", - "the", - "description", - "of", - "the", - "treatment", - "type", - "that", - "costs", - "the", - "least", - "money", - "in", - "total", - "?" - ], - "utterance": "So what is the description of the treatment type that costs the least money in total?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 4, - 49, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 3 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 8, - false - ], - null - ], - [ - 0, - 47, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 8, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 9, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "What is the description of the treatment type that costs the least money in total?" - }, - "interaction_id": 10 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT name, sum(cost_of_treatment) FROM Treatments AS T1 JOIN DOGS AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id", - "utterance_toks": [ - "Show", - "the", - "dog", - "name", - "and", - "total", - "cost", - "of", - "each", - "dog", - "." - ], - "utterance": "Show the dog name and total cost of each dog.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 45, - false - ], - null - ], - [ - 0, - 20, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 45, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ], - [ - 4, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(name) FROM Treatments AS T1 JOIN DOGS AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id Having sum(cost_of_treatment) > 700", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "cost", - "over", - "700", - "?" - ], - "utterance": "How many of them cost over 700?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 45, - false - ], - null - ], - [ - 0, - 20, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 4, - 49, - false - ], - null - ], - 700.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 45, - false - ] - ], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 Having sum(T3.cost_of_treatment) > 400", - "utterance_toks": [ - "Which", - "owner", - "paid", - "the", - "cost", - "larger", - "than", - "400", - ",", - "show", - "the", - "owner", - "id", - "and", - "the", - "zip", - "code", - "?" - ], - "utterance": "Which owner paid the cost larger than 400, show the owner id and the zip code?", - "sql": { - "orderBy": [], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 3, - [ - 0, - [ - 4, - 49, - false - ], - null - ], - 400.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "about", - "the", - "owner", - "who", - "spent", - "the", - "largest", - "cost", - "?" - ], - "utterance": "What about the owner who spent the largest cost?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 4, - 49, - false - ], - null - ] - ] - ], - "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 - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 10, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 10, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 16, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code." - }, - "interaction_id": 11 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT T1.first_name, T2.treatment_type_code FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id", - "utterance_toks": [ - "List", - "the", - "professional", - "first", - "names", - "and", - "their", - "types", - "of", - "treatments", - "." - ], - "utterance": "List the professional first names and their types of treatments.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 47, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.first_name, T2.treatment_type_code, count(*) FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id", - "utterance_toks": [ - "Add", - "the", - "counts", - "of", - "them", - "also", - "." - ], - "utterance": "Add the counts of them also.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 47, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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(*) = 1", - "utterance_toks": [ - "Among", - "the", - "results", - ",", - "who", - "did", - "only", - "1", - "type", - "of", - "treatment", - "?", - "List", - "the", - "professional", - "ids", - "and", - "cell", - "phone", - "numbers", - "of", - "them", - "." - ], - "utterance": "Among the results, who did only 1 type of treatment? List the professional ids and cell phone numbers of them.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 2, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 1.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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", - "utterance_toks": [ - "What", - "about", - "at", - "least", - "two", - "types", - "of", - "treatments", - "?" - ], - "utterance": "What about at least two types of treatments?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - [ - 0, - 46, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [ - [ - false, - 5, - [ - 0, - [ - 3, - 0, - false - ], - null - ], - 2.0, - null - ] - ], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 33, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 33, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 43, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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", - "utterance": "Which professionals have done at least two types of treatments? List the professional id and cell phone." - }, - "interaction_id": 12 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT min(cost_of_treatment), max(cost_of_treatment), avg(cost_of_treatment) FROM Treatments", - "utterance_toks": [ - "What", - "is", - "the", - "minimum", - ",", - "maximum", - "and", - "average", - "value", - "of", - "the", - "treatment", - "costs", - "?" - ], - "utterance": "What is the minimum, maximum and average value of the treatment costs?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ], - [ - 1, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ], - [ - 5, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment = ( SELECT min(cost_of_treatment) FROM Treatments )", - "utterance_toks": [ - "Which", - "professionals", - "who", - "did", - "the", - "minimum", - "value", - "of", - "the", - "treatment", - "cost", - "?", - "Provide", - "the", - "first", - "name", - "and", - "last", - "name", - "." - ], - "utterance": "Which professionals who did the minimum value of the treatment cost? Provide the first name and last name.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 49, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 40, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment = ( SELECT max(cost_of_treatment) FROM Treatments )", - "utterance_toks": [ - "What", - "about", - "the", - "maximum", - "cost", - "?" - ], - "utterance": "What about the maximum cost?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 49, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 40, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 )", - "utterance_toks": [ - "How", - "about", - "below", - "the", - "average", - "of", - "the", - "cost", - "?" - ], - "utterance": "How about below the average of the cost?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 49, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - true, - [ - [ - 0, - [ - 0, - [ - 0, - 35, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 40, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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 )", - "utterance": "What are the first name and last name of the professionals who have done treatment with cost below average?" - }, - "interaction_id": 13 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code", - "utterance_toks": [ - "How", - "many", - "dogs", - "for", - "each", - "breed", - "code", - "?" - ], - "utterance": "How many dogs for each breed code?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 23, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code Order BY count(*) DESC LIMIT 1", - "utterance_toks": [ - "Which", - "one", - "is", - "the", - "most", - "popular", - "one", - "?" - ], - "utterance": "Which one is the most popular one?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 23, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code Order BY count(*) ASC LIMIT 1", - "utterance_toks": [ - "What", - "about", - "the", - "least", - "popular", - "one", - "?" - ], - "utterance": "What about the least popular one?", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 23, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ], - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 )", - "utterance_toks": [ - "So", - "which", - "dogs", - "are", - "having", - "the", - "breed", - "code", - "?", - "And", - "the", - "treatment", - "dates", - "?" - ], - "utterance": "So which dogs are having the breed code? And the treatment dates?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ], - [ - "table_unit", - 7 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - [ - 0, - 45, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 23, - false - ], - null - ], - { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 3, - 0, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [ - [ - 0, - 23, - false - ] - ], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 23, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 48, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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 )", - "utterance": "List the names of the dogs of the rarest breed and the treatment dates of them." - }, - "interaction_id": 14 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.city = 'Lake Tia'", - "utterance_toks": [ - "Show", - "the", - "name", - "of", - "dogs", - "whose", - "owners", - "are", - "from", - "the", - "city", - "'Lake", - "Tia", - "'", - "." - ], - "utterance": "Show the name of dogs whose owners are from the city 'Lake Tia'.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 21, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"Lake Tia\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.first_name, T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.city = 'Lake Tia'", - "utterance_toks": [ - "Add", - "the", - "owner", - "'s", - "first", - "names", - "also", - "." - ], - "utterance": "Add the owner's first names also.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 21, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 14, - false - ], - null - ], - "\"Lake Tia\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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'", - "utterance_toks": [ - "What", - "about", - "when", - "the", - "owner", - "is", - "from", - "the", - "state", - "of", - "'Virginia", - "'", - "?" - ], - "utterance": "What about when the owner is from the state of 'Virginia'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 21, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"Virginia\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 25, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "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'", - "utterance": "Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name." - }, - "interaction_id": 15 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT * FROM Dogs order by age asc limit 1", - "utterance_toks": [ - "Which", - "one", - "is", - "the", - "oldest", - "dog", - "?", - "List", - "the", - "information", - "of", - "it", - "." - ], - "utterance": "Which one is the oldest dog? List the information of it.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "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 )", - "utterance_toks": [ - "What", - "are", - "the", - "last", - "names", - "of", - "the", - "oldest", - "dogs", - "?" - ], - "utterance": "What are the last names of the oldest dogs?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 21, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 26, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 1, - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT min(age) FROM Dogs )", - "utterance_toks": [ - "What", - "about", - "the", - "owner", - "last", - "name", - "of", - "the", - "youngest", - "dog", - "?" - ], - "utterance": "What about the owner last name of the youngest dog?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ], - [ - "table_unit", - 5 - ] - ], - "conds": [ - [ - false, - 2, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - [ - 0, - 21, - false - ], - null - ] - ] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 26, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 2, - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT min(age) FROM Dogs )", - "utterance": "List the last name of the owner owning the youngest dog." - }, - "interaction_id": 16 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT city, state FROM professionals", - "utterance_toks": [ - "Show", - "the", - "cities", - "and", - "states", - "of", - "the", - "professionals", - "." - ], - "utterance": "Show the cities and states of the professionals.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 37, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 38, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM professionals WHERE state = 'Hawaii'", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "are", - "from", - "'Hawaii", - "'", - "?" - ], - "utterance": "How many of them are from 'Hawaii'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - "\"Hawaii\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'", - "utterance_toks": [ - "List", - "the", - "emails", - "of", - "the", - "professionals", - "who", - "live", - "in", - "the", - "state", - "of", - "Hawaii", - "or", - "the", - "state", - "of", - "Wisconsin", - "." - ], - "utterance": "List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - "\"Hawaii\"", - null - ], - "or", - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - "\"Wisconsin\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 41, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'", - "utterance": "List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin." - }, - "interaction_id": 17 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT state FROM professionals", - "utterance_toks": [ - "Show", - "the", - "states", - "of", - "the", - "professionals", - "." - ], - "utterance": "Show the states of the professionals.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 38, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM professionals WHERE state = 'Wisconsin'", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "are", - "from", - "'Wisconsin", - "'", - "?" - ], - "utterance": "How many of them are from 'Wisconsin'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - "\"Wisconsin\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT role_code , street , city , state FROM professionals WHERE state = 'Wisconsin'", - "utterance_toks": [ - "List", - "the", - "role", - "code", - ",", - "street", - ",", - "city", - ",", - "state", - "from", - "the", - "above", - "results", - "." - ], - "utterance": "List the role code , street , city , state from the above results.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 38, - false - ], - null - ], - "\"Wisconsin\"", - null - ] - ], - "groupBy": [], - "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 - ] - ] - ] - ] - } - }, - { - "query": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'", - "utterance_toks": [ - "What", - "about", - "those", - "professionals", - "who", - "live", - "in", - "a", - "city", - "containing", - "the", - "substring", - "'West", - "'", - "?" - ], - "utterance": "What about those professionals who live in a city containing the substring 'West'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 9, - [ - 0, - [ - 0, - 37, - false - ], - null - ], - "\"%West%\"", - null - ] - ], - "groupBy": [], - "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 - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'", - "utterance": "Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state." - }, - "interaction_id": 18 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT state FROM Owners", - "utterance_toks": [ - "Show", - "the", - "states", - "of", - "the", - "owners", - "." - ], - "utterance": "Show the states of the owners.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 15, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Owners WHERE state = 'Vermont'", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "are", - "from", - "'Vermont", - "'", - "?" - ], - "utterance": "How many of them are from 'Vermont'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"Vermont\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", - "utterance_toks": [ - "List", - "the", - "first", - "name", - ",", - "last", - "name", - "and", - "email", - "of", - "the", - "owners", - "who", - "lives", - "in", - "the", - "states", - "that", - "has", - "the", - "substring", - "'North", - "'", - "." - ], - "utterance": "List the first name, last name and email of the owners who lives in the states that has the substring 'North'.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 9, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"%North%\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 11, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 12, - false - ], - null - ] - ], - [ - 0, - [ - 0, - [ - 0, - 17, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", - "utterance": "Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email." - }, - "interaction_id": 19 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT age FROM Dogs ORDER BY age", - "utterance_toks": [ - "Order", - "the", - "dog", - "ages", - "in", - "descending", - "order", - "." - ], - "utterance": "Order the dog ages in descending order.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Dogs WHERE age < 4", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "are", - "below", - "4", - "?" - ], - "utterance": "How many of them are below 4?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 26, - false - ], - null - ], - 4.0, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )", - "utterance_toks": [ - "What", - "about", - "the", - "ones", - "that", - "are", - "below", - "the", - "average", - "?" - ], - "utterance": "What about the ones that are below the average?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 4, - [ - 0, - [ - 0, - 26, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 5, - [ - 0, - [ - 0, - 26, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )", - "utterance": "How many dogs have an age below the average?" - }, - "interaction_id": 20 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT * FROM Treatments", - "utterance_toks": [ - "Show", - "the", - "treatment", - "details", - "." - ], - "utterance": "Show the treatment details.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT cost_of_treatment FROM Treatments ORDER BY cost_of_treatment ASC", - "utterance_toks": [ - "Order", - "the", - "cost", - "in", - "ascending", - "order", - "." - ], - "utterance": "Order the cost in ascending order.", - "sql": { - "orderBy": [ - "asc", - [ - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT cost_of_treatment FROM Treatments ORDER BY cost_of_treatment DESC", - "utterance_toks": [ - "What", - "about", - "in", - "descending", - "order", - "?" - ], - "utterance": "What about in descending order?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", - "utterance_toks": [ - "Which", - "one", - "is", - "the", - "most", - "recent", - "cost", - "?" - ], - "utterance": "Which one is the most recent cost?", - "sql": { - "orderBy": [ - "desc", - [ - [ - 0, - [ - 0, - 48, - false - ], - null - ] - ] - ], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": 1, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 49, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", - "utterance": "How much does the most recent treatment cost?" - }, - "interaction_id": 21 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT * FROM Owners", - "utterance_toks": [ - "Show", - "all", - "the", - "owner", - "information", - "." - ], - "utterance": "Show all the owner information.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Dogs", - "utterance_toks": [ - "What", - "about", - "the", - "dogs", - "?" - ], - "utterance": "What about the dogs?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", - "utterance_toks": [ - "Among", - "those", - ",", - "how", - "many", - "of", - "them", - "have", - "been", - "sent", - "to", - "receive", - "treatment", - "?" - ], - "utterance": "Among those, how many of them have been sent to receive treatment?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 8, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 45, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )", - "utterance_toks": [ - "What", - "about", - "those", - "who", - "did", - "not", - "?" - ], - "utterance": "What about those who did not?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 20, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 45, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )", - "utterance": "How many dogs have not gone through any treatment?" - }, - "interaction_id": 22 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT * FROM Owners", - "utterance_toks": [ - "Show", - "all", - "the", - "owner", - "information", - "." - ], - "utterance": "Show all the owner information.", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Owners WHERE state = 'Arizona'", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "come", - "from", - "the", - "state", - "of", - "'Arizona", - "'", - "?" - ], - "utterance": "How many of them come from the state of 'Arizona'?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 15, - false - ], - null - ], - "\"Arizona\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )", - "utterance_toks": [ - "What", - "about", - "those", - "who", - "do", - "not", - "have", - "any", - "dogs", - "temporarily", - "?" - ], - "utterance": "What about those who do not have any dogs temporarily?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 4 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 10, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 5 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 21, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )", - "utterance": "How many owners temporarily do not have any dogs?" - }, - "interaction_id": 23 - }, - { - "database_id": "dog_kennels", - "interaction": [ - { - "query": "SELECT count(*) FROM Professionals", - "utterance_toks": [ - "How", - "many", - "professionals", - "are", - "there", - "?" - ], - "utterance": "How many professionals are there?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Professionals WHERE city = 'West Heidi'", - "utterance_toks": [ - "How", - "many", - "of", - "them", - "come", - "from", - "'West", - "Heidi", - "?", - "'" - ], - "utterance": "How many of them come from 'West Heidi?'", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - false, - 2, - [ - 0, - [ - 0, - 37, - false - ], - null - ], - "\"West Heidi\"", - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - }, - { - "query": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )", - "utterance_toks": [ - "What", - "about", - "those", - "who", - "did", - "not", - "operate", - "any", - "treatment", - "on", - "dogs", - "?" - ], - "utterance": "What about those who did not operate any treatment on dogs?", - "sql": { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 6 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [ - [ - true, - 8, - [ - 0, - [ - 0, - 33, - false - ], - null - ], - { - "orderBy": [], - "from": { - "table_units": [ - [ - "table_unit", - 7 - ] - ], - "conds": [] - }, - "union": null, - "except": null, - "having": [], - "limit": null, - "intersect": null, - "where": [], - "groupBy": [], - "select": [ - false, - [ - [ - 0, - [ - 0, - [ - 0, - 46, - false - ], - null - ] - ] - ] - ] - }, - null - ] - ], - "groupBy": [], - "select": [ - false, - [ - [ - 3, - [ - 0, - [ - 0, - 0, - false - ], - null - ] - ] - ] - ] - } - } - ], - "final": { - "query": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )", - "utterance": "How many professionals did not operate any treatment on dogs?" - }, - "interaction_id": 24 + "db_id": "flight_2", + "final_query": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", + "final_utterance": "What country is Jetblue Airways affiliated with?", + "interaction_utterance": [ + "What are all the airlines?", + "Of these, which is Jetblue Airways?", + "What is the country corresponding it?" + ], + "interaction_query": [ + "SELECT * FROM AIRLINES", + "SELECT * FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", + "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", + "final_utterance": "Which abbreviation corresponds to Jetblue Airways?", + "interaction_utterance": [ + "What are all the abbreviations?", + "What is the abbreviation for Jetblue Airways?" + ], + "interaction_query": [ + "SELECT Abbreviation FROM AIRLINES", + "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"", + "final_utterance": "What are the airline names and abbreviations for airlines in the USA?", + "interaction_utterance": [ + "List all airline names and their abbreviations.", + "Of these, list only those in the USA." + ], + "interaction_query": [ + "SELECT Airline , Abbreviation FROM AIRLINES", + "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"", + "final_utterance": "Give the airport code and airport name corresonding to the city Anthony.", + "interaction_utterance": [ + "Find all information about the airport in the city Anthony.", + "What is the airport code and airport name?" + ], + "interaction_query": [ + "SELECT * FROM AIRPORTS WHERE city = \"Anthony\"", + "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM AIRLINES", + "final_utterance": "What is the total number of airlines?", + "interaction_utterance": [ + "What are all the airlines?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM AIRLINES", + "SELECT count(*) FROM AIRLINES" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM AIRPORTS", + "final_utterance": "Return the number of airports.", + "interaction_utterance": [ + "What are all the airports?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM AIRPORTS", + "SELECT count(*) FROM AIRPORTS" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM FLIGHTS", + "final_utterance": "Return the number of flights.", + "interaction_utterance": [ + "What are all the flights?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM FLIGHTS", + "SELECT count(*) FROM FLIGHTS" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"", + "final_utterance": "Give the airline with abbreviation 'UAL'.", + "interaction_utterance": [ + "What are all the airline names?", + "Of this, which has the abbreviation 'UAL'?" + ], + "interaction_query": [ + "SELECT Airline FROM AIRLINES", + "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"", + "final_utterance": "Return the number of airlines in the USA.", + "interaction_utterance": [ + "What are the names of the airlines in the USA?", + "How many are there?" + ], + "interaction_query": [ + "SELECT airline FROM AIRLINES WHERE Country = \"USA\"", + "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", + "final_utterance": "Give the city and country for the Alton airport.", + "interaction_utterance": [ + "What are the city and country for all airports?", + "Of these, what are the city and country for Alton airport?" + ], + "interaction_query": [ + "SELECT City , Country FROM AIRPORTS", + "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", + "final_utterance": "Return the name of the airport with code 'AKO'.", + "interaction_utterance": [ + "What are all the airport names?", + "Of these, which has code 'AKO'?" + ], + "interaction_query": [ + "SELECT AirportName FROM AIRPORTS", + "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"", + "final_utterance": "What are the names of airports in Aberdeen?", + "interaction_utterance": [ + "What are all the airport names?", + "Which is in Aberdeen?" + ], + "interaction_query": [ + "SELECT AirportName FROM AIRPORTS", + "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", + "final_utterance": "Count the number of flights departing from 'APG'.", + "interaction_utterance": [ + "What are all the flights departing from 'APG'?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM FLIGHTS WHERE SourceAirport = \"APG\"", + "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", + "final_utterance": "Count the number of flights into ATO.", + "interaction_utterance": [ + "What flights land in ATO?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM FLIGHTS WHERE DestAirport = \"ATO\"", + "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", + "final_utterance": "Return the number of flights departing from Aberdeen.", + "interaction_utterance": [ + "What are all the flights derparting from Aberdeen?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", + "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", + "final_utterance": "Return the number of flights arriving in Aberdeen.", + "interaction_utterance": [ + "What are all the flights arriving in Aberdeen.", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", + "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" + ] + }, + { + "db_id": "flight_2", + "final_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\"", + "final_utterance": "How many flights fly from Aberdeen to Ashley?", + "interaction_utterance": [ + "What are all the flights that leave from Aberdeen?", + "Of those, which land in Ashley?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", + "SELECT * 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\"", + "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\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", + "final_utterance": "Give the number of Jetblue Airways flights.", + "interaction_utterance": [ + "What are all the flights on Jetblue Airways?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", + "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"" + ] + }, + { + "db_id": "flight_2", + "final_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\"", + "final_utterance": "Count the number of United Airlines flights arriving in ASY Airport.", + "interaction_utterance": [ + "What are the United Airlines flights?", + "How many are there?", + "How many land in ASY Airport?" + ], + "interaction_query": [ + "SELECT * FROM AIRLINES WHERE Airline = \"United Airlines\"", + "SELECT count(*) FROM AIRLINES WHERE Airline = \"United Airlines\"", + "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"" + ] + }, + { + "db_id": "flight_2", + "final_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\"", + "final_utterance": "Return the number of United Airlines flights leaving from AHD Airport.", + "interaction_utterance": [ + "What are the United Airlines flights?", + "Which ones leave from AHD?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM AIRLINES WHERE Airline = \"United Airlines\"", + "SELECT * FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", + "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"" + ] + }, + { + "db_id": "flight_2", + "final_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\"", + "final_utterance": "Count the number of United Airlines flights that arrive in Aberdeen.", + "interaction_utterance": [ + "Which United Airlines flights fly into Aberdeen?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * 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\"", + "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\"" + ] + }, + { + "db_id": "flight_2", + "final_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", + "final_utterance": "Which city has the most frequent destination airport?", + "interaction_utterance": [ + "Name all cities that have destination airports.", + "Order them by number of arriving flights.", + "Which one has the most?" + ], + "interaction_query": [ + "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport", + "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC", + "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" + ] + }, + { + "db_id": "flight_2", + "final_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", + "final_utterance": "Which city is the most frequent source airport?", + "interaction_utterance": [ + "Name all cities that have source airports.", + "Order them by number of departing flights.", + "Which one has the most?" + ], + "interaction_query": [ + "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport", + "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC", + "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" + ] + }, + { + "db_id": "flight_2", + "final_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", + "final_utterance": "What is the airport code of the airport with the most flights?", + "interaction_utterance": [ + "What are airport codes of any airport with a arriving flight?", + "Also include codes of airports with departure flights.", + "Which one has the highest number of flights?" + ], + "interaction_query": [ + "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport", + "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport", + "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" + ] + }, + { + "db_id": "flight_2", + "final_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", + "final_utterance": "Give the code of the airport with the least flights.", + "interaction_utterance": [ + "What are airport codes of any airport with a arriving flight?", + "Also include codes of airports with departure flights.", + "Which one has the least number of flights?" + ], + "interaction_query": [ + "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport", + "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport", + "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" + ] + }, + { + "db_id": "flight_2", + "final_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", + "final_utterance": "What airline serves the most flights?", + "interaction_utterance": [ + "Count the number of flights by airline.", + "Which airline has the most?" + ], + "interaction_query": [ + "SELECT count(*) , T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline", + "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" + ] + }, + { + "db_id": "flight_2", + "final_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", + "final_utterance": "What is the abbreviation of the airilne has the fewest flights and what country is it in?", + "interaction_utterance": [ + "What are all the airline abbreviations and what countries are they in?", + "Order them by the number of flights that they have.", + "Which one has the fewest?" + ], + "interaction_query": [ + "SELECT Abbreviation , Country FROM AIRLINES", + "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(*)", + "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" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", + "final_utterance": "Which airlines have a flight with source airport AHD?", + "interaction_utterance": [ + "Which flights leave from AHD?", + "What are their airlines?" + ], + "interaction_query": [ + "SELECT * FROM FLIGHTS WHERE SourceAirport = \"AHD\"", + "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", + "final_utterance": "Which airlines have a flight with destination airport AHD?", + "interaction_utterance": [ + "Which flights arrive in AHD?", + "What are their airlines?" + ], + "interaction_query": [ + "SELECT * FROM FLIGHTS WHERE DestAirport = \"AHD\"", + "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"" + ] + }, + { + "db_id": "flight_2", + "final_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\"", + "final_utterance": "Which airlines have departing flights from both APG and CVO airports?", + "interaction_utterance": [ + "Which airlines have flights departing from APG?", + "Of those, which also have flights from CVO?" + ], + "interaction_query": [ + "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", + "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\"" + ] + }, + { + "db_id": "flight_2", + "final_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\"", + "final_utterance": "Which airlines have departures from CVO but not from APG airports?", + "interaction_utterance": [ + "Which airlines have flights from CVO?", + "Of these, which do not have flights from APG?" + ], + "interaction_query": [ + "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", + "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\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", + "final_utterance": "Which airlines have at least 10 flights?", + "interaction_utterance": [ + "What are all the airlines?", + "Which ones have more than 10 flights?" + ], + "interaction_query": [ + "SELECT DISTINCT Airline FROM AIRLINES", + "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", + "final_utterance": "Which airlines have less than 200 flights?", + "interaction_utterance": [ + "What are all the airlines?", + "Which ones have less than 200 flights?" + ], + "interaction_query": [ + "SELECT DISTINCT Airline FROM AIRLINES", + "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", + "final_utterance": "Which flight numbers correspond to United Airlines flights?", + "interaction_utterance": [ + "What are all the flight numbers?", + "Which belong to United Airlines?" + ], + "interaction_query": [ + "SELECT FlightNo FROM FLIGHTS", + "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", + "final_utterance": "Give the flight numbers of flights leaving from APG.", + "interaction_utterance": [ + "What are all the flight numbers?", + "Of these, which correspond to flights leaving from APG?" + ], + "interaction_query": [ + "SELECT FlightNo FROM FLIGHTS", + "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", + "final_utterance": "Give the flight numbers of flights landing at APG.", + "interaction_utterance": [ + "What are all the flight numbers?", + "Also, which numbers are for flights that land in APG?" + ], + "interaction_query": [ + "SELECT FlightNo FROM FLIGHTS", + "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", + "final_utterance": "Give the flight numbers of flights leaving from Aberdeen.", + "interaction_utterance": [ + "What are all the flight numbers?", + "Of these, which are departure flights?", + "Which leave from Aberdeen?" + ], + "interaction_query": [ + "SELECT FlightNo FROM FLIGHTS", + "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode", + "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", + "final_utterance": "Give the flight numbers of flights arriving in Aberdeen.", + "interaction_utterance": [ + "What are all the flight numbers?", + "Of these, which are arrival flights?", + "Which land in Aberdeen?" + ], + "interaction_query": [ + "SELECT FlightNo FROM FLIGHTS", + "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode", + "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", + "final_utterance": "How many flights land in Aberdeen or Abilene?", + "interaction_utterance": [ + "What flights land in Aberdeen?", + "Also include flights that land in Abilene.", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\"", + "SELECT * FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", + "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"" + ] + }, + { + "db_id": "flight_2", + "final_query": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", + "final_utterance": "Which airports do not have departing or arriving flights?", + "interaction_utterance": [ + "What are the source airports?", + "Also include the destination airports.", + "Which airports are not included?" + ], + "interaction_query": [ + "SELECT SourceAirport FROM Flights", + "SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights", + "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT count(*) FROM pets WHERE weight > 10", + "final_utterance": "How many pets have a greater weight than 10?", + "interaction_utterance": [ + "What information is there on pets?", + "Which pets weigh more than 10?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM pets", + "SELECT * FROM pets WHERE weight > 10", + "SELECT count(*) FROM pets WHERE weight > 10" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1", + "final_utterance": "How much does the youngest dog weigh?", + "interaction_utterance": [ + "Order the pets by age", + "How much does each one weigh?", + "What about the first one?" + ], + "interaction_query": [ + "SELECT * FROM pets ORDER BY pet_age", + "SELECT weight FROM pets ORDER BY pet_age", + "SELECT weight FROM pets ORDER BY pet_age LIMIT 1" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT max(weight) , petType FROM pets GROUP BY petType", + "final_utterance": "List the maximum weight and type for each type of pet.", + "interaction_utterance": [ + "What are the different types of pets?", + "For each of those types, what is the maximum weight?" + ], + "interaction_query": [ + "SELECT DISTINCT petType FROM pets", + "SELECT max(weight) , petType FROM pets GROUP BY petType" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", + "final_utterance": "How many pets are owned by students that have an age greater than 20?", + "interaction_utterance": [ + "Which pets are owned by students older than 20?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", + "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20" + ] + }, + { + "db_id": "pets_1", + "final_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'", + "final_utterance": "How many dog pets are raised by female students?", + "interaction_utterance": [ + "Who are the female students?", + "Of those, who has a pet?", + "How many of those have dogs?" + ], + "interaction_query": [ + "SELECT * FROM student WHERE sex = 'F'", + "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.sex = 'F'", + "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'" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT count(DISTINCT pettype) FROM pets", + "final_utterance": "How many different types of pet are there?", + "interaction_utterance": [ + "What are the different pet types?", + "How many exist?" + ], + "interaction_query": [ + "SELECT DISTINCT pettype FROM pets", + "SELECT count(DISTINCT pettype) FROM pets" + ] + }, + { + "db_id": "pets_1", + "final_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'", + "final_utterance": "What are the first names of every student who has a cat or dog as a pet?", + "interaction_utterance": [ + "what is the first name of every student?", + "Of those names, which ones correspond to somebody who has a cat?", + "Also, combine those names with those who have a dog." + ], + "interaction_query": [ + "SELECT DISTINCT T1.Fname FROM student AS T1", + "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'", + "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'" + ] + }, + { + "db_id": "pets_1", + "final_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'", + "final_utterance": "What are the students' first names who have both cats and dogs as pets?", + "interaction_utterance": [ + "Which students have a dog as their type of pet?", + "Who also has a cat?", + "What are their first names?" + ], + "interaction_query": [ + "SELECT * 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'", + "SELECT * 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 * 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'", + "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'" + ] + }, + { + "db_id": "pets_1", + "final_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')", + "final_utterance": "What major is every student who does not own a cat as a pet, and also how old are they?", + "interaction_utterance": [ + "Which students have a cat as their pets?", + "What are they majoring in?", + "Also, how old are they?" + ], + "interaction_query": [ + "SELECT * 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')", + "SELECT major 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')", + "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')" + ] + }, + { + "db_id": "pets_1", + "final_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'", + "final_utterance": "What are the ids of the students who do not own cats as pets?", + "interaction_utterance": [ + "What is every student's id?", + "Of those ids, which correspond to those who own cats as pets?", + "List all the other ids." + ], + "interaction_query": [ + "SELECT stuid FROM student", + "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'", + "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'" + ] + }, + { + "db_id": "pets_1", + "final_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')", + "final_utterance": "What is the first name of every student who has a dog but does not have a cat?", + "interaction_utterance": [ + "Which students have dogs?", + "Of those, who does not own a cat?", + "What are their first names and ages?" + ], + "interaction_query": [ + "SELECT * 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'", + "SELECT * 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' EXCEPT SELECT * 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'", + "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' EXCEPT 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 = 'cat'" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", + "final_utterance": "What type of pet is the youngest animal, and how much does it weigh?", + "interaction_utterance": [ + "Who is the youngest pet?", + "What type are they?", + "Also, how much do they weigh?" + ], + "interaction_query": [ + "SELECT * FROM pets ORDER BY pet_age LIMIT 1", + "SELECT pettype FROM pets ORDER BY pet_age LIMIT 1", + "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT petid , weight FROM pets WHERE pet_age > 1", + "final_utterance": "What is the id and weight of every pet who is older than 1?", + "interaction_utterance": [ + "What are ids of every pet?", + "For those, which refer to pets older than 1?", + "Also, how much do they weigh?" + ], + "interaction_query": [ + "SELECT petid FROM pets", + "SELECT petid FROM pets WHERE pet_age > 1", + "SELECT petid , weight FROM pets WHERE pet_age > 1" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype", + "final_utterance": "What is the average and maximum age for each pet type?", + "interaction_utterance": [ + "What are the different pet types?", + "For each of those, what is the maximum age?", + "What about the average age?" + ], + "interaction_query": [ + "SELECT DISTINCT pettype FROM pets", + "SELECT max(pet_age) , pettype FROM pets GROUP BY pettype", + "SELECT avg(pet_age) , pettype FROM pets GROUP BY pettype" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype", + "final_utterance": "What is the average weight for each type of pet?", + "interaction_utterance": [ + "What information is there on pets?", + "For each pet type, what is the average weight?" + ], + "interaction_query": [ + "SELECT * FROM pets", + "SELECT avg(weight) , pettype FROM pets GROUP BY pettype" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", + "final_utterance": "What are the different first names and ages of the students who do have pets?", + "interaction_utterance": [ + "Which students have pets?", + "What are the different first names?", + "Also, what are their ages?" + ], + "interaction_query": [ + "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", + "SELECT DISTINCT T1.fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", + "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", + "final_utterance": "What is the id of the pet owned by the student whose last name is 'Smith'?", + "interaction_utterance": [ + "Which students have pets?", + "Of those, whose last name is smith?", + "What is their pet's id?" + ], + "interaction_query": [ + "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", + "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", + "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", + "final_utterance": "For students who have pets, how many pets does each student have?", + "interaction_utterance": [ + "Which of the students have pets?", + "How many pets does each of them have?" + ], + "interaction_query": [ + "SELECT * FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", + "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid" + ] + }, + { + "db_id": "pets_1", + "final_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", + "final_utterance": "What is the first name and gender of the all the students who have more than one pet?", + "interaction_utterance": [ + "What is the first name and sex of each student?", + "Which of those belong to somebody who has more than one pet?" + ], + "interaction_query": [ + "SELECT T1.fname , T1.sex FROM student AS T1", + "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" + ] + }, + { + "db_id": "pets_1", + "final_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'", + "final_utterance": "What is the last name of the student who has a cat that is 3 years old?", + "interaction_utterance": [ + "What is the id of the three-year old cat?", + "Who is the owner of that cat?", + "What is their last name?" + ], + "interaction_query": [ + "SELECT petid FROM pets WHERE pet_age = 3 AND pettype = 'cat'", + "SELECT * 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'", + "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'" + ] + }, + { + "db_id": "pets_1", + "final_query": "SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid)", + "final_utterance": "What is the average age for all students who do not own any pets?", + "interaction_utterance": [ + "Which students do not own any pets?", + "What is their average age?" + ], + "interaction_query": [ + "SELECT * FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid)", + "SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid)" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name FROM country WHERE IndepYear > 1950", + "final_utterance": "Give the names of the nations that were founded after 1950.", + "interaction_utterance": [ + "What are the names of all the countries?", + "Give the names of the ones that became independent after 1950." + ], + "interaction_query": [ + "SELECT Name FROM country", + "SELECT Name FROM country WHERE IndepYear > 1950" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", + "final_utterance": "How many countries have governments that are republics?", + "interaction_utterance": [ + "How many countries are there?", + "Out of those, how many have a republic as their form of government?" + ], + "interaction_query": [ + "SELECT count(*) FROM country", + "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", + "final_utterance": "How much surface area do the countires in the Carribean cover together?", + "interaction_utterance": [ + "What are the countries in the Carribean region?", + "What is the surface area of each of those countries?", + "Find the total surface area of the above." + ], + "interaction_query": [ + "SELECT * FROM country WHERE Region = \"Caribbean\"", + "SELECT SurfaceArea FROM country WHERE Region = \"Caribbean\"", + "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", + "final_utterance": "What is the continent name which Anguilla belongs to?", + "interaction_utterance": [ + "What continent does each country belong to?", + "Which one does Anguila belong to?" + ], + "interaction_query": [ + "SELECT Continent FROM country", + "SELECT Continent FROM country WHERE Name = \"Anguilla\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", + "final_utterance": "What region is Kabul in?", + "interaction_utterance": [ + "What are the names of all the regions?", + "Which of those is the city Kabul located in?" + ], + "interaction_query": [ + "SELECT Region FROM country", + "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"" + ] + }, + { + "db_id": "world_1", + "final_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", + "final_utterance": "What language is predominantly spoken in Aruba?", + "interaction_utterance": [ + "What are all the languages?", + "What are the languages spoken in Aruba?", + "Which one is the most popular?" + ], + "interaction_query": [ + "SELECT LANGUAGE FROM countrylanguage", + "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", + "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" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", + "final_utterance": "Give me Brazil\u2019s population and life expectancies.", + "interaction_utterance": [ + "What are the population and life expectancies for all countries?", + "Of those, which ones are for the country Brazil?" + ], + "interaction_query": [ + "SELECT Population , LifeExpectancy FROM country", + "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", + "final_utterance": "What region does Angola belong to and what is its population?", + "interaction_utterance": [ + "Which region is Angola in?", + "For that country, what is its population?" + ], + "interaction_query": [ + "SELECT Region FROM country WHERE Name = \"Angola\"", + "SELECT Population FROM country WHERE Name = \"Angola\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", + "final_utterance": "How long is the people\u2019s average life expectancy in Central Africa?", + "interaction_utterance": [ + "What are the life expectancies for all the countries?", + "What are the life expectancies for the countries in the region of Central Africa?", + "What is the average of those?" + ], + "interaction_query": [ + "SELECT LifeExpectancy FROM country", + "SELECT LifeExpectancy FROM country WHERE Region = \"Central Africa\"", + "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", + "final_utterance": "Give the name of the country in Asia with the lowest life expectancy.", + "interaction_utterance": [ + "What are the names of the countries in Asia?", + "Which one has the shortest life expectancy?" + ], + "interaction_query": [ + "SELECT Name FROM country WHERE Continent = \"Asia\"", + "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", + "final_utterance": "How many people live in Asia, and what is the largest GNP among them?", + "interaction_utterance": [ + "How many people live in Asia?", + "What about the largest GNP among them?" + ], + "interaction_query": [ + "SELECT sum(Population) FROM country WHERE Continent = \"Asia\"", + "SELECT max(GNP) FROM country WHERE Continent = \"Asia\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", + "final_utterance": "Give the average life expectancy for countries in Africa which are republics?", + "interaction_utterance": [ + "Which countries are in Africa?", + "Which countries are also republics?", + "What is the average of their life expectancies?" + ], + "interaction_query": [ + "SELECT * FROM country WHERE Continent = \"Africa\"", + "SELECT * FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", + "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", + "final_utterance": "Give the total surface area covered by countries in Asia or Europe.", + "interaction_utterance": [ + "What are the countries in the continents of Asia or Europe?", + "What is the surface area of each country?", + "What is the total surface area summed up?" + ], + "interaction_query": [ + "SELECT * FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", + "SELECT SurfaceArea FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", + "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", + "final_utterance": "What is the total population of Gelderland district?", + "interaction_utterance": [ + "What are the populations of each city in the district of Gelderland?", + "What is the total population in that district?" + ], + "interaction_query": [ + "SELECT Population FROM city WHERE District = \"Gelderland\"", + "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", + "final_utterance": "Give the mean GNP and total population of nations which are considered US territory.", + "interaction_utterance": [ + "What are all the nations?", + "Which of those have a government that is a US territory?", + "For those, what is the average GNP and total population?" + ], + "interaction_query": [ + "SELECT * FROM country", + "SELECT * FROM country WHERE GovernmentForm = \"US Territory\"", + "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", + "final_utterance": "What is the number of distinct languages used around the world?", + "interaction_utterance": [ + "What are all the distinct languages used around the world?", + "How many are there?" + ], + "interaction_query": [ + "SELECT DISTINCT LANGUAGE FROM countrylanguage", + "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", + "final_utterance": "How many different forms of governments are there in Africa?", + "interaction_utterance": [ + "What are the distinct forms of government in the continent of Africa?", + "How many are there?" + ], + "interaction_query": [ + "SELECT DISTINCT GovernmentForm FROM country WHERE Continent = \"Africa\"", + "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", + "final_utterance": "How many languages are spoken in Aruba?", + "interaction_utterance": [ + "What is the information about the country Aruba?", + "What are the languages used in Aruba?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM country WHERE Name = \"Aruba\"", + "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", + "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", + "final_utterance": "How many official languages are spoken in Afghanistan?", + "interaction_utterance": [ + "What are the languages used in Afghanistan?", + "Of those, how many are the official languages?" + ], + "interaction_query": [ + "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\"", + "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"" + ] + }, + { + "db_id": "world_1", + "final_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", + "final_utterance": "Give the name of the nation that uses the greatest amount of languages.", + "interaction_utterance": [ + "How many languages are spoken in each country?", + "Which country speaks the most?" + ], + "interaction_query": [ + "SELECT count(*) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name", + "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" + ] + }, + { + "db_id": "world_1", + "final_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", + "final_utterance": "Which continent speaks the most languages?", + "interaction_utterance": [ + "How many languages are spoken on each continent?", + "Which one speaks the most languages?" + ], + "interaction_query": [ + "SELECT COUNT(*) , T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent", + "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" + ] + }, + { + "db_id": "world_1", + "final_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\")", + "final_utterance": "What is the number of nations that use English and Dutch?", + "interaction_utterance": [ + "What are the countries that speak English?", + "Which of those also speak Dutch?", + "How many of them are there?" + ], + "interaction_query": [ + "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", + "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\"", + "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\")" + ] + }, + { + "db_id": "world_1", + "final_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\"", + "final_utterance": "Give the names of nations that speak both English and French.", + "interaction_utterance": [ + "What are the names of countries which speak English?", + "Of those countries, what are the names of the nations that speak French as well?" + ], + "interaction_query": [ + "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", + "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\"" + ] + }, + { + "db_id": "world_1", + "final_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\"", + "final_utterance": "Give the names of countries with English and French as official languages.", + "interaction_utterance": [ + "What are the official languages of each country?", + "Of those countries, give the names of the ones that have English as one of the official languages.", + "Of those, which also have French as another official language?" + ], + "interaction_query": [ + "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = \"T\"", + "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\"", + "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\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", + "final_utterance": "How many continents speak Chinese?", + "interaction_utterance": [ + "In which countries is Chinese spoken?", + "Which distinct continents are they in?", + "How many of them are there?" + ], + "interaction_query": [ + "SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", + "SELECT DISTINCT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", + "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"" + ] + }, + { + "db_id": "world_1", + "final_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\"", + "final_utterance": "Which regions speak Dutch or English?", + "interaction_utterance": [ + "What are all the different regions?", + "Which of those speak Dutch or English?" + ], + "interaction_query": [ + "SELECT DISTINCT Region FROM country", + "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\"" + ] + }, + { + "db_id": "world_1", + "final_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\"", + "final_utterance": "Which countries have either English or Dutch as an official language?", + "interaction_utterance": [ + "What are the official languages for each country?", + "Which of these countries have English or Dutch?" + ], + "interaction_query": [ + "SELECT T2.Language , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IsOfficial = \"T\"", + "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\"" + ] + }, + { + "db_id": "world_1", + "final_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", + "final_utterance": "What is the language that is used by the largest number of Asian nations?", + "interaction_utterance": [ + "What are all the different languages used in the continent of Asia?", + "Which one is used by the largest number of Asian countries?" + ], + "interaction_query": [ + "SELECT DISTINCT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\"", + "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" + ] + }, + { + "db_id": "world_1", + "final_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", + "final_utterance": "What languages are only used by a single country with a republic government?", + "interaction_utterance": [ + "Which countries have republics as their form of government?", + "Which language is spoken by only one of those countries?" + ], + "interaction_query": [ + "SELECT * FROM country WHERE GovernmentForm = \"Republic\"", + "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" + ] + }, + { + "db_id": "world_1", + "final_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", + "final_utterance": "What is the most populace city that speaks English?", + "interaction_utterance": [ + "What are the names of all the cities that use English?", + "Which of those has the largest population?" + ], + "interaction_query": [ + "SELECT T1.Name FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\"", + "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" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", + "final_utterance": "What are the name, population, and life expectancy of the largest Asian country by land?", + "interaction_utterance": [ + "What are the names, population, and life expectancy for all the countries in Asia?", + "Of those, which belong to the country with the largest surface area?" + ], + "interaction_query": [ + "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\"", + "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1" + ] + }, + { + "db_id": "world_1", + "final_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\")", + "final_utterance": "Give the mean life expectancy of countries in which English is not the official language.", + "interaction_utterance": [ + "What are the official languages of each country?", + "Which countries do not have English as the official language?", + "In those countries, what is the average life expectancy?" + ], + "interaction_query": [ + "SELECT T2.Language , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = \"T\"", + "SELECT * 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\")", + "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\")" + ] + }, + { + "db_id": "world_1", + "final_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\")", + "final_utterance": "How many people live in countries that do not speak English?", + "interaction_utterance": [ + "What are the names of each country that does not speak English?", + "How many people live in those countries?" + ], + "interaction_query": [ + "SELECT Name 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\")", + "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\")" + ] + }, + { + "db_id": "world_1", + "final_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\"", + "final_utterance": "What is the official language used in the country the name of whose head of state is Beatrix.", + "interaction_utterance": [ + "Which country has a head of state named Beatrix?", + "What languages are spoken in that country?", + "Which of those languages is the official one?" + ], + "interaction_query": [ + "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\"", + "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\"", + "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"" + ] + }, + { + "db_id": "world_1", + "final_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\"", + "final_utterance": "For the countries founded before 1930, what is the total number of distinct official languages?", + "interaction_utterance": [ + "What are the names of all the countries?", + "What are the names of those countries that were founded after 1930?", + "For those countries, how many unique official languages are spoken in total?" + ], + "interaction_query": [ + "SELECT T1.Name FROM country AS t1", + "SELECT T1.Name FROM country AS t1 WHERE IndepYear < 1930", + "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\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", + "final_utterance": "Which countries have greater area than that of any country in Europe?", + "interaction_utterance": [ + "What are all the information about European countries?", + "Of those countries, What is the minimum surface area?", + "What are the countries that have a greater surface area than that?" + ], + "interaction_query": [ + "SELECT * FROM country WHERE Continent = \"Europe\"", + "SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\"", + "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT max(population) FROM country WHERE Continent = \"Asia\")", + "final_utterance": "Which African countries have a smaller population than that of any country in Asia?", + "interaction_utterance": [ + "What is the maximum population of a country in Asia?", + "Which countries in Africa have a population smaller than that?" + ], + "interaction_query": [ + "SELECT min(population) FROM country WHERE Continent = \"Asia\"", + "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT max(population) FROM country WHERE Continent = \"Asia\")" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT min(population) FROM country WHERE Continent = \"Africa\")", + "final_utterance": "What are the Asian countries which have a population larger than that of any country in Africa?", + "interaction_utterance": [ + "What is the smallest population of a country in Africa?", + "Which Asian countries have a greater population than that?" + ], + "interaction_query": [ + "SELECT min(population) FROM country WHERE Continent = \"Africa\"", + "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT min(population) FROM country WHERE Continent = \"Africa\")" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", + "final_utterance": "Return the country codes for countries that do not speak English.", + "interaction_utterance": [ + "What are the country codes of all the countries?", + "Of those countries, give the country codes for those which do not speak English." + ], + "interaction_query": [ + "SELECT CountryCode FROM countrylanguage", + "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE ! = \"English\"", + "final_utterance": "Give the country codes for countries in which people speak langauges that are not English.", + "interaction_utterance": [ + "What are the country codes of all the countries?", + "Of those, which do not speak English?" + ], + "interaction_query": [ + "SELECT DISTINCT CountryCode FROM countrylanguage", + "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE ! = \"English\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Code FROM country WHERE GovernmentForm ! = \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", + "final_utterance": "Return the codes of countries that do not speak English and do not have Republics for governments.", + "interaction_utterance": [ + "What are the country codes for countries which are not republics?", + "Of those, which do not speak English?" + ], + "interaction_query": [ + "SELECT Code FROM country WHERE GovernmentForm ! = \"Republic\"", + "SELECT Code FROM country WHERE GovernmentForm ! = \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"" + ] + }, + { + "db_id": "world_1", + "final_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')", + "final_utterance": "What are the names of cities in Europe for which English is not the official language?", + "interaction_utterance": [ + "What are the names of the countries where English is the official language?", + "What are the names of the countries in Europe that are not one of those?", + "What are the names of the cities in those countries?" + ], + "interaction_query": [ + "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'English'", + "SELECT Name FROM country WHERE Continent = 'Europe' AND Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'English')", + "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')" + ] + }, + { + "db_id": "world_1", + "final_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\"", + "final_utterance": "Return the different names of cities that are in Asia and for which Chinese is the official language.", + "interaction_utterance": [ + "What are the countries in Asia where Chinese is spoken?", + "Of those, which have Chinese as the official language?", + "What are the different cities in those countries?" + ], + "interaction_query": [ + "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", + "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", + "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\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1", + "final_utterance": "Give the name, year of independence, and surface area of the country that has the lowest population.", + "interaction_utterance": [ + "Which country has the smallest population?", + "What is its name, independence year, and surface area?" + ], + "interaction_query": [ + "SELECT * FROM country ORDER BY Population LIMIT 1", + "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", + "final_utterance": "Give the name, population, and head of state for the country that has the largest area.", + "interaction_utterance": [ + "What is the country with the largest surface area?", + "What is its population, name and leader?" + ], + "interaction_query": [ + "SELECT * FROM country ORDER BY SurfaceArea DESC LIMIT 1", + "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1" + ] + }, + { + "db_id": "world_1", + "final_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", + "final_utterance": "What are the names of countries that speak more than 2 languages, as well as how many languages they speak?", + "interaction_utterance": [ + "What are the names of the countries?", + "Which of them speak at least three languages?", + "Also, how many languages are spoken in each of those countries?" + ], + "interaction_query": [ + "SELECT Name FROM country", + "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2", + "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" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", + "final_utterance": "How many cities in each district have a population that is above the average population across all cities?", + "interaction_utterance": [ + "What is the average city population for each city?", + "For each district, count how many cities have a population greater than the average." + ], + "interaction_query": [ + "SELECT avg(Population) FROM city", + "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", + "final_utterance": "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?", + "interaction_utterance": [ + "The countries with which government form have an average life expectancy greater than age 72?", + "For those, list the total population and government form name." + ], + "interaction_query": [ + "SELECT * FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", + "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", + "final_utterance": "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?", + "interaction_utterance": [ + "Which continents have an average life expectancy less than age 72?", + "Give their average life expectancy and total population." + ], + "interaction_query": [ + "SELECT Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", + "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", + "final_utterance": "Return the names and surface areas of the 5 largest countries.", + "interaction_utterance": [ + "What are the countries with the top 5 largest surface areas?", + "What are the surface areas and names of those countries?" + ], + "interaction_query": [ + "SELECT * FROM country ORDER BY SurfaceArea DESC LIMIT 5", + "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", + "final_utterance": "Return the names of the 3 most populated countries.", + "interaction_utterance": [ + "Order the countries by descending population size.", + "Give the names of the 3 countries which have the most." + ], + "interaction_query": [ + "SELECT * FROM country ORDER BY Population DESC", + "SELECT Name FROM country ORDER BY Population DESC LIMIT 3" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", + "final_utterance": "Return the names of the 3 countries with the fewest people.", + "interaction_utterance": [ + "Order the countries by increasing population.", + "Give the names of the 3 countries with the lowest." + ], + "interaction_query": [ + "SELECT * FROM country ORDER BY Population", + "SELECT Name FROM country ORDER BY Population DESC LIMIT 3" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT count(*) FROM country WHERE continent = \"Asia\"", + "final_utterance": "Count the number of countries in Asia.", + "interaction_utterance": [ + "What are the countries in the continent of Asia?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM country WHERE continent = \"Asia\"", + "SELECT count(*) FROM country WHERE continent = \"Asia\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT Name FROM country WHERE WHERE continent = \"Europe\" AND Population = \"80000\"", + "final_utterance": "Give the names of countries that are in Europe and have a population equal to 80000.", + "interaction_utterance": [ + "Which countries are in the continent of Europe?", + "Of those, what are the names of those that have a population of 80000?" + ], + "interaction_query": [ + "SELECT * FROM country WHERE continent = \"Europe\"", + "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT sum(Population) , avg(SurfaceArea) FROM country WHERE Continent = \"North America\" AND SurfaceArea > 3000", + "final_utterance": "Give the total population and average surface area corresponding to countries in Noth America that have a surface area greater than 3000.", + "interaction_utterance": [ + "What countries are in North America?", + "Of those, which have surface area greater than 3000?", + "What is the total population and average surface area of those countries?" + ], + "interaction_query": [ + "SELECT * FROM country WHERE Continent = \"North America\"", + "SELECT * FROM country WHERE Continent = \"North America\" AND SurfaceArea > 3000", + "SELECT sum(Population) , avg(SurfaceArea) FROM country WHERE Continent = \"North America\" AND SurfaceArea > 3000" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT name FROM city WHERE Population BETWEEN 160000 AND 90000", + "final_utterance": "Return the names of cities that have a population between 160000 and 900000.", + "interaction_utterance": [ + "What are the names of all the cities?", + "Which of those have a population between 160000 and 900000?" + ], + "interaction_query": [ + "SELECT name FROM city", + "SELECT name FROM city WHERE Population BETWEEN 160000 AND 90000" + ] + }, + { + "db_id": "world_1", + "final_query": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", + "final_utterance": "Give the language that is spoken in the most countries.", + "interaction_utterance": [ + "What are the different languages?", + "Which one is spoken in the most countries?" + ], + "interaction_query": [ + "SELECT LANGUAGE FROM countrylanguage", + "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";", + "final_utterance": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\".", + "interaction_utterance": [ + "Tell me\ufeff the director of the cartoon named \"Day of the Dark Knight!\".", + "What is the channel of this cartoon?", + "Give me the titles of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\"?" + ], + "interaction_query": [ + "SELECT Directed_by FROM Cartoon WHERE Title = \"Day of the Dark Knight!\"", + "SELECT Channel FROM Cartoon WHERE Title = \"Day of the Dark Knight!\"", + "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;", + "final_utterance": "Which country has the most of TV Channels? List the country and number of TV Channels it has.", + "interaction_utterance": [ + "Show me all the information about the Italian TV Channels.", + "How about the Polish TV Channels?", + "Which country has the most of TV Channels? List the country and number of TV Channels it has." + ], + "interaction_query": [ + "SELECT * FROM TV_Channel WHERE Country = \"Italy\"", + "SELECT * FROM TV_Channel WHERE Country = \"Poland\"", + "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;", + "final_utterance": "List the number of different series names and contents in the TV Channel table.", + "interaction_utterance": [ + "Tell me the TV Channel of the cartoon titled \"The Eyes of Despero!\".", + "How about this channel's series name?", + "Tell me the number of different series names and contents in the TV Channel table." + ], + "interaction_query": [ + "SELECT Channel FROM Cartoon WHERE Title = \"The Eyes of Despero!\"", + "SELECT series_name FROM TV_Channel WHERE id IN (SELECT Channel FROM Cartoon WHERE Title = \"The Eyes of Despero!\")", + "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;", + "final_utterance": "List the language used least number of TV Channel. List language and number of TV Channel.", + "interaction_utterance": [ + "Tell me the package option for the series named \"Rock TV\".", + "tell me the language of this series.", + "List the language used least number of TV Channel. List language and number of TV Channel." + ], + "interaction_query": [ + "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Rock TV\"", + "SELECT Language FROM TV_Channel WHERE series_name = \"Rock TV\"", + "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1" + ] + }, + { + "db_id": "tvshow", + "final_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!\";", + "final_utterance": "What is the TV Channel that shows the cartoon \"The Rise of the Blue Beetle!\"? List the TV Channel's series name.", + "interaction_utterance": [ + "Tell me the author of the cartoon \"The Rise of the Blue Beetle!\"", + "How about its director?", + "What is its TV Channel?" + ], + "interaction_query": [ + "SELECT Written_by FROM Cartoon WHERE Title = \"The Rise of the Blue Beetle!\"", + "SELECT Directed_by FROM Cartoon WHERE Title = \"The Rise of the Blue Beetle!\"", + "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!\"" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", + "final_utterance": "List the title of all Cartoons showed on TV Channel with series name \"Sky Radio\".", + "interaction_utterance": [ + "tell me the country of the TV Channel for the series named \"Sky Radio\".", + "How about its content?", + "I want to know the title of all Cartoons showed on TV Channel with series name \"Sky Radio\"." + ], + "interaction_query": [ + "SELECT Country FROM TV_Channel WHERE series_name = \"Sky Radio\"", + "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\"", + "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\"" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;", + "final_utterance": "List top 3 highest Rating TV series. List the TV series's Episode and Rating.", + "interaction_utterance": [ + "Tell me the rating of the episode named \"Double Down\".", + "How about the rating of the episode named \"Keepers\".", + "Okay, I want to know the top 3 highest Rating TV series. List the TV series's Episode and Rating." + ], + "interaction_query": [ + "SELECT Rating FROM TV_series WHERE Episode = \"Double Down\"", + "SELECT Rating FROM TV_series WHERE Episode = \"Keepers\"", + "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT max(SHARE) , min(SHARE) FROM TV_series;", + "final_utterance": "What is minimum and maximum share of TV series?", + "interaction_utterance": [ + "tell me the weekly rank of the episode named \"Emily\".", + "How about its share?", + "tell me the minimum and maximum share of TV series." + ], + "interaction_query": [ + "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"Emily\"", + "SELECT Share FROM TV_series WHERE Episode = \"Emily\"", + "SELECT max(SHARE) , min(SHARE) FROM TV_series" + ] + }, + { + "db_id": "tvshow", + "final_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\";", + "final_utterance": "What is the TV Channel of TV series with Episode \"A Love of a Lifetime\"? List the TV Channel's series name.", + "interaction_utterance": [ + "Tell me the rating of the episode titled \"A Love of a Lifetime\".", + "How about its weekly rank?", + "And What is its TV Channel?" + ], + "interaction_query": [ + "SELECT Rating FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", + "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", + "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\"" + ] + }, + { + "db_id": "tvshow", + "final_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\";", + "final_utterance": "List the Episode of all TV series showed on TV Channel with series name \"Sky Radio\".", + "interaction_utterance": [ + "tell me the content of TV Channel with the series named \"Sky Radio\".", + "How about its language?", + "Okay, now I want to know the Episode of all TV series showed on TV Channel with series name \"Sky Radio\"." + ], + "interaction_query": [ + "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\"", + "SELECT Language FROM TV_Channel WHERE series_name = \"Sky Radio\"", + "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\"" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT production_code , channel FROM cartoon ORDER BY original_air_date LIMIT 1", + "final_utterance": "Find the production code and channel of the most recently aired cartoon.", + "interaction_utterance": [ + "Tell me the air date of the cartoon titled \"Fall of the Blue Beetle!\".", + "What is its production code?", + "tell me the production code and channel of the most recently aired cartoon." + ], + "interaction_query": [ + "SELECT Original_air_date FROM Cartoon WHERE Title = \"Fall of the Blue Beetle!\"", + "SELECT Production_code FROM Cartoon WHERE Title = \"Fall of the Blue Beetle!\"", + "SELECT production_code , channel FROM cartoon ORDER BY original_air_date LIMIT 1" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = 'Todd Casey'", + "final_utterance": "which countries' tv channels are playing some cartoon written by Todd Casey?", + "interaction_utterance": [ + "Tell me the cartoons directed by Ben Jone.", + "Tell me the cartoons written by Todd Casey.", + "Which countries' tv channels are playing some cartoon written by Todd Casey?" + ], + "interaction_query": [ + "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\"", + "SELECT Title FROM Cartoon WHERE Written_by = \"Todd Casey\"", + "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = 'Todd Casey'" + ] + }, + { + "db_id": "tvshow", + "final_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'", + "final_utterance": "which countries' tv channels are not playing any cartoon written by Todd Casey?", + "interaction_utterance": [ + "which countries' tv channels are playing some cartoon written by Steven Melching?", + "which countries' tv channels are not playing any cartoon written by Todd Casey?" + ], + "interaction_query": [ + "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = 'Steven Melching'", + "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'" + ] + }, + { + "db_id": "tvshow", + "final_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'", + "final_utterance": "Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?", + "interaction_utterance": [ + "Tell me the director of the cartoon titled \"Deep Cover for Batman!\".", + "I want to know this cartoon's production code.", + "Tell me the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang." + ], + "interaction_query": [ + "SELECT Directed_by FROM Cartoon WHERE Title = \"Deep Cover for Batman!\"", + "SELECT Production_code FROM Cartoon WHERE Title = \"Deep Cover for Batman!\"", + "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'" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", + "final_utterance": "find id of the tv channels that from the countries where have more than two tv channels.", + "interaction_utterance": [ + "tell me the country of the TV channel with series named \"MTV Music\"", + "Tell me the number of Italian channels.", + "find id of the tv channels that from the countries where have more than two tv channels." + ], + "interaction_query": [ + "SELECT Country FROM TV_Channel WHERE series_name = \"MTV Music\"", + "SELECT COUNT(*) FROM TV_Channel WHERE Country = \"Italy\"", + "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2" + ] + }, + { + "db_id": "tvshow", + "final_query": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", + "final_utterance": "find the id of tv channels that do not play any cartoon directed by Ben Jones.", + "interaction_utterance": [ + "Who is the director of the cartoon titled \"Return of the Fearsome Fangs!\"?", + "Tell me the cartoons directed by Ben Jones.", + "Find the id of tv channels that do not play any cartoon directed by Ben Jones." + ], + "interaction_query": [ + "SELECT Directed_by FROM Cartoon WHERE Title = \"Return of the Fearsome Fangs!\"", + "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\"", + "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT count(*) FROM poker_player", + "final_utterance": "How many poker players are there?", + "interaction_utterance": [ + "Show all the poker players.", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM poker_player", + "SELECT count(*) FROM poker_player" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC", + "final_utterance": "List the earnings of poker players in descending order.", + "interaction_utterance": [ + "What is the earnings of each poker player?", + "Sort them in descending order." + ], + "interaction_query": [ + "SELECT Earnings FROM poker_player", + "SELECT Earnings FROM poker_player ORDER BY Earnings DESC" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT Final_Table_Made , Best_Finish FROM poker_player", + "final_utterance": "List the final tables made and the best finishes of poker players.", + "interaction_utterance": [ + "Show all the information about each poker player.", + "What are their final table mades?", + "What are their final table mades and best finishes?" + ], + "interaction_query": [ + "SELECT * FROM poker_player", + "SELECT Final_Table_Made FROM poker_player", + "SELECT Final_Table_Made , Best_Finish FROM poker_player" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT avg(Earnings) FROM poker_player", + "final_utterance": "What is the average earnings of poker players?", + "interaction_utterance": [ + "What is the earnings of each poker player?", + "Give me the average." + ], + "interaction_query": [ + "SELECT Earnings FROM poker_player", + "SELECT avg(Earnings) FROM poker_player" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1", + "final_utterance": "What is the money rank of the poker player with the highest earnings?", + "interaction_utterance": [ + "What is the money rank of each poker player?", + "Sort them in the decreasing order.", + "Return the top one." + ], + "interaction_query": [ + "SELECT Money_Rank FROM poker_player", + "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC", + "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000", + "final_utterance": "What is the maximum number of final tables made among poker players with earnings less than 200000?", + "interaction_utterance": [ + "Which poker player has earnings less than 200000?", + "Among them, what is the maximum number of final tables made?" + ], + "interaction_query": [ + "SELECT * FROM poker_player WHERE Earnings < 200000", + "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", + "final_utterance": "What are the names of poker players?", + "interaction_utterance": [ + "Show all the poker players.", + "What are their names?" + ], + "interaction_query": [ + "SELECT * FROM poker_player", + "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000", + "final_utterance": "What are the names of poker players whose earnings is higher than 300000?", + "interaction_utterance": [ + "Which poker players have earnings higher than 300000?", + "What are their names?" + ], + "interaction_query": [ + "SELECT * FROM poker_player WHERE Earnings > 300000", + "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000" + ] + }, + { + "db_id": "poker_player", + "final_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", + "final_utterance": "List the names of poker players ordered by the final tables made in ascending order.", + "interaction_utterance": [ + "What are the names of all poker players?", + "Sort them in the ascending order of the final tables made." + ], + "interaction_query": [ + "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", + "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" + ] + }, + { + "db_id": "poker_player", + "final_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", + "final_utterance": "What is the birth date of the poker player with the lowest earnings?", + "interaction_utterance": [ + "What is the birth date of each poker player?", + "Sort the list by the poker player's earnings.", + "Give me the result for the player with the lowest earnings." + ], + "interaction_query": [ + "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", + "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings", + "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" + ] + }, + { + "db_id": "poker_player", + "final_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", + "final_utterance": "What is the money rank of the tallest poker player?", + "interaction_utterance": [ + "What is the height of each poker player?", + "Who has the largest height?", + "What is his or her money rank?" + ], + "interaction_query": [ + "SELECT Height FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", + "SELECT * FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", + "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" + ] + }, + { + "db_id": "poker_player", + "final_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", + "final_utterance": "What is the average earnings of poker players with height higher than 200?", + "interaction_utterance": [ + "What is the height of each poker player?", + "Who all have heights greater than 200?", + "What is the average earnings among them?" + ], + "interaction_query": [ + "SELECT Height FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", + "SELECT * FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200", + "SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200" + ] + }, + { + "db_id": "poker_player", + "final_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", + "final_utterance": "What are the names of poker players in descending order of earnings?", + "interaction_utterance": [ + "Sort all the poker players in descending order of earnings.", + "What are the names of poker players in descending order of earnings?" + ], + "interaction_query": [ + "SELECT * FROM poker_player ORDER BY Earnings DESC", + "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality", + "final_utterance": "What are different nationalities of people and the corresponding number of people from each nation?", + "interaction_utterance": [ + "Show the nationality of each person.", + "Group people by their nationality.", + "For each of the result, show the corresponding number of people of that nationality?" + ], + "interaction_query": [ + "SELECT Nationality FROM people", + "SELECT * FROM people GROUP BY Nationality", + "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", + "final_utterance": "What is the most common nationality of people?", + "interaction_utterance": [ + "Show the nationality of each person.", + "Count the number of people for each nationality.", + "What is the most common nationality of people?" + ], + "interaction_query": [ + "SELECT Nationality FROM people", + "SELECT COUNT(*) FROM people GROUP BY Nationality", + "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2", + "final_utterance": "What are the nationalities that are shared by at least two people?", + "interaction_utterance": [ + "Count the number of people for each nationality.", + "Which nationalities are held by at least two people?" + ], + "interaction_query": [ + "SELECT COUNT(*) FROM people GROUP BY Nationality", + "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC", + "final_utterance": "List the names and birth dates of people in ascending alphabetical order of name.", + "interaction_utterance": [ + "What are the names and birth dates of people?", + "Sort the results in ascending alphabetical order of name." + ], + "interaction_query": [ + "SELECT Name , Birth_Date FROM people", + "SELECT Name , Birth_Date FROM people ORDER BY Name ASC" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT Name FROM people WHERE Nationality != \"Russia\"", + "final_utterance": "Show names of people whose nationality is not \"Russia\".", + "interaction_utterance": [ + "What are the names of all people?", + "What about people whose nationality is not \"Russia\"?" + ], + "interaction_query": [ + "SELECT Name FROM people", + "SELECT Name FROM people WHERE Nationality != \"Russia\"" + ] + }, + { + "db_id": "poker_player", + "final_query": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", + "final_utterance": "List the names of people that are not poker players.", + "interaction_utterance": [ + "Show all the poker players.", + "Show all people who are not poker players.", + "Give me their names." + ], + "interaction_query": [ + "SELECT * FROM poker_player", + "SELECT * FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", + "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)" + ] + }, + { + "db_id": "battle_death", + "final_query": "SELECT max(killed) , min(killed) FROM death", + "final_utterance": "What is maximum and minimum death toll caused each time?", + "interaction_utterance": [ + "What are the death tolls each time?", + "What is the maximum number of deaths in any one time?", + "What about the minimum?", + "Give me the maximum and also the minimum." + ], + "interaction_query": [ + "SELECT killed FROM death", + "SELECT max(killed) FROM death", + "SELECT min(killed) FROM death", + "SELECT max(killed) , min(killed) FROM death" + ] + }, + { + "db_id": "battle_death", + "final_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'", + "final_utterance": "What are the death and injury situations caused by the ship with tonnage 't'?", + "interaction_utterance": [ + "Show me information about deaths caused by ships.", + "Only ships with tonnage 't'.", + "Only return the death and injury information for those ships." + ], + "interaction_query": [ + "SELECT * FROM death as T1 JOIN ship as T2 ON T1.caused_by_ship_id = T2.id", + "SELECT * FROM death AS T1 JOIN ship AS T2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'", + "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'" + ] + }, + { + "db_id": "battle_death", + "final_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'", + "final_utterance": "What are the different ids and names of the battles that lost any 'Brig' type ships?", + "interaction_utterance": [ + "What are the ids and names of the battles?", + "Only show those that ships were lost in.", + "Please, just the ones with 'Brig' ship type." + ], + "interaction_query": [ + "SELECT id, name FROM battle", + "SELECT DISTINCT T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle", + "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'" + ] + }, + { + "db_id": "battle_death", + "final_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", + "final_utterance": "What are the ids and names of the battles that led to more than 10 people killed in total.", + "interaction_utterance": [ + "How many people were killed or injured in each battle?", + "Only show the deaths for those battles that produced at least ten deaths." + ], + "interaction_query": [ + "SELECT T1.id , T1.name, sum(T3.killed), sum(T3.injured) 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", + "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" + ] + }, + { + "db_id": "battle_death", + "final_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 sum(T1.injured) DESC LIMIT 1", + "final_utterance": "What is the ship id and name that caused most total injuries?", + "interaction_utterance": [ + "List the injuries caused by each ship (give ship id and name please).", + "Sort it by decreasing number of injuries.", + "Only show the ship id and name that caused the most total injuries." + ], + "interaction_query": [ + "SELECT T2.id , T2.name, sum(T1.injured) FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id", + "SELECT T2.id , T2.name, sum(T1.injured) FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY sum(T1.injured)", + "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 sum(T1.injured) DESC LIMIT 1" + ] + }, + { + "db_id": "battle_death", + "final_query": "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'", + "final_utterance": "What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?", + "interaction_utterance": [ + "Which battles did the bulgarian commander 'Kaloyan' fight in?", + "How about the latin commander 'Baldwin I'?", + "Just the ones where they were fighting one another, please." + ], + "interaction_query": [ + "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan'", + "SELECT name FROM battle WHERE latin_commander = 'Baldwin I'", + "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'" + ] + }, + { + "db_id": "battle_death", + "final_query": "SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );", + "final_utterance": "How many battles did not lose any ship with tonnage '225'?", + "interaction_utterance": [ + "Which battle ids lost ships with tonnage '225'?", + "Give the names of these battles, too.", + "Which battle ids and names did not lose any ship with tonnage '225'?", + "How many is that?" + ], + "interaction_query": [ + "SELECT lost_in_battle FROM ship WHERE tonnage = '225'", + "SELECT T2.id, T2.name from ship AS T1 join battle AS T2 ON T1.lost_in_battle = T2.id WHERE tonnage = '225'", + "SELECT id, name FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );", + "SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );" + ] + }, + { + "db_id": "battle_death", + "final_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'", + "final_utterance": "List the name and date of the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'", + "interaction_utterance": [ + "List the name and date of the battle that has lost the ship named 'Lettice'", + "Same for 'HMS Atlanta', please.", + "Can you intersect those?" + ], + "interaction_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'", + "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atlanta'", + "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'" + ] + }, + { + "db_id": "battle_death", + "final_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'", + "final_utterance": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.", + "interaction_utterance": [ + "Which battle ids and names lost ships in the 'English Channel'?", + "Which did not?", + "For these ones, show their names, results, and bulgarian commanders." + ], + "interaction_query": [ + "SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'", + "SELECT T1.id, T1.name FROM battle EXCEPT SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'", + "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'" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;", + "final_utterance": "How many countries does each continent have? List the continent id, continent name and the number of countries.", + "interaction_utterance": [ + "How many continents are there?", + "Show all their ids and names!", + "What countries do they each have?", + "Count how many there are for each continent name and id!" + ], + "interaction_query": [ + "SELECT count(*) FROM CONTINENTS;", + "SELECT ContId , Continent FROM CONTINENTS;", + "SELECT T1.ContId , T1.Continent , * FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent;", + "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "How many models does each car maker produce? List maker full name, id and the number.", + "interaction_utterance": [ + "What are the names and ids of the different car makers?", + "What countries are they each from?", + "For each, how many models do they each produce?", + "Can actually just show the name, id and the number of models?" + ], + "interaction_query": [ + "Select FullName, ID From CAR_MAKERS;", + "Select Country, FullName, ID From CAR_MAKERS;", + "SELECT count(*), T1.Country, T1.FullName, T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "Which model of the car has the minimum horsepower?", + "interaction_utterance": [ + "What is the average horsepower of all cars?", + "How about the maximum?", + "What about the minimum?", + "What is the model of the car with this horsepower?" + ], + "interaction_query": [ + "Select avg(horsepower) FROM CARS_DATA;", + "SELECT T2.horsepower FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower DESC LIMIT 1;", + "SELECT T2.horsepower FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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)", + "final_utterance": "Find the model of the car whose weight is below the average weight.", + "interaction_utterance": [ + "What is the average weight of all the cars?", + "List all the car information with weights above this?", + "How about below this?", + "Please, show just their model names!" + ], + "interaction_query": [ + "SELECT avg(Weight) FROM CARS_DATA", + "SELECT * FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight > (SELECT avg(Weight) FROM CARS_DATA)", + "SELECT * FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)", + "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)" + ] + }, + { + "db_id": "car_1", + "final_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';", + "final_utterance": "Find the name of the makers that produced some cars in the year of 1970?", + "interaction_utterance": [ + "What are the ids, and models of the cars were made in 1970?", + "Show their horsepower and MPG as well?", + "Also provide the names of their makers!", + "Just show a unique list of all these different makers." + ], + "interaction_query": [ + "Select T1.id, T2.model from cars_data as T1 join car_names as T2 on T1.id = T2.MakeId where T1.year = '1970';", + "Select T1.horsepower, T1.mpg, T1.id, T2.model from cars_data as T1 join car_names as T2 on T1.id = T2.MakeId where T1.year = '1970';", + "SELECT T1.Maker, T4.horsepower, T4.mpg, T4.id, T2.model 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';", + "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';" + ] + }, + { + "db_id": "car_1", + "final_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);", + "final_utterance": "Find the make and production time of the cars that were produced in the earliest year?", + "interaction_utterance": [ + "Show me the makes and models of each car!", + "Also provide which the year they were produced?", + "Which ones been produce in the earliest year?", + "Show just the make and year!" + ], + "interaction_query": [ + "SELECT Make , Model from Car_Names;", + "SELECT T2.Make , T2.Model, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId;", + "SELECT T2.Make , T2.Model, 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);", + "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);" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "Which distinct car models are the produced after 1980?", + "interaction_utterance": [ + "What are all the different car models?", + "Show also all the car makes and the years that they were produced!", + "Show only those that were made after 1980!", + "What are the distinct car models for these?" + ], + "interaction_query": [ + "SELECT DISTINCT model FROM MODEL_LIST;", + "SELECT T1.model, T2.Make, T3.Year 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;", + "SELECT T1.model, T2.Make, T3.Year 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;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "How many car makers are there in each continents? List the continent name and the count.", + "interaction_utterance": [ + "What are the names and country name of each car maker?", + "Also provide the continent name for each!", + "How many car makers are there per continent?" + ], + "interaction_query": [ + "Select T1.Maker, T2.CountryName from Car_Makers as T1 JOIN Countries as T2 on T1.Country = T2.CountryId;", + "SELECT T1.Continent, T3.Maker, T2.CountryName FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "Which of the countries has the most car makers? List the country name.", + "interaction_utterance": [ + "How many countries are there?", + "How many car makers belong to each one?", + "What is the name of the country that has the least number?", + "How about the most?" + ], + "interaction_query": [ + "SELECT count(*) from Countries;", + "SELECT *, count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country;", + "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) ASC LIMIT 1;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT Count(*) , T2.FullName FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id;", + "final_utterance": "How many car models are produced by each maker? List the count and the maker full name.", + "interaction_utterance": [ + "How many makers are there?", + "What are their full names and ids?", + "What models have they each produced?", + "Count how many modes there are per maker." + ], + "interaction_query": [ + "Select Count(*) FROM CAR_MAKERS;", + "SELECT FullName, id FROM CAR_MAKERS;", + "SELECT T1.Model , T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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)';", + "final_utterance": "What is the accelerate of the car make amc hornet sportabout (sw)?", + "interaction_utterance": [ + "Show all the car ids with the make amc hornet sporabout (sw)?", + "What is its horsepower?", + "How about its MPG?", + "How about its accelerate?" + ], + "interaction_query": [ + "SELECT T1.ID FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", + "SELECT T1.Horsepower FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", + "SELECT T1.MPG FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", + "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)';" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", + "final_utterance": "How many car makers are there in france?", + "interaction_utterance": [ + "Show all the different car makers?", + "What are the names of the countries they belong to?", + "Show just the car makers from France!", + "How many are there?" + ], + "interaction_query": [ + "SELECT distinct Maker FROM CAR_MAKERS;", + "SELECT T1.Maker, T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId;", + "SELECT T1.Maker FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", + "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';" + ] + }, + { + "db_id": "car_1", + "final_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';", + "final_utterance": "How many car models are produced in the usa?", + "interaction_utterance": [ + "How many car models are produced in total?", + "How many in Germany?", + "How about in Japan?", + "How about the USA?" + ], + "interaction_query": [ + "SELECT count(*) FROM MODEL_LIST;", + "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 = 'Germany';", + "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 = 'japan';", + "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';" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 8 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1;", + "final_utterance": "What is the smallest weight of the car produced with 8 cylinders in 1974?", + "interaction_utterance": [ + "What is all the car information for cars produced in 1974?", + "Now, show me just the weight and cylinders of these cars.", + "List just those with 8 cylinders!", + "What is the smallest weight?" + ], + "interaction_query": [ + "SELECT * FROM CARS_DATA WHERE YEAR = 1974;", + "SELECT Weight, Cylinders FROM CARS_DATA WHERE YEAR = 1974;", + "SELECT Weight, Cylinders FROM CARS_DATA WHERE Cylinders = 8 AND YEAR = 1974;", + "SELECT Weight FROM CARS_DATA WHERE Cylinders = 8 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "What are the countries having at least one car maker? List name and id.", + "interaction_utterance": [ + "What are all the different country names?", + "Which ones have no car makers?", + "Which ones have at least one?", + "Also provide the country id!" + ], + "interaction_query": [ + "Select CountryName FROM COUNTRIES;", + "Select CountryName FROM COUNTRIES where CountryID not in (Select Country from CAR_MAKERS);", + "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "Which countries in europe have at least 3 car manufacturers?", + "interaction_utterance": [ + "Show all the car makers and their country name?", + "Count how many there are per country name?", + "Show just those from countries in the continent Europe.", + "List the country names of those with at least 3 manufacturers!" + ], + "interaction_query": [ + "SELECT T3.Maker, 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;", + "SELECT T1.CountryName, count(*) FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country GROUP BY T1.CountryName;", + "SELECT T1.CountryName, count(*) 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;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "What is the maximum horsepower and the make of the car models with 3 cylinders?", + "interaction_utterance": [ + "What is the horsepower, make for each car!", + "Show those with 8 cylinders!", + "How about 3?", + "Show the one with the maximum horsepower." + ], + "interaction_query": [ + "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id;", + "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 8;", + "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon.", + "interaction_utterance": [ + "What is id of the car with the max horsepower?", + "How about with the max MPG?", + "Show its make!", + "Now show its model!" + ], + "interaction_query": [ + "SELECT id FROM CARS_DATA ORDER BY horsepower DESC LIMIT 1;", + "SELECT id FROM CARS_DATA ORDER BY mpg DESC LIMIT 1;", + "SELECT T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", + "final_utterance": "What is the average edispl of the cars of model volvo?", + "interaction_utterance": [ + "What is the average edispl of all cars?", + "Can you show the average per car make?", + "How about per car model?", + "Show the average for the model volvo!" + ], + "interaction_query": [ + "SELECT avg(edispl) FROM CARS_DATA;", + "SELECT T1.Make, avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id group by T1.Make;", + "SELECT T1.Model, avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id group by T1.Model;", + "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;", + "final_utterance": "Which model has the most version(make) of cars?", + "interaction_utterance": [ + "What are all the different models for each car?", + "What are the makes for each?", + "How many makes are there for each?", + "What is the model name with the most makes?" + ], + "interaction_query": [ + "SELECT distinct Model from CAR_NAMES;", + "SELECT Model, Make FROM CAR_NAMES;", + "SELECT Model, count(*) FROM CAR_NAMES GROUP BY Model;", + "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", + "final_utterance": "How many car models were produced by the maker with full name American Motor Company?", + "interaction_utterance": [ + "Show the full names of all the different car makers?", + "Also include the car models produced by each!", + "Show me just those produced by the maker with full name American Motor Company!", + "How many are there?" + ], + "interaction_query": [ + "SELECT FullName FROM CAR_MAKERS;", + "SELECT T1.FullName, T2.Model FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker;", + "SELECT T1.FullName, T2.Model FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", + "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "Which makers designed more than 3 car models? List full name and the id.", + "interaction_utterance": [ + "What is all the information for the makers that have designed at least 1 car model!", + "Which ones have designed more than 1?", + "How about more than 3?", + "List just the full name and id!" + ], + "interaction_query": [ + "SELECT * FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker;", + "SELECT * FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 1;", + "SELECT * FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?", + "interaction_utterance": [ + "How many different models has maker with full name General Motors produced?", + "How many different models weigh over 3500 pounds?", + "How many models have either of these features?", + "Show me the distinct list of their model names!" + ], + "interaction_query": [ + "SELECT count(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 WHERE T3.FullName = 'General Motors';", + "SELECT count(DISTINCT T2.Model) FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T1.MakeId = T3.Id WHERE T3.weight > 3500;", + "SELECT count(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;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT DISTINCT T1.Year FROM CARS_DATA AS T1 WHERE T1.Weight > 3000 AND T1.weight < 4000;", + "final_utterance": "In which years cars were produced weighing no less than 3000 and no more than 4000?", + "interaction_utterance": [ + "Show the years and weight of all the cars!", + "Show distinct years that the cars that weigh more than 3000 were produced!", + "How about the different years for those that weight less than 4000.", + "What are the distinct years, for the cars that are both?" + ], + "interaction_query": [ + "SELECT Year, weight FROM CARS_DATA;", + "SELECT DISTINCT Year FROM CARS_DATA AS T1 WHERE Weight > 3000;", + "SELECT DISTINCT Year FROM CARS_DATA AS T1 WHERE Weight < 4000;", + "SELECT DISTINCT Year FROM CARS_DATA WHERE Weight > 3000 AND Weight < 4000;" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;", + "final_utterance": "What is the horsepower of the car with the largest accelerate?", + "interaction_utterance": [ + "What is the lowest accelerate for any car?", + "How about the highest?", + "What is the ID, Make and Model of this car?", + "Show just its horsepower." + ], + "interaction_query": [ + "SELECT accelerate FROM CARS_DATA ORDER BY accelerate ASC LIMIT 1;", + "SELECT accelerate FROM CARS_DATA ORDER BY accelerate DESC LIMIT 1;", + "SELECT T1.ID, T2.Make, T2.Model FROM CARS_DATA as T1 JOIN CAR_NAMES as T2 ON T1.ID = T2.MakeID ORDER BY T1.accelerate DESC LIMIT 1;", + "SELECT horsepower FROM CARS_DATA ORDER BY accelerate DESC LIMIT 1;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "For model volvo, how many cylinders does the car with the least accelerate have?", + "interaction_utterance": [ + "Show all the car information for any car of the model volvo!", + "What is the car with the least accelerate?", + "What is its horsepower?", + "What about its number of cylinders?" + ], + "interaction_query": [ + "SELECT * FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo';", + "SELECT * 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;", + "SELECT T1.horsepower 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;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", + "final_utterance": "How many cars have a larger accelerate than the car with the largest horsepower?", + "interaction_utterance": [ + "What is largest horsepower of all cars?", + "What is the accelerate of the car with this horsepower?", + "What are the car ids of the cars with a greater accelerate than this?", + "How many are there?" + ], + "interaction_query": [ + "SELECT horsepower FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1", + "SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1", + "SELECT id FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", + "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 2 );", + "final_utterance": "How many countries has more than 2 car makers?", + "interaction_utterance": [ + "What are the names of the countries that have no car makers?", + "Show me all the names of all the different countries outside of those!", + "How many of these have more than 1 car maker?", + "How about more than 2?" + ], + "interaction_query": [ + "SELECT CountryName FROM COUNTRIES where CountryId not in (SELECT T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country);", + "SELECT distinct T1.CountryName FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country;", + "SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 1 );", + "SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 2 );" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "For the cars with 4 cylinders, which model has the largest horsepower?", + "interaction_utterance": [ + "Show all models and horsepowers of all cars!", + "Now show just the ones with 4 cylinders.", + "What is the model of that with the lowest horsepower?", + "How about the greatest horsepower?" + ], + "interaction_query": [ + "SELECT T1.Model, T2.horsepower FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id;", + "SELECT T1.Model, T2.horsepower FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4;", + "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 ASC LIMIT 1;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.", + "interaction_utterance": [ + "What is the lowest horsepower of all cars?", + "Show all the ids and makes of those with a horsepower greater than this!", + "Which ones have 5 cylinders or less?", + "How about 3 or less?" + ], + "interaction_query": [ + "SELECT min(Horsepower) FROM CARS_DATA;", + "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);", + "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 <= 5;", + "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;" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1;", + "final_utterance": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980?", + "interaction_utterance": [ + "Show me the mpg, horsepower and accelerate for all the cars that were produced before 1980!", + "Also include the cars that have 8 cylinders!", + "What is the max horsepower for this group?", + "how about the max mpg?" + ], + "interaction_query": [ + "SELECT mpg, horsepower, accelerate FROM CARS_DATA WHERE YEAR < 1980;", + "SELECT mpg, horsepower, accelerate FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980;", + "SELECT accelerate FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY accelerate DESC LIMIT 1;", + "SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1;" + ] + }, + { + "db_id": "car_1", + "final_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';", + "final_utterance": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'?", + "interaction_utterance": [ + "Show all the models that were built by the Ford Motor Company.", + "What are all the models except those!", + "Also provide the weights for all different makes for each of these models.", + "List all the different models from these that have makes that are lighter than 3500!" + ], + "interaction_query": [ + "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id where T2.FullName = 'Ford Motor Company';", + "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id where T2.FullName != 'Ford Motor Company';", + "SELECT T1.model, T2.Make, T3.weight 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'", + "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';" + ] + }, + { + "db_id": "car_1", + "final_query": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", + "final_utterance": "What are the name of the countries where there is not a single car maker?", + "interaction_utterance": [ + "What are all the names of countries?", + "Which ones have at least one car maker?", + "Show me all of car names other than these!" + ], + "interaction_query": [ + "SELECT CountryName FROM countries;", + "SELECT distinct T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", + "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;" + ] + }, + { + "db_id": "car_1", + "final_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;", + "final_utterance": "Which are the car makers which produce at least 2 models and more than 3 car makes? List the id and the maker.", + "interaction_utterance": [ + "Show all the car maker id, names, the models and makes they produce!", + "How many model does each car maker produce? List the id and maker!", + "Show me those that produce at least 2!", + "For each of these, only show those that have more than 3 car makes!" + ], + "interaction_query": [ + "SELECT T1.Id , T1.Maker, T2.Model FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker;", + "SELECT T1.Id , T1.Maker, count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", + "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;", + "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;" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT avg(loser_age) , avg(winner_age) FROM matches", + "final_utterance": "Find the average age of losers and winners of all matches.", + "interaction_utterance": [ + "How many matches are there?", + "What was the maximum length in minutes for the matches?", + "Average?", + "How about for the age of losers and winners?" + ], + "interaction_query": [ + "SELECT count(*) FROM matches", + "SELECT max(minutes) FROM matches", + "SELECT avg(minutes) FROM matches", + "SELECT avg(loser_age) , avg(winner_age) FROM matches" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10", + "final_utterance": "Find the name of tourney that has more than 10 matches.", + "interaction_utterance": [ + "How many distinct tourney names are there?", + "Which ones have more than 20 matches?", + "More than 10?" + ], + "interaction_query": [ + "SELECT count(DISTINCT tourney_name) FROM matches", + "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 20", + "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", + "final_utterance": "List the names of all winners who played in both 2013 and 2016.", + "interaction_utterance": [ + "How many distinct winners played in 2013?", + "Of those, how many also played in 2016.", + "What are their names?" + ], + "interaction_query": [ + "SELECT count(DISTINCT winner_name) FROM matches WHERE year = 2013", + "SELECT count(*) FROM (SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016)", + "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", + "final_utterance": "List the number of all matches who played in years of 2013 or 2016.", + "interaction_utterance": [ + "How many matches were played?", + "How many where the loser hand is L?", + "How many played in year 2013 or 2016?" + ], + "interaction_query": [ + "SELECT count(*) FROM matches", + "SELECT count(*) FROM matches WHERE loser_hand = \"L\"", + "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016" + ] + }, + { + "db_id": "wta_1", + "final_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'", + "final_utterance": "What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?", + "interaction_utterance": [ + "How many players are there?", + "Which ones won in the tourney WTA Championships? Give their last name and birth date.", + "Give first name and country code instead.", + "Which ones also won in the Australian Open?" + ], + "interaction_query": [ + "SELECT count(*) FROM players", + "SELECT T1.last_name, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships'", + "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'", + "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'" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", + "final_utterance": "Find the first name and country code of the oldest player.", + "interaction_utterance": [ + "What is the birth date of the oldest player?", + "Give the player id and last name instead.", + "Give the first name and country code instead." + ], + "interaction_query": [ + "SELECT birth_date FROM players ORDER BY birth_date DESC LIMIT 1", + "SELECT player_id , last_name FROM players ORDER BY birth_date LIMIT 1", + "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", + "final_utterance": "List the first and last name of all players who are left / L hand in the order of birth date.", + "interaction_utterance": [ + "How many players have right / R hand?", + "Left / L hand?", + "Give their country code and birth date.", + "Order by their birth date, and give the first and last name instead." + ], + "interaction_query": [ + "SELECT count(*) FROM players WHERE hand = 'R'", + "SELECT count(*) FROM players WHERE hand = 'L'", + "SELECT country_code , birth_date FROM players WHERE hand = 'L'", + "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date" + ] + }, + { + "db_id": "wta_1", + "final_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", + "final_utterance": "Find the first name and country code of the player who did the most number of tours.", + "interaction_utterance": [ + "How many players are there?", + "How many tours did the player who did the least number of tours do?", + "Most number of tours?", + "Give the first name and country code instead." + ], + "interaction_query": [ + "SELECT count(*) FROM players", + "SELECT T2.tours FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours ASC LIMIT 1", + "SELECT T2.tours FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", + "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" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", + "final_utterance": "Find the year that has the most number of matches.", + "interaction_utterance": [ + "How many matches are there?", + "Find the surface that has the most number.", + "What about the year?" + ], + "interaction_query": [ + "SELECT count(*) FROM matches", + "SELECT surface FROM matches GROUP BY surface ORDER BY count(*) DESC LIMIT 1", + "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", + "final_utterance": "Find the name and rank points of the winner who won the most times.", + "interaction_utterance": [ + "Find the name of the loser who lost the most times.", + "Give the rank points as well.", + "Give the same, but for the winner who won the most times." + ], + "interaction_query": [ + "SELECT loser_name FROM matches GROUP BY loser_name ORDER BY count(*) DESC LIMIT 1", + "SELECT loser_name, loser_rank_points FROM matches GROUP BY loser_name ORDER BY count(*) DESC LIMIT 1", + "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", + "final_utterance": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.", + "interaction_utterance": [ + "Give the name of the loser who has the highest rank points.", + "Do the same but for the Australian Open tourney.", + "Give the winner name instead." + ], + "interaction_query": [ + "SELECT loser_name FROM matches ORDER BY loser_rank_points DESC LIMIT 1", + "SELECT loser_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY loser_rank_points DESC LIMIT 1", + "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", + "final_utterance": "find the names of loser and winner who played in the match with greatest number of minutes.", + "interaction_utterance": [ + "Give the length of the match in minutes of the shortest match.", + "Longest match?", + "Give the winner and loser name instead." + ], + "interaction_query": [ + "SELECT minutes FROM matches ORDER BY minutes ASC LIMIT 1", + "SELECT minutes FROM matches ORDER BY minutes DESC LIMIT 1", + "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1" + ] + }, + { + "db_id": "wta_1", + "final_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", + "final_utterance": "Find the average ranking for each player and their first name.", + "interaction_utterance": [ + "Find the birth dates of each of the players.", + "Find tours and first name instead.", + "Give the average ranking instead of the tours." + ], + "interaction_query": [ + "SELECT birth_date FROM players", + "SELECT T2.tours, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", + "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" + ] + }, + { + "db_id": "wta_1", + "final_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", + "final_utterance": "Find the total ranking points for each player and their first name.", + "interaction_utterance": [ + "Give the number of tours for each player.", + "Give the average rank points and first name.", + "Find the total ranking points instead." + ], + "interaction_query": [ + "SELECT tours FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", + "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", + "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" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1", + "final_utterance": "find the code of the country where has the greatest number of players.", + "interaction_utterance": [ + "Find the number of players for each country.", + "Which country has the least number of players? Give the country code.", + "Greatest number?" + ], + "interaction_query": [ + "SELECT count(*) FROM players GROUP BY country_code", + "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) ASC LIMIT 1", + "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", + "final_utterance": "Find the codes of countries that have more than 50 players.", + "interaction_utterance": [ + "What is the number of players for each hand type? Give the hand type as well.", + "For each country?", + "Give the ones that have more than 50 players.", + "Give the country code only." + ], + "interaction_query": [ + "SELECT count(*), hand FROM players GROUP BY hand", + "SELECT count(*), country_code FROM players GROUP BY country_code", + "SELECT count(*), country_code FROM players GROUP BY country_code HAVING count(*) > 50", + "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", + "final_utterance": "Find the name and rank of the 3 youngest winners across all matches.", + "interaction_utterance": [ + "Give the name of the 3 oldest losers across all matches.", + "How about the 3 oldest winners.", + "Youngest? Give the rank as well." + ], + "interaction_query": [ + "SELECT DISTINCT loser_name FROM matches ORDER BY loser_age DESC LIMIT 3", + "SELECT DISTINCT winner_name FROM matches ORDER BY winner_age DESC LIMIT 3", + "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3" + ] + }, + { + "db_id": "wta_1", + "final_query": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", + "final_utterance": "How many different winners both participated in the WTA Championships and were left handed?", + "interaction_utterance": [ + "How many different losers participated in the Australian Open?", + "Winners?", + "How about in the WTA Championships, and were also left handed?" + ], + "interaction_query": [ + "SELECT count(DISTINCT loser_name) FROM matches WHERE tourney_name = 'Australian Open'", + "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'Australian Open'", + "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT count(*) FROM conductor", + "final_utterance": "How many conductors are there?", + "interaction_utterance": [ + "List all conductor information.", + "How many conductors are there?" + ], + "interaction_query": [ + "SELECT * FROM conductor", + "SELECT count(*) FROM conductor" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Name FROM conductor ORDER BY Age ASC", + "final_utterance": "List the names of conductors in ascending order of age.", + "interaction_utterance": [ + "What are the names of the conductors?", + "What are the ages of the conductors?", + "List the names of conductors in ascending order of age." + ], + "interaction_query": [ + "SELECT Name FROM conductor", + "SELECT Age FROM conductor", + "SELECT Name FROM conductor ORDER BY Age ASC" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Name FROM conductor WHERE Nationality != 'USA'", + "final_utterance": "What are the names of conductors whose nationalities are not \"USA\"?", + "interaction_utterance": [ + "List the names of conductors", + "Among these conductors, which of them are not from the USA?" + ], + "interaction_query": [ + "SELECT Name FROM conductor", + "SELECT Name FROM conductor WHERE Nationality != 'USA'" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC", + "final_utterance": "What are the record companies of orchestras in descending order of years in which they were founded?", + "interaction_utterance": [ + "List the information of record companies.", + "When were they founded?", + "Please list the record companies of orchestras in descending order of years in which they were founded." + ], + "interaction_query": [ + "SELECT Record_Company FROM orchestra", + "SELECT Record_Company, Year_of_Founded FROM orchestra", + "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT avg(Attendance) FROM SHOW", + "final_utterance": "What is the average attendance of shows?", + "interaction_utterance": [ + "What is the attendance of each show?", + "What is the average attendance?" + ], + "interaction_query": [ + "SELECT Attendance FROM SHOW", + "SELECT avg(Attendance) FROM SHOW" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"", + "final_utterance": "What are the maximum and minimum share of performances whose type is not \"Live final\".", + "interaction_utterance": [ + "What are the shares of performances?", + "What are the shares of performances whose type is not \"Live final\"?", + "What are the maximum and the minimum of these values?" + ], + "interaction_query": [ + "SELECT SHARE FROM performance", + "SELECT SHARE FROM performance WHERE TYPE != \"Live final\"", + "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT count(DISTINCT Nationality) FROM conductor", + "final_utterance": "How many different nationalities do conductors have?", + "interaction_utterance": [ + "List the nationalities of conductors.", + "How many are there?" + ], + "interaction_query": [ + "SELECT Nationality FROM conductor", + "SELECT count(DISTINCT Nationality) FROM conductor" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", + "final_utterance": "List names of conductors in descending order of years of work.", + "interaction_utterance": [ + "List the names of conductors.", + "List years of work of conductors.", + "List names of conductors in descending order of years of work." + ], + "interaction_query": [ + "SELECT Name FROM conductor", + "SELECT Year_of_Work FROM conductor", + "SELECT Name FROM conductor ORDER BY Year_of_Work DESC" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", + "final_utterance": "List the name of the conductor with the most years of work.", + "interaction_utterance": [ + "List the names of the conductors.", + "List years of work of conductors.", + "List the name of the conductor with the most years of work." + ], + "interaction_query": [ + "SELECT Name FROM conductor", + "SELECT Year_of_Work FROM conductor", + "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", + "final_utterance": "Show the names of conductors and the orchestras they have conducted.", + "interaction_utterance": [ + "Show the names of conductors.", + "Please list these names with the orchestras they have conducted." + ], + "interaction_query": [ + "SELECT Name FROM conductor", + "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID" + ] + }, + { + "db_id": "orchestra", + "final_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", + "final_utterance": "Show the names of conductors that have conducted more than one orchestras.", + "interaction_utterance": [ + "Please show the names of the conductors.", + "Which of them have conducted more than one orchestras?" + ], + "interaction_query": [ + "SELECT Name FROM conductor", + "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" + ] + }, + { + "db_id": "orchestra", + "final_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", + "final_utterance": "Show the name of the conductor that has conducted the most number of orchestras.", + "interaction_utterance": [ + "Please show the names of the conductors.", + "Who has conducted the most orchestras?" + ], + "interaction_query": [ + "SELECT Name FROM conductor", + "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" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", + "final_utterance": "Please show the name of the conductor that has conducted orchestras founded after 2008.", + "interaction_utterance": [ + "Please show the names of the conductors.", + "Who has conducted orchestras founded after 2008?" + ], + "interaction_query": [ + "SELECT Name FROM conductor", + "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", + "final_utterance": "Please show the different record companies and the corresponding number of orchestras.", + "interaction_utterance": [ + "Please show the record companies without duplicates.", + "Please also show their corresponding number of orchestras." + ], + "interaction_query": [ + "SELECT Record_Company FROM orchestra GROUP BY Record_Company", + "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", + "final_utterance": "Please show the record formats of orchestras in ascending order of count.", + "interaction_utterance": [ + "Please show the record formats of orchestras.", + "Please list them in ascending order of count." + ], + "interaction_query": [ + "SELECT Major_Record_Format FROM orchestra", + "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1", + "final_utterance": "List the record company shared by the most number of orchestras.", + "interaction_utterance": [ + "List the information of all record companies.", + "Which one is shared by the most orchestras?" + ], + "interaction_query": [ + "SELECT Record_Company FROM orchestra", + "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)", + "final_utterance": "List the names of orchestras that have no performance.", + "interaction_utterance": [ + "List the names of orchestras.", + "Which of them have had no performances?" + ], + "interaction_query": [ + "SELECT Orchestra FROM orchestra", + "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", + "final_utterance": "Show the record companies shared by orchestras founded before 2003 and after 2003.", + "interaction_utterance": [ + "Please list the record companies.", + "Which of them are shared by orchestras founded before 2003?", + "Which of them are shared by orchestras founded after 2003?", + "Which of them are shared by orchestras founded before 2003 and after 2003?" + ], + "interaction_query": [ + "SELECT Record_Company FROM orchestra", + "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003", + "SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", + "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003" + ] + }, + { + "db_id": "orchestra", + "final_query": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", + "final_utterance": "Find the number of orchestras whose record format is \"CD\" or \"DVD\".", + "interaction_utterance": [ + "List the orchestras whose record format is \"CD\" or \"DVD\".", + "How many of these orchestras are there?" + ], + "interaction_query": [ + "SELECT * FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", + "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT document_id , document_name , document_description FROM Documents", + "final_utterance": "List document IDs, document names, and document descriptions for all documents.", + "interaction_utterance": [ + "Show information for all documents.", + "Show their ids.", + "Also show their document names and document descriptions." + ], + "interaction_query": [ + "SELECT * FROM Documents", + "SELECT document_id FROM Documents", + "SELECT document_id , document_name , document_description FROM Documents" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", + "final_utterance": "What is the document name and template id for document with description with the letter 'w' in it?", + "interaction_utterance": [ + "Show the document name for all documents.", + "Also show their description.", + "Which one has description with the letter 'w' in it?", + "Show its name and template id." + ], + "interaction_query": [ + "SELECT document_name FROM Documents", + "SELECT document_name, Document_Description FROM Documents", + "SELECT document_name FROM Documents WHERE Document_Description LIKE \"%w%\"", + "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", + "final_utterance": "What is the document id, template id and description for document named \"Robbin CV\"?", + "interaction_utterance": [ + "Show the the document name for all documents.", + "Show the document id for the one named \"Robbin CV\"?", + "Also show its template id and description." + ], + "interaction_query": [ + "SELECT document_name from Documents", + "SELECT document_id FROM Documents WHERE document_name = \"Robbin CV\"", + "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT count(DISTINCT template_id) FROM Documents", + "final_utterance": "How many different templates do all document use?", + "interaction_utterance": [ + "Show the template id for all documents.", + "Show all distinct results.", + "How many are there?" + ], + "interaction_query": [ + "SELECT template_id FROM Documents", + "SELECT DISTINCT template_id FROM Documents", + "SELECT count(DISTINCT template_id) FROM Documents" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", + "final_utterance": "How many documents are using the template with type code 'PPT'?", + "interaction_utterance": [ + "Show the document ids.", + "Also show their template id and template type code.", + "Which documents are using the template with type code 'PPT'?", + "How many are there?" + ], + "interaction_query": [ + "SELECT document_id FROM Documents", + "SELECT T1.document_id, T2.Template_ID, T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID", + "SELECT T1.document_id FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID where T2.Template_Type_Code = 'PPT'", + "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_id , count(*) FROM Documents GROUP BY template_id", + "final_utterance": "Show all template ids and number of documents using each template.", + "interaction_utterance": [ + "Show the template id for all documents.", + "For each of them, show the number of documents using it." + ], + "interaction_query": [ + "SELECT template_id FROM Documents", + "SELECT template_id , count(*) FROM Documents GROUP BY template_id" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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", + "final_utterance": "What is the id and type code for the template used by the most documents?", + "interaction_utterance": [ + "Show the template id for all Documents.", + "Also show its template type code.", + "For each of them, show the number of documents using it.", + "Which one has the most?" + ], + "interaction_query": [ + "SELECT template_id FROM Documents", + "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id", + "SELECT count(*), 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", + "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" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1", + "final_utterance": "Show ids for all templates that are used by more than one document.", + "interaction_utterance": [ + "Show the template id for all documents.", + "For each of them, show the number of documents.", + "Which of them are used by more than one document?" + ], + "interaction_query": [ + "SELECT template_id FROM Documents", + "SELECT template_id, count(*) FROM Documents GROUP BY template_id", + "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents", + "final_utterance": "Show ids for all templates not used by any document.", + "interaction_utterance": [ + "Show template ids used by some document.", + "Show all template ids.", + "Which of them are not used by any document?" + ], + "interaction_query": [ + "SELECT template_id FROM Documents", + "SELECT template_id FROM Templates", + "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT count(*) FROM Templates", + "final_utterance": "How many templates do we have?", + "interaction_utterance": [ + "Show info for all templates.", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM Templates", + "SELECT count(*) FROM Templates" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_id , version_number , template_type_code FROM Templates", + "final_utterance": "Show template ids, version numbers, and template type codes for all templates.", + "interaction_utterance": [ + "Show template ids for all templates.", + "Also show their version numbers and template type codes." + ], + "interaction_query": [ + "SELECT template_id FROM Templates", + "SELECT template_id , version_number , template_type_code FROM Templates" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT DISTINCT template_type_code FROM Templates", + "final_utterance": "Show all distinct template type codes for all templates.", + "interaction_utterance": [ + "Show all template type codes for all templates.", + "Filter out duplicates." + ], + "interaction_query": [ + "SELECT template_type_code FROM Templates", + "SELECT DISTINCT template_type_code FROM Templates" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"", + "final_utterance": "What are the ids of templates with template type code PP or PPT?", + "interaction_utterance": [ + "Show the template ids for all templates.", + "How about the ids with template type code PP or PPT?" + ], + "interaction_query": [ + "SELECT template_id FROM Templates", + "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", + "final_utterance": "How many templates have template type code CV?", + "interaction_utterance": [ + "Show the template type codes for all templates.", + "How many of them have template type code CV?" + ], + "interaction_query": [ + "SELECT template_type_code FROM Templates", + "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", + "final_utterance": "What is the version number and template type code for the template with version number later than 5?", + "interaction_utterance": [ + "What is the version number for all template?", + "Only show those with version number later than 5.", + "Also show their template type code." + ], + "interaction_query": [ + "SELECT version_number FROM Templates", + "SELECT version_number FROM Templates WHERE version_number > 5", + "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code", + "final_utterance": "Show all template type codes and number of templates for each.", + "interaction_utterance": [ + "Show the template type code for all templates.", + "For each of them, count the number of templates" + ], + "interaction_query": [ + "SELECT template_type_code FROM Templates", + "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1", + "final_utterance": "Which template type code has most number of templates?", + "interaction_utterance": [ + "Show all type codes for templates.", + "For each of them, how many templates do they contain?", + "Which of them contains the most templates?" + ], + "interaction_query": [ + "SELECT template_type_code FROM Templates", + "SELECT template_type_code, count(*) FROM Templates GROUP BY template_type_code", + "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3", + "final_utterance": "Show all template type codes with less than three templates.", + "interaction_utterance": [ + "Show all template type codes.", + "For each of them, show the count of templates.", + "Which of them have fewer than three templates?" + ], + "interaction_query": [ + "SELECT template_type_code FROM Templates", + "SELECT template_type_code, count(*) FROM Templates GROUP BY template_type_code", + "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT min(Version_Number) , template_type_code FROM Templates", + "final_utterance": "What the smallest version number and its template type code?", + "interaction_utterance": [ + "Show the version number for all templates.", + "What is the smallest value?", + "Also show its template type code." + ], + "interaction_query": [ + "SELECT Version_Number FROM Templates", + "SELECT min(Version_Number) FROM Templates", + "SELECT min(Version_Number) , template_type_code FROM Templates" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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\"", + "final_utterance": "What is the template type code of the template used by document with the name \"Data base\"?", + "interaction_utterance": [ + "What is the template type code of the template.", + "Also show the names of all documents using each template.", + "Which of the template type codes is used by document with the name \"Data base\"?" + ], + "interaction_query": [ + "SELECT template_type_code FROM Templates", + "SELECT T1.template_type_code, T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", + "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\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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\"", + "final_utterance": "Show all document names using templates with template type code BK.", + "interaction_utterance": [ + "Show all document names.", + "Also show their template type codes.", + "Which of the documents are using templates with template type code BK?" + ], + "interaction_query": [ + "SELECT document_name FROM Documents", + "SELECT T2.document_name, T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", + "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\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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", + "final_utterance": "Show all template type codes and the number of documents using each type.", + "interaction_utterance": [ + "Show all template type codes.", + "Also show the document ids using each template.", + "For each type code, how many documents are using that template?" + ], + "interaction_query": [ + "SELECT template_type_code FROM Templates", + "SELECT T1.template_type_code , T2.document_id FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", + "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" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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", + "final_utterance": "Which template type code is used by most number of documents?", + "interaction_utterance": [ + "Show the type codes for all templates.", + "For each, how many documents are using this template?", + "Order the template type codes in descending order by this number.", + "Which of them has the most?" + ], + "interaction_query": [ + "SELECT template_type_code FROM Templates", + "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", + "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", + "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" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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", + "final_utterance": "Show all template type codes that are not used by any document.", + "interaction_utterance": [ + "Show all template type codes.", + "Show all template type codes that are used by some document.", + "How about those that are not used by any document?" + ], + "interaction_query": [ + "SELECT template_type_code FROM Templates", + "SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", + "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" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_type_code , template_type_description FROM Ref_template_types", + "final_utterance": "Show all template type codes and descriptions.", + "interaction_utterance": [ + "Show all template type codes.", + "Also show their descriptions." + ], + "interaction_query": [ + "SELECT template_type_code FROM Ref_template_types", + "SELECT template_type_code , template_type_description FROM Ref_template_types" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", + "final_utterance": "What is the template type descriptions for template type code \"AD\".", + "interaction_utterance": [ + "Show all template type codes and descriptions.", + "What is the description for template type code \"AD\"?" + ], + "interaction_query": [ + "SELECT template_type_code , template_type_description FROM Ref_template_types", + "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", + "final_utterance": "What is the template type code for template type description \"Book\".", + "interaction_utterance": [ + "Show all template type codes.", + "Also show descriptions.", + "Which code has template type description \"Book\"?" + ], + "interaction_query": [ + "SELECT template_type_code FROM Ref_template_types", + "SELECT template_type_code , template_type_description FROM Ref_template_types", + "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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", + "final_utterance": "What are the distinct template type descriptions for the templates ever used by any document?", + "interaction_utterance": [ + "Show the template ids used by any document.", + "Also show the template type code for those ids.", + "How about their template type descriptions?", + "Show the distinct values among them." + ], + "interaction_query": [ + "select Template_ID from Documents", + "select T2.Template_ID, T1.template_type_code from Templates AS T1 JOIN Documents AS T2 ON T1.Template_ID = T2.template_ID", + "SELECT 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", + "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" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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\"", + "final_utterance": "What are the template ids with template type description \"Presentation\".", + "interaction_utterance": [ + "Show the template id for all templates.", + "Also show their template type description.", + "What are the template ids with description \"Presentation\"?" + ], + "interaction_query": [ + "SELECT template_id from Templates", + "SELECT T2.template_id, T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code", + "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\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT count(*) FROM Paragraphs", + "final_utterance": "How many paragraphs in total?", + "interaction_utterance": [ + "Show the info for all paragraphs.", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM Paragraphs", + "SELECT count(*) FROM Paragraphs" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", + "final_utterance": "How many paragraphs for the document with name 'Summer Show'?", + "interaction_utterance": [ + "Show the id for all paragraphs.", + "Also show their document names.", + "Only show the id for all paragraphs in the document named 'Summer Show'.", + "How many such paragraphs are there?" + ], + "interaction_query": [ + "SELECT paragraph_id FROM Paragraphs", + "SELECT T1.paragraph_id, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID", + "SELECT T1.paragraph_id FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", + "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea'", + "final_utterance": "Show paragraph details for paragraph with text 'Korea'.", + "interaction_utterance": [ + "Show the parapraph text for all paragraphs.", + "Also show their paragraph details.", + "What are the details for the paragraph containing 'Korea'?" + ], + "interaction_query": [ + "SELECT paragraph_text FROM Paragraphs", + "SELECT Other_Details, paragraph_text FROM Paragraphs", + "SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea'" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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'", + "final_utterance": "Show all paragraph ids and texts for the document with name 'Welcome to NY'.", + "interaction_utterance": [ + "Show all paragraph ids and texts.", + "For each of them, also show their document name.", + "What are the ids and texts for the paragraph in the document with name 'Welcome to NY'?" + ], + "interaction_query": [ + "SELECT paragraph_id , paragraph_text FROM Paragraphs", + "SELECT T1.paragraph_id , T1.paragraph_text, T2.Document_Name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id", + "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'" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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\"", + "final_utterance": "Show all paragraph texts for the document \"Customer reviews\".", + "interaction_utterance": [ + "Show all paragraph text.", + "For each of them, also show the document name.", + "What is the text for the document \"Customer reviews\"?" + ], + "interaction_query": [ + "SELECT paragraph_text FROM Paragraphs", + "SELECT T1.paragraph_text, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id", + "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\"" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", + "final_utterance": "Show all document ids and the number of paragraphs in each document. Order by document id.", + "interaction_utterance": [ + "Show the document id for all paragraphs.", + "For each id, show the number of paragraphs.", + "Order by document id." + ], + "interaction_query": [ + "SELECT document_id FROM Paragraphs", + "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id", + "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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", + "final_utterance": "Show all document ids, names and the number of paragraphs in each document.", + "interaction_utterance": [ + "Show all document ids and names.", + "For each of them, count the number of paragraphs in each document." + ], + "interaction_query": [ + "SELECT document_id , document_name FROM Documents", + "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" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", + "final_utterance": "List all document ids with at least two paragraphs.", + "interaction_utterance": [ + "Show the document id for all paragraphs.", + "For each of these document ids, count the number of paragraphs.", + "Which of them have at least two paragraphs?" + ], + "interaction_query": [ + "SELECT document_id FROM Paragraphs", + "SELECT document_id, count(*) FROM Paragraphs GROUP BY document_id", + "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_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", + "final_utterance": "What is the document id and name with greatest number of paragraphs?", + "interaction_utterance": [ + "Show the id number and name for all documents.", + "Also show the paragraph id for those documents.", + "For each of these results, count the number of paragraphs.", + "Which of them is the longest?" + ], + "interaction_query": [ + "SELECT document_id , document_name FROM Documents", + "SELECT T1.document_id , T2.document_name , T1.paragraph_id FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id", + "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", + "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" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", + "final_utterance": "What is the document id with least number of paragraphs?", + "interaction_utterance": [ + "Show the document id for all paragraphs.", + "For each of them, count the number of paragraphs.", + "Sort them by these counts.", + "Which has the fewest?" + ], + "interaction_query": [ + "SELECT document_id FROM Paragraphs", + "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id", + "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*)", + "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1" + ] + }, + { + "db_id": "cre_Doc_Template_Mgt", + "final_query": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2", + "final_utterance": "What is the document id with 1 to 2 paragraphs?", + "interaction_utterance": [ + "Show the document id for all paragraphs.", + "For each of these ids, show the number of paragraphs.", + "Which of them have between 1 and 2 paragraphs?" + ], + "interaction_query": [ + "SELECT document_id FROM Paragraphs", + "SELECT document_id, count(*) FROM Paragraphs GROUP BY document_id", + "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT count(*) FROM singer", + "final_utterance": "How many singers do we have?", + "interaction_utterance": [ + "Show information for all singers.", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM singer", + "SELECT count(*) FROM singer" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT name , country , age FROM singer ORDER BY age DESC", + "final_utterance": "Show name, country, age for all singers ordered by age from the oldest to the youngest.", + "interaction_utterance": [ + "Show names of all singers.", + "For each of them, also show country and age.", + "List the results in descending order of their age." + ], + "interaction_query": [ + "SELECT name FROM singer", + "SELECT name , country , age FROM singer", + "SELECT name , country , age FROM singer ORDER BY age DESC" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'", + "final_utterance": "What is the average, minimum, and maximum age of all singers from France?", + "interaction_utterance": [ + "Show age for all singers.", + "What about age for those from France?", + "What is the average, minimum, and maximum age for those?" + ], + "interaction_query": [ + "select age from singer", + "select age from singer WHERE country = 'France'", + "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1", + "final_utterance": "Show the name and the release year of the song by the youngest singer.", + "interaction_utterance": [ + "Show the names of all songs.", + "Also show the release year for each of them.", + "Order the result by the age of their singers.", + "What is the result for the song by the yongest?" + ], + "interaction_query": [ + "select song_name from singer", + "SELECT song_name , song_release_year FROM singer", + "SELECT song_name , song_release_year FROM singer ORDER BY age", + "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT DISTINCT country FROM singer WHERE age > 20", + "final_utterance": "What are all distinct countries where singers above age 20 are from?", + "interaction_utterance": [ + "Show country for all singers.", + "Only show the results for those above 20.", + "What are all distinct countries for them?" + ], + "interaction_query": [ + "SELECT country FROM singer", + "SELECT country FROM singer WHERE age > 20", + "SELECT DISTINCT country FROM singer WHERE age > 20" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT country , count(*) FROM singer GROUP BY country", + "final_utterance": "Show all countries and the number of singers in each country.", + "interaction_utterance": [ + "Show the country for all singers.", + "For each of them, what is the number of singers?" + ], + "interaction_query": [ + "SELECT country FROM singer", + "SELECT country , count(*) FROM singer GROUP BY country" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", + "final_utterance": "List all song names by singers above the average age.", + "interaction_utterance": [ + "What is the average age for all singers?", + "Show the name for songs by singers older than that." + ], + "interaction_query": [ + "SELECT avg(age) FROM singer", + "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", + "final_utterance": "Show location and name for all stadiums with a capacity between 5000 and 10000.", + "interaction_utterance": [ + "Show the name for all stadiums.", + "What about those with a capacity between 5000 and 10000?", + "Also list the location for them." + ], + "interaction_query": [ + "SELECT name FROM stadium", + "SELECT name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", + "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT avg(capacity) , max(capacity) FROM stadium", + "final_utterance": "What is the average and the maximum capacity of all stadiums?", + "interaction_utterance": [ + "Show the capacity for all stadiums.", + "What is the average of them?", + "Also show the maximum." + ], + "interaction_query": [ + "select capacity FROM stadium", + "SELECT avg(capacity) FROM stadium", + "SELECT avg(capacity) , max(capacity) FROM stadium" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", + "final_utterance": "What is the name and capacity for the stadium with highest average attendance?", + "interaction_utterance": [ + "Show the name and capacity for all stadiums.", + "Show the result in descending order of their average attendance.", + "Which one has the highest?" + ], + "interaction_query": [ + "SELECT name , capacity FROM stadium", + "SELECT name , capacity FROM stadium ORDER BY average DESC", + "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", + "final_utterance": "How many concerts are there in year 2014 or 2015?", + "interaction_utterance": [ + "Show the concert information in year 2014.", + "Also show those in year 2015.", + "How many are there in total?" + ], + "interaction_query": [ + "SELECT * FROM concert WHERE YEAR = 2014", + "SELECT * FROM concert WHERE YEAR = 2014 OR YEAR = 2015", + "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015" + ] + }, + { + "db_id": "concert_singer", + "final_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", + "final_utterance": "Show the stadium name and the number of concerts in each stadium.", + "interaction_utterance": [ + "Show the names of stadiums.", + "For each of them, also show the number of concerts." + ], + "interaction_query": [ + "SELECT name from stadium", + "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id" + ] + }, + { + "db_id": "concert_singer", + "final_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", + "final_utterance": "Show the stadium name and capacity with most number of concerts in year 2014 or after.", + "interaction_utterance": [ + "Show all stadium names and their capacities.", + "Order the results in descending order of the number of concerts in year 2014 or after.", + "Which one has the most?" + ], + "interaction_query": [ + "SELECT name , capacity FROM stadium", + "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", + "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" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", + "final_utterance": "Which year has most number of concerts?", + "interaction_utterance": [ + "Show the year for all concerts.", + "Order them in descending order of the number of concerts", + "Which year has the most?" + ], + "interaction_query": [ + "SELECT YEAR FROM concert", + "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC", + "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)", + "final_utterance": "Show the stadium names without any concert.", + "interaction_utterance": [ + "Show all stadium ids of concerts.", + "Show the stadium names without any concert." + ], + "interaction_query": [ + "SELECT stadium_id FROM concert", + "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30", + "final_utterance": "Show countries where a singer above age 40 and a singer below 30 are from.", + "interaction_utterance": [ + "Show the country for all singers.", + "How about those for singers above age 40?", + "How about those for singers below 30?", + "How about countries with both?" + ], + "interaction_query": [ + "SELECT country FROM singer", + "SELECT country FROM singer WHERE age > 40", + "SELECT country FROM singer WHERE age < 30", + "SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30" + ] + }, + { + "db_id": "concert_singer", + "final_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", + "final_utterance": "Show names for all stadiums except for stadiums having a concert in year 2014.", + "interaction_utterance": [ + "Show name for stadiums that had a concert in year 2014.", + "Show names for all stadiums except for those." + ], + "interaction_query": [ + "SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014", + "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" + ] + }, + { + "db_id": "concert_singer", + "final_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", + "final_utterance": "Show the name and theme for all concerts and the number of singers in each concert.", + "interaction_utterance": [ + "Show the name and theme for all concerts.", + "For each of those, also show the number of singers." + ], + "interaction_query": [ + "SELECT concert_name , theme from concert", + "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" + ] + }, + { + "db_id": "concert_singer", + "final_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", + "final_utterance": "List singer names and number of concerts for each singer.", + "interaction_utterance": [ + "Show the name for all singers.", + "For each of them, also show the number of concerts" + ], + "interaction_query": [ + "SELECT name FROM singer", + "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" + ] + }, + { + "db_id": "concert_singer", + "final_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", + "final_utterance": "List all singer names in concerts in year 2014.", + "interaction_utterance": [ + "List all singer names.", + "How about those performing concerts in year 2014?" + ], + "interaction_query": [ + "select name from singer", + "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" + ] + }, + { + "db_id": "concert_singer", + "final_query": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", + "final_utterance": "what is the name and nation of the singer who have a song having 'Hey' in its name?", + "interaction_utterance": [ + "What are the names of all singers?", + "Show the names for those having a song having 'Hey' in its name.", + "Also show the nation for those singers." + ], + "interaction_query": [ + "SELECT name FROM singer", + "SELECT name FROM singer WHERE song_name LIKE '%Hey%'", + "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'" + ] + }, + { + "db_id": "concert_singer", + "final_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", + "final_utterance": "Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.", + "interaction_utterance": [ + "Show the name and location for the stadiums.", + "How about those with some concerts happened in the year 2014?", + "Among those, what are stadiums also holding some concerts in the year 2015?" + ], + "interaction_query": [ + "SELECT name , location FROM stadium", + "SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014", + "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" + ] + }, + { + "db_id": "singer", + "final_query": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", + "final_utterance": "Show the name of singers whose birth year is either 1948 or 1949?", + "interaction_utterance": [ + "Show the names and birth years of singers", + "Only for the ones born in 1948.", + "Show the name of singers whose birth year is either 1948 or 1949?" + ], + "interaction_query": [ + "SELECT Name, Birth_Year from singer", + "SELECT Name, Birth_Year from singer WHERE Birth_Year = 1948", + "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949" + ] + }, + { + "db_id": "singer", + "final_query": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1", + "final_utterance": "What is the name of the singer with the largest net worth?", + "interaction_utterance": [ + "Show the name and net worth of the singers.", + "Order by richest first.", + "What is the name of the singer with the largest net worth?" + ], + "interaction_query": [ + "SELECT Name, Net_Worth_Millions FROM singer", + "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC", + "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1" + ] + }, + { + "db_id": "singer", + "final_query": "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1", + "final_utterance": "Please show the most common citizenship of singers.", + "interaction_utterance": [ + "Show the names and citizenships of singers.", + "Show citizenship counts.", + "Sort that by most common first.", + "Limit it to one." + ], + "interaction_query": [ + "SELECT Name, Citizenship FROM singer", + "SELECT Citizenship, COUNT(*) FROM singer GROUP BY Citizenship", + "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC", + "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1" + ] + }, + { + "db_id": "singer", + "final_query": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000", + "final_utterance": "Show distinct names of singers that have songs with sales more than 300000.", + "interaction_utterance": [ + "Join singer names with their song titles.", + "Limit the entries to where song sales exceed 300000.", + "Which are the distinct names in that list?" + ], + "interaction_query": [ + "SELECT t1.name, t2.title from singer as t1 join song as t2 on t1.Singer_ID = t2.Singer_ID", + "SELECT t1.name, t2.title from singer as t1 join song as t2 on t1.Singer_ID = t2.Singer_ID WHERE t2.Sales > 300000", + "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000" + ] + }, + { + "db_id": "singer", + "final_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", + "final_utterance": "Show the names of singers that have more than one song.", + "interaction_utterance": [ + "Show the names and song counts of singers.", + "Show the names of singers that have more than one song." + ], + "interaction_query": [ + "SELECT T1.Name, COUNT(*) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", + "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" + ] + }, + { + "db_id": "singer", + "final_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", + "final_utterance": "Show the names of singers and the total sales of their songs.", + "interaction_utterance": [ + "Show the songs and sale amounts.", + "Show the names of singers and the total sales of their songs." + ], + "interaction_query": [ + "SELECT title, Sales from song", + "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" + ] + }, + { + "db_id": "singer", + "final_query": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)", + "final_utterance": "List the name of singers that do not have any song.", + "interaction_utterance": [ + "Which singer ids have at least one song?", + "Which singer names do not?" + ], + "interaction_query": [ + "SELECT DISTINCT Singer_ID from song", + "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_query": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1", + "final_utterance": "Which cities do more than one employee under age 30 come from?", + "interaction_utterance": [ + "find all employees who are under age 30.", + "Which cities did they come from?", + "show the cities from which more than one employee originated." + ], + "interaction_query": [ + "SELECT * FROM employee WHERE age < 30", + "SELECT city FROM employee WHERE age < 30", + "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_query": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", + "final_utterance": "Find the manager name and district of the shop whose number of products is the largest.", + "interaction_utterance": [ + "show all shops.", + "what is the total number of products they are selling?", + "find the name of the shop with the greatest number of products.", + "what are its manager name and district?" + ], + "interaction_query": [ + "SELECT * FROM shop", + "SELECT sum(number_products) FROM shop", + "SELECT name FROM shop ORDER BY number_products DESC LIMIT 1", + "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_query": "SELECT min(Number_products) , max(Number_products) FROM shop", + "final_utterance": "find the minimum and maximum number of products of all stores.", + "interaction_utterance": [ + "find the average number of products of all stores.", + "how about the minimum and maximum?" + ], + "interaction_query": [ + "SELECT avg(Number_products) FROM shop", + "SELECT min(Number_products) , max(Number_products) FROM shop" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_query": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", + "final_utterance": "Find the names of stores whose number products is more than the average number of products.", + "interaction_utterance": [ + "show the name and number of product for all shops.", + "what is the average number of products?", + "Find the names of stores whose number products is less than the average.", + "how about more than?" + ], + "interaction_query": [ + "SELECT name, number_products FROM shop", + "SELECT avg(number_products) FROM shop", + "SELECT name FROM shop WHERE number_products < (SELECT avg(number_products) FROM shop)", + "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_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", + "final_utterance": "find the name of employee who was awarded the most times in the evaluation.", + "interaction_utterance": [ + "how many evaluations are there?", + "what years were they given?", + "find the name of the employee who received the most evaluation awards." + ], + "interaction_query": [ + "SELECT count(*) FROM evaluation", + "SELECT Year_awarded FROM evaluation", + "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" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_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", + "final_utterance": "Find the name of the employee who got the highest one time bonus.", + "interaction_utterance": [ + "find the name of the employees who received past evaluation awards.", + "who won the most times?", + "ok, which one received the award with the highest bonus?" + ], + "interaction_query": [ + "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID", + "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", + "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" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_query": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", + "final_utterance": "Find the names of employees who never won any award in the evaluation.", + "interaction_utterance": [ + "find the number of different employees who were awarded in the past evaluations.", + "what are their names?", + "show the names of the employees who never won." + ], + "interaction_query": [ + "SELECT count(distinct Employee_ID) FROM evaluation", + "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID", + "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_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", + "final_utterance": "What is the name of the shop that is hiring the largest number of employees?", + "interaction_utterance": [ + "how many shops are hiring?", + "what are the shops' names?'", + "which one is hiring the largest number of employees?" + ], + "interaction_query": [ + "SELECT count(distinct Shop_ID) FROM hiring", + "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id", + "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" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_query": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)", + "final_utterance": "Find the name of the shops that do not hire any employee.", + "interaction_utterance": [ + "show all hiring info.", + "Find the names of any shops not hiring." + ], + "interaction_query": [ + "SELECT * FROM hiring", + "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)" + ] + }, + { + "db_id": "employee_hire_evaluation", + "final_query": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", + "final_utterance": "Find the number of employees hired in each shop; show the shop name as well.", + "interaction_utterance": [ + "how many employees are being hired in all shops?", + "show the number for each shop. show the shop name as well." + ], + "interaction_query": [ + "SELECT count(*) FROM hiring", + "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name" + ] + }, + { + "db_id": "museum_visit", + "final_query": "SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC", + "final_utterance": "Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.", + "interaction_utterance": [ + "show all visitors.", + "order them by their membership level from high to low.", + "just show their names.", + "do not list those whose membership level is lower than or equal to 4." + ], + "interaction_query": [ + "SELECT * FROM visitor", + "SELECT * FROM visitor ORDER BY Level_of_membership DESC", + "SELECT name FROM visitor ORDER BY Level_of_membership DESC", + "SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC" + ] + }, + { + "db_id": "museum_visit", + "final_query": "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC", + "final_utterance": "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.", + "interaction_utterance": [ + "find the number of visitors with a membership level higher than 4.", + "what are their names and membership levels?", + "sort by their age from old to young." + ], + "interaction_query": [ + "SELECT count(*) FROM visitor WHERE Level_of_membership > 4", + "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4", + "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC" + ] + }, + { + "db_id": "museum_visit", + "final_query": "SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1", + "final_utterance": "Find the id and name of the museum that has the most staff members?", + "interaction_utterance": [ + "how many museums are in the table?", + "what is the average number of staff working in these museums?", + "Find the name of the museum that has the most staff members.", + "what is its id?" + ], + "interaction_query": [ + "SELECT count(*) FROM museum", + "SELECT avg(num_of_staff) FROM museum", + "SELECT name FROM museum ORDER BY num_of_staff DESC LIMIT 1", + "SELECT museum_id FROM museum ORDER BY num_of_staff DESC LIMIT 1" + ] + }, + { + "db_id": "museum_visit", + "final_query": "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)", + "final_utterance": "find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.", + "interaction_utterance": [ + "find the names of museums opened before 2010.", + "how about after?", + "find the minimum number of staff of those museums.", + "find the names of museums which have more staff than that." + ], + "interaction_query": [ + "SELECT name FROM museum WHERE open_year < 2010", + "SELECT name FROM museum WHERE open_year > 2010", + "SELECT min(num_of_staff) FROM museum WHERE open_year > 2010", + "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)" + ] + }, + { + "db_id": "museum_visit", + "final_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", + "final_utterance": "find the id, name and age for visitors who visited some museums more than once.", + "interaction_utterance": [ + "find the names of visitors who visited and who have some museum visit records.", + "which of them visited some museums more than once?", + "also show their ids and ages." + ], + "interaction_query": [ + "SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id", + "SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING count(*) > 1", + "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" + ] + }, + { + "db_id": "museum_visit", + "final_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", + "final_utterance": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?", + "interaction_utterance": [ + "what is the total spent on all visits?", + "find the name of the visitor who has spent the most money for his or her visits.", + "what are his id and membership level?" + ], + "interaction_query": [ + "SELECT sum(Total_spent) FROM visit", + "SELECT t1.name 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", + "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" + ] + }, + { + "db_id": "museum_visit", + "final_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", + "final_utterance": "What are the id and name of the museum visited most times?", + "interaction_utterance": [ + "show the id and name of all museums.", + "show the number of tickets sold for each of them.", + "which one was visited the most times?" + ], + "interaction_query": [ + "SELECT Museum_ID, name FROM museum", + "SELECT t2.Museum_ID , t1.name, count(*) FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID", + "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" + ] + }, + { + "db_id": "museum_visit", + "final_query": "SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)", + "final_utterance": "What is the name of the museum that had no visitor yet?", + "interaction_utterance": [ + "how many museums are there?", + "how many of them have not had any visitors yet?", + "what are their names?" + ], + "interaction_query": [ + "SELECT count(*) FROM museum", + "SELECT count(*) FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)", + "SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)" + ] + }, + { + "db_id": "museum_visit", + "final_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", + "final_utterance": "Find the name and age of the visitor who bought the most tickets at once.", + "interaction_utterance": [ + "how many tickets were sold from all of the museums?", + "find the id of the visitor who bought the most tickets at once.", + "Find the name and age of this visitor." + ], + "interaction_query": [ + "SELECT sum(num_of_ticket) FROM visit", + "SELECT visitor_id FROM visit ORDER BY num_of_ticket DESC LIMIT 1", + "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" + ] + }, + { + "db_id": "museum_visit", + "final_query": "SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit", + "final_utterance": "What are the average and maximum number of tickets bought in all visits?", + "interaction_utterance": [ + "find the total cost of all visits.", + "what was the amount of the largest one time purchase of tickets out of all visits?", + "how about the average and maximum number of tickets purchased?" + ], + "interaction_query": [ + "SELECT sum(Total_spent) FROM visit", + "SELECT max(Total_spent) FROM visit", + "SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit" + ] + }, + { + "db_id": "museum_visit", + "final_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", + "final_utterance": "What is the total ticket expense of the visitors whose membership level is 1?", + "interaction_utterance": [ + "what is the lowest level of membership?", + "find the number of visitors whose membership level is 1.", + "show the ticket expenses of all of their museum visits.", + "what is the total amount of money spent?" + ], + "interaction_query": [ + "SELECT min(Level_of_membership) FROM visitor", + "SELECT count(*) FROM visitor WHERE Level_of_membership = 1", + "SELECT t2.Total_spent FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1", + "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" + ] + }, + { + "db_id": "museum_visit", + "final_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", + "final_utterance": "What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?", + "interaction_utterance": [ + "find the names of museums opened before 2009.", + "what about those opened after 2011?", + "What is the name of the visitor who visited both groups of museums?" + ], + "interaction_query": [ + "SELECT name FROM museum WHERE open_year < 2009", + "SELECT name FROM museum WHERE open_year > 2011", + "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" + ] + }, + { + "db_id": "museum_visit", + "final_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)", + "final_utterance": "Find the number of visitors who did not visit any museum opened after 2010.", + "interaction_utterance": [ + "find the names of museums opened after 2010", + "find the number of visits to these museums?", + "Find the number of visitors who did not visit these museums." + ], + "interaction_query": [ + "SELECT name FROM museum WHERE open_year > 2010", + "SELECT count(*) FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010", + "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)" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10", + "final_utterance": "How many high schoolers are there in grade 9 or 10?", + "interaction_utterance": [ + "How many high schoolers are there?", + "How many in each grade 11 or 12?", + "How many in grade 9 or 10?" + ], + "interaction_query": [ + "SELECT count(*) FROM Highschooler", + "SELECT count(*) FROM Highschooler WHERE grade = 11 OR grade = 12", + "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1", + "final_utterance": "Which grade has the most high schoolers?", + "interaction_utterance": [ + "How many distinct grades are there?", + "What are they?", + "Which one has the least number of highschoolers?", + "Which one has the most?" + ], + "interaction_query": [ + "SELECT count(distinct grade) FROM Highschooler", + "SELECT distinct grade FROM Highschooler", + "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) ASC LIMIT 1", + "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", + "final_utterance": "Show me all grades that have at least 4 students.", + "interaction_utterance": [ + "How many highschoolers are there in total?", + "How many per grade?", + "What grades have at least 10 students?", + "How about at least 4?" + ], + "interaction_query": [ + "SELECT count(*) FROM Highschooler", + "SELECT grade, count(*) FROM Highschooler GROUP BY grade", + "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 10", + "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT T2.name, count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", + "final_utterance": "Show the names of high school students and their corresponding number of friends.", + "interaction_utterance": [ + "What are the names of all the high school students?", + "Show the names of the friends for each one.", + "How many friends does each student each have?" + ], + "interaction_query": [ + "SELECT name FROM highschooler", + "SELECT T2.name, T3.name FROM friend as T1 join highschooler as T2 on friend_id = T2.ID join highschooler as T3 on student_id = T3.ID", + "SELECT T2.name, count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id" + ] + }, + { + "db_id": "network_1", + "final_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", + "final_utterance": "What is the name of the high schooler who has the greatest number of friends?", + "interaction_utterance": [ + "What are the names of all the high schoolers?", + "Show me the number of friends for each one.", + "Which one has the least number of friends?", + "How about the greatest?" + ], + "interaction_query": [ + "SELECT name FROM highschooler", + "SELECT T2.name, count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", + "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(*) ASC LIMIT 1", + "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" + ] + }, + { + "db_id": "network_1", + "final_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", + "final_utterance": "Show the names of high schoolers who have at least 3 friends.", + "interaction_utterance": [ + "How many highschoolers have more than 5?", + "at least 3?", + "What are their names?" + ], + "interaction_query": [ + "SELECT count(*) FROM (SELECT * FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) > 5)", + "SELECT count(*) FROM (SELECT * FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3)", + "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" + ] + }, + { + "db_id": "network_1", + "final_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\"", + "final_utterance": "Show the names of all of the high schooler Kyle's friends.", + "interaction_utterance": [ + "Show me information on the high schooler named \"Kyle.\"", + "How many friends does he have?", + "What are their names?" + ], + "interaction_query": [ + "SELECT * FROM highschooler where name = \"Kyle\"", + "SELECT count(*) 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\"", + "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\"" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", + "final_utterance": "How many friends does the high school student Kyle have?", + "interaction_utterance": [ + "Is there a highschooler named Kyle?", + "Who does he like?", + "What are the names of his friends?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM highschooler where name = \"Kyle\"", + "SELECT T3.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.liked_id = T3.id WHERE T2.name = \"Kyle\"", + "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\"", + "SELECT count(*) 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\"" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", + "final_utterance": "Show ids of all students who do not have any friends.", + "interaction_utterance": [ + "Show me all the high school student ids.", + "How many friends do each of them have?", + "Which ones have at least 1?", + "Which ones have none?" + ], + "interaction_query": [ + "SELECT ID FROM highschooler", + "SELECT student_id, count(*) FROM friend group by student_id", + "SELECT student_id FROM Friend", + "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", + "final_utterance": "Show names of all high school students who do not have any friends.", + "interaction_utterance": [ + "What are the names of all the highshcool students?", + "Which ones have at least 5 friends?", + "how about at least 1?", + "how about 0?" + ], + "interaction_query": [ + "SELECT name FROM highschooler", + "SELECT count(*) FROM (SELECT * FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 5)", + "SELECT distinct T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", + "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", + "final_utterance": "Show the ids of high schoolers who have friends and are also liked by someone else.", + "interaction_utterance": [ + "Show me the ids of all highschoolers who have friends?", + "Also show, for each, the ids of the people they like?", + "Now only show those who are liked by someone else!", + "Show me just their ids!" + ], + "interaction_query": [ + "SELECT student_id FROM Friend", + "SELECT distinct T1.student_id, T2.liked_id FROM Friend as T1 JOIN Likes as T2 ON T1.student_id = T2.student_id", + "SELECT distinct T1.student_id, T2.liked_id FROM Friend as T1 JOIN Likes as T2 ON T1.student_id = T2.student_id where T1.student_id in (SELECT liked_id FROM Likes)", + "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes" + ] + }, + { + "db_id": "network_1", + "final_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", + "final_utterance": "Show name of all students who have some friends and also are liked by someone else.", + "interaction_utterance": [ + "How many high schoolers are liked by someone else?", + "What are their names?", + "How many of them have friends?", + "Who are they?" + ], + "interaction_query": [ + "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", + "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", + "SELECT count (*) FROM (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)", + "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" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", + "final_utterance": "Show the names of high schoolers who have likes, and numbers of likes for each.", + "interaction_utterance": [ + "What are the names of the highschoolers who don't like anyone?", + "How about those who like others?", + "How many people do they each like?" + ], + "interaction_query": [ + "SELECT name FROM Highschooler where ID not in (SELECT student_id FROM Likes)", + "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", + "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id" + ] + }, + { + "db_id": "network_1", + "final_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", + "final_utterance": "What is the name of the high schooler who has the greatest number of likes?", + "interaction_utterance": [ + "How many high schoolers like somebody else?", + "What are their names?", + "what is the greatest number of likes anyone has?", + "who has the greatest number of likes?" + ], + "interaction_query": [ + "SELECT count(distinct student_id) FROM likes", + "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", + "SELECT count(*) 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", + "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" + ] + }, + { + "db_id": "network_1", + "final_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", + "final_utterance": "Show the names of students who have at least 2 likes.", + "interaction_utterance": [ + "Show me the names of all students?", + "How about those who like at least one other person!", + "How about those who like at least two other students!" + ], + "interaction_query": [ + "SELECT name FROM highschooler", + "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 1", + "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" + ] + }, + { + "db_id": "network_1", + "final_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", + "final_utterance": "Show the names of students who have a grade higher than 5 and have at least 2 friends.", + "interaction_utterance": [ + "What are the names of the students who have some friends?", + "How about those have at least 2 friends?", + "What grades are they each in?", + "Show me the names of only those who are in a grade higher than 5!" + ], + "interaction_query": [ + "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", + "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", + "SELECT T2.name, T2.grade FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", + "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" + ] + }, + { + "db_id": "network_1", + "final_query": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", + "final_utterance": "How many likes does Kyle have?", + "interaction_utterance": [ + "What grade is the student named Kyle in?", + "How many other students like him?", + "What are their names?", + "How many other students does he like?" + ], + "interaction_query": [ + "SELECT grade FROM highschooler where name = \"Kyle\"", + "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id WHERE T2.name = \"Kyle\"", + "SELECT T3.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id JOIN Highschooler as T3 on T3.ID = T1.student_id WHERE T2.name = \"Kyle\"", + "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"" + ] + }, + { + "db_id": "network_1", + "final_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)", + "final_utterance": "Find the average grade of all students who have some friends.", + "interaction_utterance": [ + "Show me the student_id and the grade for all students.", + "What is the average grade?", + "How about for students who have no friends?", + "How about for those who have some friends?" + ], + "interaction_query": [ + "SELECT id, grade FROM highschooler", + "SELECT avg(grade) FROM highschooler", + "SELECT avg(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)", + "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)" + ] + }, + { + "db_id": "course_teach", + "final_query": "SELECT count(*) FROM teacher", + "final_utterance": "How many teachers are there?", + "interaction_utterance": [ + "Show all the teachers.", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM teacher", + "SELECT count(*) FROM teacher" + ] + }, + { + "db_id": "course_teach", + "final_query": "SELECT Name FROM teacher ORDER BY Age ASC", + "final_utterance": "List the names of teachers in ascending order of age.", + "interaction_utterance": [ + "What is the name of each teacher?", + "Sort them in ascending order of age." + ], + "interaction_query": [ + "SELECT Name FROM teacher", + "SELECT Name FROM teacher ORDER BY Age ASC" + ] + }, + { + "db_id": "course_teach", + "final_query": "SELECT Age , Hometown FROM teacher", + "final_utterance": "What are the age and hometown of teachers?", + "interaction_utterance": [ + "What is the age of each teacher?", + "Also show the hometown for each." + ], + "interaction_query": [ + "SELECT Hometown FROM teacher", + "SELECT Age , Hometown FROM teacher" + ] + }, + { + "db_id": "course_teach", + "final_query": "SELECT Name FROM teacher WHERE Hometown != \"Little Lever Urban Distric\"", + "final_utterance": "List the name of teachers whose hometown is not \"Little Lever Urban District\".", + "interaction_utterance": [ + "What is the hometown of each teacher?", + "Which teacher's hometown is not \"Little Lever Urban District\"?", + "Give me their names." + ], + "interaction_query": [ + "SELECT Hometown FROM teacher", + "SELECT * FROM teacher WHERE Hometown != \"Little Lever Urban Distric\"", + "SELECT Name FROM teacher WHERE Hometown != \"Little Lever Urban Distric\"" + ] + }, + { + "db_id": "course_teach", + "final_query": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33", + "final_utterance": "Show the name of teachers aged either 32 or 33?", + "interaction_utterance": [ + "What are the ages of all the teachers?", + "Which teachers are age 32?", + "Which teachers are age 32 or 33?", + "What are their names?" + ], + "interaction_query": [ + "SELECT Age FROM teacher", + "SELECT * FROM teacher WHERE Age = 32", + "SELECT * FROM teacher WHERE Age = 32 OR Age = 33", + "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33" + ] + }, + { + "db_id": "course_teach", + "final_query": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1", + "final_utterance": "What is the hometown of the youngest teacher?", + "interaction_utterance": [ + "Sort all the teachers by their age.", + "Which teacher is the youngest?", + "What is his or her hometown?" + ], + "interaction_query": [ + "SELECT * FROM teacher ORDER BY Age", + "SELECT * FROM teacher ORDER BY Age ASC LIMIT 1", + "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1" + ] + }, + { + "db_id": "course_teach", + "final_query": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown", + "final_utterance": "Show different hometown of teachers and the number of teachers from each hometown.", + "interaction_utterance": [ + "What is the hometown of each teacher?", + "Can you order teachers by their hometowns?", + "Show the number of teachers from each hometown." + ], + "interaction_query": [ + "SELECT Hometown FROM teacher", + "SELECT * FROM teacher order BY Hometown", + "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown" + ] + }, + { + "db_id": "course_teach", + "final_query": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1", + "final_utterance": "List the most common hometown of teachers.", + "interaction_utterance": [ + "How many teachers are there?", + "How many are there for each hometown?", + "Find the most common hometown of teachers." + ], + "interaction_query": [ + "SELECT COUNT(*) FROM teacher", + "SELECT COUNT(*) FROM teacher GROUP BY Hometown", + "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1" + ] + }, + { + "db_id": "course_teach", + "final_query": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2", + "final_utterance": "Show the hometowns shared by at least two teachers.", + "interaction_utterance": [ + "How many teachers are there?", + "How many teachers are there for each hometown?", + "Which hometowns are shared by at least two teachers?" + ], + "interaction_query": [ + "SELECT COUNT(*) FROM teacher", + "SELECT COUNT(*) FROM teacher GROUP BY Hometown", + "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2" + ] + }, + { + "db_id": "course_teach", + "final_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", + "final_utterance": "Show names of teachers and the courses they are arranged to teach.", + "interaction_utterance": [ + "Find all the course arrangements.", + "For each of the courses, show the teacher who teaches it." + ], + "interaction_query": [ + "SELECT * FROM course_arrange", + "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" + ] + }, + { + "db_id": "course_teach", + "final_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", + "final_utterance": "Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.", + "interaction_utterance": [ + "Find all the course arrangements.", + "Show names of teachers and the courses they are arranged to teach.", + "Sort the results by teacher's name" + ], + "interaction_query": [ + "SELECT * FROM course_arrange", + "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", + "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" + ] + }, + { + "db_id": "course_teach", + "final_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\"", + "final_utterance": "Show the name of the teacher for the math course.", + "interaction_utterance": [ + "Find all the course arrangements.", + "Show names of teachers and the courses they are arranged to teach.", + "Which teachers teach the math course? Give me their names." + ], + "interaction_query": [ + "SELECT * FROM course_arrange", + "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", + "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\"" + ] + }, + { + "db_id": "course_teach", + "final_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", + "final_utterance": "Show names of teachers and the number of courses they teach.", + "interaction_utterance": [ + "Show all the teacher names.", + "Show names of teachers and the number of courses they teach." + ], + "interaction_query": [ + "SELECT Name FROM teacher", + "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name" + ] + }, + { + "db_id": "course_teach", + "final_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", + "final_utterance": "Show names of teachers that teach at least two courses.", + "interaction_utterance": [ + "Show all the teacher names.", + "Show names of teachers and the number of courses they teach.", + "Show the names of teachers who teach at least two courses." + ], + "interaction_query": [ + "SELECT Name FROM teacher", + "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", + "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" + ] + }, + { + "db_id": "real_estate_properties", + "final_query": "SELECT count(*) FROM Other_Available_Features", + "final_utterance": "How many available features are there in total?", + "interaction_utterance": [ + "Show all the available features.", + "How many available features are there?" + ], + "interaction_query": [ + "SELECT * FROM Other_Available_Features", + "SELECT count(*) FROM Other_Available_Features" + ] + }, + { + "db_id": "real_estate_properties", + "final_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\"", + "final_utterance": "What is the feature type name of feature AirCon?", + "interaction_utterance": [ + "Find the available features with feature name \"AirCon\".", + "What is the feature type name?" + ], + "interaction_query": [ + "SELECT * FROM Other_Available_Features WHERE feature_name = \"AirCon\"", + "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\"" + ] + }, + { + "db_id": "real_estate_properties", + "final_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", + "final_utterance": "Show the property type descriptions of properties belonging to that code.", + "interaction_utterance": [ + "What is the property type description of each property?", + "Show the property type descriptions of properties for each property type code." + ], + "interaction_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", + "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" + ] + }, + { + "db_id": "voter_1", + "final_query": "SELECT count(*) FROM area_code_state", + "final_utterance": "How many states are there?", + "interaction_utterance": [ + "Show all area codes and states.", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM area_code_state", + "SELECT count(*) FROM area_code_state" + ] + }, + { + "db_id": "voter_1", + "final_query": "SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC", + "final_utterance": "List the contestant numbers and names, ordered by contestant name descending.", + "interaction_utterance": [ + "Show all info about contestants.", + "What are their names?", + "Can you also show contestant numbers?", + "Can you sort them ordered in descending order of contestant name?" + ], + "interaction_query": [ + "SELECT * FROM contestants", + "SELECT contestant_name FROM contestants", + "SELECT contestant_number , contestant_name FROM contestants", + "SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC" + ] + }, + { + "db_id": "voter_1", + "final_query": "SELECT vote_id , phone_number , state FROM votes", + "final_utterance": "List the vote ids, phone numbers and states of all votes.", + "interaction_utterance": [ + "Show all info about votes.", + "Also provide vote ids.", + "Also show phone numbers." + ], + "interaction_query": [ + "SELECT state FROM votes", + "SELECT vote_id, state FROM votes", + "SELECT vote_id , phone_number , state FROM votes" + ] + }, + { + "db_id": "voter_1", + "final_query": "SELECT max(area_code) , min(area_code) FROM area_code_state", + "final_utterance": "What are the maximum and minimum values of area codes?", + "interaction_utterance": [ + "Show all area codes.", + "What is the largest one?", + "How about smallest one?", + "Give me both." + ], + "interaction_query": [ + "SELECT area_code FROM area_code_state", + "SELECT max(area_code) FROM area_code_state", + "SELECT min(area_code) FROM area_code_state", + "SELECT max(area_code) , min(area_code) FROM area_code_state" + ] + }, + { + "db_id": "voter_1", + "final_query": "SELECT max(created) FROM votes WHERE state = 'CA'", + "final_utterance": "What is last date created of votes from the state 'CA'?", + "interaction_utterance": [ + "Show all votes.", + "Which ones are from the state 'CA'?", + "Among those, can you give me the last date created?" + ], + "interaction_query": [ + "SELECT * FROM votes", + "SELECT * FROM votes WHERE state = 'CA'", + "SELECT max(created) FROM votes WHERE state = 'CA'" + ] + }, + { + "db_id": "voter_1", + "final_query": "SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'", + "final_utterance": "What are the names of the contestants whose names are not 'Jessie Alloway'", + "interaction_utterance": [ + "Show all contestants.", + "What are their names?", + "Can you not include the name 'Jessie Alloway'?" + ], + "interaction_query": [ + "SELECT * FROM contestants", + "SELECT contestant_name FROM contestants", + "SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'" + ] + }, + { + "db_id": "voter_1", + "final_query": "SELECT DISTINCT state , created FROM votes", + "final_utterance": "What are the distinct states and create time of all votes?", + "interaction_utterance": [ + "Show all votes?", + "Among these, what is the list of states?", + "What are the distinct states and create time?" + ], + "interaction_query": [ + "SELECT * FROM votes", + "SELECT state FROM votes", + "SELECT DISTINCT state , created FROM votes" + ] + }, + { + "db_id": "voter_1", + "final_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", + "final_utterance": "What are the contestant numbers and names of the contestants who had at least two votes?", + "interaction_utterance": [ + "Show all the contestants.", + "Show all the votes.", + "Can you show contestants with at least two votes?", + "What are their contestant numbers and names?" + ], + "interaction_query": [ + "SELECT * FROM contestants", + "SELECT * FROM votes", + "SELECT * FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2", + "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" + ] + }, + { + "db_id": "voter_1", + "final_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", + "final_utterance": "Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?", + "interaction_utterance": [ + "Show all the contestants.", + "Show all the votes.", + "Can you show the contestant with the least votes?", + "What is his or her contestant number and contestant name?" + ], + "interaction_query": [ + "SELECT * FROM contestants", + "SELECT * FROM votes", + "SELECT * 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", + "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" + ] + }, + { + "db_id": "voter_1", + "final_query": "SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'", + "final_utterance": "What are the number of votes from state 'NY' or 'CA'?", + "interaction_utterance": [ + "Show all votes.", + "What about those from state 'NY' or 'CA'?", + "Give me the count of these votes." + ], + "interaction_query": [ + "SELECT * FROM votes", + "SELECT * FROM votes WHERE state = 'NY' OR state = 'CA'", + "SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'" + ] + }, + { + "db_id": "voter_1", + "final_query": "SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )", + "final_utterance": "How many contestants did not get voted?", + "interaction_utterance": [ + "Show all contestants", + "Which contestants did not get any votes?", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM contestants", + "SELECT * FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )", + "SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )" + ] + }, + { + "db_id": "voter_1", + "final_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", + "final_utterance": "What is the area code in which the most voters voted?", + "interaction_utterance": [ + "Show all area codes and states.", + "Show all votes.", + "Get the count of votes for each area code.", + "What is the area code in which the most voters voted?" + ], + "interaction_query": [ + "SELECT * FROM area_code_state", + "SELECT * FROM votes", + "SELECT count(*) FROM AREA_CODE_STATE AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code", + "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" + ] + }, + { + "db_id": "voter_1", + "final_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'", + "final_utterance": "What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?", + "interaction_utterance": [ + "Show all votes.", + "Show those that were for the contestant named 'Tabatha Gehling'.", + "What are the create dates, states, and phone numbers of these votes?" + ], + "interaction_query": [ + "SELECT * FROM votes", + "SELECT * FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'", + "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'" + ] + }, + { + "db_id": "voter_1", + "final_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'", + "final_utterance": "List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.", + "interaction_utterance": [ + "Show all area codes.", + "Can you tell me area codes in which voters voted for the contestant 'Tabatha Gehling'?", + "How about both the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'?" + ], + "interaction_query": [ + "SELECT * FROM area_code_state", + "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'", + "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'" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "Which department offers the most number of degrees? List department name and id.", + "interaction_utterance": [ + "Give me the description of the department that offers the most number of degrees.", + "What's the name and id of that department?" + ], + "interaction_query": [ + "SELECT T2.department_description , 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", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_query": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", + "final_utterance": "How many degrees does the engineering department offer?", + "interaction_utterance": [ + "Show me all the degrees offered by the engineering department.", + "How many are there?" + ], + "interaction_query": [ + "SELECT * FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", + "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "What are the names and id of courses having at most 2 sections?", + "interaction_utterance": [ + "Show me courses that have exactly 2 sections.", + "Show me names and ids for courses that have at most 2 sections." + ], + "interaction_query": [ + "SELECT * FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) = 2", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "What is the semester which most student registered in? Show both the name and the id.", + "interaction_utterance": [ + "Which semester did the least number of students register? Give me its name and id.", + "How about the semester that most number of students registered?" + ], + "interaction_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(*) ASC LIMIT 1", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_query": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'", + "final_utterance": "What is the description of the department whose name has the substring the computer?", + "interaction_utterance": [ + "Show me all department names that contain the word \"computer\"", + "Show me their descriptions." + ], + "interaction_query": [ + "SELECT * FROM Departments WHERE department_name LIKE '%computer%'", + "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.", + "interaction_utterance": [ + "How many people are enrolled in 2 degree programs in one semester?", + "Show me their first, middle, and last names." + ], + "interaction_query": [ + "SELECT count(*) FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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'", + "final_utterance": "Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.", + "interaction_utterance": [ + "How many people are enrolled in the Bachelor degree program?", + "What are their first, middle, and last names?" + ], + "interaction_query": [ + "SELECT DISTINCT count(*) 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'", + "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'" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "Find the kind of program which most number of students are enrolled in?", + "interaction_utterance": [ + "Show me the descriptions of programs with 3 highest number of enrolled students.", + "Show me the name of program with the most enrolled students." + ], + "interaction_query": [ + "SELECT T1.degree_summary_description 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 3", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "Find the program which most number of students are enrolled in. List both the id and the summary.", + "interaction_utterance": [ + "What is the description of the program that has the least number of enrolled students?", + "How about the program that has the most number of enrolled students?", + "Show me the id and summary." + ], + "interaction_query": [ + "SELECT T1.degree_summary_description 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(*) ASC LIMIT 1", + "SELECT T1.degree_summary_description 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", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "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.", + "interaction_utterance": [ + "Show me the id, first and last names of top 3 students who have enrolled for the most times in any program.", + "Show me just the top 1." + ], + "interaction_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 3", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_query": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", + "final_utterance": "Which semesters do not have any student enrolled? List the semester name.", + "interaction_utterance": [ + "Give me the description of a semester with no enrolled students.", + "What's the name of that semester?" + ], + "interaction_query": [ + "SELECT semester_description FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", + "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "What's the name of the course with most number of enrollments?", + "interaction_utterance": [ + "What's the name of the course with the least number of enrollments?", + "How many enrollments does the course with most enrollments have?", + "What's the name of that course?" + ], + "interaction_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(*) ASC LIMIT 1", + "SELECT count(*) 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", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.", + "interaction_utterance": [ + "How many students currently live in North Carolina?", + "How many of those students have not registered in any degree program?", + "What are their last names?" + ], + "interaction_query": [ + "SELECT count(*) FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina'", + "SELECT count(*) 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", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "Show the date and id of the transcript with at least 2 course results.", + "interaction_utterance": [ + "Show me date and id of transcripts with exactly 2 course results.", + "How about transcripts with at least 2 course results?" + ], + "interaction_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", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_query": "SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'", + "final_utterance": "What is the phone number of the man with the first name Timmothy and the last name Ward?", + "interaction_utterance": [ + "What is the address of the student with first name Timothy and last name Ward?", + "What's his phone number?" + ], + "interaction_query": [ + "SELECT current_address_id FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'", + "SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", + "final_utterance": "Who is the first student to register? List the first name, middle name and last name.", + "interaction_utterance": [ + "Who was the last student to register? Show me the first, middle, and last names of that student.", + "Who was the first to register?" + ], + "interaction_query": [ + "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered DESC LIMIT 1", + "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_query": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1", + "final_utterance": "Who is the earliest graduate of the school? List the first name, middle name and last name.", + "interaction_utterance": [ + "Who is the least recent graduate of the school? List the first, middle, and last names.", + "Who is the earliest graduate of the school?" + ], + "interaction_query": [ + "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left DESC LIMIT 1", + "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "Which address holds the most number of students currently? List the address id and all lines.", + "interaction_utterance": [ + "Give me the id of the address that holds the most number of students?", + "How many students live there?", + "Give me all the lines as well as the id of that address." + ], + "interaction_query": [ + "SELECT T1.address_id 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", + "SELECT count(*) 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", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_query": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", + "final_utterance": "When is the first transcript released? List the date and details.", + "interaction_utterance": [ + "Give me details of the first transcript released.", + "Tell me when it was released as well, along with its details." + ], + "interaction_query": [ + "SELECT other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", + "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_query": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1", + "final_utterance": "What is the last transcript release date?", + "interaction_utterance": [ + "What is the oldest transcript release date?", + "How about the latest?" + ], + "interaction_query": [ + "SELECT transcript_date FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", + "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_query": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", + "final_utterance": "How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.", + "interaction_utterance": [ + "How many times, at minimum, can a course enrollment result show in different transcript? Show me the course enrollment id.", + "How many times at most?" + ], + "interaction_query": [ + "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) ASC LIMIT 1", + "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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", + "final_utterance": "Show the date of the transcript which shows the least number of results, also list the id.", + "interaction_utterance": [ + "Show other details of the transcript with least number of results.", + "Show me the date and id of that transcript." + ], + "interaction_query": [ + "SELECT T2.other_details 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", + "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" + ] + }, + { + "db_id": "student_transcripts_tracking", + "final_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'", + "final_utterance": "Find the semester when both Master students and Bachelor students got enrolled in.", + "interaction_utterance": [ + "Find a semester when there was a Master student enrolled.", + "How about a semester when there was a Bachelor student enrolled?", + "Find a semester that both types of students were enrolled in." + ], + "interaction_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'", + "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'", + "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'" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals", + "final_utterance": "Which states have both owners and professionals living there?", + "interaction_utterance": [ + "List all the information about the owners.", + "What about the Professionals?", + "Now show the states of them.", + "Which of them have both owners and professionals living there?" + ], + "interaction_query": [ + "SELECT * FROM Owners", + "SELECT * FROM Professionals", + "SELECT state FROM Professionals", + "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", + "final_utterance": "What is the average age of the dogs who have gone through any treatments?", + "interaction_utterance": [ + "Show all the dog ages.", + "What is the maximum and minimum value?", + "Which of the dogs have gone through treatments?", + "What about the average age of them?" + ], + "interaction_query": [ + "SELECT age FROM Dogs", + "SELECT max(age), min(age) FROM Dogs", + "SELECT * FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", + "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )" + ] + }, + { + "db_id": "dog_kennels", + "final_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", + "final_utterance": "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.", + "interaction_utterance": [ + "List all the professionals who are Employees.", + "How many of them live in Connecticut?", + "What about in Indiana?", + "Among all the professionals, which have done treatment only 1 treatments?", + "List the id, last name and cell phone of the professionals who live in the state of Indiana or have done treatment on more than 2 treatments?" + ], + "interaction_query": [ + "SELECT * FROM Professionals WHERE role_code = 'Employee'", + "SELECT count(*) FROM Professionals WHERE state = 'Connecticut'", + "SELECT count(*) FROM Professionals WHERE state = 'Indiana'", + "SELECT * FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) = 1", + "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" + ] + }, + { + "db_id": "dog_kennels", + "final_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 )", + "final_utterance": "Which dogs have not cost their owner more than 1000 for treatment? List the dog names.", + "interaction_utterance": [ + "Show the dog name and total cost of each dog.", + "Which of them cost over 500?", + "What about more than 1000?" + ], + "interaction_query": [ + "SELECT name, sum(cost_of_treatment) FROM Treatments AS T1 JOIN dogs AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id", + "SELECT name FROM Treatments AS T1 JOIN dogs AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id Having sum(cost_of_treatment) > 500", + "SELECT name FROM Dogs WHERE dog_id NOT IN( SELECT dog_id FROM Treatments GROUP BY dog_id HAVING sum(cost_of_treatment) > 1000 )" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", + "final_utterance": "Which first names are used for professionals or owners but are not used as dog names?", + "interaction_utterance": [ + "List all the names of both Professionals and Owners.", + "What about the dog names?", + "Which human names are not used as dog names." + ], + "interaction_query": [ + "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners", + "SELECT name FROM Dogs", + "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs" + ] + }, + { + "db_id": "dog_kennels", + "final_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", + "final_utterance": "Which professional did not operate any treatment on dogs? List the professional's id, role and email.", + "interaction_utterance": [ + "Show the professional first names and the corresponding treatment type codes for the treatment.", + "What about each professional's id, role, email and the treatment type code?", + "Which professional did not provide any treatment? Keep the id, role and email." + ], + "interaction_query": [ + "SELECT T1.first_name, T2.treatment_type_code FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", + "SELECT T1.professional_id , T1.role_code , T1.email_address, T2.treatment_type_code FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", + "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" + ] + }, + { + "db_id": "dog_kennels", + "final_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", + "final_utterance": "Which owner owns the most dogs? List the owner id, first name and last name.", + "interaction_utterance": [ + "Show the number of dogs for each owner, keep the owner id.", + "Which one has 2 dogs?", + "What about the one with the most dogs?" + ], + "interaction_query": [ + "SELECT T1.owner_id ,count(*) FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id", + "SELECT T1.owner_id , T2.first_name , T2.last_name, count(*) FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id Having count(*) = 2", + "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" + ] + }, + { + "db_id": "dog_kennels", + "final_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", + "final_utterance": "Which professionals have done at least two treatments? List the professional's id, role, and first name.", + "interaction_utterance": [ + "How many treatment does each professional finished?", + "Show the first name of the professionals who did only 1 treatment.", + "What about at least two treatments?", + "Show the id, role, and first name of each from the above." + ], + "interaction_query": [ + "SELECT T1.professional_id , count(*) FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id", + "SELECT 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(*) = 1", + "SELECT 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", + "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" + ] + }, + { + "db_id": "dog_kennels", + "final_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", + "final_utterance": "What is the name of the breed with the most dogs?", + "interaction_utterance": [ + "How many dogs for each breed code?", + "Which breed codes are the most popular two?", + "What about the most common 1?", + "What name is the breed?" + ], + "interaction_query": [ + "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code", + "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code limit 2", + "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code limit 1", + "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" + ] + }, + { + "db_id": "dog_kennels", + "final_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", + "final_utterance": "Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.", + "interaction_utterance": [ + "Show the dog name and total cost of each dog.", + "What are the owner names and the cost from their dogs.", + "Who has paid for the most treatments on the dogs? Keep owner IDs and last names." + ], + "interaction_query": [ + "SELECT name, sum(cost_of_treatment) FROM Treatments AS T1 JOIN dogs AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id", + "SELECT T1.owner_id, T3.cost_of_treatment 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", + "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" + ] + }, + { + "db_id": "dog_kennels", + "final_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", + "final_utterance": "What is the description of the treatment type that costs the least money in total?", + "interaction_utterance": [ + "List the treatment type code and the description.", + "For each treatment type, calculate the sum of costs, and order them in descending order.", + "Show the treatment type description also.", + "So what is the description of the treatment type that costs the least money in total?" + ], + "interaction_query": [ + "SELECT * FROM Treatment_Types", + "SELECT treatment_type_code, sum(cost_of_treatment) FROM Treatments group by treatment_type_code order by sum(cost_of_treatment) desc", + "SELECT T2.treatment_type_code, T1.treatment_type_description, sum(cost_of_treatment) 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", + "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" + ] + }, + { + "db_id": "dog_kennels", + "final_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", + "final_utterance": "Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.", + "interaction_utterance": [ + "Show the dog name and total cost of each dog.", + "How many of them cost over 700?", + "Which owner paid the cost larger than 400, show the owner id and the zip code?", + "What about the owner who spent the largest cost?" + ], + "interaction_query": [ + "SELECT name, sum(cost_of_treatment) FROM Treatments AS T1 JOIN DOGS AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id", + "SELECT count(name) FROM Treatments AS T1 JOIN DOGS AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.dog_id Having sum(cost_of_treatment) > 700", + "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 Having sum(T3.cost_of_treatment) > 400", + "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" + ] + }, + { + "db_id": "dog_kennels", + "final_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", + "final_utterance": "Which professionals have done at least two types of treatments? List the professional id and cell phone.", + "interaction_utterance": [ + "List the professional first names and their types of treatments.", + "Add the counts of them also.", + "Among the results, who did only 1 type of treatment? List the professional ids and cell phone numbers of them.", + "What about at least two types of treatments?" + ], + "interaction_query": [ + "SELECT T1.first_name, T2.treatment_type_code FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id", + "SELECT T1.first_name, T2.treatment_type_code, count(*) FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id", + "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(*) = 1", + "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" + ] + }, + { + "db_id": "dog_kennels", + "final_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 )", + "final_utterance": "What are the first name and last name of the professionals who have done treatment with cost below average?", + "interaction_utterance": [ + "What is the minimum, maximum and average value of the treatment costs?", + "Which professionals who did the minimum value of the treatment cost? Provide the first name and last name.", + "What about the maximum cost?", + "How about below the average of the cost?" + ], + "interaction_query": [ + "SELECT min(cost_of_treatment), max(cost_of_treatment), avg(cost_of_treatment) FROM Treatments", + "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment = ( SELECT min(cost_of_treatment) FROM Treatments )", + "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment = ( SELECT max(cost_of_treatment) FROM Treatments )", + "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 )" + ] + }, + { + "db_id": "dog_kennels", + "final_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 )", + "final_utterance": "List the names of the dogs of the rarest breed and the treatment dates of them.", + "interaction_utterance": [ + "How many dogs for each breed code?", + "Which one is the most popular one?", + "What about the least popular one?", + "So which dogs are having the breed code? And the treatment dates?" + ], + "interaction_query": [ + "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code", + "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code Order BY count(*) DESC LIMIT 1", + "SELECT breed_code, count(*) FROM Dogs GROUP BY breed_code Order BY count(*) ASC LIMIT 1", + "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 )" + ] + }, + { + "db_id": "dog_kennels", + "final_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'", + "final_utterance": "Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name.", + "interaction_utterance": [ + "Show the name of dogs whose owners are from the city 'Lake Tia'.", + "Add the owner's first names also.", + "What about when the owner is from the state of 'Virginia'?" + ], + "interaction_query": [ + "SELECT T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.city = 'Lake Tia'", + "SELECT T1.first_name, T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.city = 'Lake Tia'", + "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'" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT min(age) FROM Dogs )", + "final_utterance": "List the last name of the owner owning the youngest dog.", + "interaction_utterance": [ + "Which one is the oldest dog? List the information of it.", + "What are the last names of the oldest dogs?", + "What about the owner last name of the youngest dog?" + ], + "interaction_query": [ + "SELECT * FROM Dogs order by age asc limit 1", + "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 )", + "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT min(age) FROM Dogs )" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'", + "final_utterance": "List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.", + "interaction_utterance": [ + "Show the cities and states of the professionals.", + "How many of them are from 'Hawaii'?", + "List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin." + ], + "interaction_query": [ + "SELECT city, state FROM professionals", + "SELECT count(*) FROM professionals WHERE state = 'Hawaii'", + "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'", + "final_utterance": "Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state.", + "interaction_utterance": [ + "Show the states of the professionals.", + "How many of them are from 'Wisconsin'?", + "List the role code , street , city , state from the above results.", + "What about those professionals who live in a city containing the substring 'West'?" + ], + "interaction_query": [ + "SELECT state FROM professionals", + "SELECT count(*) FROM professionals WHERE state = 'Wisconsin'", + "SELECT role_code , street , city , state FROM professionals WHERE state = 'Wisconsin'", + "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", + "final_utterance": "Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email.", + "interaction_utterance": [ + "Show the states of the owners.", + "How many of them are from 'Vermont'?", + "List the first name, last name and email of the owners who lives in the states that has the substring 'North'." + ], + "interaction_query": [ + "SELECT state FROM Owners", + "SELECT count(*) FROM Owners WHERE state = 'Vermont'", + "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )", + "final_utterance": "How many dogs have an age below the average?", + "interaction_utterance": [ + "Order the dog ages in descending order.", + "How many of them are below 4?", + "What about the ones that are below the average?" + ], + "interaction_query": [ + "SELECT age FROM Dogs ORDER BY age", + "SELECT count(*) FROM Dogs WHERE age < 4", + "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", + "final_utterance": "How much does the most recent treatment cost?", + "interaction_utterance": [ + "Show the treatment details.", + "Order the cost in ascending order.", + "What about in descending order?", + "Which one is the most recent cost?" + ], + "interaction_query": [ + "SELECT * FROM Treatments", + "SELECT cost_of_treatment FROM Treatments ORDER BY cost_of_treatment ASC", + "SELECT cost_of_treatment FROM Treatments ORDER BY cost_of_treatment DESC", + "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )", + "final_utterance": "How many dogs have not gone through any treatment?", + "interaction_utterance": [ + "Show all the owner information.", + "What about the dogs?", + "Among those, how many of them have been sent to receive treatment?", + "What about those who did not?" + ], + "interaction_query": [ + "SELECT * FROM Owners", + "SELECT count(*) FROM Dogs", + "SELECT count(*) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", + "SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )", + "final_utterance": "How many owners temporarily do not have any dogs?", + "interaction_utterance": [ + "Show all the owner information.", + "How many of them come from the state of 'Arizona'?", + "What about those who do not have any dogs temporarily?" + ], + "interaction_query": [ + "SELECT * FROM Owners", + "SELECT count(*) FROM Owners WHERE state = 'Arizona'", + "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )" + ] + }, + { + "db_id": "dog_kennels", + "final_query": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )", + "final_utterance": "How many professionals did not operate any treatment on dogs?", + "interaction_utterance": [ + "How many professionals are there?", + "How many of them come from 'West Heidi?'", + "What about those who did not operate any treatment on dogs?" + ], + "interaction_query": [ + "SELECT count(*) FROM Professionals", + "SELECT count(*) FROM Professionals WHERE city = 'West Heidi'", + "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )" + ] } ] \ No newline at end of file