| [ | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(*) FROM Faculty", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty" | |
| ], | |
| "question": "How many faculty do we have?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "faculty", | |
| "do", | |
| "we", | |
| "have", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(*) FROM Faculty", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty" | |
| ], | |
| "question": "What is the total number of faculty members?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "total", | |
| "number", | |
| "of", | |
| "faculty", | |
| "members", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT DISTINCT rank FROM Faculty", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "rank", | |
| "FROM", | |
| "Faculty" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "rank", | |
| "from", | |
| "faculty" | |
| ], | |
| "question": "What ranks do we have for faculty?", | |
| "question_toks": [ | |
| "What", | |
| "ranks", | |
| "do", | |
| "we", | |
| "have", | |
| "for", | |
| "faculty", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT DISTINCT rank FROM Faculty", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "rank", | |
| "FROM", | |
| "Faculty" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "rank", | |
| "from", | |
| "faculty" | |
| ], | |
| "question": "Find the list of distinct ranks for faculty.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "list", | |
| "of", | |
| "distinct", | |
| "ranks", | |
| "for", | |
| "faculty", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT DISTINCT building FROM Faculty", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "building", | |
| "FROM", | |
| "Faculty" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "building", | |
| "from", | |
| "faculty" | |
| ], | |
| "question": "Show all the distinct buildings that have faculty rooms.", | |
| "question_toks": [ | |
| "Show", | |
| "all", | |
| "the", | |
| "distinct", | |
| "buildings", | |
| "that", | |
| "have", | |
| "faculty", | |
| "rooms", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT DISTINCT building FROM Faculty", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "building", | |
| "FROM", | |
| "Faculty" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "building", | |
| "from", | |
| "faculty" | |
| ], | |
| "question": "What buildings have faculty offices?", | |
| "question_toks": [ | |
| "What", | |
| "buildings", | |
| "have", | |
| "faculty", | |
| "offices", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT rank , Fname , Lname FROM Faculty", | |
| "query_toks": [ | |
| "SELECT", | |
| "rank", | |
| ",", | |
| "Fname", | |
| ",", | |
| "Lname", | |
| "FROM", | |
| "Faculty" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "rank", | |
| ",", | |
| "fname", | |
| ",", | |
| "lname", | |
| "from", | |
| "faculty" | |
| ], | |
| "question": "Show the rank, first name, and last name for all the faculty.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "rank", | |
| ",", | |
| "first", | |
| "name", | |
| ",", | |
| "and", | |
| "last", | |
| "name", | |
| "for", | |
| "all", | |
| "the", | |
| "faculty", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT rank , Fname , Lname FROM Faculty", | |
| "query_toks": [ | |
| "SELECT", | |
| "rank", | |
| ",", | |
| "Fname", | |
| ",", | |
| "Lname", | |
| "FROM", | |
| "Faculty" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "rank", | |
| ",", | |
| "fname", | |
| ",", | |
| "lname", | |
| "from", | |
| "faculty" | |
| ], | |
| "question": "What are the rank, first name, and last name of the faculty members?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "rank", | |
| ",", | |
| "first", | |
| "name", | |
| ",", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "the", | |
| "faculty", | |
| "members", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'", | |
| "query_toks": [ | |
| "SELECT", | |
| "Fname", | |
| ",", | |
| "Lname", | |
| ",", | |
| "phone", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Sex", | |
| "=", | |
| "'F", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "fname", | |
| ",", | |
| "lname", | |
| ",", | |
| "phone", | |
| "from", | |
| "faculty", | |
| "where", | |
| "sex", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show the first name, last name, and phone number for all female faculty members.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "first", | |
| "name", | |
| ",", | |
| "last", | |
| "name", | |
| ",", | |
| "and", | |
| "phone", | |
| "number", | |
| "for", | |
| "all", | |
| "female", | |
| "faculty", | |
| "members", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"F\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'", | |
| "query_toks": [ | |
| "SELECT", | |
| "Fname", | |
| ",", | |
| "Lname", | |
| ",", | |
| "phone", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Sex", | |
| "=", | |
| "'F", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "fname", | |
| ",", | |
| "lname", | |
| ",", | |
| "phone", | |
| "from", | |
| "faculty", | |
| "where", | |
| "sex", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the first name, last name, and phone number of all the female faculty members?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "first", | |
| "name", | |
| ",", | |
| "last", | |
| "name", | |
| ",", | |
| "and", | |
| "phone", | |
| "number", | |
| "of", | |
| "all", | |
| "the", | |
| "female", | |
| "faculty", | |
| "members", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"F\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT FacID FROM Faculty WHERE Sex = 'M'", | |
| "query_toks": [ | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Sex", | |
| "=", | |
| "'M", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "where", | |
| "sex", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show ids for all the male faculty.", | |
| "question_toks": [ | |
| "Show", | |
| "ids", | |
| "for", | |
| "all", | |
| "the", | |
| "male", | |
| "faculty", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"M\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT FacID FROM Faculty WHERE Sex = 'M'", | |
| "query_toks": [ | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Sex", | |
| "=", | |
| "'M", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "where", | |
| "sex", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the faculty ids of all the male faculty members?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "faculty", | |
| "ids", | |
| "of", | |
| "all", | |
| "the", | |
| "male", | |
| "faculty", | |
| "members", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"M\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = \"Professor\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Sex", | |
| "=", | |
| "'F", | |
| "'", | |
| "AND", | |
| "Rank", | |
| "=", | |
| "``", | |
| "Professor", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "where", | |
| "sex", | |
| "=", | |
| "value", | |
| "and", | |
| "rank", | |
| "=", | |
| "value" | |
| ], | |
| "question": "How many female Professors do we have?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "female", | |
| "Professors", | |
| "do", | |
| "we", | |
| "have", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"F\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = \"Professor\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Sex", | |
| "=", | |
| "'F", | |
| "'", | |
| "AND", | |
| "Rank", | |
| "=", | |
| "``", | |
| "Professor", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "where", | |
| "sex", | |
| "=", | |
| "value", | |
| "and", | |
| "rank", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Count the number of female Professors we have.", | |
| "question_toks": [ | |
| "Count", | |
| "the", | |
| "number", | |
| "of", | |
| "female", | |
| "Professors", | |
| "we", | |
| "have", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"F\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT phone , room , building FROM Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "phone", | |
| ",", | |
| "room", | |
| ",", | |
| "building", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Fname", | |
| "=", | |
| "``", | |
| "Jerry", | |
| "''", | |
| "AND", | |
| "Lname", | |
| "=", | |
| "``", | |
| "Prince", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "phone", | |
| ",", | |
| "room", | |
| ",", | |
| "building", | |
| "from", | |
| "faculty", | |
| "where", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show the phone, room, and building for the faculty named Jerry Prince.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "phone", | |
| ",", | |
| "room", | |
| ",", | |
| "and", | |
| "building", | |
| "for", | |
| "the", | |
| "faculty", | |
| "named", | |
| "Jerry", | |
| "Prince", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Jerry\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Prince\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT phone , room , building FROM Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "phone", | |
| ",", | |
| "room", | |
| ",", | |
| "building", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Fname", | |
| "=", | |
| "``", | |
| "Jerry", | |
| "''", | |
| "AND", | |
| "Lname", | |
| "=", | |
| "``", | |
| "Prince", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "phone", | |
| ",", | |
| "room", | |
| ",", | |
| "building", | |
| "from", | |
| "faculty", | |
| "where", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the phone, room, and building of the faculty member called Jerry Prince?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "phone", | |
| ",", | |
| "room", | |
| ",", | |
| "and", | |
| "building", | |
| "of", | |
| "the", | |
| "faculty", | |
| "member", | |
| "called", | |
| "Jerry", | |
| "Prince", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Jerry\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Prince\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(*) FROM Faculty WHERE Rank = \"Professor\" AND building = \"NEB\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Rank", | |
| "=", | |
| "``", | |
| "Professor", | |
| "''", | |
| "AND", | |
| "building", | |
| "=", | |
| "``", | |
| "NEB", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value", | |
| "and", | |
| "building", | |
| "=", | |
| "value" | |
| ], | |
| "question": "How many Professors are in building NEB?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "Professors", | |
| "are", | |
| "in", | |
| "building", | |
| "NEB", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"NEB\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(*) FROM Faculty WHERE Rank = \"Professor\" AND building = \"NEB\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Rank", | |
| "=", | |
| "``", | |
| "Professor", | |
| "''", | |
| "AND", | |
| "building", | |
| "=", | |
| "``", | |
| "NEB", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value", | |
| "and", | |
| "building", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Count the number of Professors who have office in building NEB.", | |
| "question_toks": [ | |
| "Count", | |
| "the", | |
| "number", | |
| "of", | |
| "Professors", | |
| "who", | |
| "have", | |
| "office", | |
| "in", | |
| "building", | |
| "NEB", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"NEB\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT fname , lname FROM Faculty WHERE Rank = \"Instructor\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "fname", | |
| ",", | |
| "lname", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Rank", | |
| "=", | |
| "``", | |
| "Instructor", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "fname", | |
| ",", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show the first name and last name for all the instructors.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "first", | |
| "name", | |
| "and", | |
| "last", | |
| "name", | |
| "for", | |
| "all", | |
| "the", | |
| "instructors", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Instructor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT fname , lname FROM Faculty WHERE Rank = \"Instructor\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "fname", | |
| ",", | |
| "lname", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "Rank", | |
| "=", | |
| "``", | |
| "Instructor", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "fname", | |
| ",", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the first name and last name of all the instructors?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "first", | |
| "name", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "all", | |
| "the", | |
| "instructors", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Instructor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT building , count(*) FROM Faculty GROUP BY building", | |
| "query_toks": [ | |
| "SELECT", | |
| "building", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "building" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "building", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "building" | |
| ], | |
| "question": "Show all the buildings along with the number of faculty members the buildings have.", | |
| "question_toks": [ | |
| "Show", | |
| "all", | |
| "the", | |
| "buildings", | |
| "along", | |
| "with", | |
| "the", | |
| "number", | |
| "of", | |
| "faculty", | |
| "members", | |
| "the", | |
| "buildings", | |
| "have", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT building , count(*) FROM Faculty GROUP BY building", | |
| "query_toks": [ | |
| "SELECT", | |
| "building", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "building" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "building", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "building" | |
| ], | |
| "question": "How many faculty members does each building have? List the result with the name of the building.", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "faculty", | |
| "members", | |
| "does", | |
| "each", | |
| "building", | |
| "have", | |
| "?", | |
| "List", | |
| "the", | |
| "result", | |
| "with", | |
| "the", | |
| "name", | |
| "of", | |
| "the", | |
| "building", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "building", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "building", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "building", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "building", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Which building has most faculty members?", | |
| "question_toks": [ | |
| "Which", | |
| "building", | |
| "has", | |
| "most", | |
| "faculty", | |
| "members", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "building", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "building", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "building", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "building", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Find the building that has the largest number of faculty members.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "building", | |
| "that", | |
| "has", | |
| "the", | |
| "largest", | |
| "number", | |
| "of", | |
| "faculty", | |
| "members", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT building FROM Faculty WHERE rank = \"Professor\" GROUP BY building HAVING count(*) >= 10", | |
| "query_toks": [ | |
| "SELECT", | |
| "building", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "rank", | |
| "=", | |
| "``", | |
| "Professor", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "building", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "10" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "building", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "building", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show all the buildings that have at least 10 professors.", | |
| "question_toks": [ | |
| "Show", | |
| "all", | |
| "the", | |
| "buildings", | |
| "that", | |
| "have", | |
| "at", | |
| "least", | |
| "10", | |
| "professors", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 10.0, | |
| null | |
| ] | |
| ], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT building FROM Faculty WHERE rank = \"Professor\" GROUP BY building HAVING count(*) >= 10", | |
| "query_toks": [ | |
| "SELECT", | |
| "building", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "rank", | |
| "=", | |
| "``", | |
| "Professor", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "building", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "10" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "building", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "building", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "value" | |
| ], | |
| "question": "In which buildings are there at least ten professors?", | |
| "question_toks": [ | |
| "In", | |
| "which", | |
| "buildings", | |
| "are", | |
| "there", | |
| "at", | |
| "least", | |
| "ten", | |
| "professors", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 10.0, | |
| null | |
| ] | |
| ], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT rank , count(*) FROM Faculty GROUP BY rank", | |
| "query_toks": [ | |
| "SELECT", | |
| "rank", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "rank" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "rank", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "rank" | |
| ], | |
| "question": "For each faculty rank, show the number of faculty members who have it.", | |
| "question_toks": [ | |
| "For", | |
| "each", | |
| "faculty", | |
| "rank", | |
| ",", | |
| "show", | |
| "the", | |
| "number", | |
| "of", | |
| "faculty", | |
| "members", | |
| "who", | |
| "have", | |
| "it", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT rank , count(*) FROM Faculty GROUP BY rank", | |
| "query_toks": [ | |
| "SELECT", | |
| "rank", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "rank" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "rank", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "rank" | |
| ], | |
| "question": "How many faculty members do we have for each faculty rank?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "faculty", | |
| "members", | |
| "do", | |
| "we", | |
| "have", | |
| "for", | |
| "each", | |
| "faculty", | |
| "rank", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "rank", | |
| ",", | |
| "sex", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "rank", | |
| ",", | |
| "sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "rank", | |
| ",", | |
| "sex", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "rank", | |
| ",", | |
| "sex" | |
| ], | |
| "question": "Show all the ranks and the number of male and female faculty for each rank.", | |
| "question_toks": [ | |
| "Show", | |
| "all", | |
| "the", | |
| "ranks", | |
| "and", | |
| "the", | |
| "number", | |
| "of", | |
| "male", | |
| "and", | |
| "female", | |
| "faculty", | |
| "for", | |
| "each", | |
| "rank", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "rank", | |
| ",", | |
| "sex", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "rank", | |
| ",", | |
| "sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "rank", | |
| ",", | |
| "sex", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "rank", | |
| ",", | |
| "sex" | |
| ], | |
| "question": "How many faculty members do we have for each rank and gender?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "faculty", | |
| "members", | |
| "do", | |
| "we", | |
| "have", | |
| "for", | |
| "each", | |
| "rank", | |
| "and", | |
| "gender", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "rank", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "rank", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "ASC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "rank", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "rank", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "asc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Which rank has the smallest number of faculty members?", | |
| "question_toks": [ | |
| "Which", | |
| "rank", | |
| "has", | |
| "the", | |
| "smallest", | |
| "number", | |
| "of", | |
| "faculty", | |
| "members", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "rank", | |
| "FROM", | |
| "Faculty", | |
| "GROUP", | |
| "BY", | |
| "rank", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "ASC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "rank", | |
| "from", | |
| "faculty", | |
| "group", | |
| "by", | |
| "rank", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "asc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Find the faculty rank that has the least members.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "faculty", | |
| "rank", | |
| "that", | |
| "has", | |
| "the", | |
| "least", | |
| "members", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "sex", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "rank", | |
| "=", | |
| "``", | |
| "AsstProf", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "sex", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "sex" | |
| ], | |
| "question": "Show the number of male and female assistant professors.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "number", | |
| "of", | |
| "male", | |
| "and", | |
| "female", | |
| "assistant", | |
| "professors", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"AsstProf\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex", | |
| "query_toks": [ | |
| "SELECT", | |
| "sex", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "WHERE", | |
| "rank", | |
| "=", | |
| "``", | |
| "AsstProf", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "sex" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "sex", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "sex" | |
| ], | |
| "question": "How many male and female assistant professors do we have?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "male", | |
| "and", | |
| "female", | |
| "assistant", | |
| "professors", | |
| "do", | |
| "we", | |
| "have", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"AsstProf\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "WHERE", | |
| "T2.fname", | |
| "=", | |
| "``", | |
| "Linda", | |
| "''", | |
| "AND", | |
| "T2.lname", | |
| "=", | |
| "``", | |
| "Smith", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "where", | |
| "t2", | |
| ".", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "t2", | |
| ".", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the first name and last name of Linda Smith's advisor?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "first", | |
| "name", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "Linda", | |
| "Smith", | |
| "'s", | |
| "advisor", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Linda\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Smith\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "WHERE", | |
| "T2.fname", | |
| "=", | |
| "``", | |
| "Linda", | |
| "''", | |
| "AND", | |
| "T2.lname", | |
| "=", | |
| "``", | |
| "Smith", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "where", | |
| "t2", | |
| ".", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "t2", | |
| ".", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Who is the advisor of Linda Smith? Give me the first name and last name.", | |
| "question_toks": [ | |
| "Who", | |
| "is", | |
| "the", | |
| "advisor", | |
| "of", | |
| "Linda", | |
| "Smith", | |
| "?", | |
| "Give", | |
| "me", | |
| "the", | |
| "first", | |
| "name", | |
| "and", | |
| "last", | |
| "name", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Linda\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Smith\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "T2.StuID", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "WHERE", | |
| "T1.rank", | |
| "=", | |
| "``", | |
| "Professor", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t2", | |
| ".", | |
| "stuid", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "where", | |
| "t1", | |
| ".", | |
| "rank", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show the ids of students whose advisors are professors.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "ids", | |
| "of", | |
| "students", | |
| "whose", | |
| "advisors", | |
| "are", | |
| "professors", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "T2.StuID", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "WHERE", | |
| "T1.rank", | |
| "=", | |
| "``", | |
| "Professor", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t2", | |
| ".", | |
| "stuid", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "where", | |
| "t1", | |
| ".", | |
| "rank", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Which students have professors as their advisors? Find their student ids.", | |
| "question_toks": [ | |
| "Which", | |
| "students", | |
| "have", | |
| "professors", | |
| "as", | |
| "their", | |
| "advisors", | |
| "?", | |
| "Find", | |
| "their", | |
| "student", | |
| "ids", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = \"Michael\" AND T1.lname = \"Goodrich\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "T2.fname", | |
| ",", | |
| "T2.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "WHERE", | |
| "T1.fname", | |
| "=", | |
| "``", | |
| "Michael", | |
| "''", | |
| "AND", | |
| "T1.lname", | |
| "=", | |
| "``", | |
| "Goodrich", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t2", | |
| ".", | |
| "fname", | |
| ",", | |
| "t2", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "where", | |
| "t1", | |
| ".", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "t1", | |
| ".", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show first name and last name for all the students advised by Michael Goodrich.", | |
| "question_toks": [ | |
| "Show", | |
| "first", | |
| "name", | |
| "and", | |
| "last", | |
| "name", | |
| "for", | |
| "all", | |
| "the", | |
| "students", | |
| "advised", | |
| "by", | |
| "Michael", | |
| "Goodrich", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Michael\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Goodrich\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = \"Michael\" AND T1.lname = \"Goodrich\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "T2.fname", | |
| ",", | |
| "T2.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "WHERE", | |
| "T1.fname", | |
| "=", | |
| "``", | |
| "Michael", | |
| "''", | |
| "AND", | |
| "T1.lname", | |
| "=", | |
| "``", | |
| "Goodrich", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t2", | |
| ".", | |
| "fname", | |
| ",", | |
| "t2", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "where", | |
| "t1", | |
| ".", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "t1", | |
| ".", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Which students are advised by Michael Goodrich? Give me their first and last names.", | |
| "question_toks": [ | |
| "Which", | |
| "students", | |
| "are", | |
| "advised", | |
| "by", | |
| "Michael", | |
| "Goodrich", | |
| "?", | |
| "Give", | |
| "me", | |
| "their", | |
| "first", | |
| "and", | |
| "last", | |
| "names", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Michael\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Goodrich\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.FacID", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "facid", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid" | |
| ], | |
| "question": "Show the faculty id of each faculty member, along with the number of students he or she advises.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "faculty", | |
| "id", | |
| "of", | |
| "each", | |
| "faculty", | |
| "member", | |
| ",", | |
| "along", | |
| "with", | |
| "the", | |
| "number", | |
| "of", | |
| "students", | |
| "he", | |
| "or", | |
| "she", | |
| "advises", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.FacID", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "facid", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid" | |
| ], | |
| "question": "What are the faculty id and the number of students each faculty has?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "faculty", | |
| "id", | |
| "and", | |
| "the", | |
| "number", | |
| "of", | |
| "students", | |
| "each", | |
| "faculty", | |
| "has", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.rank", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "GROUP", | |
| "BY", | |
| "T1.rank" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "rank", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "rank" | |
| ], | |
| "question": "Show all the faculty ranks and the number of students advised by each rank.", | |
| "question_toks": [ | |
| "Show", | |
| "all", | |
| "the", | |
| "faculty", | |
| "ranks", | |
| "and", | |
| "the", | |
| "number", | |
| "of", | |
| "students", | |
| "advised", | |
| "by", | |
| "each", | |
| "rank", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.rank", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "GROUP", | |
| "BY", | |
| "T1.rank" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "rank", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "rank" | |
| ], | |
| "question": "How many students are advised by each rank of faculty? List the rank and the number of students.", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "students", | |
| "are", | |
| "advised", | |
| "by", | |
| "each", | |
| "rank", | |
| "of", | |
| "faculty", | |
| "?", | |
| "List", | |
| "the", | |
| "rank", | |
| "and", | |
| "the", | |
| "number", | |
| "of", | |
| "students", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "What are the first and last name of the faculty who has the most students?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "first", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "the", | |
| "faculty", | |
| "who", | |
| "has", | |
| "the", | |
| "most", | |
| "students", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Give me the the first and last name of the faculty who advises the most students.", | |
| "question_toks": [ | |
| "Give", | |
| "me", | |
| "the", | |
| "the", | |
| "first", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "the", | |
| "faculty", | |
| "who", | |
| "advises", | |
| "the", | |
| "most", | |
| "students", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.FacID", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "2" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show the ids for all the faculty members who have at least 2 students.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "ids", | |
| "for", | |
| "all", | |
| "the", | |
| "faculty", | |
| "members", | |
| "who", | |
| "have", | |
| "at", | |
| "least", | |
| "2", | |
| "students", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| null | |
| ] | |
| ], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.FacID", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Student", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.FacID", | |
| "=", | |
| "T2.advisor", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "2" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "student", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "advisor", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Which faculty members advise two ore more students? Give me their faculty ids.", | |
| "question_toks": [ | |
| "Which", | |
| "faculty", | |
| "members", | |
| "advise", | |
| "two", | |
| "ore", | |
| "more", | |
| "students", | |
| "?", | |
| "Give", | |
| "me", | |
| "their", | |
| "faculty", | |
| "ids", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| null | |
| ] | |
| ], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", | |
| "query_toks": [ | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty", | |
| "EXCEPT", | |
| "SELECT", | |
| "advisor", | |
| "FROM", | |
| "Student" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "except", | |
| "select", | |
| "advisor", | |
| "from", | |
| "student" | |
| ], | |
| "question": "Show ids for the faculty members who don't advise any student.", | |
| "question_toks": [ | |
| "Show", | |
| "ids", | |
| "for", | |
| "the", | |
| "faculty", | |
| "members", | |
| "who", | |
| "do", | |
| "n't", | |
| "advise", | |
| "any", | |
| "student", | |
| "." | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", | |
| "query_toks": [ | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty", | |
| "EXCEPT", | |
| "SELECT", | |
| "advisor", | |
| "FROM", | |
| "Student" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "except", | |
| "select", | |
| "advisor", | |
| "from", | |
| "student" | |
| ], | |
| "question": "What are the ids of the faculty members who do not advise any student.", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "ids", | |
| "of", | |
| "the", | |
| "faculty", | |
| "members", | |
| "who", | |
| "do", | |
| "not", | |
| "advise", | |
| "any", | |
| "student", | |
| "." | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT activity_name FROM Activity", | |
| "query_toks": [ | |
| "SELECT", | |
| "activity_name", | |
| "FROM", | |
| "Activity" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "activity_name", | |
| "from", | |
| "activity" | |
| ], | |
| "question": "What activities do we have?", | |
| "question_toks": [ | |
| "What", | |
| "activities", | |
| "do", | |
| "we", | |
| "have", | |
| "?" | |
| ], | |
| "sql": { | |
| "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": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT activity_name FROM Activity", | |
| "query_toks": [ | |
| "SELECT", | |
| "activity_name", | |
| "FROM", | |
| "Activity" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "activity_name", | |
| "from", | |
| "activity" | |
| ], | |
| "question": "List all the activities we have.", | |
| "question_toks": [ | |
| "List", | |
| "all", | |
| "the", | |
| "activities", | |
| "we", | |
| "have", | |
| "." | |
| ], | |
| "sql": { | |
| "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": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(*) FROM Activity", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Activity" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "activity" | |
| ], | |
| "question": "How many activities do we have?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "activities", | |
| "do", | |
| "we", | |
| "have", | |
| "?" | |
| ], | |
| "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": "activity_1", | |
| "query": "SELECT count(*) FROM Activity", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Activity" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "activity" | |
| ], | |
| "question": "Find the number of activities available.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "number", | |
| "of", | |
| "activities", | |
| "available", | |
| "." | |
| ], | |
| "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": "activity_1", | |
| "query": "SELECT count(DISTINCT FacID) FROM Faculty_participates_in", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "DISTINCT", | |
| "FacID", | |
| ")", | |
| "FROM", | |
| "Faculty_participates_in" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "distinct", | |
| "facid", | |
| ")", | |
| "from", | |
| "faculty_participates_in" | |
| ], | |
| "question": "How many faculty members participate in an activity?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "faculty", | |
| "members", | |
| "participate", | |
| "in", | |
| "an", | |
| "activity", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(DISTINCT FacID) FROM Faculty_participates_in", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "DISTINCT", | |
| "FacID", | |
| ")", | |
| "FROM", | |
| "Faculty_participates_in" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "distinct", | |
| "facid", | |
| ")", | |
| "from", | |
| "faculty_participates_in" | |
| ], | |
| "question": "Give me the number of faculty members who participate in an activity", | |
| "question_toks": [ | |
| "Give", | |
| "me", | |
| "the", | |
| "number", | |
| "of", | |
| "faculty", | |
| "members", | |
| "who", | |
| "participate", | |
| "in", | |
| "an", | |
| "activity" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", | |
| "query_toks": [ | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty", | |
| "EXCEPT", | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty_participates_in" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "except", | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty_participates_in" | |
| ], | |
| "question": "Show the ids of the faculty who don't participate in any activity.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "ids", | |
| "of", | |
| "the", | |
| "faculty", | |
| "who", | |
| "do", | |
| "n't", | |
| "participate", | |
| "in", | |
| "any", | |
| "activity", | |
| "." | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", | |
| "query_toks": [ | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty", | |
| "EXCEPT", | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty_participates_in" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "except", | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty_participates_in" | |
| ], | |
| "question": "Which faculty do not participate in any activity? Find their faculty ids.", | |
| "question_toks": [ | |
| "Which", | |
| "faculty", | |
| "do", | |
| "not", | |
| "participate", | |
| "in", | |
| "any", | |
| "activity", | |
| "?", | |
| "Find", | |
| "their", | |
| "faculty", | |
| "ids", | |
| "." | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", | |
| "query_toks": [ | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty_participates_in", | |
| "INTERSECT", | |
| "SELECT", | |
| "advisor", | |
| "FROM", | |
| "Student" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty_participates_in", | |
| "intersect", | |
| "select", | |
| "advisor", | |
| "from", | |
| "student" | |
| ], | |
| "question": "Show the ids of all the faculty members who participate in an activity and advise a student.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "ids", | |
| "of", | |
| "all", | |
| "the", | |
| "faculty", | |
| "members", | |
| "who", | |
| "participate", | |
| "in", | |
| "an", | |
| "activity", | |
| "and", | |
| "advise", | |
| "a", | |
| "student", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", | |
| "query_toks": [ | |
| "SELECT", | |
| "FacID", | |
| "FROM", | |
| "Faculty_participates_in", | |
| "INTERSECT", | |
| "SELECT", | |
| "advisor", | |
| "FROM", | |
| "Student" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "facid", | |
| "from", | |
| "faculty_participates_in", | |
| "intersect", | |
| "select", | |
| "advisor", | |
| "from", | |
| "student" | |
| ], | |
| "question": "What are ids of the faculty members who not only participate in an activity but also advise a student.", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "ids", | |
| "of", | |
| "the", | |
| "faculty", | |
| "members", | |
| "who", | |
| "not", | |
| "only", | |
| "participate", | |
| "in", | |
| "an", | |
| "activity", | |
| "but", | |
| "also", | |
| "advise", | |
| "a", | |
| "student", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "WHERE", | |
| "T1.fname", | |
| "=", | |
| "``", | |
| "Mark", | |
| "''", | |
| "AND", | |
| "T1.lname", | |
| "=", | |
| "``", | |
| "Giuliano", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "where", | |
| "t1", | |
| ".", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "t1", | |
| ".", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "How many activities does Mark Giuliano participate in?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "activities", | |
| "does", | |
| "Mark", | |
| "Giuliano", | |
| "participate", | |
| "in", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Mark\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Giuliano\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "WHERE", | |
| "T1.fname", | |
| "=", | |
| "``", | |
| "Mark", | |
| "''", | |
| "AND", | |
| "T1.lname", | |
| "=", | |
| "``", | |
| "Giuliano", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "where", | |
| "t1", | |
| ".", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "t1", | |
| ".", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Find the number of activities Mark Giuliano is involved in.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "number", | |
| "of", | |
| "activities", | |
| "Mark", | |
| "Giuliano", | |
| "is", | |
| "involved", | |
| "in", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Mark\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Giuliano\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "T3.activity_name", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "Activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T3.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T1.fname", | |
| "=", | |
| "``", | |
| "Mark", | |
| "''", | |
| "AND", | |
| "T1.lname", | |
| "=", | |
| "``", | |
| "Giuliano", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t3", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t1", | |
| ".", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "t1", | |
| ".", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Show the names of all the activities Mark Giuliano participates in.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "names", | |
| "of", | |
| "all", | |
| "the", | |
| "activities", | |
| "Mark", | |
| "Giuliano", | |
| "participates", | |
| "in", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Mark\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Giuliano\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "T3.activity_name", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "Activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T3.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T1.fname", | |
| "=", | |
| "``", | |
| "Mark", | |
| "''", | |
| "AND", | |
| "T1.lname", | |
| "=", | |
| "``", | |
| "Giuliano", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t3", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t1", | |
| ".", | |
| "fname", | |
| "=", | |
| "value", | |
| "and", | |
| "t1", | |
| ".", | |
| "lname", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the names of the activities Mark Giuliano is involved in", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "names", | |
| "of", | |
| "the", | |
| "activities", | |
| "Mark", | |
| "Giuliano", | |
| "is", | |
| "involved", | |
| "in" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Mark\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Giuliano\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "T1.FacID", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "t1", | |
| ".", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid" | |
| ], | |
| "question": "Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "first", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "all", | |
| "the", | |
| "faculty", | |
| "members", | |
| "who", | |
| "participated", | |
| "in", | |
| "some", | |
| "activity", | |
| ",", | |
| "together", | |
| "with", | |
| "the", | |
| "number", | |
| "of", | |
| "activities", | |
| "they", | |
| "participated", | |
| "in", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "T1.FacID", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "t1", | |
| ".", | |
| "facid", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid" | |
| ], | |
| "question": "What is the first and last name of the faculty members who participated in at least one activity? For each of them, also show the number of activities they participated in.", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "first", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "the", | |
| "faculty", | |
| "members", | |
| "who", | |
| "participated", | |
| "in", | |
| "at", | |
| "least", | |
| "one", | |
| "activity", | |
| "?", | |
| "For", | |
| "each", | |
| "of", | |
| "them", | |
| ",", | |
| "also", | |
| "show", | |
| "the", | |
| "number", | |
| "of", | |
| "activities", | |
| "they", | |
| "participated", | |
| "in", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.activity_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Activity", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.actID", | |
| "=", | |
| "T2.actID", | |
| "GROUP", | |
| "BY", | |
| "T1.actID" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "activity_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "activity", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "actid" | |
| ], | |
| "question": "Show all the activity names and the number of faculty involved in each activity.", | |
| "question_toks": [ | |
| "Show", | |
| "all", | |
| "the", | |
| "activity", | |
| "names", | |
| "and", | |
| "the", | |
| "number", | |
| "of", | |
| "faculty", | |
| "involved", | |
| "in", | |
| "each", | |
| "activity", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.activity_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Activity", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.actID", | |
| "=", | |
| "T2.actID", | |
| "GROUP", | |
| "BY", | |
| "T1.actID" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "activity_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "activity", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "actid" | |
| ], | |
| "question": "How many faculty members participate in each activity? Return the activity names and the number of faculty members.", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "faculty", | |
| "members", | |
| "participate", | |
| "in", | |
| "each", | |
| "activity", | |
| "?", | |
| "Return", | |
| "the", | |
| "activity", | |
| "names", | |
| "and", | |
| "the", | |
| "number", | |
| "of", | |
| "faculty", | |
| "members", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "What is the first and last name of the faculty participating in the most activities?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "first", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "the", | |
| "faculty", | |
| "participating", | |
| "in", | |
| "the", | |
| "most", | |
| "activities", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "GROUP", | |
| "BY", | |
| "T1.FacID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "facid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Find the first and last name of the faculty who is involved in the largest number of activities.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "first", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "the", | |
| "faculty", | |
| "who", | |
| "is", | |
| "involved", | |
| "in", | |
| "the", | |
| "largest", | |
| "number", | |
| "of", | |
| "activities", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.activity_name", | |
| "FROM", | |
| "Activity", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.actID", | |
| "=", | |
| "T2.actID", | |
| "GROUP", | |
| "BY", | |
| "T1.actID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "activity_name", | |
| "from", | |
| "activity", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "actid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "What is the name of the activity that has the most faculty members involved in?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "name", | |
| "of", | |
| "the", | |
| "activity", | |
| "that", | |
| "has", | |
| "the", | |
| "most", | |
| "faculty", | |
| "members", | |
| "involved", | |
| "in", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.activity_name", | |
| "FROM", | |
| "Activity", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.actID", | |
| "=", | |
| "T2.actID", | |
| "GROUP", | |
| "BY", | |
| "T1.actID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "activity_name", | |
| "from", | |
| "activity", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "actid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Which activity has the most faculty members participating in? Find the activity name.", | |
| "question_toks": [ | |
| "Which", | |
| "activity", | |
| "has", | |
| "the", | |
| "most", | |
| "faculty", | |
| "members", | |
| "participating", | |
| "in", | |
| "?", | |
| "Find", | |
| "the", | |
| "activity", | |
| "name", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", | |
| "query_toks": [ | |
| "SELECT", | |
| "StuID", | |
| "FROM", | |
| "Student", | |
| "EXCEPT", | |
| "SELECT", | |
| "StuID", | |
| "FROM", | |
| "Participates_in" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "stuid", | |
| "from", | |
| "student", | |
| "except", | |
| "select", | |
| "stuid", | |
| "from", | |
| "participates_in" | |
| ], | |
| "question": "Show the ids of the students who don't participate in any activity.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "ids", | |
| "of", | |
| "the", | |
| "students", | |
| "who", | |
| "do", | |
| "n't", | |
| "participate", | |
| "in", | |
| "any", | |
| "activity", | |
| "." | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", | |
| "query_toks": [ | |
| "SELECT", | |
| "StuID", | |
| "FROM", | |
| "Student", | |
| "EXCEPT", | |
| "SELECT", | |
| "StuID", | |
| "FROM", | |
| "Participates_in" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "stuid", | |
| "from", | |
| "student", | |
| "except", | |
| "select", | |
| "stuid", | |
| "from", | |
| "participates_in" | |
| ], | |
| "question": "What are the ids of the students who are not involved in any activity", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "ids", | |
| "of", | |
| "the", | |
| "students", | |
| "who", | |
| "are", | |
| "not", | |
| "involved", | |
| "in", | |
| "any", | |
| "activity" | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", | |
| "query_toks": [ | |
| "SELECT", | |
| "StuID", | |
| "FROM", | |
| "Participates_in", | |
| "INTERSECT", | |
| "SELECT", | |
| "StuID", | |
| "FROM", | |
| "Student", | |
| "WHERE", | |
| "age", | |
| "<", | |
| "20" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "stuid", | |
| "from", | |
| "participates_in", | |
| "intersect", | |
| "select", | |
| "stuid", | |
| "from", | |
| "student", | |
| "where", | |
| "age", | |
| "<", | |
| "value" | |
| ], | |
| "question": "Show the ids for all the students who participate in an activity and are under 20.", | |
| "question_toks": [ | |
| "Show", | |
| "the", | |
| "ids", | |
| "for", | |
| "all", | |
| "the", | |
| "students", | |
| "who", | |
| "participate", | |
| "in", | |
| "an", | |
| "activity", | |
| "and", | |
| "are", | |
| "under", | |
| "20", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| 20.0, | |
| null | |
| ] | |
| ] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", | |
| "query_toks": [ | |
| "SELECT", | |
| "StuID", | |
| "FROM", | |
| "Participates_in", | |
| "INTERSECT", | |
| "SELECT", | |
| "StuID", | |
| "FROM", | |
| "Student", | |
| "WHERE", | |
| "age", | |
| "<", | |
| "20" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "stuid", | |
| "from", | |
| "participates_in", | |
| "intersect", | |
| "select", | |
| "stuid", | |
| "from", | |
| "student", | |
| "where", | |
| "age", | |
| "<", | |
| "value" | |
| ], | |
| "question": "What are the ids of the students who are under 20 years old and are involved in at least one activity.", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "ids", | |
| "of", | |
| "the", | |
| "students", | |
| "who", | |
| "are", | |
| "under", | |
| "20", | |
| "years", | |
| "old", | |
| "and", | |
| "are", | |
| "involved", | |
| "in", | |
| "at", | |
| "least", | |
| "one", | |
| "activity", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| 20.0, | |
| null | |
| ] | |
| ] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| "FROM", | |
| "Student", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.StuID", | |
| "=", | |
| "T2.StuID", | |
| "GROUP", | |
| "BY", | |
| "T1.StuID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "student", | |
| "as", | |
| "t1", | |
| "join", | |
| "participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "stuid", | |
| "=", | |
| "t2", | |
| ".", | |
| "stuid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "stuid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "What is the first and last name of the student participating in the most activities?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "first", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "the", | |
| "student", | |
| "participating", | |
| "in", | |
| "the", | |
| "most", | |
| "activities", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.fname", | |
| ",", | |
| "T1.lname", | |
| "FROM", | |
| "Student", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.StuID", | |
| "=", | |
| "T2.StuID", | |
| "GROUP", | |
| "BY", | |
| "T1.StuID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "fname", | |
| ",", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "student", | |
| "as", | |
| "t1", | |
| "join", | |
| "participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "stuid", | |
| "=", | |
| "t2", | |
| ".", | |
| "stuid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "stuid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Tell me the first and last name of the student who has the most activities.", | |
| "question_toks": [ | |
| "Tell", | |
| "me", | |
| "the", | |
| "first", | |
| "and", | |
| "last", | |
| "name", | |
| "of", | |
| "the", | |
| "student", | |
| "who", | |
| "has", | |
| "the", | |
| "most", | |
| "activities", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.activity_name", | |
| "FROM", | |
| "Activity", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.actID", | |
| "=", | |
| "T2.actID", | |
| "GROUP", | |
| "BY", | |
| "T1.actID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "activity_name", | |
| "from", | |
| "activity", | |
| "as", | |
| "t1", | |
| "join", | |
| "participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "actid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "What is the name of the activity with the most students?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "name", | |
| "of", | |
| "the", | |
| "activity", | |
| "with", | |
| "the", | |
| "most", | |
| "students", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.activity_name", | |
| "FROM", | |
| "Activity", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.actID", | |
| "=", | |
| "T2.actID", | |
| "GROUP", | |
| "BY", | |
| "T1.actID", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "activity_name", | |
| "from", | |
| "activity", | |
| "as", | |
| "t1", | |
| "join", | |
| "participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "actid", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Find the name of the activity that has the largest number of student participants.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "name", | |
| "of", | |
| "the", | |
| "activity", | |
| "that", | |
| "has", | |
| "the", | |
| "largest", | |
| "number", | |
| "of", | |
| "student", | |
| "participants", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T3.activity_name", | |
| "=", | |
| "'Canoeing", | |
| "'", | |
| "OR", | |
| "T3.activity_name", | |
| "=", | |
| "'Kayaking", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value", | |
| "or", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Find the first names of the faculty members who are playing Canoeing or Kayaking.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "first", | |
| "names", | |
| "of", | |
| "the", | |
| "faculty", | |
| "members", | |
| "who", | |
| "are", | |
| "playing", | |
| "Canoeing", | |
| "or", | |
| "Kayaking", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Canoeing\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Kayaking\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T3.activity_name", | |
| "=", | |
| "'Canoeing", | |
| "'", | |
| "OR", | |
| "T3.activity_name", | |
| "=", | |
| "'Kayaking", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value", | |
| "or", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.", | |
| "question_toks": [ | |
| "Which", | |
| "faculty", | |
| "members", | |
| "are", | |
| "playing", | |
| "either", | |
| "Canoeing", | |
| "or", | |
| "Kayaking", | |
| "?", | |
| "Tell", | |
| "me", | |
| "their", | |
| "first", | |
| "names", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Canoeing\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Kayaking\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", | |
| "query_toks": [ | |
| "SELECT", | |
| "lname", | |
| "FROM", | |
| "faculty", | |
| "WHERE", | |
| "rank", | |
| "=", | |
| "'Professor", | |
| "'", | |
| "EXCEPT", | |
| "SELECT", | |
| "DISTINCT", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T3.activity_name", | |
| "=", | |
| "'Canoeing", | |
| "'", | |
| "OR", | |
| "T3.activity_name", | |
| "=", | |
| "'Kayaking", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value", | |
| "except", | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value", | |
| "or", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Find the first names of professors who are not playing Canoeing or Kayaking.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "first", | |
| "names", | |
| "of", | |
| "professors", | |
| "who", | |
| "are", | |
| "not", | |
| "playing", | |
| "Canoeing", | |
| "or", | |
| "Kayaking", | |
| "." | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Canoeing\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Kayaking\"", | |
| null | |
| ] | |
| ] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", | |
| "query_toks": [ | |
| "SELECT", | |
| "lname", | |
| "FROM", | |
| "faculty", | |
| "WHERE", | |
| "rank", | |
| "=", | |
| "'Professor", | |
| "'", | |
| "EXCEPT", | |
| "SELECT", | |
| "DISTINCT", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T3.activity_name", | |
| "=", | |
| "'Canoeing", | |
| "'", | |
| "OR", | |
| "T3.activity_name", | |
| "=", | |
| "'Kayaking", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "where", | |
| "rank", | |
| "=", | |
| "value", | |
| "except", | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value", | |
| "or", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the first names of the professors who do not play Canoeing or Kayaking as activities?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "first", | |
| "names", | |
| "of", | |
| "the", | |
| "professors", | |
| "who", | |
| "do", | |
| "not", | |
| "play", | |
| "Canoeing", | |
| "or", | |
| "Kayaking", | |
| "as", | |
| "activities", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Canoeing\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Kayaking\"", | |
| null | |
| ] | |
| ] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 18, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Professor\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T3.activity_name", | |
| "=", | |
| "'Canoeing", | |
| "'", | |
| "INTERSECT", | |
| "SELECT", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T3.activity_name", | |
| "=", | |
| "'Kayaking", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value", | |
| "intersect", | |
| "select", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Find the first names of the faculty members who participate in Canoeing and Kayaking.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "first", | |
| "names", | |
| "of", | |
| "the", | |
| "faculty", | |
| "members", | |
| "who", | |
| "participate", | |
| "in", | |
| "Canoeing", | |
| "and", | |
| "Kayaking", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Kayaking\"", | |
| null | |
| ] | |
| ] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Canoeing\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T3.activity_name", | |
| "=", | |
| "'Canoeing", | |
| "'", | |
| "INTERSECT", | |
| "SELECT", | |
| "T1.lname", | |
| "FROM", | |
| "Faculty", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Faculty_participates_in", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.facID", | |
| "=", | |
| "T2.facID", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T3.activity_name", | |
| "=", | |
| "'Kayaking", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value", | |
| "intersect", | |
| "select", | |
| "t1", | |
| ".", | |
| "lname", | |
| "from", | |
| "faculty", | |
| "as", | |
| "t1", | |
| "join", | |
| "faculty_participates_in", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "facid", | |
| "=", | |
| "t2", | |
| ".", | |
| "facid", | |
| "join", | |
| "activity", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t3", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "What are the first names of the faculty members playing both Canoeing and Kayaking?", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "first", | |
| "names", | |
| "of", | |
| "the", | |
| "faculty", | |
| "members", | |
| "playing", | |
| "both", | |
| "Canoeing", | |
| "and", | |
| "Kayaking", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Kayaking\"", | |
| null | |
| ] | |
| ] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Canoeing\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.stuid", | |
| "FROM", | |
| "participates_in", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T2.activity_name", | |
| "=", | |
| "'Canoeing", | |
| "'", | |
| "INTERSECT", | |
| "SELECT", | |
| "T1.stuid", | |
| "FROM", | |
| "participates_in", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T2.activity_name", | |
| "=", | |
| "'Kayaking", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "stuid", | |
| "from", | |
| "participates_in", | |
| "as", | |
| "t1", | |
| "join", | |
| "activity", | |
| "as", | |
| "t2", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t2", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value", | |
| "intersect", | |
| "select", | |
| "t1", | |
| ".", | |
| "stuid", | |
| "from", | |
| "participates_in", | |
| "as", | |
| "t1", | |
| "join", | |
| "activity", | |
| "as", | |
| "t2", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t2", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Find the ids of the students who participate in Canoeing and Kayaking.", | |
| "question_toks": [ | |
| "Find", | |
| "the", | |
| "ids", | |
| "of", | |
| "the", | |
| "students", | |
| "who", | |
| "participate", | |
| "in", | |
| "Canoeing", | |
| "and", | |
| "Kayaking", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Kayaking\"", | |
| null | |
| ] | |
| ] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Canoeing\"", | |
| null | |
| ] | |
| ] | |
| } | |
| }, | |
| { | |
| "db_id": "activity_1", | |
| "query": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.stuid", | |
| "FROM", | |
| "participates_in", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T2.activity_name", | |
| "=", | |
| "'Canoeing", | |
| "'", | |
| "INTERSECT", | |
| "SELECT", | |
| "T1.stuid", | |
| "FROM", | |
| "participates_in", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "activity", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T2.actid", | |
| "=", | |
| "T2.actid", | |
| "WHERE", | |
| "T2.activity_name", | |
| "=", | |
| "'Kayaking", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "stuid", | |
| "from", | |
| "participates_in", | |
| "as", | |
| "t1", | |
| "join", | |
| "activity", | |
| "as", | |
| "t2", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t2", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value", | |
| "intersect", | |
| "select", | |
| "t1", | |
| ".", | |
| "stuid", | |
| "from", | |
| "participates_in", | |
| "as", | |
| "t1", | |
| "join", | |
| "activity", | |
| "as", | |
| "t2", | |
| "on", | |
| "t2", | |
| ".", | |
| "actid", | |
| "=", | |
| "t2", | |
| ".", | |
| "actid", | |
| "where", | |
| "t2", | |
| ".", | |
| "activity_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.", | |
| "question_toks": [ | |
| "Which", | |
| "students", | |
| "participate", | |
| "in", | |
| "both", | |
| "Canoeing", | |
| "and", | |
| "Kayaking", | |
| "as", | |
| "their", | |
| "activities", | |
| "?", | |
| "Tell", | |
| "me", | |
| "their", | |
| "student", | |
| "ids", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Kayaking\"", | |
| null | |
| ] | |
| ] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Canoeing\"", | |
| null | |
| ] | |
| ] | |
| } | |
| } | |
| ] |