| [ | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT count(*) FROM candidate", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "candidate" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "candidate" | |
| ], | |
| "question": "How many candidates are there?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "candidates", | |
| "are", | |
| "there", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT count(*) FROM candidate", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "candidate" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "candidate" | |
| ], | |
| "question": "Count the number of candidates.", | |
| "question_toks": [ | |
| "Count", | |
| "the", | |
| "number", | |
| "of", | |
| "candidates", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "poll_source", | |
| "FROM", | |
| "candidate", | |
| "GROUP", | |
| "BY", | |
| "poll_source", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "poll_source", | |
| "from", | |
| "candidate", | |
| "group", | |
| "by", | |
| "poll_source", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Which poll resource provided the most number of candidate information?", | |
| "question_toks": [ | |
| "Which", | |
| "poll", | |
| "resource", | |
| "provided", | |
| "the", | |
| "most", | |
| "number", | |
| "of", | |
| "candidate", | |
| "information", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "poll_source", | |
| "FROM", | |
| "candidate", | |
| "GROUP", | |
| "BY", | |
| "poll_source", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "poll_source", | |
| "from", | |
| "candidate", | |
| "group", | |
| "by", | |
| "poll_source", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Return the poll resource associated with the most candidates.", | |
| "question_toks": [ | |
| "Return", | |
| "the", | |
| "poll", | |
| "resource", | |
| "associated", | |
| "with", | |
| "the", | |
| "most", | |
| "candidates", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3", | |
| "query_toks": [ | |
| "SELECT", | |
| "support_rate", | |
| "FROM", | |
| "candidate", | |
| "ORDER", | |
| "BY", | |
| "support_rate", | |
| "DESC", | |
| "LIMIT", | |
| "3" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "support_rate", | |
| "from", | |
| "candidate", | |
| "order", | |
| "by", | |
| "support_rate", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "what are the top 3 highest support rates?", | |
| "question_toks": [ | |
| "what", | |
| "are", | |
| "the", | |
| "top", | |
| "3", | |
| "highest", | |
| "support", | |
| "rates", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 3, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3", | |
| "query_toks": [ | |
| "SELECT", | |
| "support_rate", | |
| "FROM", | |
| "candidate", | |
| "ORDER", | |
| "BY", | |
| "support_rate", | |
| "DESC", | |
| "LIMIT", | |
| "3" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "support_rate", | |
| "from", | |
| "candidate", | |
| "order", | |
| "by", | |
| "support_rate", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Return the top 3 greatest support rates.", | |
| "question_toks": [ | |
| "Return", | |
| "the", | |
| "top", | |
| "3", | |
| "greatest", | |
| "support", | |
| "rates", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 3, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "Candidate_ID", | |
| "FROM", | |
| "candidate", | |
| "ORDER", | |
| "BY", | |
| "oppose_rate", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "candidate_id", | |
| "from", | |
| "candidate", | |
| "order", | |
| "by", | |
| "oppose_rate", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Find the id of the candidate who got the lowest oppose rate.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "id", | |
| "of", | |
| "the", | |
| "candidate", | |
| "who", | |
| "got", | |
| "the", | |
| "lowest", | |
| "oppose", | |
| "rate", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "Candidate_ID", | |
| "FROM", | |
| "candidate", | |
| "ORDER", | |
| "BY", | |
| "oppose_rate", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "candidate_id", | |
| "from", | |
| "candidate", | |
| "order", | |
| "by", | |
| "oppose_rate", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "What is the id of the candidate with the lowest oppose rate?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "id", | |
| "of", | |
| "the", | |
| "candidate", | |
| "with", | |
| "the", | |
| "lowest", | |
| "oppose", | |
| "rate", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate", | |
| "query_toks": [ | |
| "SELECT", | |
| "Support_rate", | |
| ",", | |
| "Consider_rate", | |
| ",", | |
| "Oppose_rate", | |
| "FROM", | |
| "candidate", | |
| "ORDER", | |
| "BY", | |
| "unsure_rate" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "support_rate", | |
| ",", | |
| "consider_rate", | |
| ",", | |
| "oppose_rate", | |
| "from", | |
| "candidate", | |
| "order", | |
| "by", | |
| "unsure_rate" | |
| ], | |
| "question": "Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.", | |
| "question_toks": [ | |
| "Please", | |
| "list", | |
| "support", | |
| ",", | |
| "consider", | |
| ",", | |
| "and", | |
| "oppose", | |
| "rates", | |
| "for", | |
| "each", | |
| "candidate", | |
| "in", | |
| "ascending", | |
| "order", | |
| "by", | |
| "unsure", | |
| "rate", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate", | |
| "query_toks": [ | |
| "SELECT", | |
| "Support_rate", | |
| ",", | |
| "Consider_rate", | |
| ",", | |
| "Oppose_rate", | |
| "FROM", | |
| "candidate", | |
| "ORDER", | |
| "BY", | |
| "unsure_rate" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "support_rate", | |
| ",", | |
| "consider_rate", | |
| ",", | |
| "oppose_rate", | |
| "from", | |
| "candidate", | |
| "order", | |
| "by", | |
| "unsure_rate" | |
| ], | |
| "question": "What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "support", | |
| ",", | |
| "consider", | |
| ",", | |
| "and", | |
| "oppose", | |
| "rates", | |
| "of", | |
| "each", | |
| "candidate", | |
| ",", | |
| "ordered", | |
| "ascending", | |
| "by", | |
| "their", | |
| "unsure", | |
| "rate", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "poll_source", | |
| "FROM", | |
| "candidate", | |
| "ORDER", | |
| "BY", | |
| "oppose_rate", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "poll_source", | |
| "from", | |
| "candidate", | |
| "order", | |
| "by", | |
| "oppose_rate", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "which poll source does the highest oppose rate come from?", | |
| "question_toks": [ | |
| "which", | |
| "poll", | |
| "source", | |
| "does", | |
| "the", | |
| "highest", | |
| "oppose", | |
| "rate", | |
| "come", | |
| "from", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "poll_source", | |
| "FROM", | |
| "candidate", | |
| "ORDER", | |
| "BY", | |
| "oppose_rate", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "poll_source", | |
| "from", | |
| "candidate", | |
| "order", | |
| "by", | |
| "oppose_rate", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Return the poll source corresponding to the candidate who has the oppose rate.", | |
| "question_toks": [ | |
| "Return", | |
| "the", | |
| "poll", | |
| "source", | |
| "corresponding", | |
| "to", | |
| "the", | |
| "candidate", | |
| "who", | |
| "has", | |
| "the", | |
| "oppose", | |
| "rate", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT name FROM people ORDER BY date_of_birth", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "people", | |
| "ORDER", | |
| "BY", | |
| "date_of_birth" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "people", | |
| "order", | |
| "by", | |
| "date_of_birth" | |
| ], | |
| "question": "List all people names in the order of their date of birth from old to young.", | |
| "question_toks": [ | |
| "List", | |
| "all", | |
| "people", | |
| "names", | |
| "in", | |
| "the", | |
| "order", | |
| "of", | |
| "their", | |
| "date", | |
| "of", | |
| "birth", | |
| "from", | |
| "old", | |
| "to", | |
| "young", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT name FROM people ORDER BY date_of_birth", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "people", | |
| "ORDER", | |
| "BY", | |
| "date_of_birth" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "people", | |
| "order", | |
| "by", | |
| "date_of_birth" | |
| ], | |
| "question": "What are the names of all people, ordered by their date of birth?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "names", | |
| "of", | |
| "all", | |
| "people", | |
| ",", | |
| "ordered", | |
| "by", | |
| "their", | |
| "date", | |
| "of", | |
| "birth", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT avg(height) , avg(weight) FROM people WHERE sex = 'M'", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "height", | |
| ")", | |
| ",", | |
| "avg", | |
| "(", | |
| "weight", | |
| ")", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "sex", | |
| "=", | |
| "'M", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "height", | |
| ")", | |
| ",", | |
| "avg", | |
| "(", | |
| "weight", | |
| ")", | |
| "from", | |
| "people", | |
| "where", | |
| "sex", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Find the average height and weight for all males (sex is M).", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "average", | |
| "height", | |
| "and", | |
| "weight", | |
| "for", | |
| "all", | |
| "males", | |
| "(", | |
| "sex", | |
| "is", | |
| "M", | |
| ")", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"M\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT avg(height) , avg(weight) FROM people WHERE sex = 'M'", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "height", | |
| ")", | |
| ",", | |
| "avg", | |
| "(", | |
| "weight", | |
| ")", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "sex", | |
| "=", | |
| "'M", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "height", | |
| ")", | |
| ",", | |
| "avg", | |
| "(", | |
| "weight", | |
| ")", | |
| "from", | |
| "people", | |
| "where", | |
| "sex", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the average height and weight across males (sex is M)?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "average", | |
| "height", | |
| "and", | |
| "weight", | |
| "across", | |
| "males", | |
| "(", | |
| "sex", | |
| "is", | |
| "M", | |
| ")", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"M\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT name FROM people WHERE height > 200 OR height < 190", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "height", | |
| ">", | |
| "200", | |
| "OR", | |
| "height", | |
| "<", | |
| "190" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "people", | |
| "where", | |
| "height", | |
| ">", | |
| "value", | |
| "or", | |
| "height", | |
| "<", | |
| "value" | |
| ], | |
| "question": "find the names of people who are taller than 200 or lower than 190.", | |
| "question_toks": [ | |
| "find", | |
| "the", | |
| "names", | |
| "of", | |
| "people", | |
| "who", | |
| "are", | |
| "taller", | |
| "than", | |
| "200", | |
| "or", | |
| "lower", | |
| "than", | |
| "190", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| 200.0, | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| 190.0, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT name FROM people WHERE height > 200 OR height < 190", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "height", | |
| ">", | |
| "200", | |
| "OR", | |
| "height", | |
| "<", | |
| "190" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "people", | |
| "where", | |
| "height", | |
| ">", | |
| "value", | |
| "or", | |
| "height", | |
| "<", | |
| "value" | |
| ], | |
| "question": "What are the names of people who have a height greater than 200 or less than 190?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "names", | |
| "of", | |
| "people", | |
| "who", | |
| "have", | |
| "a", | |
| "height", | |
| "greater", | |
| "than", | |
| "200", | |
| "or", | |
| "less", | |
| "than", | |
| "190", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| 200.0, | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| 190.0, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT avg(weight) , min(weight) , sex FROM people GROUP BY sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "weight", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "weight", | |
| ")", | |
| ",", | |
| "sex", | |
| "FROM", | |
| "people", | |
| "GROUP", | |
| "BY", | |
| "sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "weight", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "weight", | |
| ")", | |
| ",", | |
| "sex", | |
| "from", | |
| "people", | |
| "group", | |
| "by", | |
| "sex" | |
| ], | |
| "question": "Find the average and minimum weight for each gender.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "average", | |
| "and", | |
| "minimum", | |
| "weight", | |
| "for", | |
| "each", | |
| "gender", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT avg(weight) , min(weight) , sex FROM people GROUP BY sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "weight", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "weight", | |
| ")", | |
| ",", | |
| "sex", | |
| "FROM", | |
| "people", | |
| "GROUP", | |
| "BY", | |
| "sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "weight", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "weight", | |
| ")", | |
| ",", | |
| "sex", | |
| "from", | |
| "people", | |
| "group", | |
| "by", | |
| "sex" | |
| ], | |
| "question": "What are the average and minimum weights for people of each sex?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "average", | |
| "and", | |
| "minimum", | |
| "weights", | |
| "for", | |
| "people", | |
| "of", | |
| "each", | |
| "sex", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.name , t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.name", | |
| ",", | |
| "t1.sex", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "ORDER", | |
| "BY", | |
| "t2.support_rate", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "name", | |
| ",", | |
| "t1", | |
| ".", | |
| "sex", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "support_rate", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Find the name and gender of the candidate who got the highest support rate.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "name", | |
| "and", | |
| "gender", | |
| "of", | |
| "the", | |
| "candidate", | |
| "who", | |
| "got", | |
| "the", | |
| "highest", | |
| "support", | |
| "rate", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.name , t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.name", | |
| ",", | |
| "t1.sex", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "ORDER", | |
| "BY", | |
| "t2.support_rate", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "name", | |
| ",", | |
| "t1", | |
| ".", | |
| "sex", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "support_rate", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "What is the name and sex of the candidate with the highest support rate?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "name", | |
| "and", | |
| "sex", | |
| "of", | |
| "the", | |
| "candidate", | |
| "with", | |
| "the", | |
| "highest", | |
| "support", | |
| "rate", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.name , t1.sex , min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.name", | |
| ",", | |
| "t1.sex", | |
| ",", | |
| "min", | |
| "(", | |
| "oppose_rate", | |
| ")", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "GROUP", | |
| "BY", | |
| "t1.sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "name", | |
| ",", | |
| "t1", | |
| ".", | |
| "sex", | |
| ",", | |
| "min", | |
| "(", | |
| "oppose_rate", | |
| ")", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "sex" | |
| ], | |
| "question": "Find the name of the candidates whose oppose percentage is the lowest for each sex.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "name", | |
| "of", | |
| "the", | |
| "candidates", | |
| "whose", | |
| "oppose", | |
| "percentage", | |
| "is", | |
| "the", | |
| "lowest", | |
| "for", | |
| "each", | |
| "sex", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.name , t1.sex , min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.name", | |
| ",", | |
| "t1.sex", | |
| ",", | |
| "min", | |
| "(", | |
| "oppose_rate", | |
| ")", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "GROUP", | |
| "BY", | |
| "t1.sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "name", | |
| ",", | |
| "t1", | |
| ".", | |
| "sex", | |
| ",", | |
| "min", | |
| "(", | |
| "oppose_rate", | |
| ")", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "sex" | |
| ], | |
| "question": "For each sex, what is the name and sex of the candidate with the oppose rate for their sex?", | |
| "question_toks": [ | |
| "For", | |
| "each", | |
| "sex", | |
| ",", | |
| "what", | |
| "is", | |
| "the", | |
| "name", | |
| "and", | |
| "sex", | |
| "of", | |
| "the", | |
| "candidate", | |
| "with", | |
| "the", | |
| "oppose", | |
| "rate", | |
| "for", | |
| "their", | |
| "sex", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.sex", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "GROUP", | |
| "BY", | |
| "t1.sex", | |
| "ORDER", | |
| "BY", | |
| "avg", | |
| "(", | |
| "t2.unsure_rate", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "sex", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "sex", | |
| "order", | |
| "by", | |
| "avg", | |
| "(", | |
| "t2", | |
| ".", | |
| "unsure_rate", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "which gender got the highest average uncertain ratio.", | |
| "question_toks": [ | |
| "which", | |
| "gender", | |
| "got", | |
| "the", | |
| "highest", | |
| "average", | |
| "uncertain", | |
| "ratio", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 5, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.sex", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "GROUP", | |
| "BY", | |
| "t1.sex", | |
| "ORDER", | |
| "BY", | |
| "avg", | |
| "(", | |
| "t2.unsure_rate", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "sex", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "sex", | |
| "order", | |
| "by", | |
| "avg", | |
| "(", | |
| "t2", | |
| ".", | |
| "unsure_rate", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "What is the sex of the candidate who had the highest unsure rate?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "sex", | |
| "of", | |
| "the", | |
| "candidate", | |
| "who", | |
| "had", | |
| "the", | |
| "highest", | |
| "unsure", | |
| "rate", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 5, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate)", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "people_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "people_id", | |
| "FROM", | |
| "candidate", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "people", | |
| "where", | |
| "people_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "people_id", | |
| "from", | |
| "candidate", | |
| ")" | |
| ], | |
| "question": "what are the names of people who did not participate in the candidate election.", | |
| "question_toks": [ | |
| "what", | |
| "are", | |
| "the", | |
| "names", | |
| "of", | |
| "people", | |
| "who", | |
| "did", | |
| "not", | |
| "participate", | |
| "in", | |
| "the", | |
| "candidate", | |
| "election", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate)", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "people_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "people_id", | |
| "FROM", | |
| "candidate", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "people", | |
| "where", | |
| "people_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "people_id", | |
| "from", | |
| "candidate", | |
| ")" | |
| ], | |
| "question": "Give the names of people who did not participate in the candidate election.", | |
| "question_toks": [ | |
| "Give", | |
| "the", | |
| "names", | |
| "of", | |
| "people", | |
| "who", | |
| "did", | |
| "not", | |
| "participate", | |
| "in", | |
| "the", | |
| "candidate", | |
| "election", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.name", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "WHERE", | |
| "t2.support_rate", | |
| "<", | |
| "t2.oppose_rate" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "name", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "where", | |
| "t2", | |
| ".", | |
| "support_rate", | |
| "<", | |
| "t2", | |
| ".", | |
| "oppose_rate" | |
| ], | |
| "question": "Find the names of the candidates whose support percentage is lower than their oppose rate.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "names", | |
| "of", | |
| "the", | |
| "candidates", | |
| "whose", | |
| "support", | |
| "percentage", | |
| "is", | |
| "lower", | |
| "than", | |
| "their", | |
| "oppose", | |
| "rate", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.name", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "WHERE", | |
| "t2.support_rate", | |
| "<", | |
| "t2.oppose_rate" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "name", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "where", | |
| "t2", | |
| ".", | |
| "support_rate", | |
| "<", | |
| "t2", | |
| ".", | |
| "oppose_rate" | |
| ], | |
| "question": "What are the names of candidates who have a lower support rate than oppose rate?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "names", | |
| "of", | |
| "candidates", | |
| "who", | |
| "have", | |
| "a", | |
| "lower", | |
| "support", | |
| "rate", | |
| "than", | |
| "oppose", | |
| "rate", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT count(*) , sex FROM people WHERE weight > 85 GROUP BY sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "sex", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "weight", | |
| ">", | |
| "85", | |
| "GROUP", | |
| "BY", | |
| "sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "sex", | |
| "from", | |
| "people", | |
| "where", | |
| "weight", | |
| ">", | |
| "value", | |
| "group", | |
| "by", | |
| "sex" | |
| ], | |
| "question": "how many people are there whose weight is higher than 85 for each gender?", | |
| "question_toks": [ | |
| "how", | |
| "many", | |
| "people", | |
| "are", | |
| "there", | |
| "whose", | |
| "weight", | |
| "is", | |
| "higher", | |
| "than", | |
| "85", | |
| "for", | |
| "each", | |
| "gender", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ], | |
| 85.0, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT count(*) , sex FROM people WHERE weight > 85 GROUP BY sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "sex", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "weight", | |
| ">", | |
| "85", | |
| "GROUP", | |
| "BY", | |
| "sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "sex", | |
| "from", | |
| "people", | |
| "where", | |
| "weight", | |
| ">", | |
| "value", | |
| "group", | |
| "by", | |
| "sex" | |
| ], | |
| "question": "Count the number of people of each sex who have a weight higher than 85.", | |
| "question_toks": [ | |
| "Count", | |
| "the", | |
| "number", | |
| "of", | |
| "people", | |
| "of", | |
| "each", | |
| "sex", | |
| "who", | |
| "have", | |
| "a", | |
| "weight", | |
| "higher", | |
| "than", | |
| "85", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ], | |
| 85.0, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT max(support_rate) , min(consider_rate) , min(oppose_rate) FROM candidate", | |
| "query_toks": [ | |
| "SELECT", | |
| "max", | |
| "(", | |
| "support_rate", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "consider_rate", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "oppose_rate", | |
| ")", | |
| "FROM", | |
| "candidate" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "max", | |
| "(", | |
| "support_rate", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "consider_rate", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "oppose_rate", | |
| ")", | |
| "from", | |
| "candidate" | |
| ], | |
| "question": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.", | |
| "question_toks": [ | |
| "find", | |
| "the", | |
| "highest", | |
| "support", | |
| "percentage", | |
| ",", | |
| "lowest", | |
| "consider", | |
| "rate", | |
| "and", | |
| "oppose", | |
| "rate", | |
| "of", | |
| "all", | |
| "candidates", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 1, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT max(support_rate) , min(consider_rate) , min(oppose_rate) FROM candidate", | |
| "query_toks": [ | |
| "SELECT", | |
| "max", | |
| "(", | |
| "support_rate", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "consider_rate", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "oppose_rate", | |
| ")", | |
| "FROM", | |
| "candidate" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "max", | |
| "(", | |
| "support_rate", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "consider_rate", | |
| ")", | |
| ",", | |
| "min", | |
| "(", | |
| "oppose_rate", | |
| ")", | |
| "from", | |
| "candidate" | |
| ], | |
| "question": "Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?", | |
| "question_toks": [ | |
| "Return", | |
| "the", | |
| "maximum", | |
| "support", | |
| "rate", | |
| ",", | |
| "minimum", | |
| "consider", | |
| "rate", | |
| ",", | |
| "and", | |
| "minimum", | |
| "oppose", | |
| "rate", | |
| "across", | |
| "all", | |
| "candidates", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 1, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.name", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "WHERE", | |
| "t1.sex", | |
| "=", | |
| "'F", | |
| "'", | |
| "ORDER", | |
| "BY", | |
| "t1.name" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "name", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "where", | |
| "t1", | |
| ".", | |
| "sex", | |
| "=", | |
| "value", | |
| "order", | |
| "by", | |
| "t1", | |
| ".", | |
| "name" | |
| ], | |
| "question": "list all female (sex is F) candidate names in the alphabetical order.", | |
| "question_toks": [ | |
| "list", | |
| "all", | |
| "female", | |
| "(", | |
| "sex", | |
| "is", | |
| "F", | |
| ")", | |
| "candidate", | |
| "names", | |
| "in", | |
| "the", | |
| "alphabetical", | |
| "order", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"F\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.name", | |
| "FROM", | |
| "people", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "candidate", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.people_id", | |
| "=", | |
| "t2.people_id", | |
| "WHERE", | |
| "t1.sex", | |
| "=", | |
| "'F", | |
| "'", | |
| "ORDER", | |
| "BY", | |
| "t1.name" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "name", | |
| "from", | |
| "people", | |
| "as", | |
| "t1", | |
| "join", | |
| "candidate", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "people_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "people_id", | |
| "where", | |
| "t1", | |
| ".", | |
| "sex", | |
| "=", | |
| "value", | |
| "order", | |
| "by", | |
| "t1", | |
| ".", | |
| "name" | |
| ], | |
| "question": "What are the names of all female candidates in alphabetical order (sex is F)?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "names", | |
| "of", | |
| "all", | |
| "female", | |
| "candidates", | |
| "in", | |
| "alphabetical", | |
| "order", | |
| "(", | |
| "sex", | |
| "is", | |
| "F", | |
| ")", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"F\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT name FROM people WHERE height < (SELECT avg(height) FROM people)", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "height", | |
| "<", | |
| "(", | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "height", | |
| ")", | |
| "FROM", | |
| "people", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "people", | |
| "where", | |
| "height", | |
| "<", | |
| "(", | |
| "select", | |
| "avg", | |
| "(", | |
| "height", | |
| ")", | |
| "from", | |
| "people", | |
| ")" | |
| ], | |
| "question": "find the name of people whose height is lower than the average.", | |
| "question_toks": [ | |
| "find", | |
| "the", | |
| "name", | |
| "of", | |
| "people", | |
| "whose", | |
| "height", | |
| "is", | |
| "lower", | |
| "than", | |
| "the", | |
| "average", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT name FROM people WHERE height < (SELECT avg(height) FROM people)", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "people", | |
| "WHERE", | |
| "height", | |
| "<", | |
| "(", | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "height", | |
| ")", | |
| "FROM", | |
| "people", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "people", | |
| "where", | |
| "height", | |
| "<", | |
| "(", | |
| "select", | |
| "avg", | |
| "(", | |
| "height", | |
| ")", | |
| "from", | |
| "people", | |
| ")" | |
| ], | |
| "question": "What are the names of people who are shorter than average?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "names", | |
| "of", | |
| "people", | |
| "who", | |
| "are", | |
| "shorter", | |
| "than", | |
| "average", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT * FROM people", | |
| "query_toks": [ | |
| "SELECT", | |
| "*", | |
| "FROM", | |
| "people" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "*", | |
| "from", | |
| "people" | |
| ], | |
| "question": "List all info about all people.", | |
| "question_toks": [ | |
| "List", | |
| "all", | |
| "info", | |
| "about", | |
| "all", | |
| "people", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "candidate_poll", | |
| "query": "SELECT * FROM people", | |
| "query_toks": [ | |
| "SELECT", | |
| "*", | |
| "FROM", | |
| "people" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "*", | |
| "from", | |
| "people" | |
| ], | |
| "question": "What is all the information about all people?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "all", | |
| "the", | |
| "information", | |
| "about", | |
| "all", | |
| "people", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| } | |
| ] |