diff --git "a/testsets/aggregation_in_column/testset_aggregation_in_column.json" "b/testsets/aggregation_in_column/testset_aggregation_in_column.json" new file mode 100644--- /dev/null +++ "b/testsets/aggregation_in_column/testset_aggregation_in_column.json" @@ -0,0 +1 @@ +[{"id": "train_0195", "db_id": "bike_1", "query": "select distinct zip_code from weather except select distinct zip_code from weather where max_dew_point_f >= 70", "query_toks": ["SELECT", "DISTINCT", "zip_code", "FROM", "weather", "EXCEPT", "SELECT", "DISTINCT", "zip_code", "FROM", "weather", "WHERE", "max_dew_point_f", ">", "=", "70"], "query_toks_no_value": ["select", "distinct", "zip_code", "from", "weather", "except", "select", "distinct", "zip_code", "from", "weather", "where", "max_dew_point_f", ">", "=", "value"], "question": "Find all the zip codes in which the max dew point have never reached 70.", "question_toks": ["Find", "all", "the", "zip", "codes", "in", "which", "the", "max", "dew", "point", "have", "never", "reached", "70", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [true, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [true, [[0, [0, [0, 46, false], null]]]], "where": [[false, 5, [0, [0, 27, false], null], 70.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0196", "db_id": "bike_1", "query": "select distinct zip_code from weather except select distinct zip_code from weather where max_dew_point_f >= 70", "query_toks": ["SELECT", "DISTINCT", "zip_code", "FROM", "weather", "EXCEPT", "SELECT", "DISTINCT", "zip_code", "FROM", "weather", "WHERE", "max_dew_point_f", ">", "=", "70"], "query_toks_no_value": ["select", "distinct", "zip_code", "from", "weather", "except", "select", "distinct", "zip_code", "from", "weather", "where", "max_dew_point_f", ">", "=", "value"], "question": "What are all the different zip codes that have a maximum dew point that was always below 70?", "question_toks": ["What", "are", "all", "the", "different", "zip", "codes", "that", "have", "a", "maximum", "dew", "point", "that", "was", "always", "below", "70", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [true, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [true, [[0, [0, [0, 46, false], null]]]], "where": [[false, 5, [0, [0, 27, false], null], 70.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0200", "db_id": "bike_1", "query": "select date from weather where mean_sea_level_pressure_inches between 30.3 and 31", "query_toks": ["SELECT", "date", "FROM", "weather", "WHERE", "mean_sea_level_pressure_inches", "BETWEEN", "30.3", "AND", "31"], "query_toks_no_value": ["select", "date", "from", "weather", "where", "mean_sea_level_pressure_inches", "between", "value", "and", "value"], "question": "What are the dates that have an average sea level pressure between 30.3 and 31?", "question_toks": ["What", "are", "the", "dates", "that", "have", "an", "average", "sea", "level", "pressure", "between", "30.3", "and", "31", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]]]], "where": [[false, 1, [0, [0, 34, false], null], 30.3, 31.0]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0201", "db_id": "bike_1", "query": "select date , max_temperature_f - min_temperature_f from weather order by max_temperature_f - min_temperature_f limit 1", "query_toks": ["SELECT", "date", ",", "max_temperature_f", "-", "min_temperature_f", "FROM", "weather", "ORDER", "BY", "max_temperature_f", "-", "min_temperature_f", "LIMIT", "1"], "query_toks_no_value": ["select", "date", ",", "max_temperature_f", "-", "min_temperature_f", "from", "weather", "order", "by", "max_temperature_f", "-", "min_temperature_f", "limit", "value"], "question": "Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.", "question_toks": ["Find", "the", "day", "in", "which", "the", "difference", "between", "the", "max", "temperature", "and", "min", "temperature", "was", "the", "smallest", ".", "Also", "report", "the", "difference", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]], [0, [1, [0, 24, false], [0, 26, false]]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["asc", [[1, [0, 24, false], [0, 26, false]]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0016", "db_id": "concert_singer", "query": "select max(capacity), average from stadium", "query_toks": ["select", "max", "(", "capacity", ")", ",", "average", "from", "stadium"], "query_toks_no_value": ["select", "max", "(", "capacity", ")", ",", "average", "from", "stadium"], "question": "What is the maximum capacity and the average of all stadiums ?", "question_toks": ["What", "is", "the", "maximum", "capacity", "and", "the", "average", "of", "all", "stadiums", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[1, [0, [0, 4, false], null]], [0, [0, [0, 7, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0018", "db_id": "concert_singer", "query": "select name , capacity from stadium order by average desc limit 1", "query_toks": ["SELECT", "name", ",", "capacity", "FROM", "stadium", "ORDER", "BY", "average", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "name", ",", "capacity", "from", "stadium", "order", "by", "average", "desc", "limit", "value"], "question": "What is the name and capacity for the stadium with highest average attendance?", "question_toks": ["What", "is", "the", "name", "and", "capacity", "for", "the", "stadium", "with", "highest", "average", "attendance", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 3, false], null]], [0, [0, [0, 4, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 7, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0019", "db_id": "concert_singer", "query": "select name , capacity from stadium order by average desc limit 1", "query_toks": ["SELECT", "name", ",", "capacity", "FROM", "stadium", "ORDER", "BY", "average", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "name", ",", "capacity", "from", "stadium", "order", "by", "average", "desc", "limit", "value"], "question": "What is the name and capacity for the stadium with the highest average attendance?", "question_toks": ["What", "is", "the", "name", "and", "capacity", "for", "the", "stadium", "with", "the", "highest", "average", "attendance", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 3, false], null]], [0, [0, [0, 4, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 7, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1278", "db_id": "game_injury", "query": "select average_attendance from stadium where capacity_percentage > 100", "query_toks": ["SELECT", "average_attendance", "FROM", "stadium", "WHERE", "capacity_percentage", ">", "100"], "query_toks_no_value": ["select", "average_attendance", "from", "stadium", "where", "capacity_percentage", ">", "value"], "question": "What is the average attendance of stadiums with capacity percentage higher than 100%?", "question_toks": ["What", "is", "the", "average", "attendance", "of", "stadiums", "with", "capacity", "percentage", "higher", "than", "100", "%", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 4, false], null]]]], "where": [[false, 3, [0, [0, 6, false], null], 100.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3712", "db_id": "mountain_photos", "query": "select brand , name from camera_lens order by max_aperture desc", "query_toks": ["SELECT", "brand", ",", "name", "FROM", "camera_lens", "ORDER", "BY", "max_aperture", "DESC"], "query_toks_no_value": ["select", "brand", ",", "name", "from", "camera_lens", "order", "by", "max_aperture", "desc"], "question": "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.", "question_toks": ["Find", "the", "brand", "and", "name", "for", "each", "camera", "lens", ",", "and", "sort", "in", "descending", "order", "of", "maximum", "aperture", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[0, [0, [0, 8, false], null]], [0, [0, [0, 9, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 11, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1971", "db_id": "products_for_hire", "query": "select max(booked_count) , min(booked_count) , avg(booked_count) from products_booked", "query_toks": ["SELECT", "max", "(", "booked_count", ")", ",", "min", "(", "booked_count", ")", ",", "avg", "(", "booked_count", ")", "FROM", "products_booked"], "query_toks_no_value": ["select", "max", "(", "booked_count", ")", ",", "min", "(", "booked_count", ")", ",", "avg", "(", "booked_count", ")", "from", "products_booked"], "question": "What are the maximum, minimum, and average booked count for the products booked?", "question_toks": ["What", "are", "the", "maximum", ",", "minimum", ",", "and", "average", "booked", "count", "for", "the", "products", "booked", "?"], "sql": {"from": {"table_units": [["table_unit", 5]], "conds": []}, "select": [false, [[1, [0, [0, 40, false], null]], [2, [0, [0, 40, false], null]], [5, [0, [0, 40, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1909", "db_id": "school_finance", "query": "select t1.school_name , t1.mascot , t1.ihsaa_football_class from school as t1 join budget as t2 on t1.school_id = t2.school_id where budgeted > 6000 or year < 2003 order by t2.total_budget_percent_invested , t2.total_budget_percent_budgeted", "query_toks": ["SELECT", "T1.School_name", ",", "T1.Mascot", ",", "T1.IHSAA_Football_Class", "FROM", "school", "AS", "T1", "JOIN", "budget", "AS", "T2", "ON", "T1.school_id", "=", "T2.school_id", "WHERE", "Budgeted", ">", "6000", "OR", "YEAR", "<", "2003", "ORDER", "BY", "T2.total_budget_percent_invested", ",", "T2.total_budget_percent_budgeted"], "query_toks_no_value": ["select", "t1", ".", "school_name", ",", "t1", ".", "mascot", ",", "t1", ".", "ihsaa_football_class", "from", "school", "as", "t1", "join", "budget", "as", "t2", "on", "t1", ".", "school_id", "=", "t2", ".", "school_id", "where", "budgeted", ">", "value", "or", "year", "<", "value", "order", "by", "t2", ".", "total_budget_percent_invested", ",", "t2", ".", "total_budget_percent_budgeted"], "question": "List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget.", "question_toks": ["List", "the", "name", ",", "IHSAA", "Football", "Class", ",", "and", "Mascot", "of", "the", "schools", "that", "have", "more", "than", "6000", "of", "budgeted", "amount", "or", "were", "founded", "before", "2003", ",", "in", "the", "order", "of", "percent", "of", "total", "invested", "budget", "and", "total", "budgeted", "budget", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 9, false], null]]}, "select": [false, [[0, [0, [0, 2, false], null]], [0, [0, [0, 4, false], null]], [0, [0, [0, 7, false], null]]]], "where": [[false, 3, [0, [0, 11, false], null], 6000.0, null], "or", [false, 4, [0, [0, 10, false], null], 2003.0, null]], "groupBy": [], "having": [], "orderBy": ["asc", [[0, [0, 14, false], null], [0, [0, 12, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3349", "db_id": "sports_competition", "query": "select count(*) from club_rank where total < 10", "query_toks": ["SELECT", "count", "(", "*", ")", "FROM", "club_rank", "WHERE", "Total", "<", "10"], "query_toks_no_value": ["select", "count", "(", "*", ")", "from", "club_rank", "where", "total", "<", "value"], "question": "How many clubs have total medals less than 10?", "question_toks": ["How", "many", "clubs", "have", "total", "medals", "less", "than", "10", "?"], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[3, [0, [0, 0, false], null]]]], "where": [[false, 4, [0, [0, 10, false], null], 10.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_3350", "db_id": "sports_competition", "query": "select count(*) from club_rank where total < 10", "query_toks": ["SELECT", "count", "(", "*", ")", "FROM", "club_rank", "WHERE", "Total", "<", "10"], "query_toks_no_value": ["select", "count", "(", "*", ")", "from", "club_rank", "where", "total", "<", "value"], "question": "What is the total number of clubs that have less than 10 medals in total?", "question_toks": ["What", "is", "the", "total", "number", "of", "clubs", "that", "have", "less", "than", "10", "medals", "in", "total", "?"], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[3, [0, [0, 0, false], null]]]], "where": [[false, 4, [0, [0, 10, false], null], 10.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2702", "db_id": "storm_record", "query": "select avg(damage_millions_usd) , max(damage_millions_usd) from storm where max_speed > 1000", "query_toks": ["SELECT", "avg", "(", "damage_millions_USD", ")", ",", "max", "(", "damage_millions_USD", ")", "FROM", "storm", "WHERE", "max_speed", ">", "1000"], "query_toks_no_value": ["select", "avg", "(", "damage_millions_usd", ")", ",", "max", "(", "damage_millions_usd", ")", "from", "storm", "where", "max_speed", ">", "value"], "question": "Show the average and maximum damage for all storms with max speed higher than 1000.", "question_toks": ["Show", "the", "average", "and", "maximum", "damage", "for", "all", "storms", "with", "max", "speed", "higher", "than", "1000", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[5, [0, [0, 5, false], null]], [1, [0, [0, 5, false], null]]]], "where": [[false, 3, [0, [0, 4, false], null], 1000.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2703", "db_id": "storm_record", "query": "select avg(damage_millions_usd) , max(damage_millions_usd) from storm where max_speed > 1000", "query_toks": ["SELECT", "avg", "(", "damage_millions_USD", ")", ",", "max", "(", "damage_millions_USD", ")", "FROM", "storm", "WHERE", "max_speed", ">", "1000"], "query_toks_no_value": ["select", "avg", "(", "damage_millions_usd", ")", ",", "max", "(", "damage_millions_usd", ")", "from", "storm", "where", "max_speed", ">", "value"], "question": "What is the average and maximum damage in millions for storms that had a max speed over 1000?", "question_toks": ["What", "is", "the", "average", "and", "maximum", "damage", "in", "millions", "for", "storms", "that", "had", "a", "max", "speed", "over", "1000", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[5, [0, [0, 5, false], null]], [1, [0, [0, 5, false], null]]]], "where": [[false, 3, [0, [0, 4, false], null], 1000.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2704", "db_id": "storm_record", "query": "select sum(number_deaths) , sum(damage_millions_usd) from storm where max_speed > (select avg(max_speed) from storm)", "query_toks": ["SELECT", "sum", "(", "number_deaths", ")", ",", "sum", "(", "damage_millions_USD", ")", "FROM", "storm", "WHERE", "max_speed", ">", "(", "SELECT", "avg", "(", "max_speed", ")", "FROM", "storm", ")"], "query_toks_no_value": ["select", "sum", "(", "number_deaths", ")", ",", "sum", "(", "damage_millions_usd", ")", "from", "storm", "where", "max_speed", ">", "(", "select", "avg", "(", "max_speed", ")", "from", "storm", ")"], "question": "What is the total number of deaths and damage for all storms with a max speed greater than the average?", "question_toks": ["What", "is", "the", "total", "number", "of", "deaths", "and", "damage", "for", "all", "storms", "with", "a", "max", "speed", "greater", "than", "the", "average", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 6, false], null]], [4, [0, [0, 5, false], null]]]], "where": [[false, 3, [0, [0, 4, false], null], {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[5, [0, [0, 4, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2705", "db_id": "storm_record", "query": "select sum(number_deaths) , sum(damage_millions_usd) from storm where max_speed > (select avg(max_speed) from storm)", "query_toks": ["SELECT", "sum", "(", "number_deaths", ")", ",", "sum", "(", "damage_millions_USD", ")", "FROM", "storm", "WHERE", "max_speed", ">", "(", "SELECT", "avg", "(", "max_speed", ")", "FROM", "storm", ")"], "query_toks_no_value": ["select", "sum", "(", "number_deaths", ")", ",", "sum", "(", "damage_millions_usd", ")", "from", "storm", "where", "max_speed", ">", "(", "select", "avg", "(", "max_speed", ")", "from", "storm", ")"], "question": "Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.", "question_toks": ["Return", "the", "total", "number", "of", "deaths", "and", "total", "damange", "in", "millions", "for", "storms", "that", "had", "a", "max", "speed", "greater", "than", "the", "average", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[4, [0, [0, 6, false], null]], [4, [0, [0, 5, false], null]]]], "where": [[false, 3, [0, [0, 4, false], null], {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[5, [0, [0, 4, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2706", "db_id": "storm_record", "query": "select name , damage_millions_usd from storm order by max_speed desc", "query_toks": ["SELECT", "name", ",", "damage_millions_USD", "FROM", "storm", "ORDER", "BY", "max_speed", "DESC"], "query_toks_no_value": ["select", "name", ",", "damage_millions_usd", "from", "storm", "order", "by", "max_speed", "desc"], "question": "List name and damage for all storms in a descending order of max speed.", "question_toks": ["List", "name", "and", "damage", "for", "all", "storms", "in", "a", "descending", "order", "of", "max", "speed", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 2, false], null]], [0, [0, [0, 5, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 4, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2707", "db_id": "storm_record", "query": "select name , damage_millions_usd from storm order by max_speed desc", "query_toks": ["SELECT", "name", ",", "damage_millions_USD", "FROM", "storm", "ORDER", "BY", "max_speed", "DESC"], "query_toks_no_value": ["select", "name", ",", "damage_millions_usd", "from", "storm", "order", "by", "max_speed", "desc"], "question": "What are the names and damage in millions for storms, ordered by their max speeds descending?", "question_toks": ["What", "are", "the", "names", "and", "damage", "in", "millions", "for", "storms", ",", "ordered", "by", "their", "max", "speeds", "descending", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 2, false], null]], [0, [0, [0, 5, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 4, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2716", "db_id": "storm_record", "query": "select t1.name , t1.max_speed from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id order by count(*) desc limit 1", "query_toks": ["SELECT", "T1.name", ",", "T1.max_speed", "FROM", "storm", "AS", "T1", "JOIN", "affected_region", "AS", "T2", "ON", "T1.storm_id", "=", "T2.storm_id", "GROUP", "BY", "T1.storm_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "t1", ".", "name", ",", "t1", ".", "max_speed", "from", "storm", "as", "t1", "join", "affected_region", "as", "t2", "on", "t1", ".", "storm_id", "=", "t2", ".", "storm_id", "group", "by", "t1", ".", "storm_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value"], "question": "What is the storm name and max speed which affected the greatest number of regions?", "question_toks": ["What", "is", "the", "storm", "name", "and", "max", "speed", "which", "affected", "the", "greatest", "number", "of", "regions", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 11, false], null]]}, "select": [false, [[0, [0, [0, 2, false], null]], [0, [0, [0, 4, false], null]]]], "where": [], "groupBy": [[0, 1, false]], "having": [], "orderBy": ["desc", [[0, [3, 0, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_2717", "db_id": "storm_record", "query": "select t1.name , t1.max_speed from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id order by count(*) desc limit 1", "query_toks": ["SELECT", "T1.name", ",", "T1.max_speed", "FROM", "storm", "AS", "T1", "JOIN", "affected_region", "AS", "T2", "ON", "T1.storm_id", "=", "T2.storm_id", "GROUP", "BY", "T1.storm_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "t1", ".", "name", ",", "t1", ".", "max_speed", "from", "storm", "as", "t1", "join", "affected_region", "as", "t2", "on", "t1", ".", "storm_id", "=", "t2", ".", "storm_id", "group", "by", "t1", ".", "storm_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value"], "question": "Return the name and max speed of the storm that affected the most regions.", "question_toks": ["Return", "the", "name", "and", "max", "speed", "of", "the", "storm", "that", "affected", "the", "most", "regions", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 11, false], null]]}, "select": [false, [[0, [0, [0, 2, false], null]], [0, [0, [0, 4, false], null]]]], "where": [], "groupBy": [[0, 1, false]], "having": [], "orderBy": ["desc", [[0, [3, 0, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5855", "db_id": "tracking_share_transactions", "query": "select max(share_count) from transactions where amount_of_transaction < 10000", "query_toks": ["SELECT", "max", "(", "share_count", ")", "FROM", "TRANSACTIONS", "WHERE", "amount_of_transaction", "<", "10000"], "query_toks_no_value": ["select", "max", "(", "share_count", ")", "from", "transactions", "where", "amount_of_transaction", "<", "value"], "question": "Show the maximum share count of transactions where the amount is smaller than 10000", "question_toks": ["Show", "the", "maximum", "share", "count", "of", "transactions", "where", "the", "amount", "is", "smaller", "than", "10000"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[1, [0, [0, 13, false], null]]]], "where": [[false, 4, [0, [0, 12, false], null], 10000.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5856", "db_id": "tracking_share_transactions", "query": "select date_of_transaction from transactions where share_count > 100 or amount_of_transaction > 1000", "query_toks": ["SELECT", "date_of_transaction", "FROM", "TRANSACTIONS", "WHERE", "share_count", ">", "100", "OR", "amount_of_transaction", ">", "1000"], "query_toks_no_value": ["select", "date_of_transaction", "from", "transactions", "where", "share_count", ">", "value", "or", "amount_of_transaction", ">", "value"], "question": "Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.", "question_toks": ["Show", "the", "dates", "of", "transactions", "if", "the", "share", "count", "is", "bigger", "than", "100", "or", "the", "amount", "is", "bigger", "than", "1000", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 11, false], null]]]], "where": [[false, 3, [0, [0, 13, false], null], 100.0, null], "or", [false, 3, [0, [0, 12, false], null], 1000.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5857", "db_id": "tracking_share_transactions", "query": "select t1.transaction_type_description , t2.date_of_transaction from ref_transaction_types as t1 join transactions as t2 on t1.transaction_type_code = t2.transaction_type_code where t2.share_count < 10", "query_toks": ["SELECT", "T1.transaction_type_description", ",", "T2.date_of_transaction", "FROM", "Ref_Transaction_Types", "AS", "T1", "JOIN", "TRANSACTIONS", "AS", "T2", "ON", "T1.transaction_type_code", "=", "T2.transaction_type_code", "WHERE", "T2.share_count", "<", "10"], "query_toks_no_value": ["select", "t1", ".", "transaction_type_description", ",", "t2", ".", "date_of_transaction", "from", "ref_transaction_types", "as", "t1", "join", "transactions", "as", "t2", "on", "t1", ".", "transaction_type_code", "=", "t2", ".", "transaction_type_code", "where", "t2", ".", "share_count", "<", "value"], "question": "Show the transaction type descriptions and dates if the share count is smaller than 10.", "question_toks": ["Show", "the", "transaction", "type", "descriptions", "and", "dates", "if", "the", "share", "count", "is", "smaller", "than", "10", "."], "sql": {"from": {"table_units": [["table_unit", 2], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 6, false], null], [0, 10, false], null]]}, "select": [false, [[0, [0, [0, 7, false], null]], [0, [0, [0, 11, false], null]]]], "where": [[false, 4, [0, [0, 13, false], null], 10.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5858", "db_id": "tracking_share_transactions", "query": "select t1.investor_details from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id where t2.share_count > 100", "query_toks": ["SELECT", "T1.Investor_details", "FROM", "INVESTORS", "AS", "T1", "JOIN", "TRANSACTIONS", "AS", "T2", "ON", "T1.investor_id", "=", "T2.investor_id", "WHERE", "T2.share_count", ">", "100"], "query_toks_no_value": ["select", "t1", ".", "investor_details", "from", "investors", "as", "t1", "join", "transactions", "as", "t2", "on", "t1", ".", "investor_id", "=", "t2", ".", "investor_id", "where", "t2", ".", "share_count", ">", "value"], "question": "Show details of all investors if they make any transaction with share count greater than 100.", "question_toks": ["Show", "details", "of", "all", "investors", "if", "they", "make", "any", "transaction", "with", "share", "count", "greater", "than", "100", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 9, false], null]]}, "select": [false, [[0, [0, [0, 2, false], null]]]], "where": [[false, 3, [0, [0, 13, false], null], 100.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5864", "db_id": "tracking_share_transactions", "query": "select t1.lot_details from lots as t1 join transactions_lots as t2 on t1.lot_id = t2.transaction_id join transactions as t3 on t2.transaction_id = t3.transaction_id where t3.share_count < 50", "query_toks": ["SELECT", "T1.lot_details", "FROM", "LOTS", "AS", "T1", "JOIN", "TRANSACTIONS_LOTS", "AS", "T2", "ON", "T1.lot_id", "=", "T2.transaction_id", "JOIN", "TRANSACTIONS", "AS", "T3", "ON", "T2.transaction_id", "=", "T3.transaction_id", "WHERE", "T3.share_count", "<", "50"], "query_toks_no_value": ["select", "t1", ".", "lot_details", "from", "lots", "as", "t1", "join", "transactions_lots", "as", "t2", "on", "t1", ".", "lot_id", "=", "t2", ".", "transaction_id", "join", "transactions", "as", "t3", "on", "t2", ".", "transaction_id", "=", "t3", ".", "transaction_id", "where", "t3", ".", "share_count", "<", "value"], "question": "What are the lot details of lots associated with transactions with share count smaller than 50?", "question_toks": ["What", "are", "the", "lot", "details", "of", "lots", "associated", "with", "transactions", "with", "share", "count", "smaller", "than", "50", "?"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 6], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 3, false], null], [0, 19, false], null], "and", [false, 2, [0, [0, 19, false], null], [0, 8, false], null]]}, "select": [false, [[0, [0, [0, 5, false], null]]]], "where": [[false, 4, [0, [0, 13, false], null], 50.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5865", "db_id": "tracking_share_transactions", "query": "select t1.lot_details from lots as t1 join transactions_lots as t2 on t1.lot_id = t2.transaction_id join transactions as t3 on t2.transaction_id = t3.transaction_id where t3.share_count > 100 and t3.transaction_type_code = \"pur\"", "query_toks": ["SELECT", "T1.lot_details", "FROM", "LOTS", "AS", "T1", "JOIN", "TRANSACTIONS_LOTS", "AS", "T2", "ON", "T1.lot_id", "=", "T2.transaction_id", "JOIN", "TRANSACTIONS", "AS", "T3", "ON", "T2.transaction_id", "=", "T3.transaction_id", "WHERE", "T3.share_count", ">", "100", "AND", "T3.transaction_type_code", "=", "``", "PUR", "''"], "query_toks_no_value": ["select", "t1", ".", "lot_details", "from", "lots", "as", "t1", "join", "transactions_lots", "as", "t2", "on", "t1", ".", "lot_id", "=", "t2", ".", "transaction_id", "join", "transactions", "as", "t3", "on", "t2", ".", "transaction_id", "=", "t3", ".", "transaction_id", "where", "t3", ".", "share_count", ">", "value", "and", "t3", ".", "transaction_type_code", "=", "value"], "question": "What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is \"PUR\"?", "question_toks": ["What", "are", "the", "lot", "details", "of", "lots", "associated", "with", "transactions", "whose", "share", "count", "is", "bigger", "than", "100", "and", "whose", "type", "code", "is", "``", "PUR", "''", "?"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 6], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 3, false], null], [0, 19, false], null], "and", [false, 2, [0, [0, 19, false], null], [0, 8, false], null]]}, "select": [false, [[0, [0, [0, 5, false], null]]]], "where": [[false, 3, [0, [0, 13, false], null], 100.0, null], "and", [false, 2, [0, [0, 10, false], null], "\"PUR\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5867", "db_id": "tracking_share_transactions", "query": "select transaction_type_code , max(share_count) , min(share_count) from transactions group by transaction_type_code", "query_toks": ["SELECT", "transaction_type_code", ",", "max", "(", "share_count", ")", ",", "min", "(", "share_count", ")", "FROM", "TRANSACTIONS", "GROUP", "BY", "transaction_type_code"], "query_toks_no_value": ["select", "transaction_type_code", ",", "max", "(", "share_count", ")", ",", "min", "(", "share_count", ")", "from", "transactions", "group", "by", "transaction_type_code"], "question": "Show the maximum and minimum share count of different transaction types.", "question_toks": ["Show", "the", "maximum", "and", "minimum", "share", "count", "of", "different", "transaction", "types", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 10, false], null]], [1, [0, [0, 13, false], null]], [2, [0, [0, 13, false], null]]]], "where": [], "groupBy": [[0, 10, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5868", "db_id": "tracking_share_transactions", "query": "select investor_id , avg(share_count) from transactions group by investor_id", "query_toks": ["SELECT", "investor_id", ",", "avg", "(", "share_count", ")", "FROM", "TRANSACTIONS", "GROUP", "BY", "investor_id"], "query_toks_no_value": ["select", "investor_id", ",", "avg", "(", "share_count", ")", "from", "transactions", "group", "by", "investor_id"], "question": "Show the average share count of transactions for different investors.", "question_toks": ["Show", "the", "average", "share", "count", "of", "transactions", "for", "different", "investors", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 9, false], null]], [5, [0, [0, 13, false], null]]]], "where": [], "groupBy": [[0, 9, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5869", "db_id": "tracking_share_transactions", "query": "select investor_id , avg(share_count) from transactions group by investor_id order by avg(share_count)", "query_toks": ["SELECT", "investor_id", ",", "avg", "(", "share_count", ")", "FROM", "TRANSACTIONS", "GROUP", "BY", "investor_id", "ORDER", "BY", "avg", "(", "share_count", ")"], "query_toks_no_value": ["select", "investor_id", ",", "avg", "(", "share_count", ")", "from", "transactions", "group", "by", "investor_id", "order", "by", "avg", "(", "share_count", ")"], "question": "Show the average share count of transactions each each investor, ordered by average share count.", "question_toks": ["Show", "the", "average", "share", "count", "of", "transactions", "each", "each", "investor", ",", "ordered", "by", "average", "share", "count", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 9, false], null]], [5, [0, [0, 13, false], null]]]], "where": [], "groupBy": [[0, 9, false]], "having": [], "orderBy": ["asc", [[0, [5, 13, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5882", "db_id": "tracking_share_transactions", "query": "select date_of_transaction from transactions where share_count >= 100 or amount_of_transaction >= 100", "query_toks": ["SELECT", "date_of_transaction", "FROM", "TRANSACTIONS", "WHERE", "share_count", ">", "=", "100", "OR", "amount_of_transaction", ">", "=", "100"], "query_toks_no_value": ["select", "date_of_transaction", "from", "transactions", "where", "share_count", ">", "=", "value", "or", "amount_of_transaction", ">", "=", "value"], "question": "What are the dates of transactions with at least 100 share count or amount bigger than 100?", "question_toks": ["What", "are", "the", "dates", "of", "transactions", "with", "at", "least", "100", "share", "count", "or", "amount", "bigger", "than", "100", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 11, false], null]]]], "where": [[false, 5, [0, [0, 13, false], null], 100.0, null], "or", [false, 5, [0, [0, 12, false], null], 100.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4817", "db_id": "aircraft", "query": "select t1.aircraft , t1.description from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.total_passengers > 10000000", "query_toks": ["SELECT", "T1.Aircraft", ",", "T1.Description", "FROM", "aircraft", "AS", "T1", "JOIN", "airport_aircraft", "AS", "T2", "ON", "T1.Aircraft_ID", "=", "T2.Aircraft_ID", "JOIN", "airport", "AS", "T3", "ON", "T2.Airport_ID", "=", "T3.Airport_ID", "WHERE", "T3.Total_Passengers", ">", "10000000"], "query_toks_no_value": ["select", "t1", ".", "aircraft", ",", "t1", ".", "description", "from", "aircraft", "as", "t1", "join", "airport_aircraft", "as", "t2", "on", "t1", ".", "aircraft_id", "=", "t2", ".", "aircraft_id", "join", "airport", "as", "t3", "on", "t2", ".", "airport_id", "=", "t3", ".", "airport_id", "where", "t3", ".", "total_passengers", ">", "value"], "question": "Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.", "question_toks": ["Please", "show", "the", "names", "and", "descriptions", "of", "aircrafts", "associated", "with", "airports", "that", "have", "a", "total", "number", "of", "passengers", "bigger", "than", "10000000", "."], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 4], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 4, false], null], [0, 28, false], null], "and", [false, 2, [0, [0, 27, false], null], [0, 17, false], null]]}, "select": [false, [[0, [0, [0, 5, false], null]], [0, [0, [0, 6, false], null]]]], "where": [[false, 3, [0, [0, 19, false], null], 10000000.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4818", "db_id": "aircraft", "query": "select t1.aircraft , t1.description from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.total_passengers > 10000000", "query_toks": ["SELECT", "T1.Aircraft", ",", "T1.Description", "FROM", "aircraft", "AS", "T1", "JOIN", "airport_aircraft", "AS", "T2", "ON", "T1.Aircraft_ID", "=", "T2.Aircraft_ID", "JOIN", "airport", "AS", "T3", "ON", "T2.Airport_ID", "=", "T3.Airport_ID", "WHERE", "T3.Total_Passengers", ">", "10000000"], "query_toks_no_value": ["select", "t1", ".", "aircraft", ",", "t1", ".", "description", "from", "aircraft", "as", "t1", "join", "airport_aircraft", "as", "t2", "on", "t1", ".", "aircraft_id", "=", "t2", ".", "aircraft_id", "join", "airport", "as", "t3", "on", "t2", ".", "airport_id", "=", "t3", ".", "airport_id", "where", "t3", ".", "total_passengers", ">", "value"], "question": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", "question_toks": ["What", "are", "the", "names", "and", "descriptions", "of", "aircrafts", "associated", "with", "an", "airport", "that", "has", "more", "total", "passengers", "than", "10000000", "?"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 4], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 4, false], null], [0, 28, false], null], "and", [false, 2, [0, [0, 27, false], null], [0, 17, false], null]]}, "select": [false, [[0, [0, [0, 5, false], null]], [0, [0, [0, 6, false], null]]]], "where": [[false, 3, [0, [0, 19, false], null], 10000000.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4819", "db_id": "aircraft", "query": "select avg(t3.total_passengers) from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t1.aircraft = \"robinson r-22\"", "query_toks": ["SELECT", "avg", "(", "T3.Total_Passengers", ")", "FROM", "aircraft", "AS", "T1", "JOIN", "airport_aircraft", "AS", "T2", "ON", "T1.Aircraft_ID", "=", "T2.Aircraft_ID", "JOIN", "airport", "AS", "T3", "ON", "T2.Airport_ID", "=", "T3.Airport_ID", "WHERE", "T1.Aircraft", "=", "``", "Robinson", "R-22", "''"], "query_toks_no_value": ["select", "avg", "(", "t3", ".", "total_passengers", ")", "from", "aircraft", "as", "t1", "join", "airport_aircraft", "as", "t2", "on", "t1", ".", "aircraft_id", "=", "t2", ".", "aircraft_id", "join", "airport", "as", "t3", "on", "t2", ".", "airport_id", "=", "t3", ".", "airport_id", "where", "t1", ".", "aircraft", "=", "value"], "question": "What is the average total number of passengers of airports that are associated with aircraft \"Robinson R-22\"?", "question_toks": ["What", "is", "the", "average", "total", "number", "of", "passengers", "of", "airports", "that", "are", "associated", "with", "aircraft", "``", "Robinson", "R-22", "''", "?"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 4], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 4, false], null], [0, 28, false], null], "and", [false, 2, [0, [0, 27, false], null], [0, 17, false], null]]}, "select": [false, [[5, [0, [0, 19, false], null]]]], "where": [[false, 2, [0, [0, 5, false], null], "\"Robinson R-22\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4820", "db_id": "aircraft", "query": "select avg(t3.total_passengers) from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t1.aircraft = \"robinson r-22\"", "query_toks": ["SELECT", "avg", "(", "T3.Total_Passengers", ")", "FROM", "aircraft", "AS", "T1", "JOIN", "airport_aircraft", "AS", "T2", "ON", "T1.Aircraft_ID", "=", "T2.Aircraft_ID", "JOIN", "airport", "AS", "T3", "ON", "T2.Airport_ID", "=", "T3.Airport_ID", "WHERE", "T1.Aircraft", "=", "``", "Robinson", "R-22", "''"], "query_toks_no_value": ["select", "avg", "(", "t3", ".", "total_passengers", ")", "from", "aircraft", "as", "t1", "join", "airport_aircraft", "as", "t2", "on", "t1", ".", "aircraft_id", "=", "t2", ".", "aircraft_id", "join", "airport", "as", "t3", "on", "t2", ".", "airport_id", "=", "t3", ".", "airport_id", "where", "t1", ".", "aircraft", "=", "value"], "question": "What is the average total number of passengers for all airports that the aircraft \"Robinson R-22\" visits?", "question_toks": ["What", "is", "the", "average", "total", "number", "of", "passengers", "for", "all", "airports", "that", "the", "aircraft", "``", "Robinson", "R-22", "''", "visits", "?"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 4], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 4, false], null], [0, 28, false], null], "and", [false, 2, [0, [0, 27, false], null], [0, 17, false], null]]}, "select": [false, [[5, [0, [0, 19, false], null]]]], "where": [[false, 2, [0, [0, 5, false], null], "\"Robinson R-22\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1206", "db_id": "apartment_rentals", "query": "select min(bathroom_count) , max(bathroom_count) from apartments", "query_toks": ["SELECT", "min", "(", "bathroom_count", ")", ",", "max", "(", "bathroom_count", ")", "FROM", "Apartments"], "query_toks_no_value": ["select", "min", "(", "bathroom_count", ")", ",", "max", "(", "bathroom_count", ")", "from", "apartments"], "question": "What is the minimum and maximum number of bathrooms of all the apartments?", "question_toks": ["What", "is", "the", "minimum", "and", "maximum", "number", "of", "bathrooms", "of", "all", "the", "apartments", "?"], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[2, [0, [0, 12, false], null]], [1, [0, [0, 12, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1207", "db_id": "apartment_rentals", "query": "select min(bathroom_count) , max(bathroom_count) from apartments", "query_toks": ["SELECT", "min", "(", "bathroom_count", ")", ",", "max", "(", "bathroom_count", ")", "FROM", "Apartments"], "query_toks_no_value": ["select", "min", "(", "bathroom_count", ")", ",", "max", "(", "bathroom_count", ")", "from", "apartments"], "question": "Give me the minimum and maximum bathroom count among all the apartments.", "question_toks": ["Give", "me", "the", "minimum", "and", "maximum", "bathroom", "count", "among", "all", "the", "apartments", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[2, [0, [0, 12, false], null]], [1, [0, [0, 12, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1738", "db_id": "gymnast", "query": "select total_points from gymnast order by total_points desc", "query_toks": ["SELECT", "Total_Points", "FROM", "gymnast", "ORDER", "BY", "Total_Points", "DESC"], "query_toks_no_value": ["select", "total_points", "from", "gymnast", "order", "by", "total_points", "desc"], "question": "List the total points of gymnasts in descending order.", "question_toks": ["List", "the", "total", "points", "of", "gymnasts", "in", "descending", "order", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 8, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1739", "db_id": "gymnast", "query": "select total_points from gymnast order by total_points desc", "query_toks": ["SELECT", "Total_Points", "FROM", "gymnast", "ORDER", "BY", "Total_Points", "DESC"], "query_toks_no_value": ["select", "total_points", "from", "gymnast", "order", "by", "total_points", "desc"], "question": "What are the total points for all gymnasts, ordered by total points descending?", "question_toks": ["What", "are", "the", "total", "points", "for", "all", "gymnasts", ",", "ordered", "by", "total", "points", "descending", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 8, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1740", "db_id": "gymnast", "query": "select total_points from gymnast order by floor_exercise_points desc", "query_toks": ["SELECT", "Total_Points", "FROM", "gymnast", "ORDER", "BY", "Floor_Exercise_Points", "DESC"], "query_toks_no_value": ["select", "total_points", "from", "gymnast", "order", "by", "floor_exercise_points", "desc"], "question": "List the total points of gymnasts in descending order of floor exercise points.", "question_toks": ["List", "the", "total", "points", "of", "gymnasts", "in", "descending", "order", "of", "floor", "exercise", "points", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 2, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1741", "db_id": "gymnast", "query": "select total_points from gymnast order by floor_exercise_points desc", "query_toks": ["SELECT", "Total_Points", "FROM", "gymnast", "ORDER", "BY", "Floor_Exercise_Points", "DESC"], "query_toks_no_value": ["select", "total_points", "from", "gymnast", "order", "by", "floor_exercise_points", "desc"], "question": "What are the total points of gymnasts, ordered by their floor exercise points descending?", "question_toks": ["What", "are", "the", "total", "points", "of", "gymnasts", ",", "ordered", "by", "their", "floor", "exercise", "points", "descending", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 2, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1754", "db_id": "gymnast", "query": "select t1.total_points from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t2.age asc limit 1", "query_toks": ["SELECT", "T1.Total_Points", "FROM", "gymnast", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.Gymnast_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Age", "ASC", "LIMIT", "1"], "query_toks_no_value": ["select", "t1", ".", "total_points", "from", "gymnast", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "gymnast_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "age", "asc", "limit", "value"], "question": "What is the total point count of the youngest gymnast?", "question_toks": ["What", "is", "the", "total", "point", "count", "of", "the", "youngest", "gymnast", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 9, false], null]]}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["asc", [[0, [0, 11, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1755", "db_id": "gymnast", "query": "select t1.total_points from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t2.age asc limit 1", "query_toks": ["SELECT", "T1.Total_Points", "FROM", "gymnast", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.Gymnast_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Age", "ASC", "LIMIT", "1"], "query_toks_no_value": ["select", "t1", ".", "total_points", "from", "gymnast", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "gymnast_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "age", "asc", "limit", "value"], "question": "Return the total points of the gymnast with the lowest age.", "question_toks": ["Return", "the", "total", "points", "of", "the", "gymnast", "with", "the", "lowest", "age", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 9, false], null]]}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["asc", [[0, [0, 11, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1758", "db_id": "gymnast", "query": "select distinct t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id where t1.total_points > 57.5", "query_toks": ["SELECT", "DISTINCT", "T2.Hometown", "FROM", "gymnast", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.Gymnast_ID", "=", "T2.People_ID", "WHERE", "T1.Total_Points", ">", "57.5"], "query_toks_no_value": ["select", "distinct", "t2", ".", "hometown", "from", "gymnast", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "gymnast_id", "=", "t2", ".", "people_id", "where", "t1", ".", "total_points", ">", "value"], "question": "What are the distinct hometowns of gymnasts with total points more than 57.5?", "question_toks": ["What", "are", "the", "distinct", "hometowns", "of", "gymnasts", "with", "total", "points", "more", "than", "57.5", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 9, false], null]]}, "select": [true, [[0, [0, [0, 13, false], null]]]], "where": [[false, 3, [0, [0, 8, false], null], 57.5, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1759", "db_id": "gymnast", "query": "select distinct t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id where t1.total_points > 57.5", "query_toks": ["SELECT", "DISTINCT", "T2.Hometown", "FROM", "gymnast", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.Gymnast_ID", "=", "T2.People_ID", "WHERE", "T1.Total_Points", ">", "57.5"], "query_toks_no_value": ["select", "distinct", "t2", ".", "hometown", "from", "gymnast", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "gymnast_id", "=", "t2", ".", "people_id", "where", "t1", ".", "total_points", ">", "value"], "question": "Give the different hometowns of gymnasts that have a total point score of above 57.5.", "question_toks": ["Give", "the", "different", "hometowns", "of", "gymnasts", "that", "have", "a", "total", "point", "score", "of", "above", "57.5", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 9, false], null]]}, "select": [true, [[0, [0, [0, 13, false], null]]]], "where": [[false, 3, [0, [0, 8, false], null], 57.5, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1774", "db_id": "gymnast", "query": "select t2.age from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t1.total_points desc", "query_toks": ["SELECT", "T2.Age", "FROM", "gymnast", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.Gymnast_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Total_Points", "DESC"], "query_toks_no_value": ["select", "t2", ".", "age", "from", "gymnast", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "gymnast_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "total_points", "desc"], "question": "Show the ages of gymnasts in descending order of total points.", "question_toks": ["Show", "the", "ages", "of", "gymnasts", "in", "descending", "order", "of", "total", "points", "."], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 9, false], null]]}, "select": [false, [[0, [0, [0, 11, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 8, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1775", "db_id": "gymnast", "query": "select t2.age from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t1.total_points desc", "query_toks": ["SELECT", "T2.Age", "FROM", "gymnast", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.Gymnast_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Total_Points", "DESC"], "query_toks_no_value": ["select", "t2", ".", "age", "from", "gymnast", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "gymnast_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "total_points", "desc"], "question": "What are the ages of the gymnasts, ordered descending by their total points?", "question_toks": ["What", "are", "the", "ages", "of", "the", "gymnasts", ",", "ordered", "descending", "by", "their", "total", "points", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 1, false], null], [0, 9, false], null]]}, "select": [false, [[0, [0, [0, 11, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 8, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4902", "db_id": "store_product", "query": "select max_page_size from product group by max_page_size having count(*) > 3", "query_toks": ["SELECT", "max_page_size", "FROM", "product", "GROUP", "BY", "max_page_size", "HAVING", "count", "(", "*", ")", ">", "3"], "query_toks_no_value": ["select", "max_page_size", "from", "product", "group", "by", "max_page_size", "having", "count", "(", "*", ")", ">", "value"], "question": "Find the list of page size which have more than 3 product listed", "question_toks": ["Find", "the", "list", "of", "page", "size", "which", "have", "more", "than", "3", "product", "listed"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 6, false], null]]]], "where": [], "groupBy": [[0, 6, false]], "having": [[false, 3, [0, [3, 0, false], null], 3.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4903", "db_id": "store_product", "query": "select max_page_size from product group by max_page_size having count(*) > 3", "query_toks": ["SELECT", "max_page_size", "FROM", "product", "GROUP", "BY", "max_page_size", "HAVING", "count", "(", "*", ")", ">", "3"], "query_toks_no_value": ["select", "max_page_size", "from", "product", "group", "by", "max_page_size", "having", "count", "(", "*", ")", ">", "value"], "question": "What is the maximum page size for everything that has more than 3 products listed?", "question_toks": ["What", "is", "the", "maximum", "page", "size", "for", "everything", "that", "has", "more", "than", "3", "products", "listed", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 6, false], null]]]], "where": [], "groupBy": [[0, 6, false]], "having": [[false, 3, [0, [3, 0, false], null], 3.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4936", "db_id": "store_product", "query": "select max_page_size from product group by max_page_size order by count(*) desc limit 1", "query_toks": ["SELECT", "max_page_size", "FROM", "product", "GROUP", "BY", "max_page_size", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "max_page_size", "from", "product", "group", "by", "max_page_size", "order", "by", "count", "(", "*", ")", "desc", "limit", "value"], "question": "Find the most prominent max page size among all the products.", "question_toks": ["Find", "the", "most", "prominent", "max", "page", "size", "among", "all", "the", "products", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 6, false], null]]]], "where": [], "groupBy": [[0, 6, false]], "having": [], "orderBy": ["desc", [[0, [3, 0, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_4937", "db_id": "store_product", "query": "select max_page_size from product group by max_page_size order by count(*) desc limit 1", "query_toks": ["SELECT", "max_page_size", "FROM", "product", "GROUP", "BY", "max_page_size", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "max_page_size", "from", "product", "group", "by", "max_page_size", "order", "by", "count", "(", "*", ")", "desc", "limit", "value"], "question": "What is the most common maximum page size?", "question_toks": ["What", "is", "the", "most", "common", "maximum", "page", "size", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 6, false], null]]]], "where": [], "groupBy": [[0, 6, false]], "having": [], "orderBy": ["desc", [[0, [3, 0, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6602", "db_id": "train_station", "query": "select name , total_passengers from station where location != 'london'", "query_toks": ["SELECT", "name", ",", "total_passengers", "FROM", "station", "WHERE", "LOCATION", "!", "=", "'London", "'"], "query_toks_no_value": ["select", "name", ",", "total_passengers", "from", "station", "where", "location", "!", "=", "value"], "question": "Show the names and total passengers for all train stations not in London.", "question_toks": ["Show", "the", "names", "and", "total", "passengers", "for", "all", "train", "stations", "not", "in", "London", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 2, false], null]], [0, [0, [0, 5, false], null]]]], "where": [[false, 7, [0, [0, 6, false], null], "\"London\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6603", "db_id": "train_station", "query": "select name , main_services from station order by total_passengers desc limit 3", "query_toks": ["SELECT", "name", ",", "main_services", "FROM", "station", "ORDER", "BY", "total_passengers", "DESC", "LIMIT", "3"], "query_toks_no_value": ["select", "name", ",", "main_services", "from", "station", "order", "by", "total_passengers", "desc", "limit", "value"], "question": "Show the names and main services for train stations that have the top three total number of passengers.", "question_toks": ["Show", "the", "names", "and", "main", "services", "for", "train", "stations", "that", "have", "the", "top", "three", "total", "number", "of", "passengers", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 2, false], null]], [0, [0, [0, 7, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 5, false], null]]], "limit": 3, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_6604", "db_id": "train_station", "query": "select avg(total_passengers) , max(total_passengers) from station where location = 'london' or location = 'glasgow'", "query_toks": ["SELECT", "avg", "(", "total_passengers", ")", ",", "max", "(", "total_passengers", ")", "FROM", "station", "WHERE", "LOCATION", "=", "'London", "'", "OR", "LOCATION", "=", "'Glasgow", "'"], "query_toks_no_value": ["select", "avg", "(", "total_passengers", ")", ",", "max", "(", "total_passengers", ")", "from", "station", "where", "location", "=", "value", "or", "location", "=", "value"], "question": "What is the average and maximum number of total passengers for train stations in London or Glasgow?", "question_toks": ["What", "is", "the", "average", "and", "maximum", "number", "of", "total", "passengers", "for", "train", "stations", "in", "London", "or", "Glasgow", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[5, [0, [0, 5, false], null]], [1, [0, [0, 5, false], null]]]], "where": [[false, 2, [0, [0, 6, false], null], "\"London\"", null], "or", [false, 2, [0, [0, 6, false], null], "\"Glasgow\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5848", "db_id": "tracking_share_transactions", "query": "select date_of_transaction , share_count from transactions", "query_toks": ["SELECT", "date_of_transaction", ",", "share_count", "FROM", "TRANSACTIONS"], "query_toks_no_value": ["select", "date_of_transaction", ",", "share_count", "from", "transactions"], "question": "Show all date and share count of transactions.", "question_toks": ["Show", "all", "date", "and", "share", "count", "of", "transactions", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 11, false], null]], [0, [0, [0, 13, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_5854", "db_id": "tracking_share_transactions", "query": "select min(amount_of_transaction) from transactions where transaction_type_code = \"pur\" and share_count > 50", "query_toks": ["SELECT", "min", "(", "amount_of_transaction", ")", "FROM", "TRANSACTIONS", "WHERE", "transaction_type_code", "=", "``", "PUR", "''", "AND", "share_count", ">", "50"], "query_toks_no_value": ["select", "min", "(", "amount_of_transaction", ")", "from", "transactions", "where", "transaction_type_code", "=", "value", "and", "share_count", ">", "value"], "question": "Show the minimum amount of transactions whose type code is \"PUR\" and whose share count is bigger than 50.", "question_toks": ["Show", "the", "minimum", "amount", "of", "transactions", "whose", "type", "code", "is", "``", "PUR", "''", "and", "whose", "share", "count", "is", "bigger", "than", "50", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[2, [0, [0, 12, false], null]]]], "where": [[false, 2, [0, [0, 10, false], null], "\"PUR\"", null], "and", [false, 3, [0, [0, 13, false], null], 50.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0109", "db_id": "bike_1", "query": "select date from weather where max_temperature_f > 85", "query_toks": ["SELECT", "date", "FROM", "weather", "WHERE", "max_temperature_f", ">", "85"], "query_toks_no_value": ["select", "date", "from", "weather", "where", "max_temperature_f", ">", "value"], "question": "Give me the dates when the max temperature was higher than 85.", "question_toks": ["Give", "me", "the", "dates", "when", "the", "max", "temperature", "was", "higher", "than", "85", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]]]], "where": [[false, 3, [0, [0, 24, false], null], 85.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0110", "db_id": "bike_1", "query": "select date from weather where max_temperature_f > 85", "query_toks": ["SELECT", "date", "FROM", "weather", "WHERE", "max_temperature_f", ">", "85"], "query_toks_no_value": ["select", "date", "from", "weather", "where", "max_temperature_f", ">", "value"], "question": "What are the dates with a maximum temperature higher than 85?", "question_toks": ["What", "are", "the", "dates", "with", "a", "maximum", "temperature", "higher", "than", "85", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]]]], "where": [[false, 3, [0, [0, 24, false], null], 85.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0123", "db_id": "bike_1", "query": "select zip_code , avg(mean_temperature_f) from weather where date like \"8/%\" group by zip_code", "query_toks": ["SELECT", "zip_code", ",", "avg", "(", "mean_temperature_f", ")", "FROM", "weather", "WHERE", "date", "LIKE", "``", "8/", "%", "''", "GROUP", "BY", "zip_code"], "query_toks_no_value": ["select", "zip_code", ",", "avg", "(", "mean_temperature_f", ")", "from", "weather", "where", "date", "like", "value", "group", "by", "zip_code"], "question": "For each zip code, return the average mean temperature of August there.", "question_toks": ["For", "each", "zip", "code", ",", "return", "the", "average", "mean", "temperature", "of", "August", "there", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]], [5, [0, [0, 25, false], null]]]], "where": [[false, 9, [0, [0, 23, false], null], "\"8/%\"", null]], "groupBy": [[0, 46, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0124", "db_id": "bike_1", "query": "select zip_code , avg(mean_temperature_f) from weather where date like \"8/%\" group by zip_code", "query_toks": ["SELECT", "zip_code", ",", "avg", "(", "mean_temperature_f", ")", "FROM", "weather", "WHERE", "date", "LIKE", "``", "8/", "%", "''", "GROUP", "BY", "zip_code"], "query_toks_no_value": ["select", "zip_code", ",", "avg", "(", "mean_temperature_f", ")", "from", "weather", "where", "date", "like", "value", "group", "by", "zip_code"], "question": "For each zip code, what is the average mean temperature for all dates that start with '8'?", "question_toks": ["For", "each", "zip", "code", ",", "what", "is", "the", "average", "mean", "temperature", "for", "all", "dates", "that", "start", "with", "'8", "'", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]], [5, [0, [0, 25, false], null]]]], "where": [[false, 9, [0, [0, 23, false], null], "\"8/%\"", null]], "groupBy": [[0, 46, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0137", "db_id": "bike_1", "query": "select count(*) from weather where mean_humidity > 50 and mean_visibility_miles > 8", "query_toks": ["SELECT", "COUNT", "(", "*", ")", "FROM", "weather", "WHERE", "mean_humidity", ">", "50", "AND", "mean_visibility_miles", ">", "8"], "query_toks_no_value": ["select", "count", "(", "*", ")", "from", "weather", "where", "mean_humidity", ">", "value", "and", "mean_visibility_miles", ">", "value"], "question": "How many days had both mean humidity above 50 and mean visibility above 8?", "question_toks": ["How", "many", "days", "had", "both", "mean", "humidity", "above", "50", "and", "mean", "visibility", "above", "8", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[3, [0, [0, 0, false], null]]]], "where": [[false, 3, [0, [0, 31, false], null], 50.0, null], "and", [false, 3, [0, [0, 37, false], null], 8.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0138", "db_id": "bike_1", "query": "select count(*) from weather where mean_humidity > 50 and mean_visibility_miles > 8", "query_toks": ["SELECT", "COUNT", "(", "*", ")", "FROM", "weather", "WHERE", "mean_humidity", ">", "50", "AND", "mean_visibility_miles", ">", "8"], "query_toks_no_value": ["select", "count", "(", "*", ")", "from", "weather", "where", "mean_humidity", ">", "value", "and", "mean_visibility_miles", ">", "value"], "question": "What is the number of days that had an average humity above 50 and an average visibility above 8?", "question_toks": ["What", "is", "the", "number", "of", "days", "that", "had", "an", "average", "humity", "above", "50", "and", "an", "average", "visibility", "above", "8", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[3, [0, [0, 0, false], null]]]], "where": [[false, 3, [0, [0, 31, false], null], 50.0, null], "and", [false, 3, [0, [0, 37, false], null], 8.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0147", "db_id": "bike_1", "query": "select zip_code from weather group by zip_code order by avg(mean_sea_level_pressure_inches) limit 1", "query_toks": ["SELECT", "zip_code", "FROM", "weather", "GROUP", "BY", "zip_code", "ORDER", "BY", "avg", "(", "mean_sea_level_pressure_inches", ")", "LIMIT", "1"], "query_toks_no_value": ["select", "zip_code", "from", "weather", "group", "by", "zip_code", "order", "by", "avg", "(", "mean_sea_level_pressure_inches", ")", "limit", "value"], "question": "What is the zip code in which the average mean sea level pressure is the lowest?", "question_toks": ["What", "is", "the", "zip", "code", "in", "which", "the", "average", "mean", "sea", "level", "pressure", "is", "the", "lowest", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [], "orderBy": ["asc", [[0, [5, 34, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0148", "db_id": "bike_1", "query": "select zip_code from weather group by zip_code order by avg(mean_sea_level_pressure_inches) limit 1", "query_toks": ["SELECT", "zip_code", "FROM", "weather", "GROUP", "BY", "zip_code", "ORDER", "BY", "avg", "(", "mean_sea_level_pressure_inches", ")", "LIMIT", "1"], "query_toks_no_value": ["select", "zip_code", "from", "weather", "group", "by", "zip_code", "order", "by", "avg", "(", "mean_sea_level_pressure_inches", ")", "limit", "value"], "question": "What is the zip code that has the lowest average mean sea level pressure?", "question_toks": ["What", "is", "the", "zip", "code", "that", "has", "the", "lowest", "average", "mean", "sea", "level", "pressure", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [], "orderBy": ["asc", [[0, [5, 34, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0153", "db_id": "bike_1", "query": "select date , zip_code from weather where max_temperature_f >= 80", "query_toks": ["SELECT", "date", ",", "zip_code", "FROM", "weather", "WHERE", "max_temperature_f", ">", "=", "80"], "query_toks_no_value": ["select", "date", ",", "zip_code", "from", "weather", "where", "max_temperature_f", ">", "=", "value"], "question": "When and in what zip code did max temperature reach 80?", "question_toks": ["When", "and", "in", "what", "zip", "code", "did", "max", "temperature", "reach", "80", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]], [0, [0, [0, 46, false], null]]]], "where": [[false, 5, [0, [0, 24, false], null], 80.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0154", "db_id": "bike_1", "query": "select date , zip_code from weather where max_temperature_f >= 80", "query_toks": ["SELECT", "date", ",", "zip_code", "FROM", "weather", "WHERE", "max_temperature_f", ">", "=", "80"], "query_toks_no_value": ["select", "date", ",", "zip_code", "from", "weather", "where", "max_temperature_f", ">", "=", "value"], "question": "What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?", "question_toks": ["What", "zip", "codes", "have", "a", "station", "with", "a", "max", "temperature", "greater", "than", "or", "equal", "to", "80", "and", "when", "did", "it", "reach", "that", "temperature", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]], [0, [0, [0, 46, false], null]]]], "where": [[false, 5, [0, [0, 24, false], null], 80.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0155", "db_id": "bike_1", "query": "select t1.id from trip as t1 join weather as t2 on t1.zip_code = t2.zip_code group by t2.zip_code having avg(t2.mean_temperature_f) > 60", "query_toks": ["SELECT", "T1.id", "FROM", "trip", "AS", "T1", "JOIN", "weather", "AS", "T2", "ON", "T1.zip_code", "=", "T2.zip_code", "GROUP", "BY", "T2.zip_code", "HAVING", "avg", "(", "T2.mean_temperature_f", ")", ">", "60"], "query_toks_no_value": ["select", "t1", ".", "id", "from", "trip", "as", "t1", "join", "weather", "as", "t2", "on", "t1", ".", "zip_code", "=", "t2", ".", "zip_code", "group", "by", "t2", ".", "zip_code", "having", "avg", "(", "t2", ".", "mean_temperature_f", ")", ">", "value"], "question": "Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.", "question_toks": ["Give", "me", "ids", "for", "all", "the", "trip", "that", "took", "place", "in", "a", "zip", "code", "area", "with", "average", "mean", "temperature", "above", "60", "."], "sql": {"from": {"table_units": [["table_unit", 2], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 22, false], null], [0, 46, false], null]]}, "select": [false, [[0, [0, [0, 12, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [[false, 3, [0, [5, 25, false], null], 60.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0156", "db_id": "bike_1", "query": "select t1.id from trip as t1 join weather as t2 on t1.zip_code = t2.zip_code group by t2.zip_code having avg(t2.mean_temperature_f) > 60", "query_toks": ["SELECT", "T1.id", "FROM", "trip", "AS", "T1", "JOIN", "weather", "AS", "T2", "ON", "T1.zip_code", "=", "T2.zip_code", "GROUP", "BY", "T2.zip_code", "HAVING", "avg", "(", "T2.mean_temperature_f", ")", ">", "60"], "query_toks_no_value": ["select", "t1", ".", "id", "from", "trip", "as", "t1", "join", "weather", "as", "t2", "on", "t1", ".", "zip_code", "=", "t2", ".", "zip_code", "group", "by", "t2", ".", "zip_code", "having", "avg", "(", "t2", ".", "mean_temperature_f", ")", ">", "value"], "question": "For each zip code, find the ids of all trips that have a higher average mean temperature above 60?", "question_toks": ["For", "each", "zip", "code", ",", "find", "the", "ids", "of", "all", "trips", "that", "have", "a", "higher", "average", "mean", "temperature", "above", "60", "?"], "sql": {"from": {"table_units": [["table_unit", 2], ["table_unit", 3]], "conds": [[false, 2, [0, [0, 22, false], null], [0, 46, false], null]]}, "select": [false, [[0, [0, [0, 12, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [[false, 3, [0, [5, 25, false], null], 60.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0157", "db_id": "bike_1", "query": "select zip_code , count(*) from weather where max_wind_speed_mph >= 25 group by zip_code", "query_toks": ["SELECT", "zip_code", ",", "count", "(", "*", ")", "FROM", "weather", "WHERE", "max_wind_Speed_mph", ">", "=", "25", "GROUP", "BY", "zip_code"], "query_toks_no_value": ["select", "zip_code", ",", "count", "(", "*", ")", "from", "weather", "where", "max_wind_speed_mph", ">", "=", "value", "group", "by", "zip_code"], "question": "For each zip code, return how many times max wind speed reached 25?", "question_toks": ["For", "each", "zip", "code", ",", "return", "how", "many", "times", "max", "wind", "speed", "reached", "25", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]], [3, [0, [0, 0, false], null]]]], "where": [[false, 5, [0, [0, 39, false], null], 25.0, null]], "groupBy": [[0, 46, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0158", "db_id": "bike_1", "query": "select zip_code , count(*) from weather where max_wind_speed_mph >= 25 group by zip_code", "query_toks": ["SELECT", "zip_code", ",", "count", "(", "*", ")", "FROM", "weather", "WHERE", "max_wind_Speed_mph", ">", "=", "25", "GROUP", "BY", "zip_code"], "query_toks_no_value": ["select", "zip_code", ",", "count", "(", "*", ")", "from", "weather", "where", "max_wind_speed_mph", ">", "=", "value", "group", "by", "zip_code"], "question": "For each zip code, how many times has the maximum wind speed reached 25 mph?", "question_toks": ["For", "each", "zip", "code", ",", "how", "many", "times", "has", "the", "maximum", "wind", "speed", "reached", "25", "mph", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]], [3, [0, [0, 0, false], null]]]], "where": [[false, 5, [0, [0, 39, false], null], 25.0, null]], "groupBy": [[0, 46, false]], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0159", "db_id": "bike_1", "query": "select date , zip_code from weather where min_dew_point_f < (select min(min_dew_point_f) from weather where zip_code = 94107)", "query_toks": ["SELECT", "date", ",", "zip_code", "FROM", "weather", "WHERE", "min_dew_point_f", "<", "(", "SELECT", "min", "(", "min_dew_point_f", ")", "FROM", "weather", "WHERE", "zip_code", "=", "94107", ")"], "query_toks_no_value": ["select", "date", ",", "zip_code", "from", "weather", "where", "min_dew_point_f", "<", "(", "select", "min", "(", "min_dew_point_f", ")", "from", "weather", "where", "zip_code", "=", "value", ")"], "question": "On which day and in which zip code was the min dew point lower than any day in zip code 94107?", "question_toks": ["On", "which", "day", "and", "in", "which", "zip", "code", "was", "the", "min", "dew", "point", "lower", "than", "any", "day", "in", "zip", "code", "94107", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]], [0, [0, [0, 46, false], null]]]], "where": [[false, 4, [0, [0, 29, false], null], {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[2, [0, [0, 29, false], null]]]], "where": [[false, 2, [0, [0, 46, false], null], 94107.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0160", "db_id": "bike_1", "query": "select date , zip_code from weather where min_dew_point_f < (select min(min_dew_point_f) from weather where zip_code = 94107)", "query_toks": ["SELECT", "date", ",", "zip_code", "FROM", "weather", "WHERE", "min_dew_point_f", "<", "(", "SELECT", "min", "(", "min_dew_point_f", ")", "FROM", "weather", "WHERE", "zip_code", "=", "94107", ")"], "query_toks_no_value": ["select", "date", ",", "zip_code", "from", "weather", "where", "min_dew_point_f", "<", "(", "select", "min", "(", "min_dew_point_f", ")", "from", "weather", "where", "zip_code", "=", "value", ")"], "question": "Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?", "question_toks": ["Which", "days", "had", "a", "minimum", "dew", "point", "smaller", "than", "any", "day", "in", "zip", "code", "94107", ",", "and", "in", "which", "zip", "codes", "were", "those", "measurements", "taken", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]], [0, [0, [0, 46, false], null]]]], "where": [[false, 4, [0, [0, 29, false], null], {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[2, [0, [0, 29, false], null]]]], "where": [[false, 2, [0, [0, 46, false], null], 94107.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0175", "db_id": "bike_1", "query": "select date , mean_temperature_f , mean_humidity from weather order by max_gust_speed_mph desc limit 3", "query_toks": ["SELECT", "date", ",", "mean_temperature_f", ",", "mean_humidity", "FROM", "weather", "ORDER", "BY", "max_gust_speed_mph", "DESC", "LIMIT", "3"], "query_toks_no_value": ["select", "date", ",", "mean_temperature_f", ",", "mean_humidity", "from", "weather", "order", "by", "max_gust_speed_mph", "desc", "limit", "value"], "question": "What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?", "question_toks": ["What", "are", "the", "date", ",", "mean", "temperature", "and", "mean", "humidity", "for", "the", "top", "3", "days", "with", "the", "largest", "max", "gust", "speeds", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]], [0, [0, [0, 25, false], null]], [0, [0, [0, 31, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 41, false], null]]], "limit": 3, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0176", "db_id": "bike_1", "query": "select date , mean_temperature_f , mean_humidity from weather order by max_gust_speed_mph desc limit 3", "query_toks": ["SELECT", "date", ",", "mean_temperature_f", ",", "mean_humidity", "FROM", "weather", "ORDER", "BY", "max_gust_speed_mph", "DESC", "LIMIT", "3"], "query_toks_no_value": ["select", "date", ",", "mean_temperature_f", ",", "mean_humidity", "from", "weather", "order", "by", "max_gust_speed_mph", "desc", "limit", "value"], "question": "What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?", "question_toks": ["What", "is", "the", "date", ",", "average", "temperature", "and", "mean", "humidity", "for", "the", "days", "with", "the", "3", "largest", "maximum", "gust", "speeds", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]], [0, [0, [0, 25, false], null]], [0, [0, [0, 31, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 41, false], null]]], "limit": 3, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0181", "db_id": "bike_1", "query": "select zip_code from weather group by zip_code having avg(mean_visibility_miles) < 10", "query_toks": ["SELECT", "zip_code", "FROM", "weather", "GROUP", "BY", "zip_code", "HAVING", "avg", "(", "mean_visibility_miles", ")", "<", "10"], "query_toks_no_value": ["select", "zip_code", "from", "weather", "group", "by", "zip_code", "having", "avg", "(", "mean_visibility_miles", ")", "<", "value"], "question": "Find the zip code in which the average mean visibility is lower than 10.", "question_toks": ["Find", "the", "zip", "code", "in", "which", "the", "average", "mean", "visibility", "is", "lower", "than", "10", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [[false, 4, [0, [5, 37, false], null], 10.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0182", "db_id": "bike_1", "query": "select zip_code from weather group by zip_code having avg(mean_visibility_miles) < 10", "query_toks": ["SELECT", "zip_code", "FROM", "weather", "GROUP", "BY", "zip_code", "HAVING", "avg", "(", "mean_visibility_miles", ")", "<", "10"], "query_toks_no_value": ["select", "zip_code", "from", "weather", "group", "by", "zip_code", "having", "avg", "(", "mean_visibility_miles", ")", "<", "value"], "question": "For each zip code, select all those that have an average mean visiblity below 10.", "question_toks": ["For", "each", "zip", "code", ",", "select", "all", "those", "that", "have", "an", "average", "mean", "visiblity", "below", "10", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [[false, 4, [0, [5, 37, false], null], 10.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0199", "db_id": "bike_1", "query": "select date from weather where mean_sea_level_pressure_inches between 30.3 and 31", "query_toks": ["SELECT", "date", "FROM", "weather", "WHERE", "mean_sea_level_pressure_inches", "BETWEEN", "30.3", "AND", "31"], "query_toks_no_value": ["select", "date", "from", "weather", "where", "mean_sea_level_pressure_inches", "between", "value", "and", "value"], "question": "What are the dates in which the mean sea level pressure was between 30.3 and 31?", "question_toks": ["What", "are", "the", "dates", "in", "which", "the", "mean", "sea", "level", "pressure", "was", "between", "30.3", "and", "31", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 23, false], null]]]], "where": [[false, 1, [0, [0, 34, false], null], 30.3, 31.0]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1151", "db_id": "body_builder", "query": "select total from body_builder order by total asc", "query_toks": ["SELECT", "Total", "FROM", "body_builder", "ORDER", "BY", "Total", "ASC"], "query_toks_no_value": ["select", "total", "from", "body_builder", "order", "by", "total", "asc"], "question": "List the total scores of body builders in ascending order.", "question_toks": ["List", "the", "total", "scores", "of", "body", "builders", "in", "ascending", "order", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 5, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["asc", [[0, [0, 5, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1154", "db_id": "body_builder", "query": "select clean_jerk from body_builder order by total desc limit 1", "query_toks": ["SELECT", "Clean_Jerk", "FROM", "body_builder", "ORDER", "BY", "Total", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "clean_jerk", "from", "body_builder", "order", "by", "total", "desc", "limit", "value"], "question": "What are the clean and jerk score of the body builder with the highest total score?", "question_toks": ["What", "are", "the", "clean", "and", "jerk", "score", "of", "the", "body", "builder", "with", "the", "highest", "total", "score", "?"], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 4, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 5, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1157", "db_id": "body_builder", "query": "select t2.name from body_builder as t1 join people as t2 on t1.people_id = t2.people_id where t1.total > 300", "query_toks": ["SELECT", "T2.Name", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T1.Total", ">", "300"], "query_toks_no_value": ["select", "t2", ".", "name", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t1", ".", "total", ">", "value"], "question": "What are the names of body builders whose total score is higher than 300?", "question_toks": ["What", "are", "the", "names", "of", "body", "builders", "whose", "total", "score", "is", "higher", "than", "300", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 2, false], null], [0, 6, false], null]]}, "select": [false, [[0, [0, [0, 7, false], null]]]], "where": [[false, 3, [0, [0, 5, false], null], 300.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1159", "db_id": "body_builder", "query": "select t2.birth_date , t2.birth_place from body_builder as t1 join people as t2 on t1.people_id = t2.people_id order by t1.total desc limit 1", "query_toks": ["SELECT", "T2.Birth_Date", ",", "T2.Birth_Place", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Total", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "t2", ".", "birth_date", ",", "t2", ".", "birth_place", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "total", "desc", "limit", "value"], "question": "What are the birth date and birth place of the body builder with the highest total points?", "question_toks": ["What", "are", "the", "birth", "date", "and", "birth", "place", "of", "the", "body", "builder", "with", "the", "highest", "total", "points", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 2, false], null], [0, 6, false], null]]}, "select": [false, [[0, [0, [0, 10, false], null]], [0, [0, [0, 11, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 5, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1160", "db_id": "body_builder", "query": "select t2.height from body_builder as t1 join people as t2 on t1.people_id = t2.people_id where t1.total < 315", "query_toks": ["SELECT", "T2.Height", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T1.Total", "<", "315"], "query_toks_no_value": ["select", "t2", ".", "height", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t1", ".", "total", "<", "value"], "question": "What are the heights of body builders with total score smaller than 315?", "question_toks": ["What", "are", "the", "heights", "of", "body", "builders", "with", "total", "score", "smaller", "than", "315", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 2, false], null], [0, 6, false], null]]}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [[false, 4, [0, [0, 5, false], null], 315.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1161", "db_id": "body_builder", "query": "select avg(t1.total) from body_builder as t1 join people as t2 on t1.people_id = t2.people_id where t2.height > 200", "query_toks": ["SELECT", "avg", "(", "T1.Total", ")", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T2.Height", ">", "200"], "query_toks_no_value": ["select", "avg", "(", "t1", ".", "total", ")", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t2", ".", "height", ">", "value"], "question": "What is the average total score of body builders with height bigger than 200?", "question_toks": ["What", "is", "the", "average", "total", "score", "of", "body", "builders", "with", "height", "bigger", "than", "200", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 2, false], null], [0, 6, false], null]]}, "select": [false, [[5, [0, [0, 5, false], null]]]], "where": [[false, 3, [0, [0, 8, false], null], 200.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1162", "db_id": "body_builder", "query": "select t2.name from body_builder as t1 join people as t2 on t1.people_id = t2.people_id order by t1.total desc", "query_toks": ["SELECT", "T2.Name", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Total", "DESC"], "query_toks_no_value": ["select", "t2", ".", "name", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "total", "desc"], "question": "What are the names of body builders in descending order of total scores?", "question_toks": ["What", "are", "the", "names", "of", "body", "builders", "in", "descending", "order", "of", "total", "scores", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 2, false], null], [0, 6, false], null]]}, "select": [false, [[0, [0, [0, 7, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["desc", [[0, [0, 5, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1172", "db_id": "body_builder", "query": "select t1.total from body_builder as t1 join people as t2 on t1.people_id = t2.people_id where t2.birth_date like \"%january%\";", "query_toks": ["SELECT", "T1.total", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.people_id", "=", "T2.people_id", "WHERE", "T2.Birth_Date", "LIKE", "``", "%", "January", "%", "''", ";"], "query_toks_no_value": ["select", "t1", ".", "total", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t2", ".", "birth_date", "like", "value"], "question": "What are the total scores of the body builders whose birthday contains the string \"January\" ?", "question_toks": ["What", "are", "the", "total", "scores", "of", "the", "body", "builders", "whose", "birthday", "contains", "the", "string", "``", "January", "''", "?"], "sql": {"from": {"table_units": [["table_unit", 0], ["table_unit", 1]], "conds": [[false, 2, [0, [0, 2, false], null], [0, 6, false], null]]}, "select": [false, [[0, [0, [0, 5, false], null]]]], "where": [[false, 9, [0, [0, 10, false], null], "\"%January%\"", null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0857", "db_id": "chinook_1", "query": "select lastname from customer except select t1.lastname from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t2.total > 20", "query_toks": ["SELECT", "LastName", "FROM", "CUSTOMER", "EXCEPT", "SELECT", "T1.LastName", "FROM", "CUSTOMER", "AS", "T1", "JOIN", "Invoice", "AS", "T2", "ON", "T1.CustomerId", "=", "T2.CustomerId", "WHERE", "T2.total", ">", "20"], "query_toks_no_value": ["select", "lastname", "from", "customer", "except", "select", "t1", ".", "lastname", "from", "customer", "as", "t1", "join", "invoice", "as", "t2", "on", "t1", ".", "customerid", "=", "t2", ".", "customerid", "where", "t2", ".", "total", ">", "value"], "question": "Find all the customer last names that do not have invoice totals larger than 20.", "question_toks": ["Find", "all", "the", "customer", "last", "names", "that", "do", "not", "have", "invoice", "totals", "larger", "than", "20", "."], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": {"from": {"table_units": [["table_unit", 2], ["table_unit", 5]], "conds": [[false, 2, [0, [0, 6, false], null], [0, 37, false], null]]}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [[false, 3, [0, [0, 44, false], null], 20.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0858", "db_id": "chinook_1", "query": "select lastname from customer except select t1.lastname from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t2.total > 20", "query_toks": ["SELECT", "LastName", "FROM", "CUSTOMER", "EXCEPT", "SELECT", "T1.LastName", "FROM", "CUSTOMER", "AS", "T1", "JOIN", "Invoice", "AS", "T2", "ON", "T1.CustomerId", "=", "T2.CustomerId", "WHERE", "T2.total", ">", "20"], "query_toks_no_value": ["select", "lastname", "from", "customer", "except", "select", "t1", ".", "lastname", "from", "customer", "as", "t1", "join", "invoice", "as", "t2", "on", "t1", ".", "customerid", "=", "t2", ".", "customerid", "where", "t2", ".", "total", ">", "value"], "question": "What are the last names of customers without invoice totals exceeding 20?", "question_toks": ["What", "are", "the", "last", "names", "of", "customers", "without", "invoice", "totals", "exceeding", "20", "?"], "sql": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": {"from": {"table_units": [["table_unit", 2], ["table_unit", 5]], "conds": [[false, 2, [0, [0, 6, false], null], [0, 37, false], null]]}, "select": [false, [[0, [0, [0, 8, false], null]]]], "where": [[false, 3, [0, [0, 44, false], null], 20.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0018", "db_id": "farm", "query": "select total_horses from farm order by total_horses asc", "query_toks": ["SELECT", "Total_Horses", "FROM", "farm", "ORDER", "BY", "Total_Horses", "ASC"], "query_toks_no_value": ["select", "total_horses", "from", "farm", "order", "by", "total_horses", "asc"], "question": "List the total number of horses on farms in ascending order.", "question_toks": ["List", "the", "total", "number", "of", "horses", "on", "farms", "in", "ascending", "order", "."], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[0, [0, [0, 9, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["asc", [[0, [0, 9, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_0019", "db_id": "farm", "query": "select total_horses from farm order by total_horses asc", "query_toks": ["SELECT", "Total_Horses", "FROM", "farm", "ORDER", "BY", "Total_Horses", "ASC"], "query_toks_no_value": ["select", "total_horses", "from", "farm", "order", "by", "total_horses", "asc"], "question": "What is the total horses record for each farm, sorted ascending?", "question_toks": ["What", "is", "the", "total", "horses", "record", "for", "each", "farm", ",", "sorted", "ascending", "?"], "sql": {"from": {"table_units": [["table_unit", 1]], "conds": []}, "select": [false, [[0, [0, [0, 9, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": ["asc", [[0, [0, 9, false], null]]], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "train_1289", "db_id": "game_injury", "query": "select name , average_attendance , total_attendance from stadium except select t2.name , t2.average_attendance , t2.total_attendance from game as t1 join stadium as t2 on t1.stadium_id = t2.id join injury_accident as t3 on t1.id = t3.game_id", "query_toks": ["SELECT", "name", ",", "average_attendance", ",", "total_attendance", "FROM", "stadium", "EXCEPT", "SELECT", "T2.name", ",", "T2.average_attendance", ",", "T2.total_attendance", "FROM", "game", "AS", "T1", "JOIN", "stadium", "AS", "T2", "ON", "T1.stadium_id", "=", "T2.id", "JOIN", "injury_accident", "AS", "T3", "ON", "T1.id", "=", "T3.game_id"], "query_toks_no_value": ["select", "name", ",", "average_attendance", ",", "total_attendance", "from", "stadium", "except", "select", "t2", ".", "name", ",", "t2", ".", "average_attendance", ",", "t2", ".", "total_attendance", "from", "game", "as", "t1", "join", "stadium", "as", "t2", "on", "t1", ".", "stadium_id", "=", "t2", ".", "id", "join", "injury_accident", "as", "t3", "on", "t1", ".", "id", "=", "t3", ".", "game_id"], "question": "Show the name, average attendance, total attendance for stadiums where no accidents happened.", "question_toks": ["Show", "the", "name", ",", "average", "attendance", ",", "total", "attendance", "for", "stadiums", "where", "no", "accidents", "happened", "."], "sql": {"from": {"table_units": [["table_unit", 0]], "conds": []}, "select": [false, [[0, [0, [0, 2, false], null]], [0, [0, [0, 4, false], null]], [0, [0, [0, 5, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": {"from": {"table_units": [["table_unit", 1], ["table_unit", 0], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 7, false], null], [0, 1, false], null], "and", [false, 2, [0, [0, 8, false], null], [0, 15, false], null]]}, "select": [false, [[0, [0, [0, 2, false], null]], [0, [0, [0, 4, false], null]], [0, [0, [0, 5, false], null]]]], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_TRAIN", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0420", "db_id": "museum_visit", "query": "select t2.visitor_id , t1.name , t1.level_of_membership from visitor as t1 join visit as t2 on t1.id = t2.visitor_id group by t2.visitor_id order by sum(t2.total_spent) desc limit 1", "query_toks": ["SELECT", "t2.visitor_id", ",", "t1.name", ",", "t1.Level_of_membership", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "GROUP", "BY", "t2.visitor_id", "ORDER", "BY", "sum", "(", "t2.Total_spent", ")", "DESC", "LIMIT", "1"], "query_toks_no_value": ["select", "t2", ".", "visitor_id", ",", "t1", ".", "name", ",", "t1", ".", "level_of_membership", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "group", "by", "t2", ".", "visitor_id", "order", "by", "sum", "(", "t2", ".", "total_spent", ")", "desc", "limit", "value"], "question": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?", "question_toks": ["What", "are", "the", "id", ",", "name", "and", "membership", "level", "of", "visitors", "who", "have", "spent", "the", "largest", "amount", "of", "money", "in", "total", "in", "all", "museum", "tickets", "?"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 5, false], null], [0, 10, false], null]]}, "select": [false, [[0, [0, [0, 10, false], null]], [0, [0, [0, 6, false], null]], [0, [0, [0, 7, false], null]]]], "where": [], "groupBy": [[0, 10, false]], "having": [], "orderBy": ["desc", [[0, [4, 12, false], null]]], "limit": 1, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "dev_0425", "db_id": "museum_visit", "query": "select sum(t2.total_spent) from visitor as t1 join visit as t2 on t1.id = t2.visitor_id where t1.level_of_membership = 1", "query_toks": ["SELECT", "sum", "(", "t2.Total_spent", ")", "FROM", "visitor", "AS", "t1", "JOIN", "visit", "AS", "t2", "ON", "t1.id", "=", "t2.visitor_id", "WHERE", "t1.Level_of_membership", "=", "1"], "query_toks_no_value": ["select", "sum", "(", "t2", ".", "total_spent", ")", "from", "visitor", "as", "t1", "join", "visit", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "visitor_id", "where", "t1", ".", "level_of_membership", "=", "value"], "question": "What is the total ticket expense of the visitors whose membership level is 1?", "question_toks": ["What", "is", "the", "total", "ticket", "expense", "of", "the", "visitors", "whose", "membership", "level", "is", "1", "?"], "sql": {"from": {"table_units": [["table_unit", 1], ["table_unit", 2]], "conds": [[false, 2, [0, [0, 5, false], null], [0, 10, false], null]]}, "select": [false, [[4, [0, [0, 12, false], null]]]], "where": [[false, 2, [0, [0, 7, false], null], 1.0, null]], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "SPIDER_DEV", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "added_for_aggregation_in_column_0077", "db_id": "bike_1", "query": "select zip_code from weather group by zip_code having avg(mean_humidity) < 70 intersect select zip_code from trip group by zip_code having count(*) >= 10", "query_toks": ["select", "zip_code", "from", "weather", "group", "by", "zip_code", "having", "avg", "(", "mean_humidity", ")", "<", "70", "intersect", "select", "zip_code", "from", "trip", "group", "by", "zip_code", "having", "count", "(*)", ">=", "10"], "query_toks_no_value": ["select", "zip_code", "from", "weather", "group", "by", "zip_code", "having", "avg", "(", "mean_humidity", ")", "<", "70", "intersect", "select", "zip_code", "from", "trip", "group", "by", "zip_code", "having", "count", "(*)", ">=", "10"], "question": "Give me the zip code where the average mean humidity is below 70 and at least 10 trips took place.", "question_toks": ["Give", "me", "the", "zip", "code", "where", "the", "average", "mean", "humidity", "is", "below", "70", "and", "at", "least", "10", "trips", "took", "place", "."], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [[false, 4, [0, [5, 31, false], null], 70.0, null]], "orderBy": [], "limit": null, "intersect": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[0, [0, [0, 22, false], null]]]], "where": [], "groupBy": [[0, 22, false]], "having": [[false, 5, [0, [3, 0, false], null], 10.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "ADDED", "parents_id": null, "is_simplification": false, "simplifications_tags": []}, {"id": "added_for_aggregation_in_column_0078", "db_id": "bike_1", "query": "select zip_code from weather group by zip_code having avg(mean_humidity) < 70 intersect select zip_code from trip group by zip_code having count(*) >= 10", "query_toks": ["select", "zip_code", "from", "weather", "group", "by", "zip_code", "having", "avg", "(", "mean_humidity", ")", "<", "70", "intersect", "select", "zip_code", "from", "trip", "group", "by", "zip_code", "having", "count", "(*)", ">=", "10"], "query_toks_no_value": ["select", "zip_code", "from", "weather", "group", "by", "zip_code", "having", "avg", "(", "mean_humidity", ")", "<", "70", "intersect", "select", "zip_code", "from", "trip", "group", "by", "zip_code", "having", "count", "(*)", ">=", "10"], "question": "What are the zip codes that have an average mean humidity below 70 and had at least 10 trips come through there?", "question_toks": ["What", "are", "the", "zip", "codes", "that", "have", "an", "average", "mean", "humidity", "below", "70", "and", "had", "at", "least", "10", "trips", "come", "through", "there", "?"], "sql": {"from": {"table_units": [["table_unit", 3]], "conds": []}, "select": [false, [[0, [0, [0, 46, false], null]]]], "where": [], "groupBy": [[0, 46, false]], "having": [[false, 4, [0, [5, 31, false], null], 70.0, null]], "orderBy": [], "limit": null, "intersect": {"from": {"table_units": [["table_unit", 2]], "conds": []}, "select": [false, [[0, [0, [0, 22, false], null]]]], "where": [], "groupBy": [[0, 22, false]], "having": [[false, 5, [0, [3, 0, false], null], 10.0, null]], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null}, "union": null, "except": null}, "tags": ["AGGREGATION_IN_COLUMN"], "source": "ADDED", "parents_id": null, "is_simplification": false, "simplifications_tags": []}] \ No newline at end of file