[{"id": "train_3375", "db_id": "sports_competition", "query": "select sum(points) from player", "query_toks": ["SELECT", "sum", "(", "Points", ")", "FROM", "player"], "query_toks_no_value": ["select", "sum", "(", "points", ")", "from", "player"], "question": "Show total points of all players.", "question_toks": ["Show", "total", "points", "of", "all", "players", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 18, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6029", "db_id": "game_1", "query": "select sum(hoursperweek) , sum(gamesplayed) from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t2.fname = \"david\" and t2.lname = \"shieber\"", "query_toks": ["SELECT", "sum", "(", "hoursperweek", ")", ",", "sum", "(", "gamesplayed", ")", "FROM", "Sportsinfo", "AS", "T1", "JOIN", "Student", "AS", "T2", "ON", "T1.StuID", "=", "T2.StuID", "WHERE", "T2.Fname", "=", "``", "David", "''", "AND", "T2.Lname", "=", "``", "Shieber", "''"], "query_toks_no_value": ["select", "sum", "(", "hoursperweek", ")", ",", "sum", "(", "gamesplayed", ")", "from", "sportsinfo", "as", "t1", "join", "student", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t2", ".", "fname", "=", "value", "and", "t2", ".", "lname", "=", "value"], "question": "Show total hours per week and number of games played for student David Shieber.", "question_toks": ["Show", "total", "hours", "per", "week", "and", "number", "of", "games", "played", "for", "student", "David", "Shieber", "."], "sql": {"from": {"table_units": [["table_unit", 3], ["table_unit", 0]], "conds": [[false, 2, [0, [0, 15, false], null], [0, 1, false], null]]}, "select": [false, [[4, [0, [0, 17, false], null]], [4, [0, [0, 18, false], null]]]], "where": [[false, 2, [0, [0, 3, false], null], "\"David\"", null], "and", [false, 2, [0, [0, 2, false], null], "\"Shieber\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6031", "db_id": "game_1", "query": "select sum(hoursperweek) , sum(gamesplayed) from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t2.age < 20", "query_toks": ["SELECT", "sum", "(", "hoursperweek", ")", ",", "sum", "(", "gamesplayed", ")", "FROM", "Sportsinfo", "AS", "T1", "JOIN", "Student", "AS", "T2", "ON", "T1.StuID", "=", "T2.StuID", "WHERE", "T2.age", "<", "20"], "query_toks_no_value": ["select", "sum", "(", "hoursperweek", ")", ",", "sum", "(", "gamesplayed", ")", "from", "sportsinfo", "as", "t1", "join", "student", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t2", ".", "age", "<", "value"], "question": "Show total hours per week and number of games played for students under 20.", "question_toks": ["Show", "total", "hours", "per", "week", "and", "number", "of", "games", "played", "for", "students", "under", "20", "."], "sql": {"from": {"table_units": [["table_unit", 3], ["table_unit", 0]], "conds": [[false, 2, [0, [0, 15, false], null], [0, 1, false], null]]}, "select": [false, [[4, [0, [0, 17, false], null]], [4, [0, [0, 18, false], null]]]], "where": [[false, 4, [0, [0, 4, false], null], 20.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0289", "db_id": "employee_hire_evaluation", "query": "select sum(bonus) from evaluation", "query_toks": ["SELECT", "sum", "(", "bonus", ")", "FROM", "evaluation"], "query_toks_no_value": ["select", "sum", "(", "bonus", ")", "from", "evaluation"], "question": "What is total bonus given in all evaluations?", "question_toks": ["What", "is", "total", "bonus", "given", "in", "all", "evaluations", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[4, [0, [0, 17, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6471", "db_id": "scientist_1", "query": "select sum(hours) from projects", "query_toks": ["SELECT", "sum", "(", "hours", ")", "FROM", "projects"], "query_toks_no_value": ["select", "sum", "(", "hours", ")", "from", "projects"], "question": "Find the total hours of all projects.", "question_toks": ["Find", "the", "total", "hours", "of", "all", "projects", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[4, [0, [0, 5, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3237", "db_id": "college_1", "query": "select sum(t1.crs_credit) , t1.dept_code from course as t1 join class as t2 on t1.crs_code = t2.crs_code group by t1.dept_code", "query_toks": ["SELECT", "sum", "(", "T1.crs_credit", ")", ",", "T1.dept_code", "FROM", "course", "AS", "T1", "JOIN", "CLASS", "AS", "T2", "ON", "T1.crs_code", "=", "T2.crs_code", "GROUP", "BY", "T1.dept_code"], "query_toks_no_value": ["select", "sum", "(", "t1", ".", "crs_credit", ")", ",", "t1", ".", "dept_code", "from", "course", "as", "t1", "join", "class", "as", "t2", "on", "t1", ".", "crs_code", "=", "t2", ".", "crs_code", "group", "by", "t1", ".", "dept_code"], "question": "Find the total credits of all classes offered by each department.", "question_toks": ["Find", "the", "total", "credits", "of", "all", "classes", "offered", "by", "each", "department", "."], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 0]], "conds": [[false, 2, [0, [0, 7, false], null], [0, 2, false], null]]}, "select": [false, [[4, [0, [0, 10, false], null]], [0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [[0, 8, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5682", "db_id": "dorm_1", "query": "select sum(student_capacity) from dorm", "query_toks": ["SELECT", "sum", "(", "student_capacity", ")", "FROM", "dorm"], "query_toks_no_value": ["select", "sum", "(", "student_capacity", ")", "from", "dorm"], "question": "Find the total capacity of all dorms.", "question_toks": ["Find", "the", "total", "capacity", "of", "all", "dorms", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[4, [0, [0, 11, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4505", "db_id": "document_management", "query": "select sum(access_count) from documents group by document_type_code order by count(*) desc limit 1", "query_toks": ["SELECT", "sum", "(", "access_count", ")", "FROM", "documents", "GROUP", "BY", "document_type_code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "sum", "(", "access_count", ")", "from", "documents", "group", "by", "document_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value"], "question": "Find the total access count of all documents in the most popular document type.", "question_toks": ["Find", "the", "total", "access", "count", "of", "all", "documents", "in", "the", "most", "popular", "document", "type", "."], "sql": {"from": {"table_units": [["table_unit", 5]], "conds": []}, "select": [false, [[4, [0, [0, 21, false], null]]]], "where": [], "groupBy": [[0, 20, false]], "having": [], "orderBy": ["desc", [[0, [3, 0, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3896", "db_id": "insurance_policies", "query": "select sum(amount_claimed) from claims", "query_toks": ["SELECT", "sum", "(", "Amount_Claimed", ")", "FROM", "Claims"], "query_toks_no_value": ["select", "sum", "(", "amount_claimed", ")", "from", "claims"], "question": "Find the total claimed amount of all the claims.", "question_toks": ["Find", "the", "total", "claimed", "amount", "of", "all", "the", "claims", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 12, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1240", "db_id": "apartment_rentals", "query": "select sum(t2.room_count) from apartment_facilities as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.facility_code = \"gym\"", "query_toks": ["SELECT", "sum", "(", "T2.room_count", ")", "FROM", "Apartment_Facilities", "AS", "T1", "JOIN", "Apartments", "AS", "T2", "ON", "T1.apt_id", "=", "T2.apt_id", "WHERE", "T1.facility_code", "=", "``", "Gym", "''"], "query_toks_no_value": ["select", "sum", "(", "t2", ".", "room_count", ")", "from", "apartment_facilities", "as", "t1", "join", "apartments", "as", "t2", "on", "t1", ".", "apt_id", "=", "t2", ".", "apt_id", "where", "t1", ".", "facility_code", "=", "value"], "question": "Show the total number of rooms of all apartments with facility code \"Gym\".", "question_toks": ["Show", "the", "total", "number", "of", "rooms", "of", "all", "apartments", "with", "facility", "code", "``", "Gym", "''", "."], "sql": {"from": {"table_units": [["table_unit", 2], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 15, false], null], [0, 8, false], null]]}, "select": [false, [[4, [0, [0, 14, false], null]]]], "where": [[false, 2, [0, [0, 16, false], null], "\"Gym\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1776", "db_id": "small_bank_1", "query": "select sum(t2.balance) from accounts as t1 join savings as t2 on t1.custid = t2.custid where t1.name != 'brown'", "query_toks": ["SELECT", "sum", "(", "T2.balance", ")", "FROM", "accounts", "AS", "T1", "JOIN", "savings", "AS", "T2", "ON", "T1.custid", "=", "T2.custid", "WHERE", "T1.name", "!", "=", "'Brown", "'"], "query_toks_no_value": ["select", "sum", "(", "t2", ".", "balance", ")", "from", "accounts", "as", "t1", "join", "savings", "as", "t2", "on", "t1", ".", "custid", "=", "t2", ".", "custid", "where", "t1", ".", "name", "!", "=", "value"], "question": "Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.", "question_toks": ["Find", "the", "total", "savings", "balance", "of", "all", "accounts", "except", "the", "account", "with", "name", "\u2018Brown\u2019", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 3, false], null]]}, "select": [false, [[4, [0, [0, 4, false], null]]]], "where": [[false, 7, [0, [0, 2, false], null], "\"Brown\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3742", "db_id": "program_share", "query": "select sum(share_in_percent) from channel where owner = 'cctv'", "query_toks": ["SELECT", "sum", "(", "Share_in_percent", ")", "FROM", "channel", "WHERE", "OWNER", "=", "'CCTV", "'"], "query_toks_no_value": ["select", "sum", "(", "share_in_percent", ")", "from", "channel", "where", "owner", "=", "value"], "question": "find the total percentage share of all channels owned by CCTV.", "question_toks": ["find", "the", "total", "percentage", "share", "of", "all", "channels", "owned", "by", "CCTV", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[4, [0, [0, 9, false], null]]]], "where": [[false, 2, [0, [0, 8, false], null], "\"CCTV\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0290", "db_id": "employee_hire_evaluation", "query": "select sum(bonus) from evaluation", "query_toks": ["SELECT", "sum", "(", "bonus", ")", "FROM", "evaluation"], "query_toks_no_value": ["select", "sum", "(", "bonus", ")", "from", "evaluation"], "question": "Find the total amount of bonus given in all the evaluations.", "question_toks": ["Find", "the", "total", "amount", "of", "bonus", "given", "in", "all", "the", "evaluations", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[4, [0, [0, 17, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3219", "db_id": "college_1", "query": "select sum(stu_hrs) , dept_code from student group by dept_code", "query_toks": ["SELECT", "sum", "(", "stu_hrs", ")", ",", "dept_code", "FROM", "student", "GROUP", "BY", "dept_code"], "query_toks_no_value": ["select", "sum", "(", "stu_hrs", ")", ",", "dept_code", "from", "student", "group", "by", "dept_code"], "question": "Find the total number of hours have done for all students in each department.", "question_toks": ["Find", "the", "total", "number", "of", "hours", "have", "done", "for", "all", "students", "in", "each", "department", "."], "sql": {"from": {"table_units": [["table_unit", 6]], "conds": []}, "select": [false, [[4, [0, [0, 37, false], null]], [0, [0, [0, 41, false], null]]]], "where": [], "groupBy": [[0, 41, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2282", "db_id": "entrepreneur", "query": "select sum(t1.money_requested) from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t2.height > 1.85", "query_toks": ["SELECT", "sum", "(", "T1.Money_Requested", ")", "FROM", "entrepreneur", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T2.Height", ">", "1.85"], "query_toks_no_value": ["select", "sum", "(", "t1", ".", "money_requested", ")", "from", "entrepreneur", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t2", ".", "height", ">", "value"], "question": "Give the total money requested by entrepreneurs who are taller than 1.85.", "question_toks": ["Give", "the", "total", "money", "requested", "by", "entrepreneurs", "who", "are", "taller", "than", "1.85", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 2, false], null], [0, 6, false], null]]}, "select": [false, [[4, [0, [0, 4, false], null]]]], "where": [[false, 3, [0, [0, 8, false], null], 1.85, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0480", "db_id": "wta_1", "query": "select sum(tours) , ranking_date from rankings group by ranking_date", "query_toks": ["SELECT", "sum", "(", "tours", ")", ",", "ranking_date", "FROM", "rankings", "GROUP", "BY", "ranking_date"], "query_toks_no_value": ["select", "sum", "(", "tours", ")", ",", "ranking_date", "from", "rankings", "group", "by", "ranking_date"], "question": "How many total tours were there for each ranking date?", "question_toks": ["How", "many", "total", "tours", "were", "there", "for", "each", "ranking", "date", "?"], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 43, false], null]], [0, [0, [0, 39, false], null]]]], "where": [], "groupBy": [[0, 39, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1399", "db_id": "college_2", "query": "select sum(credits) , dept_name from course group by dept_name", "query_toks": ["SELECT", "sum", "(", "credits", ")", ",", "dept_name", "FROM", "course", "GROUP", "BY", "dept_name"], "query_toks_no_value": ["select", "sum", "(", "credits", ")", ",", "dept_name", "from", "course", "group", "by", "dept_name"], "question": "How many total credits are offered by each department?", "question_toks": ["How", "many", "total", "credits", "are", "offered", "by", "each", "department", "?"], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 10, false], null]], [0, [0, [0, 9, false], null]]]], "where": [], "groupBy": [[0, 9, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0471", "db_id": "wta_1", "query": "select sum(ranking_points) , t1.first_name from players as t1 join rankings as t2 on t1.player_id = t2.player_id group by t1.first_name", "query_toks": ["SELECT", "sum", "(", "ranking_points", ")", ",", "T1.first_name", "FROM", "players", "AS", "T1", "JOIN", "rankings", "AS", "T2", "ON", "T1.player_id", "=", "T2.player_id", "GROUP", "BY", "T1.first_name"], "query_toks_no_value": ["select", "sum", "(", "ranking_points", ")", ",", "t1", ".", "first_name", "from", "players", "as", "t1", "join", "rankings", "as", "t2", "on", "t1", ".", "player_id", "=", "t2", ".", "player_id", "group", "by", "t1", ".", "first_name"], "question": "Find the total ranking points for each player and their first name.", "question_toks": ["Find", "the", "total", "ranking", "points", "for", "each", "player", "and", "their", "first", "name", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 41, false], null]]}, "select": [false, [[4, [0, [0, 42, false], null]], [0, [0, [0, 2, false], null]]]], "where": [], "groupBy": [[0, 2, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0479", "db_id": "wta_1", "query": "select sum(tours) , ranking_date from rankings group by ranking_date", "query_toks": ["SELECT", "sum", "(", "tours", ")", ",", "ranking_date", "FROM", "rankings", "GROUP", "BY", "ranking_date"], "query_toks_no_value": ["select", "sum", "(", "tours", ")", ",", "ranking_date", "from", "rankings", "group", "by", "ranking_date"], "question": "Find the total number of tours for each ranking date.", "question_toks": ["Find", "the", "total", "number", "of", "tours", "for", "each", "ranking", "date", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 43, false], null]], [0, [0, [0, 39, false], null]]]], "where": [], "groupBy": [[0, 39, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0727", "db_id": "world_1", "query": "select sum(surfacearea) from country where continent = \"asia\" or continent = \"europe\"", "query_toks": ["SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''", "OR", "Continent", "=", "``", "Europe", "''"], "query_toks_no_value": ["select", "sum", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "or", "continent", "=", "value"], "question": "Give the total surface area covered by countries in Asia or Europe.", "question_toks": ["Give", "the", "total", "surface", "area", "covered", "by", "countries", "in", "Asia", "or", "Europe", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 12, false], null]]]], "where": [[false, 2, [0, [0, 10, false], null], "\"Asia\"", null], "or", [false, 2, [0, [0, 10, false], null], "\"Europe\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0811", "db_id": "world_1", "query": "select sum(population) , avg(surfacearea) from country where continent = \"north america\" and surfacearea > 3000", "query_toks": ["select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "\"north america\"", "and", "surfacearea", ">", "3000"], "query_toks_no_value": ["select", "sum", "(", "population", ")", ",", "avg", "(", "surfacearea", ")", "from", "country", "where", "continent", "=", "value", "and", "surfacearea", ">", "value"], "question": "Give the total population and average surface area corresponding to countries in North America that have a surface area greater than 3000 .", "question_toks": ["Give", "the", "total", "population", "and", "average", "surface", "area", "corresponding", "to", "countries", "in", "North", "America", "that", "have", "a", "surface", "area", "greater", "than", "3000", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 14, false], null]], [5, [0, [0, 12, false], null]]]], "where": [[false, 2, [0, [0, 10, false], null], "\"north america\"", null], "and", [false, 3, [0, [0, 12, false], null], 3000.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3391", "db_id": "manufacturer", "query": "select sum(market_rate) from furniture order by market_rate desc limit 2", "query_toks": ["SELECT", "sum", "(", "market_rate", ")", "FROM", "furniture", "ORDER", "BY", "market_rate", "DESC", "LIMIT", "2"], "query_toks_no_value": ["select", "sum", "(", "market_rate", ")", "from", "furniture", "order", "by", "market_rate", "desc", "limit", "value"], "question": "find the total market rate of the furnitures that have the top 2 market shares.", "question_toks": ["find", "the", "total", "market", "rate", "of", "the", "furnitures", "that", "have", "the", "top", "2", "market", "shares", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[4, [0, [0, 9, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 9, false], null]]], "limit": 2, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3512", "db_id": "hr_1", "query": "select department_id , sum(salary) from employees group by department_id having count(*) >= 2", "query_toks": ["SELECT", "department_id", ",", "SUM", "(", "salary", ")", "FROM", "employees", "GROUP", "BY", "department_id", "HAVING", "count", "(", "*", ")", ">", "=", "2"], "query_toks_no_value": ["select", "department_id", ",", "sum", "(", "salary", ")", "from", "employees", "group", "by", "department_id", "having", "count", "(", "*", ")", ">", "=", "value"], "question": "What are total salaries and department id for each department that has more than 2 employees?", "question_toks": ["What", "are", "total", "salaries", "and", "department", "id", "for", "each", "department", "that", "has", "more", "than", "2", "employees", "?"], "sql": {"from": {"table_units": [["table_unit", 4]], "conds": []}, "select": [false, [[0, [0, [0, 24, false], null]], [4, [0, [0, 21, false], null]]]], "where": [], "groupBy": [[0, 24, false]], "having": [[false, 5, [0, [3, 0, false], null], 2.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_1189", "db_id": "yelp", "query": "select sum ( t4.count ) from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id join checkin as t4 on t4.business_id = t1.business_id where t1.city = \"los angeles\" and t2.category_name = \"restaurant\" and t3.category_name = \"moroccan\";", "query_toks": ["SELECT", "SUM", "(", "t4.count", ")", "FROM", "category", "AS", "t2", "JOIN", "business", "AS", "t1", "ON", "t2.business_id", "=", "t1.business_id", "JOIN", "category", "AS", "t3", "ON", "t3.business_id", "=", "t1.business_id", "JOIN", "checkin", "AS", "t4", "ON", "t4.business_id", "=", "t1.business_id", "WHERE", "t1.city", "=", "``", "Los", "Angeles", "''", "AND", "t2.category_name", "=", "``", "restaurant", "''", "AND", "t3.category_name", "=", "``", "Moroccan", "''", ";"], "query_toks_no_value": ["select", "sum", "(", "t4", ".", "count", ")", "from", "category", "as", "t2", "join", "business", "as", "t1", "on", "t2", ".", "business_id", "=", "t1", ".", "business_id", "join", "category", "as", "t3", "on", "t3", ".", "business_id", "=", "t1", ".", "business_id", "join", "checkin", "as", "t4", "on", "t4", ".", "business_id", "=", "t1", ".", "business_id", "where", "t1", ".", "city", "=", "value", "and", "t2", ".", "category_name", "=", "value", "and", "t3", ".", "category_name", "=", "value"], "question": "find the total checkins in Moroccan restaurant in \" Los Angeles \"", "question_toks": ["find", "the", "total", "checkins", "in", "Moroccan", "restaurant", "in", "``", "Los", "Angeles", "``"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 0], ["table_unit", 1], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 13, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 13, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 19, false], null], [0, 2, false], null]]}, "select": [false, [[4, [0, [0, 20, false], null]]]], "where": [[false, 2, [0, [0, 5, false], null], "\"Los Angeles\"", null], "and", [false, 2, [0, [0, 14, false], null], "\"restaurant\"", null], "and", [false, 2, [0, [0, 14, false], null], "\"Moroccan\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_1190", "db_id": "yelp", "query": "select sum ( t4.count ) from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id join checkin as t4 on t4.business_id = t1.business_id where t1.city = \"los angeles\" and t2.category_name = \"moroccan\" and t3.category_name = \"restaurant\" and t4.day = \"friday\";", "query_toks": ["SELECT", "SUM", "(", "t4.count", ")", "FROM", "category", "AS", "t2", "JOIN", "business", "AS", "t1", "ON", "t2.business_id", "=", "t1.business_id", "JOIN", "category", "AS", "t3", "ON", "t3.business_id", "=", "t1.business_id", "JOIN", "checkin", "AS", "t4", "ON", "t4.business_id", "=", "t1.business_id", "WHERE", "t1.city", "=", "``", "Los", "Angeles", "''", "AND", "t2.category_name", "=", "``", "Moroccan", "''", "AND", "t3.category_name", "=", "``", "restaurant", "''", "AND", "t4.day", "=", "``", "Friday", "''", ";"], "query_toks_no_value": ["select", "sum", "(", "t4", ".", "count", ")", "from", "category", "as", "t2", "join", "business", "as", "t1", "on", "t2", ".", "business_id", "=", "t1", ".", "business_id", "join", "category", "as", "t3", "on", "t3", ".", "business_id", "=", "t1", ".", "business_id", "join", "checkin", "as", "t4", "on", "t4", ".", "business_id", "=", "t1", ".", "business_id", "where", "t1", ".", "city", "=", "value", "and", "t2", ".", "category_name", "=", "value", "and", "t3", ".", "category_name", "=", "value", "and", "t4", ".", "day", "=", "value"], "question": "find the total checkins in Moroccan restaurant in \" Los Angeles \" on Friday", "question_toks": ["find", "the", "total", "checkins", "in", "Moroccan", "restaurant", "in", "``", "Los", "Angeles", "``", "on", "Friday"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 0], ["table_unit", 1], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 13, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 13, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 19, false], null], [0, 2, false], null]]}, "select": [false, [[4, [0, [0, 20, false], null]]]], "where": [[false, 2, [0, [0, 5, false], null], "\"Los Angeles\"", null], "and", [false, 2, [0, [0, 14, false], null], "\"Moroccan\"", null], "and", [false, 2, [0, [0, 14, false], null], "\"restaurant\"", null], "and", [false, 2, [0, [0, 21, false], null], "\"Friday\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_1191", "db_id": "yelp", "query": "select t4.day , sum ( t4.count ) from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id join checkin as t4 on t4.business_id = t1.business_id where t1.city = \"los angeles\" and t2.category_name = \"moroccan\" and t3.category_name = \"restaurant\" group by t4.day;", "query_toks": ["SELECT", "t4.day", ",", "SUM", "(", "t4.count", ")", "FROM", "category", "AS", "t2", "JOIN", "business", "AS", "t1", "ON", "t2.business_id", "=", "t1.business_id", "JOIN", "category", "AS", "t3", "ON", "t3.business_id", "=", "t1.business_id", "JOIN", "checkin", "AS", "t4", "ON", "t4.business_id", "=", "t1.business_id", "WHERE", "t1.city", "=", "``", "Los", "Angeles", "''", "AND", "t2.category_name", "=", "``", "Moroccan", "''", "AND", "t3.category_name", "=", "``", "restaurant", "''", "GROUP", "BY", "t4.day", ";"], "query_toks_no_value": ["select", "t4", ".", "day", ",", "sum", "(", "t4", ".", "count", ")", "from", "category", "as", "t2", "join", "business", "as", "t1", "on", "t2", ".", "business_id", "=", "t1", ".", "business_id", "join", "category", "as", "t3", "on", "t3", ".", "business_id", "=", "t1", ".", "business_id", "join", "checkin", "as", "t4", "on", "t4", ".", "business_id", "=", "t1", ".", "business_id", "where", "t1", ".", "city", "=", "value", "and", "t2", ".", "category_name", "=", "value", "and", "t3", ".", "category_name", "=", "value", "group", "by", "t4", ".", "day"], "question": "find the total checkins in Moroccan restaurant in \" Los Angeles \" per day", "question_toks": ["find", "the", "total", "checkins", "in", "Moroccan", "restaurant", "in", "``", "Los", "Angeles", "``", "per", "day"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 0], ["table_unit", 1], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 13, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 13, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 19, false], null], [0, 2, false], null]]}, "select": [false, [[0, [0, [0, 21, false], null]], [4, [0, [0, 20, false], null]]]], "where": [[false, 2, [0, [0, 5, false], null], "\"Los Angeles\"", null], "and", [false, 2, [0, [0, 14, false], null], "\"Moroccan\"", null], "and", [false, 2, [0, [0, 14, false], null], "\"restaurant\"", null]], "groupBy": [[0, 21, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_1192", "db_id": "yelp", "query": "select t1.state , sum ( t4.count ) from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id join checkin as t4 on t4.business_id = t1.business_id where t2.category_name = \"italian\" and t3.category_name = \"delis\" and t4.day = \"sunday\" group by t1.state;", "query_toks": ["SELECT", "t1.state", ",", "SUM", "(", "t4.count", ")", "FROM", "category", "AS", "t2", "JOIN", "business", "AS", "t1", "ON", "t2.business_id", "=", "t1.business_id", "JOIN", "category", "AS", "t3", "ON", "t3.business_id", "=", "t1.business_id", "JOIN", "checkin", "AS", "t4", "ON", "t4.business_id", "=", "t1.business_id", "WHERE", "t2.category_name", "=", "``", "Italian", "''", "AND", "t3.category_name", "=", "``", "Delis", "''", "AND", "t4.day", "=", "``", "Sunday", "''", "GROUP", "BY", "t1.state", ";"], "query_toks_no_value": ["select", "t1", ".", "state", ",", "sum", "(", "t4", ".", "count", ")", "from", "category", "as", "t2", "join", "business", "as", "t1", "on", "t2", ".", "business_id", "=", "t1", ".", "business_id", "join", "category", "as", "t3", "on", "t3", ".", "business_id", "=", "t1", ".", "business_id", "join", "checkin", "as", "t4", "on", "t4", ".", "business_id", "=", "t1", ".", "business_id", "where", "t2", ".", "category_name", "=", "value", "and", "t3", ".", "category_name", "=", "value", "and", "t4", ".", "day", "=", "value", "group", "by", "t1", ".", "state"], "question": "find the total checkins in Italian Delis in each state on Sunday", "question_toks": ["find", "the", "total", "checkins", "in", "Italian", "Delis", "in", "each", "state", "on", "Sunday"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 0], ["table_unit", 1], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 13, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 13, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 19, false], null], [0, 2, false], null]]}, "select": [false, [[0, [0, [0, 11, false], null]], [4, [0, [0, 20, false], null]]]], "where": [[false, 2, [0, [0, 14, false], null], "\"Italian\"", null], "and", [false, 2, [0, [0, 14, false], null], "\"Delis\"", null], "and", [false, 2, [0, [0, 21, false], null], "\"Sunday\"", null]], "groupBy": [[0, 11, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_1228", "db_id": "yelp", "query": "select sum ( t3.count ) from checkin as t3 join business as t1 on t3.business_id = t1.business_id join neighbourhood as t2 on t2.business_id = t1.business_id where t2.neighbourhood_name = \"brighton heights\";", "query_toks": ["SELECT", "SUM", "(", "t3.count", ")", "FROM", "checkin", "AS", "t3", "JOIN", "business", "AS", "t1", "ON", "t3.business_id", "=", "t1.business_id", "JOIN", "neighbourhood", "AS", "t2", "ON", "t2.business_id", "=", "t1.business_id", "WHERE", "t2.neighbourhood_name", "=", "``", "Brighton", "Heights", "''", ";"], "query_toks_no_value": ["select", "sum", "(", "t3", ".", "count", ")", "from", "checkin", "as", "t3", "join", "business", "as", "t1", "on", "t3", ".", "business_id", "=", "t1", ".", "business_id", "join", "neighbourhood", "as", "t2", "on", "t2", ".", "business_id", "=", "t1", ".", "business_id", "where", "t2", ".", "neighbourhood_name", "=", "value"], "question": "Find the total checkins in \" Brighton Heights \" neighbourhood", "question_toks": ["Find", "the", "total", "checkins", "in", "``", "Brighton", "Heights", "``", "neighbourhood"], "sql": {"from": {"table_units": [["table_unit", 3], ["table_unit", 0], ["table_unit", 4]], "conds": [[false, 2, [0, [0, 19, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 23, false], null], [0, 2, false], null]]}, "select": [false, [[4, [0, [0, 20, false], null]]]], "where": [[false, 2, [0, [0, 24, false], null], "\"Brighton Heights\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3700", "db_id": "baseball_1", "query": "select sum(t1.games) from home_game as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'boston red stockings' and t1.year between 1990 and 2000;", "query_toks": ["SELECT", "sum", "(", "T1.games", ")", "FROM", "home_game", "AS", "T1", "JOIN", "team", "AS", "T2", "ON", "T1.team_id", "=", "T2.team_id_br", "WHERE", "T2.name", "=", "'Boston", "Red", "Stockings", "'", "AND", "T1.year", "BETWEEN", "1990", "AND", "2000", ";"], "query_toks_no_value": ["select", "sum", "(", "t1", ".", "games", ")", "from", "home_game", "as", "t1", "join", "team", "as", "t2", "on", "t1", ".", "team_id", "=", "t2", ".", "team_id_br", "where", "t2", ".", "name", "=", "value", "and", "t1", ".", "year", "between", "value", "and", "value"], "question": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.", "question_toks": ["Count", "the", "total", "number", "of", "games", "the", "team", "Boston", "Red", "Stockings", "attended", "from", "1990", "to", "2000", "."], "sql": {"from": {"table_units": [["table_unit", 13], ["table_unit", 23]], "conds": [[false, 2, [0, [0, 155, false], null], [0, 336, false], null]]}, "select": [false, [[4, [0, [0, 159, false], null]]]], "where": [[false, 2, [0, [0, 331, false], null], "\"Boston Red Stockings\"", null], "and", [false, 1, [0, [0, 153, false], null], 1990.0, 2000.0]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6039", "db_id": "game_1", "query": "select gameid , sum(hours_played) from plays_games group by gameid", "query_toks": ["SELECT", "gameid", ",", "sum", "(", "hours_played", ")", "FROM", "Plays_games", "GROUP", "BY", "gameid"], "query_toks_no_value": ["select", "gameid", ",", "sum", "(", "hours_played", ")", "from", "plays_games", "group", "by", "gameid"], "question": "Show all game ids and the number of hours played.", "question_toks": ["Show", "all", "game", "ids", "and", "the", "number", "of", "hours", "played", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[0, [0, [0, 13, false], null]], [4, [0, [0, 14, false], null]]]], "where": [], "groupBy": [[0, 13, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6041", "db_id": "game_1", "query": "select stuid , sum(hours_played) from plays_games group by stuid", "query_toks": ["SELECT", "Stuid", ",", "sum", "(", "hours_played", ")", "FROM", "Plays_games", "GROUP", "BY", "Stuid"], "query_toks_no_value": ["select", "stuid", ",", "sum", "(", "hours_played", ")", "from", "plays_games", "group", "by", "stuid"], "question": "Show all student ids and the number of hours played.", "question_toks": ["Show", "all", "student", "ids", "and", "the", "number", "of", "hours", "played", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[0, [0, [0, 12, false], null]], [4, [0, [0, 14, false], null]]]], "where": [], "groupBy": [[0, 12, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6045", "db_id": "game_1", "query": "select gname from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid group by t1.gameid having sum(hours_played) >= 1000", "query_toks": ["SELECT", "gname", "FROM", "Plays_games", "AS", "T1", "JOIN", "Video_games", "AS", "T2", "ON", "T1.gameid", "=", "T2.gameid", "GROUP", "BY", "T1.gameid", "HAVING", "sum", "(", "hours_played", ")", ">", "=", "1000"], "query_toks_no_value": ["select", "gname", "from", "plays_games", "as", "t1", "join", "video_games", "as", "t2", "on", "t1", ".", "gameid", "=", "t2", ".", "gameid", "group", "by", "t1", ".", "gameid", "having", "sum", "(", "hours_played", ")", ">", "=", "value"], "question": "Show all game names played by at least 1000 hours.", "question_toks": ["Show", "all", "game", "names", "played", "by", "at", "least", "1000", "hours", "."], "sql": {"from": {"table_units": [["table_unit", 2], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 13, false], null], [0, 9, false], null]]}, "select": [false, [[0, [0, [0, 10, false], null]]]], "where": [], "groupBy": [[0, 13, false]], "having": [[false, 5, [0, [4, 14, false], null], 1000.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4767", "db_id": "department_store", "query": "select product_id from order_items group by product_id having count(*) > 3 union select product_id from product_suppliers group by product_id having sum(total_amount_purchased) > 80000", "query_toks": ["SELECT", "product_id", "FROM", "Order_Items", "GROUP", "BY", "product_id", "HAVING", "count", "(", "*", ")", ">", "3", "UNION", "SELECT", "product_id", "FROM", "Product_Suppliers", "GROUP", "BY", "product_id", "HAVING", "sum", "(", "total_amount_purchased", ")", ">", "80000"], "query_toks_no_value": ["select", "product_id", "from", "order_items", "group", "by", "product_id", "having", "count", "(", "*", ")", ">", "value", "union", "select", "product_id", "from", "product_suppliers", "group", "by", "product_id", "having", "sum", "(", "total_amount_purchased", ")", ">", "value"], "question": "Return the ids of all products that were ordered more than three times or supplied more than 80000.", "question_toks": ["Return", "the", "ids", "of", "all", "products", "that", "were", "ordered", "more", "than", "three", "times", "or", "supplied", "more", "than", "80000", "."], "sql": {"from": {"table_units": [["table_unit", 11]], "conds": []}, "select": [false, [[0, [0, [0, 45, false], null]]]], "where": [], "groupBy": [[0, 45, false]], "having": [[false, 3, [0, [3, 0, false], null], 3.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": {"from": {"table_units": [["table_unit", 12]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [[false, 3, [0, [4, 50, false], null], 80000.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6014", "db_id": "game_1", "query": "select stuid , count(*) , sum(gamesplayed) from sportsinfo group by stuid", "query_toks": ["SELECT", "StuID", ",", "count", "(", "*", ")", ",", "sum", "(", "gamesplayed", ")", "FROM", "Sportsinfo", "GROUP", "BY", "StuID"], "query_toks_no_value": ["select", "stuid", ",", "count", "(", "*", ")", ",", "sum", "(", "gamesplayed", ")", "from", "sportsinfo", "group", "by", "stuid"], "question": "What are the ids of all students along with how many sports and games did they play?", "question_toks": ["What", "are", "the", "ids", "of", "all", "students", "along", "with", "how", "many", "sports", "and", "games", "did", "they", "play", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 15, false], null]], [3, [0, [0, 0, false], null]], [4, [0, [0, 18, false], null]]]], "where": [], "groupBy": [[0, 15, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4768", "db_id": "department_store", "query": "select product_id from order_items group by product_id having count(*) > 3 union select product_id from product_suppliers group by product_id having sum(total_amount_purchased) > 80000", "query_toks": ["SELECT", "product_id", "FROM", "Order_Items", "GROUP", "BY", "product_id", "HAVING", "count", "(", "*", ")", ">", "3", "UNION", "SELECT", "product_id", "FROM", "Product_Suppliers", "GROUP", "BY", "product_id", "HAVING", "sum", "(", "total_amount_purchased", ")", ">", "80000"], "query_toks_no_value": ["select", "product_id", "from", "order_items", "group", "by", "product_id", "having", "count", "(", "*", ")", ">", "value", "union", "select", "product_id", "from", "product_suppliers", "group", "by", "product_id", "having", "sum", "(", "total_amount_purchased", ")", ">", "value"], "question": "What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?", "question_toks": ["What", "are", "the", "ids", "of", "all", "products", "that", "were", "either", "ordered", "more", "than", "3", "times", "or", "have", "a", "cumulative", "amount", "purchased", "of", "above", "80000", "?"], "sql": {"from": {"table_units": [["table_unit", 11]], "conds": []}, "select": [false, [[0, [0, [0, 45, false], null]]]], "where": [], "groupBy": [[0, 45, false]], "having": [[false, 3, [0, [3, 0, false], null], 3.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": {"from": {"table_units": [["table_unit", 12]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [[false, 3, [0, [4, 50, false], null], 80000.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6042", "db_id": "game_1", "query": "select stuid , sum(hours_played) from plays_games group by stuid", "query_toks": ["SELECT", "Stuid", ",", "sum", "(", "hours_played", ")", "FROM", "Plays_games", "GROUP", "BY", "Stuid"], "query_toks_no_value": ["select", "stuid", ",", "sum", "(", "hours_played", ")", "from", "plays_games", "group", "by", "stuid"], "question": "What are the ids of all students and number of hours played?", "question_toks": ["What", "are", "the", "ids", "of", "all", "students", "and", "number", "of", "hours", "played", "?"], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[0, [0, [0, 12, false], null]], [4, [0, [0, 14, false], null]]]], "where": [], "groupBy": [[0, 12, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_0321", "db_id": "geo", "query": "select sum ( area ) from state;", "query_toks": ["SELECT", "SUM", "(", "area", ")", "FROM", "state", ";"], "query_toks_no_value": ["select", "sum", "(", "area", ")", "from", "state"], "question": "what is the area of all the states combined", "question_toks": ["what", "is", "the", "area", "of", "all", "the", "states", "combined"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 3, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_0411", "db_id": "geo", "query": "select state_name from city group by state_name order by sum ( population ) limit 1;", "query_toks": ["SELECT", "state_name", "FROM", "city", "GROUP", "BY", "state_name", "ORDER", "BY", "SUM", "(", "population", ")", "LIMIT", "1", ";"], "query_toks_no_value": ["select", "state_name", "from", "city", "group", "by", "state_name", "order", "by", "sum", "(", "population", ")", "limit", "value"], "question": "what state has the smallest urban population", "question_toks": ["what", "state", "has", "the", "smallest", "urban", "population"], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[0, [0, [0, 10, false], null]]]], "where": [], "groupBy": [[0, 10, false]], "having": [], "orderBy": ["asc", [[0, [4, 8, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6046", "db_id": "game_1", "query": "select gname from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid group by t1.gameid having sum(hours_played) >= 1000", "query_toks": ["SELECT", "gname", "FROM", "Plays_games", "AS", "T1", "JOIN", "Video_games", "AS", "T2", "ON", "T1.gameid", "=", "T2.gameid", "GROUP", "BY", "T1.gameid", "HAVING", "sum", "(", "hours_played", ")", ">", "=", "1000"], "query_toks_no_value": ["select", "gname", "from", "plays_games", "as", "t1", "join", "video_games", "as", "t2", "on", "t1", ".", "gameid", "=", "t2", ".", "gameid", "group", "by", "t1", ".", "gameid", "having", "sum", "(", "hours_played", ")", ">", "=", "value"], "question": "What are the names of all the games that have been played for at least 1000 hours?", "question_toks": ["What", "are", "the", "names", "of", "all", "the", "games", "that", "have", "been", "played", "for", "at", "least", "1000", "hours", "?"], "sql": {"from": {"table_units": [["table_unit", 2], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 13, false], null], [0, 9, false], null]]}, "select": [false, [[0, [0, [0, 10, false], null]]]], "where": [], "groupBy": [[0, 13, false]], "having": [[false, 5, [0, [4, 14, false], null], 1000.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_0320", "db_id": "geo", "query": "select sum ( area ) from state;", "query_toks": ["SELECT", "SUM", "(", "area", ")", "FROM", "state", ";"], "query_toks_no_value": ["select", "sum", "(", "area", ")", "from", "state"], "question": "what is the combined area of all 50 states", "question_toks": ["what", "is", "the", "combined", "area", "of", "all", "50", "states"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 3, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6007", "db_id": "game_1", "query": "select sum(gamesplayed) from sportsinfo", "query_toks": ["SELECT", "sum", "(", "gamesplayed", ")", "FROM", "Sportsinfo"], "query_toks_no_value": ["select", "sum", "(", "gamesplayed", ")", "from", "sportsinfo"], "question": "How many games are played for all students?", "question_toks": ["How", "many", "games", "are", "played", "for", "all", "students", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[4, [0, [0, 18, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6009", "db_id": "game_1", "query": "select sum(gamesplayed) from sportsinfo where sportname = \"football\" and onscholarship = 'y'", "query_toks": ["SELECT", "sum", "(", "gamesplayed", ")", "FROM", "Sportsinfo", "WHERE", "sportname", "=", "``", "Football", "''", "AND", "onscholarship", "=", "'Y", "'"], "query_toks_no_value": ["select", "sum", "(", "gamesplayed", ")", "from", "sportsinfo", "where", "sportname", "=", "value", "and", "onscholarship", "=", "value"], "question": "How many games are played for all football games by students on scholarship?", "question_toks": ["How", "many", "games", "are", "played", "for", "all", "football", "games", "by", "students", "on", "scholarship", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[4, [0, [0, 18, false], null]]]], "where": [[false, 2, [0, [0, 16, false], null], "\"Football\"", null], "and", [false, 2, [0, [0, 19, false], null], "\"Y\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4329", "db_id": "tracking_grants_for_research", "query": "select t2.organisation_id , t2.organisation_details from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id group by t2.organisation_id having sum(t1.grant_amount) > 6000", "query_toks": ["SELECT", "T2.organisation_id", ",", "T2.organisation_details", "FROM", "Grants", "AS", "T1", "JOIN", "Organisations", "AS", "T2", "ON", "T1.organisation_id", "=", "T2.organisation_id", "GROUP", "BY", "T2.organisation_id", "HAVING", "sum", "(", "T1.grant_amount", ")", ">", "6000"], "query_toks_no_value": ["select", "t2", ".", "organisation_id", ",", "t2", ".", "organisation_details", "from", "grants", "as", "t1", "join", "organisations", "as", "t2", "on", "t1", ".", "organisation_id", "=", "t2", ".", "organisation_id", "group", "by", "t2", ".", "organisation_id", "having", "sum", "(", "t1", ".", "grant_amount", ")", ">", "value"], "question": "What are the ids and details for all organizations that have grants of more than 6000 dollars?", "question_toks": ["What", "are", "the", "ids", "and", "details", "for", "all", "organizations", "that", "have", "grants", "of", "more", "than", "6000", "dollars", "?"], "sql": {"from": {"table_units": [["table_unit", 2], ["table_unit", 4]], "conds": [[false, 2, [0, [0, 10, false], null], [0, 17, false], null]]}, "select": [false, [[0, [0, [0, 17, false], null]], [0, [0, [0, 19, false], null]]]], "where": [], "groupBy": [[0, 17, false]], "having": [[false, 3, [0, [4, 11, false], null], 6000.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_0240", "db_id": "geo", "query": "select sum ( population ) from state;", "query_toks": ["SELECT", "SUM", "(", "population", ")", "FROM", "state", ";"], "query_toks_no_value": ["select", "sum", "(", "population", ")", "from", "state"], "question": "what is the combined population of all 50 states", "question_toks": ["what", "is", "the", "combined", "population", "of", "all", "50", "states"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 2, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3240", "db_id": "college_1", "query": "select t3.dept_name from course as t1 join class as t2 on t1.crs_code = t2.crs_code join department as t3 on t1.dept_code = t3.dept_code group by t1.dept_code order by sum(t1.crs_credit) desc limit 1", "query_toks": ["SELECT", "T3.dept_name", "FROM", "course", "AS", "T1", "JOIN", "CLASS", "AS", "T2", "ON", "T1.crs_code", "=", "T2.crs_code", "JOIN", "department", "AS", "T3", "ON", "T1.dept_code", "=", "T3.dept_code", "GROUP", "BY", "T1.dept_code", "ORDER", "BY", "sum", "(", "T1.crs_credit", ")", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "t3", ".", "dept_name", "from", "course", "as", "t1", "join", "class", "as", "t2", "on", "t1", ".", "crs_code", "=", "t2", ".", "crs_code", "join", "department", "as", "t3", "on", "t1", ".", "dept_code", "=", "t3", ".", "dept_code", "group", "by", "t1", ".", "dept_code", "order", "by", "sum", "(", "t1", ".", "crs_credit", ")", "desc", "limit", "value"], "question": "Which department offers the most credits all together?", "question_toks": ["Which", "department", "offers", "the", "most", "credits", "all", "together", "?"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 0], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 7, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 8, false], null], [0, 11, false], null]]}, "select": [false, [[0, [0, [0, 12, false], null]]]], "where": [], "groupBy": [[0, 8, false]], "having": [], "orderBy": ["desc", [[0, [4, 10, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2348", "db_id": "csu_1", "query": "select campus from degrees group by campus order by sum(degrees) desc limit 1", "query_toks": ["SELECT", "campus", "FROM", "degrees", "GROUP", "BY", "campus", "ORDER", "BY", "sum", "(", "degrees", ")", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "campus", "from", "degrees", "group", "by", "campus", "order", "by", "sum", "(", "degrees", ")", "desc", "limit", "value"], "question": "Which campus has the most degrees conferred in all times?", "question_toks": ["Which", "campus", "has", "the", "most", "degrees", "conferred", "in", "all", "times", "?"], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[0, [0, [0, 10, false], null]]]], "where": [], "groupBy": [[0, 10, false]], "having": [], "orderBy": ["desc", [[0, [4, 11, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3239", "db_id": "college_1", "query": "select t3.dept_name from course as t1 join class as t2 on t1.crs_code = t2.crs_code join department as t3 on t1.dept_code = t3.dept_code group by t1.dept_code order by sum(t1.crs_credit) desc limit 1", "query_toks": ["SELECT", "T3.dept_name", "FROM", "course", "AS", "T1", "JOIN", "CLASS", "AS", "T2", "ON", "T1.crs_code", "=", "T2.crs_code", "JOIN", "department", "AS", "T3", "ON", "T1.dept_code", "=", "T3.dept_code", "GROUP", "BY", "T1.dept_code", "ORDER", "BY", "sum", "(", "T1.crs_credit", ")", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "t3", ".", "dept_name", "from", "course", "as", "t1", "join", "class", "as", "t2", "on", "t1", ".", "crs_code", "=", "t2", ".", "crs_code", "join", "department", "as", "t3", "on", "t1", ".", "dept_code", "=", "t3", ".", "dept_code", "group", "by", "t1", ".", "dept_code", "order", "by", "sum", "(", "t1", ".", "crs_credit", ")", "desc", "limit", "value"], "question": "Find the name of the department that offers the largest number of credits of all classes.", "question_toks": ["Find", "the", "name", "of", "the", "department", "that", "offers", "the", "largest", "number", "of", "credits", "of", "all", "classes", "."], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 0], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 7, false], null], [0, 2, false], null], "and", [false, 2, [0, [0, 8, false], null], [0, 11, false], null]]}, "select": [false, [[0, [0, [0, 12, false], null]]]], "where": [], "groupBy": [[0, 8, false]], "having": [], "orderBy": ["desc", [[0, [4, 10, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6016", "db_id": "game_1", "query": "select stuid from sportsinfo group by stuid having sum(hoursperweek) > 10", "query_toks": ["SELECT", "StuID", "FROM", "Sportsinfo", "GROUP", "BY", "StuID", "HAVING", "sum", "(", "hoursperweek", ")", ">", "10"], "query_toks_no_value": ["select", "stuid", "from", "sportsinfo", "group", "by", "stuid", "having", "sum", "(", "hoursperweek", ")", ">", "value"], "question": "What are the student IDs for everybody who worked for more than 10 hours per week on all sports?", "question_toks": ["What", "are", "the", "student", "IDs", "for", "everybody", "who", "worked", "for", "more", "than", "10", "hours", "per", "week", "on", "all", "sports", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 15, false], null]]]], "where": [], "groupBy": [[0, 15, false]], "having": [[false, 3, [0, [4, 17, false], null], 10.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_ALL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0723", "db_id": "world_1", "query": "select sum(population) , max(gnp) from country where continent = \"asia\"", "query_toks": ["SELECT", "sum", "(", "Population", ")", ",", "max", "(", "GNP", ")", "FROM", "country", "WHERE", "Continent", "=", "``", "Asia", "''"], "query_toks_no_value": ["select", "sum", "(", "population", ")", ",", "max", "(", "gnp", ")", "from", "country", "where", "continent", "=", "value"], "question": "How many people live in Asia, and what is the largest GNP among them?", "question_toks": ["How", "many", "people", "live", "in", "Asia", ",", "and", "what", "is", "the", "largest", "GNP", "among", "them", "?"], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 14, false], null]], [1, [0, [0, 16, false], null]]]], "where": [[false, 2, [0, [0, 10, false], null], "\"Asia\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0728", "db_id": "world_1", "query": "select sum(population) from city where district = \"gelderland\"", "query_toks": ["SELECT", "sum", "(", "Population", ")", "FROM", "city", "WHERE", "District", "=", "``", "Gelderland", "''"], "query_toks_no_value": ["select", "sum", "(", "population", ")", "from", "city", "where", "district", "=", "value"], "question": "How many people live in Gelderland district?", "question_toks": ["How", "many", "people", "live", "in", "Gelderland", "district", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 5, false], null]]]], "where": [[false, 2, [0, [0, 4, false], null], "\"Gelderland\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0767", "db_id": "world_1", "query": "select sum(population) from country where name not in (select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = \"english\")", "query_toks": ["SELECT", "sum", "(", "Population", ")", "FROM", "country", "WHERE", "Name", "NOT", "IN", "(", "SELECT", "T1.Name", "FROM", "country", "AS", "T1", "JOIN", "countrylanguage", "AS", "T2", "ON", "T1.Code", "=", "T2.CountryCode", "WHERE", "T2.Language", "=", "``", "English", "''", ")"], "query_toks_no_value": ["select", "sum", "(", "population", ")", "from", "country", "where", "name", "not", "in", "(", "select", "t1", ".", "name", "from", "country", "as", "t1", "join", "countrylanguage", "as", "t2", "on", "t1", ".", "code", "=", "t2", ".", "countrycode", "where", "t2", ".", "language", "=", "value", ")"], "question": "How many people live in countries that do not speak English?", "question_toks": ["How", "many", "people", "live", "in", "countries", "that", "do", "not", "speak", "English", "?"], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 14, false], null]]]], "where": [[true, 8, [0, [0, 9, false], null], {"from": {"table_units": [["table_unit", 2], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 8, false], null], [0, 23, false], null]]}, "select": [false, [[0, [0, [0, 9, false], null]]]], "where": [[false, 2, [0, [0, 24, false], null], "\"English\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2357", "db_id": "csu_1", "query": "select t1.campus , sum(t2.degrees) from campuses as t1 join degrees as t2 on t1.id = t2.campus where t2.year >= 1998 and t2.year <= 2002 group by t1.campus", "query_toks": ["SELECT", "T1.campus", ",", "sum", "(", "T2.degrees", ")", "FROM", "campuses", "AS", "T1", "JOIN", "degrees", "AS", "T2", "ON", "T1.id", "=", "T2.campus", "WHERE", "T2.year", ">", "=", "1998", "AND", "T2.year", "<", "=", "2002", "GROUP", "BY", "T1.campus"], "query_toks_no_value": ["select", "t1", ".", "campus", ",", "sum", "(", "t2", ".", "degrees", ")", "from", "campuses", "as", "t1", "join", "degrees", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "campus", "where", "t2", ".", "year", ">", "=", "value", "and", "t2", ".", "year", "<", "=", "value", "group", "by", "t1", ".", "campus"], "question": "how many degrees were conferred between 1998 and 2002?", "question_toks": ["how", "many", "degrees", "were", "conferred", "between", "1998", "and", "2002", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 10, false], null]]}, "select": [false, [[0, [0, [0, 2, false], null]], [4, [0, [0, 11, false], null]]]], "where": [[false, 5, [0, [0, 9, false], null], 1998.0, null], "and", [false, 6, [0, [0, 9, false], null], 2002.0, null]], "groupBy": [[0, 2, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2384", "db_id": "csu_1", "query": "select sum(t1.undergraduate) from discipline_enrollments as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2004 and t2.campus = \"san jose state university\"", "query_toks": ["SELECT", "sum", "(", "t1.undergraduate", ")", "FROM", "discipline_enrollments", "AS", "t1", "JOIN", "campuses", "AS", "t2", "ON", "t1.campus", "=", "t2.id", "WHERE", "t1.year", "=", "2004", "AND", "t2.campus", "=", "``", "San", "Jose", "State", "University", "''"], "query_toks_no_value": ["select", "sum", "(", "t1", ".", "undergraduate", ")", "from", "discipline_enrollments", "as", "t1", "join", "campuses", "as", "t2", "on", "t1", ".", "campus", "=", "t2", ".", "id", "where", "t1", ".", "year", "=", "value", "and", "t2", ".", "campus", "=", "value"], "question": "How many undergraduates are there in \"San Jose State University\" in year 2004?", "question_toks": ["How", "many", "undergraduates", "are", "there", "in", "``", "San", "Jose", "State", "University", "''", "in", "year", "2004", "?"], "sql": {"from": {"table_units": [["table_unit", 3], ["table_unit", 0]], "conds": [[false, 2, [0, [0, 12, false], null], [0, 1, false], null]]}, "select": [false, [[4, [0, [0, 15, false], null]]]], "where": [[false, 2, [0, [0, 14, false], null], 2004.0, null], "and", [false, 2, [0, [0, 2, false], null], "\"San Jose State University\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2385", "db_id": "csu_1", "query": "select sum(t1.undergraduate) from discipline_enrollments as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2004 and t2.campus = \"san jose state university\"", "query_toks": ["SELECT", "sum", "(", "t1.undergraduate", ")", "FROM", "discipline_enrollments", "AS", "t1", "JOIN", "campuses", "AS", "t2", "ON", "t1.campus", "=", "t2.id", "WHERE", "t1.year", "=", "2004", "AND", "t2.campus", "=", "``", "San", "Jose", "State", "University", "''"], "query_toks_no_value": ["select", "sum", "(", "t1", ".", "undergraduate", ")", "from", "discipline_enrollments", "as", "t1", "join", "campuses", "as", "t2", "on", "t1", ".", "campus", "=", "t2", ".", "id", "where", "t1", ".", "year", "=", "value", "and", "t2", ".", "campus", "=", "value"], "question": "How many undergraduates are there at San Jose State", "question_toks": ["How", "many", "undergraduates", "are", "there", "at", "San", "Jose", "State"], "sql": {"from": {"table_units": [["table_unit", 3], ["table_unit", 0]], "conds": [[false, 2, [0, [0, 12, false], null], [0, 1, false], null]]}, "select": [false, [[4, [0, [0, 15, false], null]]]], "where": [[false, 2, [0, [0, 14, false], null], 2004.0, null], "and", [false, 2, [0, [0, 2, false], null], "\"San Jose State University\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2387", "db_id": "csu_1", "query": "select sum(t1.graduate) from discipline_enrollments as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2004 and t2.campus = \"san francisco state university\"", "query_toks": ["SELECT", "sum", "(", "t1.graduate", ")", "FROM", "discipline_enrollments", "AS", "t1", "JOIN", "campuses", "AS", "t2", "ON", "t1.campus", "=", "t2.id", "WHERE", "t1.year", "=", "2004", "AND", "t2.campus", "=", "``", "San", "Francisco", "State", "University", "''"], "query_toks_no_value": ["select", "sum", "(", "t1", ".", "graduate", ")", "from", "discipline_enrollments", "as", "t1", "join", "campuses", "as", "t2", "on", "t1", ".", "campus", "=", "t2", ".", "id", "where", "t1", ".", "year", "=", "value", "and", "t2", ".", "campus", "=", "value"], "question": "How many people graduated from San Francisco State University in 2004?", "question_toks": ["How", "many", "people", "graduated", "from", "San", "Francisco", "State", "University", "in", "2004", "?"], "sql": {"from": {"table_units": [["table_unit", 3], ["table_unit", 0]], "conds": [[false, 2, [0, [0, 12, false], null], [0, 1, false], null]]}, "select": [false, [[4, [0, [0, 16, false], null]]]], "where": [[false, 2, [0, [0, 14, false], null], 2004.0, null], "and", [false, 2, [0, [0, 2, false], null], "\"San Francisco State University\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2588", "db_id": "inn_1", "query": "select sum(beds) from rooms where bedtype = 'king';", "query_toks": ["SELECT", "sum", "(", "beds", ")", "FROM", "Rooms", "WHERE", "bedtype", "=", "'King", "'", ";"], "query_toks_no_value": ["select", "sum", "(", "beds", ")", "from", "rooms", "where", "bedtype", "=", "value"], "question": "How many king beds are there?", "question_toks": ["How", "many", "king", "beds", "are", "there", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 3, false], null]]]], "where": [[false, 2, [0, [0, 4, false], null], "\"King\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3008", "db_id": "loan_1", "query": "select sum(no_of_customers) from bank", "query_toks": ["SELECT", "sum", "(", "no_of_customers", ")", "FROM", "bank"], "query_toks_no_value": ["select", "sum", "(", "no_of_customers", ")", "from", "bank"], "question": "How many customers are there?", "question_toks": ["How", "many", "customers", "are", "there", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 3, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3202", "db_id": "college_1", "query": "select sum(crs_credit) , dept_code from course group by dept_code", "query_toks": ["SELECT", "sum", "(", "crs_credit", ")", ",", "dept_code", "FROM", "course", "GROUP", "BY", "dept_code"], "query_toks_no_value": ["select", "sum", "(", "crs_credit", ")", ",", "dept_code", "from", "course", "group", "by", "dept_code"], "question": "How many credits does the department offer?", "question_toks": ["How", "many", "credits", "does", "the", "department", "offer", "?"], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[4, [0, [0, 10, false], null]], [0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [[0, 8, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3220", "db_id": "college_1", "query": "select sum(stu_hrs) , dept_code from student group by dept_code", "query_toks": ["SELECT", "sum", "(", "stu_hrs", ")", ",", "dept_code", "FROM", "student", "GROUP", "BY", "dept_code"], "query_toks_no_value": ["select", "sum", "(", "stu_hrs", ")", ",", "dept_code", "from", "student", "group", "by", "dept_code"], "question": "How many hours do the students spend studying in each department?", "question_toks": ["How", "many", "hours", "do", "the", "students", "spend", "studying", "in", "each", "department", "?"], "sql": {"from": {"table_units": [["table_unit", 6]], "conds": []}, "select": [false, [[4, [0, [0, 37, false], null]], [0, [0, [0, 41, false], null]]]], "where": [], "groupBy": [[0, 41, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4945", "db_id": "soccer_2", "query": "select sum(enr) from college", "query_toks": ["SELECT", "sum", "(", "enr", ")", "FROM", "College"], "query_toks_no_value": ["select", "sum", "(", "enr", ")", "from", "college"], "question": "How many students are enrolled in college?", "question_toks": ["How", "many", "students", "are", "enrolled", "in", "college", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 3, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_0239", "db_id": "geo", "query": "select sum ( population ) from state;", "query_toks": ["SELECT", "SUM", "(", "population", ")", "FROM", "state", ";"], "query_toks_no_value": ["select", "sum", "(", "population", ")", "from", "state"], "question": "how many people live in the united states", "question_toks": ["how", "many", "people", "live", "in", "the", "united", "states"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 2, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_0322", "db_id": "geo", "query": "select sum ( area ) from state;", "query_toks": ["SELECT", "SUM", "(", "area", ")", "FROM", "state", ";"], "query_toks_no_value": ["select", "sum", "(", "area", ")", "from", "state"], "question": "how many square kilometers in the us", "question_toks": ["how", "many", "square", "kilometers", "in", "the", "us"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 3, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0707", "db_id": "world_1", "query": "select sum(surfacearea) from country where region = \"caribbean\"", "query_toks": ["SELECT", "sum", "(", "SurfaceArea", ")", "FROM", "country", "WHERE", "Region", "=", "``", "Caribbean", "''"], "query_toks_no_value": ["select", "sum", "(", "surfacearea", ")", "from", "country", "where", "region", "=", "value"], "question": "How much surface area do the countires in the Carribean cover together?", "question_toks": ["How", "much", "surface", "area", "do", "the", "countires", "in", "the", "Carribean", "cover", "together", "?"], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 12, false], null]]]], "where": [[false, 2, [0, [0, 11, false], null], "\"Caribbean\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_1319", "db_id": "academic", "query": "select year , sum ( citation_num ) from publication where title = \"making database systems usable\" group by year;", "query_toks": ["SELECT", "YEAR", ",", "SUM", "(", "citation_num", ")", "FROM", "publication", "WHERE", "title", "=", "``", "Making", "database", "systems", "usable", "''", "GROUP", "BY", "YEAR", ";"], "query_toks_no_value": ["select", "year", ",", "sum", "(", "citation_num", ")", "from", "publication", "where", "title", "=", "value", "group", "by", "year"], "question": "return me the number of citations of \" Making database systems usable \" in each year .", "question_toks": ["return", "me", "the", "number", "of", "citations", "of", "``", "Making", "database", "systems", "usable", "``", "in", "each", "year", "."], "sql": {"from": {"table_units": [["table_unit", 9]], "conds": []}, "select": [false, [[0, [0, [0, 30, false], null]], [4, [0, [0, 25, false], null]]]], "where": [[false, 2, [0, [0, 29, false], null], "\"Making database systems usable\"", null]], "groupBy": [[0, 30, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_WITHOUT_MENTIONS"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0901", "db_id": "insurance_fnol", "query": "select sum(settlement_amount) , avg(settlement_amount) from settlements", "query_toks": ["SELECT", "sum", "(", "settlement_amount", ")", ",", "avg", "(", "settlement_amount", ")", "FROM", "settlements"], "query_toks_no_value": ["select", "sum", "(", "settlement_amount", ")", ",", "avg", "(", "settlement_amount", ")", "from", "settlements"], "question": "Find the total and average amount of settlements.", "question_toks": ["Find", "the", "total", "and", "average", "amount", "of", "settlements", "."], "sql": {"from": {"table_units": [["table_unit", 6]], "conds": []}, "select": [false, [[4, [0, [0, 22, false], null]], [5, [0, [0, 22, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1001", "db_id": "university_basketball", "query": "select sum(enrollment) , affiliation from university group by affiliation", "query_toks": ["SELECT", "sum", "(", "enrollment", ")", ",", "affiliation", "FROM", "university", "GROUP", "BY", "affiliation"], "query_toks_no_value": ["select", "sum", "(", "enrollment", ")", ",", "affiliation", "from", "university", "group", "by", "affiliation"], "question": "Find the total student enrollment for different affiliation type schools.", "question_toks": ["Find", "the", "total", "student", "enrollment", "for", "different", "affiliation", "type", "schools", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[4, [0, [0, 18, false], null]], [0, [0, [0, 17, false], null]]]], "where": [], "groupBy": [[0, 17, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1015", "db_id": "university_basketball", "query": "select sum(enrollment) , affiliation from university where founded > 1850 group by affiliation", "query_toks": ["SELECT", "sum", "(", "Enrollment", ")", ",", "affiliation", "FROM", "university", "WHERE", "founded", ">", "1850", "GROUP", "BY", "affiliation"], "query_toks_no_value": ["select", "sum", "(", "enrollment", ")", ",", "affiliation", "from", "university", "where", "founded", ">", "value", "group", "by", "affiliation"], "question": "Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.", "question_toks": ["Find", "the", "total", "number", "of", "students", "enrolled", "in", "the", "colleges", "that", "were", "founded", "after", "the", "year", "of", "1850", "for", "each", "affiliation", "type", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[4, [0, [0, 18, false], null]], [0, [0, [0, 17, false], null]]]], "where": [[false, 3, [0, [0, 16, false], null], 1850.0, null]], "groupBy": [[0, 17, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1241", "db_id": "apartment_rentals", "query": "select sum(t2.room_count) from apartment_facilities as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.facility_code = \"gym\"", "query_toks": ["SELECT", "sum", "(", "T2.room_count", ")", "FROM", "Apartment_Facilities", "AS", "T1", "JOIN", "Apartments", "AS", "T2", "ON", "T1.apt_id", "=", "T2.apt_id", "WHERE", "T1.facility_code", "=", "``", "Gym", "''"], "query_toks_no_value": ["select", "sum", "(", "t2", ".", "room_count", ")", "from", "apartment_facilities", "as", "t1", "join", "apartments", "as", "t2", "on", "t1", ".", "apt_id", "=", "t2", ".", "apt_id", "where", "t1", ".", "facility_code", "=", "value"], "question": "Find the total number of rooms in the apartments that have facility code \"Gym\".", "question_toks": ["Find", "the", "total", "number", "of", "rooms", "in", "the", "apartments", "that", "have", "facility", "code", "``", "Gym", "''", "."], "sql": {"from": {"table_units": [["table_unit", 2], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 15, false], null], [0, 8, false], null]]}, "select": [false, [[4, [0, [0, 14, false], null]]]], "where": [[false, 2, [0, [0, 16, false], null], "\"Gym\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1242", "db_id": "apartment_rentals", "query": "select sum(t2.room_count) from apartment_buildings as t1 join apartments as t2 on t1.building_id = t2.building_id where t1.building_short_name = \"columbus square\"", "query_toks": ["SELECT", "sum", "(", "T2.room_count", ")", "FROM", "Apartment_Buildings", "AS", "T1", "JOIN", "Apartments", "AS", "T2", "ON", "T1.building_id", "=", "T2.building_id", "WHERE", "T1.building_short_name", "=", "``", "Columbus", "Square", "''"], "query_toks_no_value": ["select", "sum", "(", "t2", ".", "room_count", ")", "from", "apartment_buildings", "as", "t1", "join", "apartments", "as", "t2", "on", "t1", ".", "building_id", "=", "t2", ".", "building_id", "where", "t1", ".", "building_short_name", "=", "value"], "question": "Show the total number of rooms of the apartments in the building with short name \"Columbus Square\".", "question_toks": ["Show", "the", "total", "number", "of", "rooms", "of", "the", "apartments", "in", "the", "building", "with", "short", "name", "``", "Columbus", "Square", "''", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 9, false], null]]}, "select": [false, [[4, [0, [0, 14, false], null]]]], "where": [[false, 2, [0, [0, 2, false], null], "\"Columbus Square\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1352", "db_id": "college_2", "query": "select sum(budget) from department where dept_name = 'marketing' or dept_name = 'finance'", "query_toks": ["SELECT", "sum", "(", "budget", ")", "FROM", "department", "WHERE", "dept_name", "=", "'Marketing", "'", "OR", "dept_name", "=", "'Finance", "'"], "query_toks_no_value": ["select", "sum", "(", "budget", ")", "from", "department", "where", "dept_name", "=", "value", "or", "dept_name", "=", "value"], "question": "Find the total budgets of the Marketing or Finance department.", "question_toks": ["Find", "the", "total", "budgets", "of", "the", "Marketing", "or", "Finance", "department", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[4, [0, [0, 6, false], null]]]], "where": [[false, 2, [0, [0, 4, false], null], "\"Marketing\"", null], "or", [false, 2, [0, [0, 4, false], null], "\"Finance\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1398", "db_id": "college_2", "query": "select sum(credits) , dept_name from course group by dept_name", "query_toks": ["SELECT", "sum", "(", "credits", ")", ",", "dept_name", "FROM", "course", "GROUP", "BY", "dept_name"], "query_toks_no_value": ["select", "sum", "(", "credits", ")", ",", "dept_name", "from", "course", "group", "by", "dept_name"], "question": "Find the total credits of courses provided by different department.", "question_toks": ["Find", "the", "total", "credits", "of", "courses", "provided", "by", "different", "department", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 10, false], null]], [0, [0, [0, 9, false], null]]]], "where": [], "groupBy": [[0, 9, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1515", "db_id": "insurance_and_eClaims", "query": "select sum(amount_piad) , avg(amount_piad) from claim_headers", "query_toks": ["SELECT", "sum", "(", "amount_piad", ")", ",", "avg", "(", "amount_piad", ")", "FROM", "claim_headers"], "query_toks_no_value": ["select", "sum", "(", "amount_piad", ")", ",", "avg", "(", "amount_piad", ")", "from", "claim_headers"], "question": "Find the total and average amount paid in claim headers.", "question_toks": ["Find", "the", "total", "and", "average", "amount", "paid", "in", "claim", "headers", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[4, [0, [0, 17, false], null]], [5, [0, [0, 17, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1517", "db_id": "insurance_and_eClaims", "query": "select sum(t1.amount_claimed) from claim_headers as t1 join claims_documents as t2 on t1.claim_header_id = t2.claim_id where t2.created_date = (select created_date from claims_documents order by created_date limit 1)", "query_toks": ["SELECT", "sum", "(", "t1.amount_claimed", ")", "FROM", "claim_headers", "AS", "t1", "JOIN", "claims_documents", "AS", "t2", "ON", "t1.claim_header_id", "=", "t2.claim_id", "WHERE", "t2.created_date", "=", "(", "SELECT", "created_date", "FROM", "claims_documents", "ORDER", "BY", "created_date", "LIMIT", "1", ")"], "query_toks_no_value": ["select", "sum", "(", "t1", ".", "amount_claimed", ")", "from", "claim_headers", "as", "t1", "join", "claims_documents", "as", "t2", "on", "t1", ".", "claim_header_id", "=", "t2", ".", "claim_id", "where", "t2", ".", "created_date", "=", "(", "select", "created_date", "from", "claims_documents", "order", "by", "created_date", "limit", "value", ")"], "question": "Find the total amount claimed in the most recently created document.", "question_toks": ["Find", "the", "total", "amount", "claimed", "in", "the", "most", "recently", "created", "document", "."], "sql": {"from": {"table_units": [["table_unit", 3], ["table_unit", 4]], "conds": [[false, 2, [0, [0, 10, false], null], [0, 18, false], null]]}, "select": [false, [[4, [0, [0, 16, false], null]]]], "where": [[false, 2, [0, [0, 21, false], null], {"from": {"table_units": [["table_unit", 4]], "conds": []}, "select": [false, [[0, [0, [0, 21, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["asc", [[0, [0, 21, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1588", "db_id": "customers_and_invoices", "query": "select transaction_type , sum(transaction_amount) from financial_transactions group by transaction_type", "query_toks": ["SELECT", "transaction_type", ",", "sum", "(", "transaction_amount", ")", "FROM", "Financial_transactions", "GROUP", "BY", "transaction_type"], "query_toks_no_value": ["select", "transaction_type", ",", "sum", "(", "transaction_amount", ")", "from", "financial_transactions", "group", "by", "transaction_type"], "question": "What are total transaction amounts for each transaction type?", "question_toks": ["What", "are", "total", "transaction", "amounts", "for", "each", "transaction", "type", "?"], "sql": {"from": {"table_units": [["table_unit", 6]], "conds": []}, "select": [false, [[0, [0, [0, 38, false], null]], [4, [0, [0, 40, false], null]]]], "where": [], "groupBy": [[0, 38, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1781", "db_id": "small_bank_1", "query": "select sum(balance) from checking", "query_toks": ["SELECT", "sum", "(", "balance", ")", "FROM", "checking"], "query_toks_no_value": ["select", "sum", "(", "balance", ")", "from", "checking"], "question": "Find the total balance across checking accounts.", "question_toks": ["Find", "the", "total", "balance", "across", "checking", "accounts", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[4, [0, [0, 6, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1806", "db_id": "small_bank_1", "query": "select sum(t2.balance) , t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid group by t1.name", "query_toks": ["SELECT", "sum", "(", "T2.balance", ")", ",", "T1.name", "FROM", "accounts", "AS", "T1", "JOIN", "savings", "AS", "T2", "ON", "T1.custid", "=", "T2.custid", "GROUP", "BY", "T1.name"], "query_toks_no_value": ["select", "sum", "(", "t2", ".", "balance", ")", ",", "t1", ".", "name", "from", "accounts", "as", "t1", "join", "savings", "as", "t2", "on", "t1", ".", "custid", "=", "t2", ".", "custid", "group", "by", "t1", ".", "name"], "question": "Find the total saving balance for each account name.", "question_toks": ["Find", "the", "total", "saving", "balance", "for", "each", "account", "name", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 3, false], null]]}, "select": [false, [[4, [0, [0, 4, false], null]], [0, [0, [0, 2, false], null]]]], "where": [], "groupBy": [[0, 2, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2589", "db_id": "inn_1", "query": "select sum(beds) from rooms where bedtype = 'king';", "query_toks": ["SELECT", "sum", "(", "beds", ")", "FROM", "Rooms", "WHERE", "bedtype", "=", "'King", "'", ";"], "query_toks_no_value": ["select", "sum", "(", "beds", ")", "from", "rooms", "where", "bedtype", "=", "value"], "question": "Find the total number of king beds available.", "question_toks": ["Find", "the", "total", "number", "of", "king", "beds", "available", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 3, false], null]]]], "where": [[false, 2, [0, [0, 4, false], null], "\"King\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3034", "db_id": "loan_1", "query": "select sum(acc_bal) from customer where state = 'utah' or state = 'texas'", "query_toks": ["SELECT", "sum", "(", "acc_bal", ")", "FROM", "customer", "WHERE", "state", "=", "'Utah", "'", "OR", "state", "=", "'Texas", "'"], "query_toks_no_value": ["select", "sum", "(", "acc_bal", ")", "from", "customer", "where", "state", "=", "value", "or", "state", "=", "value"], "question": "Find the total account balance of each customer from Utah or Texas.", "question_toks": ["Find", "the", "total", "account", "balance", "of", "each", "customer", "from", "Utah", "or", "Texas", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[4, [0, [0, 9, false], null]]]], "where": [[false, 2, [0, [0, 13, false], null], "\"Utah\"", null], "or", [false, 2, [0, [0, 13, false], null], "\"Texas\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3060", "db_id": "loan_1", "query": "select sum(amount) , t1.bname from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id group by t1.bname", "query_toks": ["SELECT", "sum", "(", "amount", ")", ",", "T1.bname", "FROM", "bank", "AS", "T1", "JOIN", "loan", "AS", "T2", "ON", "T1.branch_id", "=", "T2.branch_id", "GROUP", "BY", "T1.bname"], "query_toks_no_value": ["select", "sum", "(", "amount", ")", ",", "t1", ".", "bname", "from", "bank", "as", "t1", "join", "loan", "as", "t2", "on", "t1", ".", "branch_id", "=", "t2", ".", "branch_id", "group", "by", "t1", ".", "bname"], "question": "Find the total amount of loans offered by each bank branch.", "question_toks": ["Find", "the", "total", "amount", "of", "loans", "offered", "by", "each", "bank", "branch", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 17, false], null]]}, "select": [false, [[4, [0, [0, 18, false], null]], [0, [0, [0, 2, false], null]]]], "where": [], "groupBy": [[0, 2, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3080", "db_id": "loan_1", "query": "select sum(t2.amount) from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id where t1.state = 'new york'", "query_toks": ["SELECT", "sum", "(", "T2.amount", ")", "FROM", "bank", "AS", "T1", "JOIN", "loan", "AS", "T2", "ON", "T1.branch_id", "=", "T2.branch_id", "WHERE", "T1.state", "=", "'New", "York", "'"], "query_toks_no_value": ["select", "sum", "(", "t2", ".", "amount", ")", "from", "bank", "as", "t1", "join", "loan", "as", "t2", "on", "t1", ".", "branch_id", "=", "t2", ".", "branch_id", "where", "t1", ".", "state", "=", "value"], "question": "Find the total amount of loans provided by bank branches in the state of New York.", "question_toks": ["Find", "the", "total", "amount", "of", "loans", "provided", "by", "bank", "branches", "in", "the", "state", "of", "New", "York", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 17, false], null]]}, "select": [false, [[4, [0, [0, 18, false], null]]]], "where": [[false, 2, [0, [0, 5, false], null], "\"New York\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "other_1424", "db_id": "academic", "query": "select t1.name from domain_author as t6 join author as t1 on t6.aid = t1.aid join domain as t3 on t3.did = t6.did join organization as t5 on t5.oid = t1.oid join writes as t2 on t2.aid = t1.aid join publication as t4 on t2.pid = t4.pid where t3.name = \"databases\" and t5.name = \"university of michigan\" group by t1.name having sum ( t4.citation_num ) > 5000;", "query_toks": ["SELECT", "t1.name", "FROM", "domain_author", "AS", "t6", "JOIN", "author", "AS", "t1", "ON", "t6.aid", "=", "t1.aid", "JOIN", "DOMAIN", "AS", "t3", "ON", "t3.did", "=", "t6.did", "JOIN", "organization", "AS", "t5", "ON", "t5.oid", "=", "t1.oid", "JOIN", "writes", "AS", "t2", "ON", "t2.aid", "=", "t1.aid", "JOIN", "publication", "AS", "t4", "ON", "t2.pid", "=", "t4.pid", "WHERE", "t3.name", "=", "``", "Databases", "''", "AND", "t5.name", "=", "``", "University", "of", "Michigan", "''", "GROUP", "BY", "t1.name", "HAVING", "SUM", "(", "t4.citation_num", ")", ">", "5000", ";"], "query_toks_no_value": ["select", "t1", ".", "name", "from", "domain_author", "as", "t6", "join", "author", "as", "t1", "on", "t6", ".", "aid", "=", "t1", ".", "aid", "join", "domain", "as", "t3", "on", "t3", ".", "did", "=", "t6", ".", "did", "join", "organization", "as", "t5", "on", "t5", ".", "oid", "=", "t1", ".", "oid", "join", "writes", "as", "t2", "on", "t2", ".", "aid", "=", "t1", ".", "aid", "join", "publication", "as", "t4", "on", "t2", ".", "pid", "=", "t4", ".", "pid", "where", "t3", ".", "name", "=", "value", "and", "t5", ".", "name", "=", "value", "group", "by", "t1", ".", "name", "having", "sum", "(", "t4", ".", "citation_num", ")", ">", "value"], "question": "return me the author in the \" University of Michigan \" in Databases area whose papers have more than 5000 total citations .", "question_toks": ["return", "me", "the", "author", "in", "the", "``", "University", "of", "Michigan", "``", "in", "Databases", "area", "whose", "papers", "have", "more", "than", "5000", "total", "citations", "."], "sql": {"from": {"table_units": [["table_unit", 3], ["table_unit", 0], ["table_unit", 2], ["table_unit", 11], ["table_unit", 13], ["table_unit", 9]], "conds": [[false, 2, [0, [0, 10, false], null], [0, 1, false], null], "and", [false, 2, [0, [0, 8, false], null], [0, 11, false], null], "and", [false, 2, [0, [0, 36, false], null], [0, 4, false], null], "and", [false, 2, [0, [0, 39, false], null], [0, 1, false], null], "and", [false, 2, [0, [0, 40, false], null], [0, 27, false], null]]}, "select": [false, [[0, [0, [0, 3, false], null]]]], "where": [[false, 2, [0, [0, 9, false], null], "\"Databases\"", null], "and", [false, 2, [0, [0, 35, false], null], "\"University of Michigan\"", null]], "groupBy": [[0, 3, false]], "having": [[false, 3, [0, [4, 25, false], null], 5000.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN_OTHERS", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2840", "db_id": "restaurant_1", "query": "select restaurant.resname , sum(visits_restaurant.spent) from visits_restaurant join restaurant on visits_restaurant.resid = restaurant.resid group by restaurant.resid order by sum(visits_restaurant.spent) asc limit 1;", "query_toks": ["SELECT", "Restaurant.ResName", ",", "sum", "(", "Visits_Restaurant.Spent", ")", "FROM", "Visits_Restaurant", "JOIN", "Restaurant", "ON", "Visits_Restaurant.ResID", "=", "Restaurant.ResID", "GROUP", "BY", "Restaurant.ResID", "ORDER", "BY", "sum", "(", "Visits_Restaurant.Spent", ")", "ASC", "LIMIT", "1", ";"], "query_toks_no_value": ["select", "restaurant.resname", ",", "sum", "(", "visits_restaurant.spent", ")", "from", "visits_restaurant", "join", "restaurant", "on", "visits_restaurant.resid", "=", "restaurant.resid", "group", "by", "restaurant.resid", "order", "by", "sum", "(", "visits_restaurant.spent", ")", "asc", "limit", "value"], "question": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.", "question_toks": ["At", "which", "restaurant", "did", "the", "students", "spend", "the", "least", "amount", "of", "time", "?", "List", "restaurant", "and", "the", "time", "students", "spent", "on", "in", "total", "."], "sql": {"from": {"table_units": [["table_unit", 4], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 19, false], null], [0, 9, false], null]]}, "select": [false, [[0, [0, [0, 10, false], null]], [4, [0, [0, 21, false], null]]]], "where": [], "groupBy": [[0, 9, false]], "having": [], "orderBy": ["asc", [[0, [4, 21, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3010", "db_id": "loan_1", "query": "select sum(no_of_customers) from bank where city = 'new york city'", "query_toks": ["SELECT", "sum", "(", "no_of_customers", ")", "FROM", "bank", "WHERE", "city", "=", "'New", "York", "City", "'"], "query_toks_no_value": ["select", "sum", "(", "no_of_customers", ")", "from", "bank", "where", "city", "=", "value"], "question": "Find the number of customers in the banks at New York City.", "question_toks": ["Find", "the", "number", "of", "customers", "in", "the", "banks", "at", "New", "York", "City", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 3, false], null]]]], "where": [[false, 2, [0, [0, 4, false], null], "\"New York City\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_NUMBER"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "added_for_hidden_sum_0004", "db_id": "cinema", "query": "select t2.name , sum(t1.show_times_per_day) from schedule as t1 join cinema as t2 on t1.cinema_id = t2.cinema_id group by t1.cinema_id", "query_toks": ["select", "t2", ".", "name", ",", "sum", "(", "t1", ".", "show_times_per_day", ")", "from", "schedule", "as", "t1", "join", "cinema", "as", "t2", "on", "t1", ".", "cinema_id", "=", "t2", ".", "cinema_id", "group", "by", "t1", ".", "cinema_id"], "query_toks_no_value": ["select", "t2", ".", "name", ",", "sum", "(", "t1", ".", "show_times_per_day", ")", "from", "schedule", "as", "t1", "join", "cinema", "as", "t2", "on", "t1", ".", "cinema_id", "=", "t2", ".", "cinema_id", "group", "by", "t1", ".", "cinema_id"], "question": "What is total number of show times per day for each cinema?", "question_toks": ["What", "is", "total", "number", "of", "show", "times", "per", "day", "for", "each", "cinema", "?"], "sql": {"from": {"table_units": [["table_unit", 2], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 13, false], null], [0, 8, false], null]]}, "select": [false, [[0, [0, [0, 9, false], null]], [4, [0, [0, 16, false], null]]]], "where": [], "groupBy": [[0, 13, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_TOTAL"], "source": "ADDED", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "added_for_hidden_sum_0064", "db_id": "scholar", "query": "select distinct t1.keyphrasename , sum ( t3.numcitedby ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"brian derenzi\" group by t1.keyphrasename order by sum ( t3.numcitedby ) desc", "query_toks": ["select", "distinct", "t1", ".", "keyphrasename", ",", "sum", "(", "t3", ".", "numcitedby", ")", "from", "paperkeyphrase", "as", "t2", "join", "keyphrase", "as", "t1", "on", "t2", ".", "keyphraseid", "=", "t1", ".", "keyphraseid", "join", "paper", "as", "t3", "on", "t3", ".", "paperid", "=", "t2", ".", "paperid", "join", "writes", "as", "t4", "on", "t4", ".", "paperid", "=", "t3", ".", "paperid", "join", "author", "as", "t5", "on", "t4", ".", "authorid", "=", "t5", ".", "authorid", "where", "t5", ".", "authorname", "=", "``", "brian", "derenzi", "''", "group", "by", "t1", ".", "keyphrasename", "order", "by", "sum", "(", "t3", ".", "numcitedby", ")", "desc"], "query_toks_no_value": ["select", "distinct", "t1", ".", "keyphrasename", ",", "sum", "(", "t3", ".", "numcitedby", ")", "from", "paperkeyphrase", "as", "t2", "join", "keyphrase", "as", "t1", "on", "t2", ".", "keyphraseid", "=", "t1", ".", "keyphraseid", "join", "paper", "as", "t3", "on", "t3", ".", "paperid", "=", "t2", ".", "paperid", "join", "writes", "as", "t4", "on", "t4", ".", "paperid", "=", "t3", ".", "paperid", "join", "author", "as", "t5", "on", "t4", ".", "authorid", "=", "t5", ".", "authorid", "where", "t5", ".", "authorname", "=", "value", "derenzi", "group", "by", "t1", ".", "keyphrasename", "order", "by", "sum", "(", "t3", ".", "numcitedby", ")", "desc"], "question": "what keyphrase does Brian DeRenzi write about that gets most citations ? Return also the number of citations", "question_toks": ["what", "keyphrase", "does", "Brian", "DeRenzi", "write", "about", "that", "gets", "most", "citations", "?", "Return", "also", "the", "number", "of", "citations"], "sql": {"from": {"table_units": [["table_unit", 8], ["table_unit", 4], ["table_unit", 5], ["table_unit", 9], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 23, false], null], [0, 9, false], null], "and", [false, 2, [0, [0, 11, false], null], [0, 22, false], null], "and", [false, 2, [0, [0, 24, false], null], [0, 11, false], null], "and", [false, 2, [0, [0, 25, false], null], [0, 3, false], null]]}, "select": [true, [[0, [0, [0, 10, false], null]], [4, [0, [0, 16, false], null]]]], "where": [[false, 2, [0, [0, 4, false], null], "\"brian derenzi\"", null]], "groupBy": [[0, 10, false]], "having": [], "orderBy": ["desc", [[0, [4, 16, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_WITHOUT_MENTIONS"], "source": "ADDED", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "added_for_hidden_sum_0065", "db_id": "scholar", "query": "select distinct t1.keyphrasename , sum ( t3.numcitedby ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"brian derenzi\" group by t1.keyphrasename order by sum ( t3.numcitedby ) desc", "query_toks": ["select", "distinct", "t1", ".", "keyphrasename", ",", "sum", "(", "t3", ".", "numcitedby", ")", "from", "paperkeyphrase", "as", "t2", "join", "keyphrase", "as", "t1", "on", "t2", ".", "keyphraseid", "=", "t1", ".", "keyphraseid", "join", "paper", "as", "t3", "on", "t3", ".", "paperid", "=", "t2", ".", "paperid", "join", "writes", "as", "t4", "on", "t4", ".", "paperid", "=", "t3", ".", "paperid", "join", "author", "as", "t5", "on", "t4", ".", "authorid", "=", "t5", ".", "authorid", "where", "t5", ".", "authorname", "=", "``", "brian", "derenzi", "''", "group", "by", "t1", ".", "keyphrasename", "order", "by", "sum", "(", "t3", ".", "numcitedby", ")", "desc"], "query_toks_no_value": ["select", "distinct", "t1", ".", "keyphrasename", ",", "sum", "(", "t3", ".", "numcitedby", ")", "from", "paperkeyphrase", "as", "t2", "join", "keyphrase", "as", "t1", "on", "t2", ".", "keyphraseid", "=", "t1", ".", "keyphraseid", "join", "paper", "as", "t3", "on", "t3", ".", "paperid", "=", "t2", ".", "paperid", "join", "writes", "as", "t4", "on", "t4", ".", "paperid", "=", "t3", ".", "paperid", "join", "author", "as", "t5", "on", "t4", ".", "authorid", "=", "t5", ".", "authorid", "where", "t5", ".", "authorname", "=", "value", "derenzi", "group", "by", "t1", ".", "keyphrasename", "order", "by", "sum", "(", "t3", ".", "numcitedby", ")", "desc"], "question": "main topics of work by Brian DeRenzi with the number of citation", "question_toks": ["main", "topics", "of", "work", "by", "Brian", "DeRenzi", "with", "the", "number", "of", "citation"], "sql": {"from": {"table_units": [["table_unit", 8], ["table_unit", 4], ["table_unit", 5], ["table_unit", 9], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 23, false], null], [0, 9, false], null], "and", [false, 2, [0, [0, 11, false], null], [0, 22, false], null], "and", [false, 2, [0, [0, 24, false], null], [0, 11, false], null], "and", [false, 2, [0, [0, 25, false], null], [0, 3, false], null]]}, "select": [true, [[0, [0, [0, 10, false], null]], [4, [0, [0, 16, false], null]]]], "where": [[false, 2, [0, [0, 4, false], null], "\"brian derenzi\"", null]], "groupBy": [[0, 10, false]], "having": [], "orderBy": ["desc", [[0, [4, 16, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["HIDDEN_SUM", "_HIDDEN_SUM_WITHOUT_MENTIONS"], "source": "ADDED", "parents_id": null, "is_simplification": false, "simplifications_tags": []}] |