question_id int64 0 16.1k | db_id stringclasses 259
values | dber_id stringlengths 15 29 | question stringlengths 16 325 | SQL stringlengths 18 1.25k | tokens listlengths 4 62 | entities listlengths 0 21 | entity_to_token listlengths 20 20 | dber_tags listlengths 4 62 |
|---|---|---|---|---|---|---|---|---|
11,021 | superstore | bird:train.json:2350 | Among the orders made by Aimee Bixby, how many of them included at least one kind of product under the category "Furniture"? | SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T3.Category = 'Furniture' AND T1.`Customer Name` = 'Aimee Bixby' | [
"Among",
"the",
"orders",
"made",
"by",
"Aimee",
"Bixby",
",",
"how",
"many",
"of",
"them",
"included",
"at",
"least",
"one",
"kind",
"of",
"product",
"under",
"the",
"category",
"\"",
"Furniture",
"\"",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "central_superstore"
},
{
"id": 7,
"type": "column",
"value": "Customer Name"
},
{
"id": 8,
"type": "value",
"value": "Aimee Bixby"
},
{
"id": 9,
"type": "column",
"value": "Customer ID"
},
{
"id": 4,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
18
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
11,022 | chicago_crime | bird:train.json:8745 | Provide the ward number with the highest population. | SELECT ward_no FROM Ward ORDER BY Population DESC LIMIT 1 | [
"Provide",
"the",
"ward",
"number",
"with",
"the",
"highest",
"population",
"."
] | [
{
"id": 2,
"type": "column",
"value": "population"
},
{
"id": 1,
"type": "column",
"value": "ward_no"
},
{
"id": 0,
"type": "table",
"value": "ward"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,024 | synthea | bird:train.json:1384 | When did Mrs. Ira Deckow have the standard pregnancy test? | SELECT T2.date FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Ira' AND T1.last = 'Deckow' AND T2.description = 'Standard pregnancy test' | [
"When",
"did",
"Mrs.",
"Ira",
"Deckow",
"have",
"the",
"standard",
"pregnancy",
"test",
"?"
] | [
{
"id": 11,
"type": "value",
"value": "Standard pregnancy test"
},
{
"id": 10,
"type": "column",
"value": "description"
},
{
"id": 2,
"type": "table",
"value": "procedures"
},
{
"id": 1,
"type": "table",
"value": "patients"
},
{
"id": 3,
"type"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
2
]
},
{
... | [
"O",
"O",
"B-VALUE",
"B-VALUE",
"B-VALUE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
11,025 | company_office | spider:train_spider.json:4548 | Find the names of the companies whose headquarters are not located in "USA". | SELECT name FROM Companies WHERE Headquarters != 'USA' | [
"Find",
"the",
"names",
"of",
"the",
"companies",
"whose",
"headquarters",
"are",
"not",
"located",
"in",
"\"",
"USA",
"\"",
"."
] | [
{
"id": 2,
"type": "column",
"value": "headquarters"
},
{
"id": 0,
"type": "table",
"value": "companies"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": "USA"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
11,026 | bike_share_1 | bird:train.json:9036 | For the rides that started at Market at 10th station and ended at South Van Ness at Market station in August of 2013, which day had the coldest temperature? | SELECT T1.start_date FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T2.date LIKE '8/%/2013' AND T1.start_station_name = 'Market at 10th' AND T1.end_station_name = 'South Van Ness at Market' AND T2.min_temper... | [
"For",
"the",
"rides",
"that",
"started",
"at",
"Market",
"at",
"10th",
"station",
"and",
"ended",
"at",
"South",
"Van",
"Ness",
"at",
"Market",
"station",
"in",
"August",
"of",
"2013",
",",
"which",
"day",
"had",
"the",
"coldest",
"temperature",
"?"
] | [
{
"id": 8,
"type": "value",
"value": "South Van Ness at Market"
},
{
"id": 5,
"type": "column",
"value": "start_station_name"
},
{
"id": 9,
"type": "column",
"value": "min_temperature_f"
},
{
"id": 7,
"type": "column",
"value": "end_station_name"
},
{
... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
27
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
22
]
},
{
"entit... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O"
] |
11,027 | airline | bird:train.json:5856 | How long was the longest minute delay caused by a weather problem in airport id 12264? | SELECT WEATHER_DELAY FROM Airlines WHERE ORIGIN_AIRPORT_ID = 12264 ORDER BY WEATHER_DELAY DESC LIMIT 1 | [
"How",
"long",
"was",
"the",
"longest",
"minute",
"delay",
"caused",
"by",
"a",
"weather",
"problem",
"in",
"airport",
"i",
"d",
"12264",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "origin_airport_id"
},
{
"id": 1,
"type": "column",
"value": "weather_delay"
},
{
"id": 0,
"type": "table",
"value": "airlines"
},
{
"id": 3,
"type": "value",
"value": "12264"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
12,
13,
14,
15
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
11,028 | company_1 | spider:train_spider.json:2133 | how many female dependents are there? | SELECT count(*) FROM dependent WHERE sex = 'F' | [
"how",
"many",
"female",
"dependents",
"are",
"there",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "dependent"
},
{
"id": 1,
"type": "column",
"value": "sex"
},
{
"id": 2,
"type": "value",
"value": "F"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
11,029 | retail_complains | bird:train.json:297 | In what years were the clients who demanded more problems with Certificate of deposit born? | SELECT T1.year FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = '(CD) Certificate of deposit' GROUP BY T1.year ORDER BY COUNT(T1.year) DESC LIMIT 1 | [
"In",
"what",
"years",
"were",
"the",
"clients",
"who",
"demanded",
"more",
"problems",
"with",
"Certificate",
"of",
"deposit",
"born",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "(CD) Certificate of deposit"
},
{
"id": 3,
"type": "column",
"value": "Sub-product"
},
{
"id": 5,
"type": "column",
"value": "client_id"
},
{
"id": 1,
"type": "table",
"value": "client"
},
{
"id": 2,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11,
12,
13
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
11,030 | chicago_crime | bird:train.json:8635 | What is the short description of the crime committed the most by criminals in the least populated community? | SELECT T3.title FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN FBI_Code AS T3 ON T2.fbi_code_no = T3.fbi_code_no GROUP BY T3.title ORDER BY T1.population ASC, T3.fbi_code_no DESC LIMIT 1 | [
"What",
"is",
"the",
"short",
"description",
"of",
"the",
"crime",
"committed",
"the",
"most",
"by",
"criminals",
"in",
"the",
"least",
"populated",
"community",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "community_area_no"
},
{
"id": 4,
"type": "table",
"value": "community_area"
},
{
"id": 3,
"type": "column",
"value": "fbi_code_no"
},
{
"id": 2,
"type": "column",
"value": "population"
},
{
"id": 1,
"type"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
{
"entity_id": 5,
"token_idxs"... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
11,031 | headphone_store | bird:test.json:956 | Find the headphone models that are not in stock in any store. | SELECT model FROM headphone WHERE headphone_id NOT IN (SELECT headphone_id FROM stock) | [
"Find",
"the",
"headphone",
"models",
"that",
"are",
"not",
"in",
"stock",
"in",
"any",
"store",
"."
] | [
{
"id": 2,
"type": "column",
"value": "headphone_id"
},
{
"id": 0,
"type": "table",
"value": "headphone"
},
{
"id": 1,
"type": "column",
"value": "model"
},
{
"id": 3,
"type": "table",
"value": "stock"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
11,033 | public_review_platform | bird:train.json:3867 | Please list the categories of the Yelp_Business that closes at 12PM on Sundays. | SELECT T4.category_name FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business_Categories AS T3 ON T1.business_id = T3.business_id INNER JOIN Categories AS T4 ON T4.category_id = T4.category_id WHERE T1.closing_time = '12PM' AND T2.day_of_week = 'Sunday' GROUP BY T4.category_name | [
"Please",
"list",
"the",
"categories",
"of",
"the",
"Yelp_Business",
"that",
"closes",
"at",
"12PM",
"on",
"Sundays",
"."
] | [
{
"id": 2,
"type": "table",
"value": "business_categories"
},
{
"id": 8,
"type": "table",
"value": "business_hours"
},
{
"id": 0,
"type": "column",
"value": "category_name"
},
{
"id": 4,
"type": "column",
"value": "closing_time"
},
{
"id": 3,
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
10
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O"
] |
11,034 | manufactory_1 | spider:train_spider.json:5305 | What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin? | SELECT sum(revenue) FROM manufacturers WHERE revenue > (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin') | [
"What",
"is",
"the",
"total",
"revenue",
"of",
"companies",
"with",
"revenue",
"greater",
"than",
"the",
"lowest",
"revenue",
"of",
"any",
"manufacturer",
"in",
"Austin",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "manufacturers"
},
{
"id": 2,
"type": "column",
"value": "headquarter"
},
{
"id": 1,
"type": "column",
"value": "revenue"
},
{
"id": 3,
"type": "value",
"value": "Austin"
}
] | [
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
18
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
11,035 | soccer_2 | spider:train_spider.json:4957 | What are the names and number of hours spent training for each player who trains for less than 1500 hours? | SELECT pName , HS FROM Player WHERE HS < 1500 | [
"What",
"are",
"the",
"names",
"and",
"number",
"of",
"hours",
"spent",
"training",
"for",
"each",
"player",
"who",
"trains",
"for",
"less",
"than",
"1500",
"hours",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 1,
"type": "column",
"value": "pname"
},
{
"id": 3,
"type": "value",
"value": "1500"
},
{
"id": 2,
"type": "column",
"value": "hs"
}
] | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
18
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
11,036 | music_tracker | bird:train.json:2077 | Which artist has id "16"? Provide her or his tag genre. | SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id = 16 | [
"Which",
"artist",
"has",
"i",
"d",
"\"",
"16",
"\"",
"?",
"Provide",
"her",
"or",
"his",
"tag",
"genre",
"."
] | [
{
"id": 1,
"type": "table",
"value": "torrents"
},
{
"id": 2,
"type": "table",
"value": "tags"
},
{
"id": 0,
"type": "column",
"value": "tag"
},
{
"id": 3,
"type": "column",
"value": "id"
},
{
"id": 4,
"type": "value",
"value": "16"
}
] | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3,
4
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
11,037 | student_1 | spider:train_spider.json:4067 | Count the number of students the teacher LORIA ONDERSMA teaches. | SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA" | [
"Count",
"the",
"number",
"of",
"students",
"the",
"teacher",
"LORIA",
"ONDERSMA",
"teaches",
"."
] | [
{
"id": 2,
"type": "column",
"value": "classroom"
},
{
"id": 3,
"type": "column",
"value": "firstname"
},
{
"id": 1,
"type": "table",
"value": "teachers"
},
{
"id": 5,
"type": "column",
"value": "lastname"
},
{
"id": 6,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-TABLE",
"O"
] |
11,038 | college_1 | spider:train_spider.json:3247 | Find the total number of employees. | SELECT count(*) FROM employee | [
"Find",
"the",
"total",
"number",
"of",
"employees",
"."
] | [
{
"id": 0,
"type": "table",
"value": "employee"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,039 | phone_market | spider:train_spider.json:1981 | List the distinct carriers of phones with memories bigger than 32. | SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G > 32 | [
"List",
"the",
"distinct",
"carriers",
"of",
"phones",
"with",
"memories",
"bigger",
"than",
"32",
"."
] | [
{
"id": 2,
"type": "column",
"value": "memory_in_g"
},
{
"id": 1,
"type": "column",
"value": "carrier"
},
{
"id": 0,
"type": "table",
"value": "phone"
},
{
"id": 3,
"type": "value",
"value": "32"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
11,040 | boat_1 | bird:test.json:907 | How many boats are red? | SELECT count(*) FROM Boats WHERE color = 'red' | [
"How",
"many",
"boats",
"are",
"red",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "boats"
},
{
"id": 1,
"type": "column",
"value": "color"
},
{
"id": 2,
"type": "value",
"value": "red"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
11,041 | movie_2 | bird:test.json:1832 | What are the movie names sorted by rating? | SELECT title FROM movies ORDER BY rating | [
"What",
"are",
"the",
"movie",
"names",
"sorted",
"by",
"rating",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "movies"
},
{
"id": 2,
"type": "column",
"value": "rating"
},
{
"id": 1,
"type": "column",
"value": "title"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,042 | world_development_indicators | bird:train.json:2229 | Which country has the smallest land area in square kilometers for 19 consecutive years starting from year 1961? Indicate how much is its land area in square kilometers in those years and the income group of the country. | SELECT T1.CountryName, SUM(T1.Value) area, T2.IncomeGroup FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IndicatorName = 'Land area (sq. km)' AND T1.Year >= 1961 AND T1.Year < 1980 GROUP BY T1.CountryCode ORDER BY SUM(T1.Value) ASC LIMIT 1 | [
"Which",
"country",
"has",
"the",
"smallest",
"land",
"area",
"in",
"square",
"kilometers",
"for",
"19",
"consecutive",
"years",
"starting",
"from",
"year",
"1961",
"?",
"Indicate",
"how",
"much",
"is",
"its",
"land",
"area",
"in",
"square",
"kilometers",
"i... | [
{
"id": 7,
"type": "value",
"value": "Land area (sq. km)"
},
{
"id": 6,
"type": "column",
"value": "indicatorname"
},
{
"id": 0,
"type": "column",
"value": "countrycode"
},
{
"id": 1,
"type": "column",
"value": "countryname"
},
{
"id": 2,
"type... | [
{
"entity_id": 0,
"token_idxs": [
38
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
34,
35
]
},
{
"entity_id": 3,
"token_idxs": [
19
]
},
{
"entity_id": 4,
"token_idxs": [
1
]
},
{... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"... |
11,043 | professional_basketball | bird:train.json:2842 | Please list the coach IDs who received the award twice from 1970 to 1990. | SELECT coachID FROM awards_coaches WHERE year BETWEEN 1970 AND 1990 GROUP BY coachID, award HAVING COUNT(award) = 2 | [
"Please",
"list",
"the",
"coach",
"IDs",
"who",
"received",
"the",
"award",
"twice",
"from",
"1970",
"to",
"1990",
"."
] | [
{
"id": 0,
"type": "table",
"value": "awards_coaches"
},
{
"id": 1,
"type": "column",
"value": "coachid"
},
{
"id": 2,
"type": "column",
"value": "award"
},
{
"id": 3,
"type": "column",
"value": "year"
},
{
"id": 4,
"type": "value",
"value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
11,044 | app_store | bird:train.json:2537 | Which free app has the most Negative comments? | SELECT T1.App FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Type = 'Free' AND T2.Sentiment = 'Negative' GROUP BY T1.App ORDER BY COUNT(T2.Sentiment) DESC LIMIT 1 | [
"Which",
"free",
"app",
"has",
"the",
"most",
"Negative",
"comments",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "user_reviews"
},
{
"id": 1,
"type": "table",
"value": "playstore"
},
{
"id": 5,
"type": "column",
"value": "sentiment"
},
{
"id": 6,
"type": "value",
"value": "Negative"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
1
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
11,045 | book_publishing_company | bird:train.json:194 | For all authors from CA who are not on contract, which title of his/hers has the most year to date sales. | SELECT T1.title FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T3.contract = 0 AND T3.state = 'CA' ORDER BY T1.ytd_sales DESC LIMIT 1 | [
"For",
"all",
"authors",
"from",
"CA",
"who",
"are",
"not",
"on",
"contract",
",",
"which",
"title",
"of",
"his",
"/",
"hers",
"has",
"the",
"most",
"year",
"to",
"date",
"sales",
"."
] | [
{
"id": 4,
"type": "table",
"value": "titleauthor"
},
{
"id": 2,
"type": "column",
"value": "ytd_sales"
},
{
"id": 6,
"type": "column",
"value": "contract"
},
{
"id": 10,
"type": "column",
"value": "title_id"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
23
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
11,046 | government_shift | bird:test.json:390 | Find details of the services that no customer has ever used . Return the service details . | select service_details from services except select t2.service_details from customers_and_services as t1 join services as t2 on t1.service_id = t2.service_id | [
"Find",
"details",
"of",
"the",
"services",
"that",
"no",
"customer",
"has",
"ever",
"used",
".",
"Return",
"the",
"service",
"details",
"."
] | [
{
"id": 2,
"type": "table",
"value": "customers_and_services"
},
{
"id": 1,
"type": "column",
"value": "service_details"
},
{
"id": 3,
"type": "column",
"value": "service_id"
},
{
"id": 0,
"type": "table",
"value": "services"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
7,
8,
9
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
11,047 | works_cycles | bird:train.json:7362 | What is the 12th business's first line address? | SELECT T1.AddressLine1 FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 ON T1.AddressID = T2.AddressID WHERE T2.BusinessEntityID = 12 | [
"What",
"is",
"the",
"12th",
"business",
"'s",
"first",
"line",
"address",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "businessentityaddress"
},
{
"id": 3,
"type": "column",
"value": "businessentityid"
},
{
"id": 0,
"type": "column",
"value": "addressline1"
},
{
"id": 5,
"type": "column",
"value": "addressid"
},
{
"id": 1,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
}... | [
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"B-TABLE",
"O"
] |
11,048 | retail_world | bird:train.json:6636 | What are the most popular confections product and calculate the total sales generated by this product? | SELECT COUNT(T1.UnitPrice * T3.Quantity) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID INNER JOIN `Order Details` AS T3 ON T1.ProductID = T3.ProductID WHERE T2.CategoryName = 'Confections' GROUP BY T3.Quantity ORDER BY T3.Quantity DESC LIMIT 1 | [
"What",
"are",
"the",
"most",
"popular",
"confections",
"product",
"and",
"calculate",
"the",
"total",
"sales",
"generated",
"by",
"this",
"product",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "Order Details"
},
{
"id": 2,
"type": "column",
"value": "categoryname"
},
{
"id": 3,
"type": "value",
"value": "Confections"
},
{
"id": 5,
"type": "table",
"value": "categories"
},
{
"id": 8,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,049 | image_and_language | bird:train.json:7498 | Give the object number of the sample which has the relationship of "lying on" with object sample no.1 from image no.2345524. | SELECT T2.OBJ1_SAMPLE_ID FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 2345524 AND T1.PRED_CLASS = 'lying on' AND T2.OBJ2_SAMPLE_ID = 1 | [
"Give",
"the",
"object",
"number",
"of",
"the",
"sample",
"which",
"has",
"the",
"relationship",
"of",
"\"",
"lying",
"on",
"\"",
"with",
"object",
"sample",
"no.1",
"from",
"image",
"no.2345524",
"."
] | [
{
"id": 0,
"type": "column",
"value": "obj1_sample_id"
},
{
"id": 8,
"type": "column",
"value": "obj2_sample_id"
},
{
"id": 3,
"type": "column",
"value": "pred_class_id"
},
{
"id": 1,
"type": "table",
"value": "pred_classes"
},
{
"id": 6,
"type... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
21
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
22
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
11,050 | store_product | spider:train_spider.json:4900 | Find all the distinct district names ordered by city area in descending. | SELECT DISTINCT District_name FROM district ORDER BY city_area DESC | [
"Find",
"all",
"the",
"distinct",
"district",
"names",
"ordered",
"by",
"city",
"area",
"in",
"descending",
"."
] | [
{
"id": 1,
"type": "column",
"value": "district_name"
},
{
"id": 2,
"type": "column",
"value": "city_area"
},
{
"id": 0,
"type": "table",
"value": "district"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8,
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O"
] |
11,052 | district_spokesman | bird:test.json:1182 | Give me the biggest and average areas of all districts. | SELECT max(area_km) , avg(area_km) FROM district | [
"Give",
"me",
"the",
"biggest",
"and",
"average",
"areas",
"of",
"all",
"districts",
"."
] | [
{
"id": 0,
"type": "table",
"value": "district"
},
{
"id": 1,
"type": "column",
"value": "area_km"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
11,053 | public_review_platform | bird:train.json:4042 | What is the ratio of good to bad business star for a businesses that are opened all the time? | SELECT CAST(SUM(CASE WHEN T1.stars BETWEEN 3.5 AND 5 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.stars BETWEEN 1 AND 2.5 THEN 1 ELSE 0 END) AS ratio FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id | [
"What",
"is",
"the",
"ratio",
"of",
"good",
"to",
"bad",
"business",
"star",
"for",
"a",
"businesses",
"that",
"are",
"opened",
"all",
"the",
"time",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "business_hours"
},
{
"id": 2,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "table",
"value": "business"
},
{
"id": 5,
"type": "column",
"value": "stars"
},
{
"id": 6,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,054 | retail_world | bird:train.json:6553 | Provide the products list which were ordered in 1996 by the company in Norway. | SELECT T4.ProductName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID WHERE T1.Country = 'Norway' AND STRFTIME('%Y', T2.OrderDate) = '1996' | [
"Provide",
"the",
"products",
"list",
"which",
"were",
"ordered",
"in",
"1996",
"by",
"the",
"company",
"in",
"Norway",
"."
] | [
{
"id": 2,
"type": "table",
"value": "Order Details"
},
{
"id": 0,
"type": "column",
"value": "productname"
},
{
"id": 12,
"type": "column",
"value": "customerid"
},
{
"id": 3,
"type": "column",
"value": "productid"
},
{
"id": 7,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,055 | student_club | bird:dev.json:1342 | What was the cost for the "Posters" on 2019/9/4? | SELECT cost FROM expense WHERE expense_description = 'Posters' AND expense_date = '2019-09-04' | [
"What",
"was",
"the",
"cost",
"for",
"the",
"\"",
"Posters",
"\"",
"on",
"2019/9/4",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "expense_description"
},
{
"id": 4,
"type": "column",
"value": "expense_date"
},
{
"id": 5,
"type": "value",
"value": "2019-09-04"
},
{
"id": 0,
"type": "table",
"value": "expense"
},
{
"id": 3,
"type": "va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
11,056 | headphone_store | bird:test.json:921 | List all different headphone models in the alphabetical order. | SELECT DISTINCT model FROM headphone ORDER BY model | [
"List",
"all",
"different",
"headphone",
"models",
"in",
"the",
"alphabetical",
"order",
"."
] | [
{
"id": 0,
"type": "table",
"value": "headphone"
},
{
"id": 1,
"type": "column",
"value": "model"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
11,057 | sakila_1 | spider:train_spider.json:2967 | What is the title and id of the film that has the greatest number of copies in inventory? | SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"title",
"and",
"i",
"d",
"of",
"the",
"film",
"that",
"has",
"the",
"greatest",
"number",
"of",
"copies",
"in",
"inventory",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "inventory"
},
{
"id": 0,
"type": "column",
"value": "film_id"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "table",
"value": "film"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
18
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,058 | menu | bird:train.json:5505 | What is the event sponsored by the Republican House? | SELECT event FROM Menu WHERE sponsor = 'REPUBLICAN HOUSE' | [
"What",
"is",
"the",
"event",
"sponsored",
"by",
"the",
"Republican",
"House",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "REPUBLICAN HOUSE"
},
{
"id": 2,
"type": "column",
"value": "sponsor"
},
{
"id": 1,
"type": "column",
"value": "event"
},
{
"id": 0,
"type": "table",
"value": "menu"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
7,
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
11,059 | retails | bird:train.json:6854 | Please indicate the names of customers whose orders are eligible for 10% discount with order dates between 1/1/1994 and 1/1/1995. | SELECT T3.c_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN customer AS T3 ON T1.o_custkey = T3.c_custkey WHERE T2.l_discount = 0.1 AND STRFTIME('%Y', T1.o_orderdate) BETWEEN 1994 AND 1995 | [
"Please",
"indicate",
"the",
"names",
"of",
"customers",
"whose",
"orders",
"are",
"eligible",
"for",
"10",
"%",
"discount",
"with",
"order",
"dates",
"between",
"1/1/1994",
"and",
"1/1/1995",
"."
] | [
{
"id": 13,
"type": "column",
"value": "o_orderdate"
},
{
"id": 6,
"type": "column",
"value": "l_discount"
},
{
"id": 10,
"type": "column",
"value": "o_orderkey"
},
{
"id": 11,
"type": "column",
"value": "l_orderkey"
},
{
"id": 4,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_... | [
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
11,060 | retails | bird:train.json:6761 | Give the name and phone number of the customers who have more than 9000 account balance. | SELECT c_name, c_phone FROM customer WHERE c_acctbal > 9000 | [
"Give",
"the",
"name",
"and",
"phone",
"number",
"of",
"the",
"customers",
"who",
"have",
"more",
"than",
"9000",
"account",
"balance",
"."
] | [
{
"id": 3,
"type": "column",
"value": "c_acctbal"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 2,
"type": "column",
"value": "c_phone"
},
{
"id": 1,
"type": "column",
"value": "c_name"
},
{
"id": 4,
"type": "value",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
14,
15
]
},
{
"entity_id": 4,
"token_idxs": [
13
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
11,061 | beer_factory | bird:train.json:5300 | Calculate the difference between the number of root beers sold that use cane sugar and corn syrup. | SELECT COUNT(CASE WHEN T3.CaneSugar = 'TRUE' THEN T1.BrandID ELSE NULL END) - COUNT(CASE WHEN T3.CornSyrup = 'TRUE' THEN T1.BrandID ELSE NULL END) AS DIFFERENCE FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID | [
"Calculate",
"the",
"difference",
"between",
"the",
"number",
"of",
"root",
"beers",
"sold",
"that",
"use",
"cane",
"sugar",
"and",
"corn",
"syrup",
"."
] | [
{
"id": 0,
"type": "table",
"value": "rootbeerbrand"
},
{
"id": 2,
"type": "table",
"value": "transaction"
},
{
"id": 4,
"type": "column",
"value": "rootbeerid"
},
{
"id": 5,
"type": "column",
"value": "canesugar"
},
{
"id": 7,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O"
] |
11,063 | disney | bird:train.json:4654 | What is the Motion Picture Association of America rating for the movie featuring a villain named Turbo? | SELECT T1.MPAA_rating FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T2.movie_title = T1.movie_title WHERE T2.villian = 'Turbo' | [
"What",
"is",
"the",
"Motion",
"Picture",
"Association",
"of",
"America",
"rating",
"for",
"the",
"movie",
"featuring",
"a",
"villain",
"named",
"Turbo",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "movies_total_gross"
},
{
"id": 0,
"type": "column",
"value": "mpaa_rating"
},
{
"id": 5,
"type": "column",
"value": "movie_title"
},
{
"id": 2,
"type": "table",
"value": "characters"
},
{
"id": 3,
"type": "... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
11,064 | retail_complains | bird:train.json:320 | What are the products that people who were born after 2005 complain about? | SELECT DISTINCT T2.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year > 2005 | [
"What",
"are",
"the",
"products",
"that",
"people",
"who",
"were",
"born",
"after",
"2005",
"complain",
"about",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "client_id"
},
{
"id": 0,
"type": "column",
"value": "product"
},
{
"id": 1,
"type": "table",
"value": "client"
},
{
"id": 2,
"type": "table",
"value": "events"
},
{
"id": 3,
"type": "column",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
11,065 | works_cycles | bird:train.json:7135 | What is the location of business number 1? | SELECT T1.AddressLine1 FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 USING (AddressID) WHERE T2.BusinessEntityID = 1 | [
"What",
"is",
"the",
"location",
"of",
"business",
"number",
"1",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "businessentityaddress"
},
{
"id": 3,
"type": "column",
"value": "businessentityid"
},
{
"id": 0,
"type": "column",
"value": "addressline1"
},
{
"id": 1,
"type": "table",
"value": "address"
},
{
"id": 4,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
11,066 | synthea | bird:train.json:1371 | According to all the observations of Elly Koss, what was her average weight? | SELECT AVG(T2.VALUE), T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Body Weight' | [
"According",
"to",
"all",
"the",
"observations",
"of",
"Elly",
"Koss",
",",
"what",
"was",
"her",
"average",
"weight",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "observations"
},
{
"id": 9,
"type": "column",
"value": "description"
},
{
"id": 10,
"type": "value",
"value": "Body Weight"
},
{
"id": 1,
"type": "table",
"value": "patients"
},
{
"id": 4,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,067 | real_estate_rentals | bird:test.json:1459 | Give the category description of the age category 'Over 60'. | SELECT age_category_description FROM Ref_Age_Categories WHERE age_category_code = 'Over 60'; | [
"Give",
"the",
"category",
"description",
"of",
"the",
"age",
"category",
"'",
"Over",
"60",
"'",
"."
] | [
{
"id": 1,
"type": "column",
"value": "age_category_description"
},
{
"id": 0,
"type": "table",
"value": "ref_age_categories"
},
{
"id": 2,
"type": "column",
"value": "age_category_code"
},
{
"id": 3,
"type": "value",
"value": "Over 60"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
11,068 | book_press | bird:test.json:1980 | Which press has the largest monthly profit? Give me the press name. | SELECT name FROM press ORDER BY Month_Profits_billion DESC LIMIT 1 | [
"Which",
"press",
"has",
"the",
"largest",
"monthly",
"profit",
"?",
"Give",
"me",
"the",
"press",
"name",
"."
] | [
{
"id": 2,
"type": "column",
"value": "month_profits_billion"
},
{
"id": 0,
"type": "table",
"value": "press"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,070 | regional_sales | bird:train.json:2654 | List the order for all in-store sales along with the products sold. | SELECT DISTINCT T1.OrderNumber, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Sales Channel` = 'In-Store' | [
"List",
"the",
"order",
"for",
"all",
"in",
"-",
"store",
"sales",
"along",
"with",
"the",
"products",
"sold",
"."
] | [
{
"id": 4,
"type": "column",
"value": "Sales Channel"
},
{
"id": 1,
"type": "column",
"value": "Product Name"
},
{
"id": 2,
"type": "table",
"value": "Sales Orders"
},
{
"id": 0,
"type": "column",
"value": "ordernumber"
},
{
"id": 7,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
8,
9
]
},
{
... | [
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
11,071 | bike_share_1 | bird:train.json:9099 | Which station did the user who started at Market at 4th station ended their trip at the time of 12:45:00 PM and the date of 8/29/2013 and what is the location coordinates of the ending station? | SELECT T1.name, T1.lat, T1.long FROM station AS T1 INNER JOIN trip AS T2 ON T2.end_station_name = T1.name WHERE T2.start_station_name = 'Market at 4th' AND T2.end_date = '8/29/2013 12:45' | [
"Which",
"station",
"did",
"the",
"user",
"who",
"started",
"at",
"Market",
"at",
"4th",
"station",
"ended",
"their",
"trip",
"at",
"the",
"time",
"of",
"12:45:00",
"PM",
"and",
"the",
"date",
"of",
"8/29/2013",
"and",
"what",
"is",
"the",
"location",
"c... | [
{
"id": 6,
"type": "column",
"value": "start_station_name"
},
{
"id": 5,
"type": "column",
"value": "end_station_name"
},
{
"id": 9,
"type": "value",
"value": "8/29/2013 12:45"
},
{
"id": 7,
"type": "value",
"value": "Market at 4th"
},
{
"id": 8,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLU... |
11,072 | mondial_geo | bird:train.json:8497 | Which Zaire region is home to the country's deepest lake's Name it and list its depth. | SELECT T3.Name, T1.Name, T1.Depth FROM lake AS T1 INNER JOIN located AS T2 ON T1.Name = T2.Lake INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN country AS T4 ON T4.Code = T3.Country WHERE T4.Name = 'Zaire' | [
"Which",
"Zaire",
"region",
"is",
"home",
"to",
"the",
"country",
"'s",
"deepest",
"lake",
"'s",
"Name",
"it",
"and",
"list",
"its",
"depth",
"."
] | [
{
"id": 4,
"type": "table",
"value": "province"
},
{
"id": 9,
"type": "column",
"value": "province"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 6,
"type": "column",
"value": "country"
},
{
"id": 8,
"type": "table",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,073 | election_representative | spider:train_spider.json:1180 | What are the life spans of representatives from New York state or Indiana state? | SELECT Lifespan FROM representative WHERE State = "New York" OR State = "Indiana" | [
"What",
"are",
"the",
"life",
"spans",
"of",
"representatives",
"from",
"New",
"York",
"state",
"or",
"Indiana",
"state",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "representative"
},
{
"id": 1,
"type": "column",
"value": "lifespan"
},
{
"id": 3,
"type": "column",
"value": "New York"
},
{
"id": 4,
"type": "column",
"value": "Indiana"
},
{
"id": 2,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
11,074 | election | spider:train_spider.json:2759 | What are the delegate and name of the county they belong to, for each county? | SELECT T2.Delegate , T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District | [
"What",
"are",
"the",
"delegate",
"and",
"name",
"of",
"the",
"county",
"they",
"belong",
"to",
",",
"for",
"each",
"county",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "county_name"
},
{
"id": 4,
"type": "column",
"value": "county_id"
},
{
"id": 0,
"type": "column",
"value": "delegate"
},
{
"id": 3,
"type": "table",
"value": "election"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,075 | video_games | bird:train.json:3398 | What is the first year a game is released? | SELECT MIN(T.release_year) FROM game_platform t | [
"What",
"is",
"the",
"first",
"year",
"a",
"game",
"is",
"released",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "game_platform"
},
{
"id": 1,
"type": "column",
"value": "release_year"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,076 | superhero | bird:dev.json:815 | Count the good female superheroes. | SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.alignment = 'Good' AND T3.gender = 'Female' | [
"Count",
"the",
"good",
"female",
"superheroes",
"."
] | [
{
"id": 9,
"type": "column",
"value": "alignment_id"
},
{
"id": 2,
"type": "table",
"value": "superhero"
},
{
"id": 3,
"type": "table",
"value": "alignment"
},
{
"id": 4,
"type": "column",
"value": "gender_id"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-VALUE",
"B-VALUE",
"B-TABLE",
"O"
] |
11,077 | software_company | bird:train.json:8532 | What is the total number of customers with an age below 30? | SELECT COUNT(ID) FROM Customers WHERE age < 30 | [
"What",
"is",
"the",
"total",
"number",
"of",
"customers",
"with",
"an",
"age",
"below",
"30",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 1,
"type": "column",
"value": "age"
},
{
"id": 2,
"type": "value",
"value": "30"
},
{
"id": 3,
"type": "column",
"value": "id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
11,078 | store_product | spider:train_spider.json:4916 | Find the names of all stores in Khanewal District. | SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = "Khanewal District" | [
"Find",
"the",
"names",
"of",
"all",
"stores",
"in",
"Khanewal",
"District",
"."
] | [
{
"id": 3,
"type": "column",
"value": "Khanewal District"
},
{
"id": 5,
"type": "table",
"value": "store_district"
},
{
"id": 2,
"type": "column",
"value": "district_name"
},
{
"id": 6,
"type": "column",
"value": "district_id"
},
{
"id": 0,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
1,
2
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"B-TABLE",
"O"
] |
11,079 | olympics | bird:train.json:5002 | Provide hockey's sport id. | SELECT id FROM sport WHERE sport_name = 'Hockey' | [
"Provide",
"hockey",
"'s",
"sport",
"i",
"d."
] | [
{
"id": 2,
"type": "column",
"value": "sport_name"
},
{
"id": 3,
"type": "value",
"value": "Hockey"
},
{
"id": 0,
"type": "table",
"value": "sport"
},
{
"id": 1,
"type": "column",
"value": "id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"B-VALUE",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN"
] |
11,080 | game_1 | spider:train_spider.json:5984 | What are the types of video games and how many are in each type? | SELECT gtype , count(*) FROM Video_games GROUP BY gtype | [
"What",
"are",
"the",
"types",
"of",
"video",
"games",
"and",
"how",
"many",
"are",
"in",
"each",
"type",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "video_games"
},
{
"id": 1,
"type": "column",
"value": "gtype"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5,
6
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,081 | cre_Students_Information_Systems | bird:test.json:514 | Give me the detention start date for all the detention records. | SELECT datetime_detention_start FROM Detention | [
"Give",
"me",
"the",
"detention",
"start",
"date",
"for",
"all",
"the",
"detention",
"records",
"."
] | [
{
"id": 1,
"type": "column",
"value": "datetime_detention_start"
},
{
"id": 0,
"type": "table",
"value": "detention"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
11,082 | cs_semester | bird:train.json:926 | Among the students with a gpa of 3.1 to 3.7, how many of them are undergraduate students? | SELECT COUNT(student_id) FROM student WHERE gpa BETWEEN 3.1 AND 3.7 AND type = 'UG' | [
"Among",
"the",
"students",
"with",
"a",
"gpa",
"of",
"3.1",
"to",
"3.7",
",",
"how",
"many",
"of",
"them",
"are",
"undergraduate",
"students",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "student_id"
},
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 5,
"type": "column",
"value": "type"
},
{
"id": 2,
"type": "column",
"value": "gpa"
},
{
"id": 3,
"type": "value",
"value": "3.1... | [
{
"entity_id": 0,
"token_idxs": [
17
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,083 | retail_complains | bird:train.json:244 | How many complaints have the client Diesel Galloway filed? | SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Diesel' AND T1.last = 'Galloway' | [
"How",
"many",
"complaints",
"have",
"the",
"client",
"Diesel",
"Galloway",
"filed",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "client_id"
},
{
"id": 6,
"type": "value",
"value": "Galloway"
},
{
"id": 0,
"type": "table",
"value": "client"
},
{
"id": 1,
"type": "table",
"value": "events"
},
{
"id": 4,
"type": "value",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"B-VALUE",
"O",
"O"
] |
11,084 | e_learning | spider:train_spider.json:3796 | List all the information about course authors and tutors in alphabetical order of the personal name. | SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name | [
"List",
"all",
"the",
"information",
"about",
"course",
"authors",
"and",
"tutors",
"in",
"alphabetical",
"order",
"of",
"the",
"personal",
"name",
"."
] | [
{
"id": 0,
"type": "table",
"value": "course_authors_and_tutors"
},
{
"id": 1,
"type": "column",
"value": "personal_name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5,
6,
7,
8
]
},
{
"entity_id": 1,
"token_idxs": [
14,
15
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
11,085 | works_cycles | bird:train.json:7469 | What is the price for the AWC Logo Cap? | SELECT T2.ListPrice FROM Product AS T1 INNER JOIN ProductListPriceHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'AWC Logo Cap' | [
"What",
"is",
"the",
"price",
"for",
"the",
"AWC",
"Logo",
"Cap",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "productlistpricehistory"
},
{
"id": 4,
"type": "value",
"value": "AWC Logo Cap"
},
{
"id": 0,
"type": "column",
"value": "listprice"
},
{
"id": 5,
"type": "column",
"value": "productid"
},
{
"id": 1,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
1,
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6,
7,
8
]
},
{
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
11,086 | sales_in_weather | bird:train.json:8207 | List out dates when haze is recorded in store 35. | SELECT T1.`date` FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 35 AND T1.codesum LIKE '%' OR 'HZ' OR '%' | [
"List",
"out",
"dates",
"when",
"haze",
"is",
"recorded",
"in",
"store",
"35",
"."
] | [
{
"id": 5,
"type": "column",
"value": "station_nbr"
},
{
"id": 6,
"type": "column",
"value": "store_nbr"
},
{
"id": 2,
"type": "table",
"value": "relation"
},
{
"id": 1,
"type": "table",
"value": "weather"
},
{
"id": 8,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
11,088 | books | bird:train.json:5983 | Sum the total price of the orders for The Prophet book. | SELECT SUM(T1.price) FROM order_line AS T1 INNER JOIN book AS T2 ON T1.book_id = T2.book_id WHERE T2.title = 'The Prophet' | [
"Sum",
"the",
"total",
"price",
"of",
"the",
"orders",
"for",
"The",
"Prophet",
"book",
"."
] | [
{
"id": 3,
"type": "value",
"value": "The Prophet"
},
{
"id": 0,
"type": "table",
"value": "order_line"
},
{
"id": 5,
"type": "column",
"value": "book_id"
},
{
"id": 2,
"type": "column",
"value": "title"
},
{
"id": 4,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": [
3
... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
11,089 | sales_in_weather | bird:train.json:8151 | What is the total units of products sold on the day with the highest max temperature in store no.3 in 2012? | SELECT SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T1.`date` LIKE '%2012%' GROUP BY T3.tmax ORDER BY T3.tmax DESC LIMIT 1 | [
"What",
"is",
"the",
"total",
"units",
"of",
"products",
"sold",
"on",
"the",
"day",
"with",
"the",
"highest",
"max",
"temperature",
"in",
"store",
"no.3",
"in",
"2012",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "sales_in_weather"
},
{
"id": 5,
"type": "column",
"value": "station_nbr"
},
{
"id": 6,
"type": "column",
"value": "store_nbr"
},
{
"id": 4,
"type": "table",
"value": "relation"
},
{
"id": 1,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
11,090 | superstore | bird:train.json:2363 | How many quantities of Advantus plastic paper clips were ordered overall? | SELECT SUM(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Advantus Plastic Paper Clips' | [
"How",
"many",
"quantities",
"of",
"Advantus",
"plastic",
"paper",
"clips",
"were",
"ordered",
"overall",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Advantus Plastic Paper Clips"
},
{
"id": 0,
"type": "table",
"value": "central_superstore"
},
{
"id": 2,
"type": "column",
"value": "Product Name"
},
{
"id": 5,
"type": "column",
"value": "Product ID"
},
{
"id"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4,
5,
6,
7
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O"
] |
11,091 | city_record | spider:train_spider.json:6295 | Which cities have higher temperature in Feb than in Jun or have once served as host cities? | SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city | [
"Which",
"cities",
"have",
"higher",
"temperature",
"in",
"Feb",
"than",
"in",
"Jun",
"or",
"have",
"once",
"served",
"as",
"host",
"cities",
"?"
] | [
{
"id": 5,
"type": "table",
"value": "hosting_city"
},
{
"id": 2,
"type": "table",
"value": "temperature"
},
{
"id": 7,
"type": "column",
"value": "host_city"
},
{
"id": 6,
"type": "column",
"value": "city_id"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_... | [
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
11,092 | movie_platform | bird:train.json:129 | For the 1998 movie which got the highest popularity, how many "4" rating did the movie get? | SELECT COUNT(T2.movie_title) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 4 AND T2.movie_release_year = 1998 ORDER BY T2.movie_popularity DESC LIMIT 1 | [
"For",
"the",
"1998",
"movie",
"which",
"got",
"the",
"highest",
"popularity",
",",
"how",
"many",
"\"",
"4",
"\"",
"rating",
"did",
"the",
"movie",
"get",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "movie_release_year"
},
{
"id": 2,
"type": "column",
"value": "movie_popularity"
},
{
"id": 5,
"type": "column",
"value": "rating_score"
},
{
"id": 3,
"type": "column",
"value": "movie_title"
},
{
"id": 4,
... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
11,093 | talkingdata | bird:train.json:1161 | What is the ratio of the number of app users that belong to the Securities category to the number of app users that belong to the Finance category? | SELECT SUM(IIF(T2.category = 'Securities', 1, 0)) / SUM(IIF(T2.category = 'Finance', 1, 0)) AS per FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id | [
"What",
"is",
"the",
"ratio",
"of",
"the",
"number",
"of",
"app",
"users",
"that",
"belong",
"to",
"the",
"Securities",
"category",
"to",
"the",
"number",
"of",
"app",
"users",
"that",
"belong",
"to",
"the",
"Finance",
"category",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "label_categories"
},
{
"id": 0,
"type": "table",
"value": "app_labels"
},
{
"id": 6,
"type": "value",
"value": "Securities"
},
{
"id": 2,
"type": "column",
"value": "label_id"
},
{
"id": 5,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
27
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
11,094 | tracking_share_transactions | spider:train_spider.json:5844 | Find the number of investors in total. | SELECT count(*) FROM INVESTORS | [
"Find",
"the",
"number",
"of",
"investors",
"in",
"total",
"."
] | [
{
"id": 0,
"type": "table",
"value": "investors"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
11,095 | simpson_episodes | bird:train.json:4282 | What is the difference between the number of votes for 1-star vs. 10-star for the episode "The Burns and the Bees"? | SELECT SUM(CASE WHEN T2.stars = 10 THEN T2.votes ELSE 0 END) - SUM(CASE WHEN T2.stars = 1 THEN T2.votes ELSE 0 END) AS Difference FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'The Burns and the Bees'; | [
"What",
"is",
"the",
"difference",
"between",
"the",
"number",
"of",
"votes",
"for",
"1",
"-",
"star",
"vs.",
"10",
"-",
"star",
"for",
"the",
"episode",
"\"",
"The",
"Burns",
"and",
"the",
"Bees",
"\"",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "The Burns and the Bees"
},
{
"id": 4,
"type": "column",
"value": "episode_id"
},
{
"id": 0,
"type": "table",
"value": "episode"
},
{
"id": 2,
"type": "column",
"value": "title"
},
{
"id": 6,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": [
19
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
21,
22,
23,
24,
25
]
},
{
"entity_id": 4,
"token_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
11,096 | books | bird:train.json:5953 | How many books did A.R. Braunmuller write? | SELECT COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T1.author_id = T2.author_id WHERE T1.author_name = 'A.R. Braunmuller' | [
"How",
"many",
"books",
"did",
"A.R.",
"Braunmuller",
"write",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "A.R. Braunmuller"
},
{
"id": 1,
"type": "table",
"value": "book_author"
},
{
"id": 2,
"type": "column",
"value": "author_name"
},
{
"id": 4,
"type": "column",
"value": "author_id"
},
{
"id": 0,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4,
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
11,098 | city_record | spider:train_spider.json:6304 | what is the GDP of the city with the largest population. | SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1 | [
"what",
"is",
"the",
"GDP",
"of",
"the",
"city",
"with",
"the",
"largest",
"population",
"."
] | [
{
"id": 2,
"type": "column",
"value": "regional_population"
},
{
"id": 0,
"type": "table",
"value": "city"
},
{
"id": 1,
"type": "column",
"value": "gdp"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,099 | card_games | bird:dev.json:394 | How many white bordered cards are powerful? | SELECT COUNT(id) FROM cards WHERE borderColor = 'white' AND cardKingdomId IS NOT NULL AND cardKingdomFoilId IS NOT NULL | [
"How",
"many",
"white",
"bordered",
"cards",
"are",
"powerful",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "cardkingdomfoilid"
},
{
"id": 4,
"type": "column",
"value": "cardkingdomid"
},
{
"id": 2,
"type": "column",
"value": "bordercolor"
},
{
"id": 0,
"type": "table",
"value": "cards"
},
{
"id": 3,
"type": "val... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-VALUE",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O"
] |
11,100 | party_host | spider:train_spider.json:2688 | List the names of hosts who did not serve as a host of any party in our record. | SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host) | [
"List",
"the",
"names",
"of",
"hosts",
"who",
"did",
"not",
"serve",
"as",
"a",
"host",
"of",
"any",
"party",
"in",
"our",
"record",
"."
] | [
{
"id": 3,
"type": "table",
"value": "party_host"
},
{
"id": 2,
"type": "column",
"value": "host_id"
},
{
"id": 0,
"type": "table",
"value": "host"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
11,101 | scientist_1 | spider:train_spider.json:6515 | Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it. | SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects) | [
"Find",
"name",
"of",
"the",
"project",
"that",
"needs",
"the",
"least",
"amount",
"of",
"time",
"to",
"finish",
"and",
"the",
"name",
"of",
"scientists",
"who",
"worked",
"on",
"it",
"."
] | [
{
"id": 1,
"type": "table",
"value": "scientists"
},
{
"id": 3,
"type": "table",
"value": "assignedto"
},
{
"id": 5,
"type": "column",
"value": "scientist"
},
{
"id": 4,
"type": "table",
"value": "projects"
},
{
"id": 7,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
18
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
11,102 | beer_factory | bird:train.json:5308 | From which cities are the customers who gave 5 stars in their reviews in November 2012? | SELECT DISTINCT T1.City FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 5 AND T2.ReviewDate BETWEEN '2012-11-01' AND '2012-11-30' | [
"From",
"which",
"cities",
"are",
"the",
"customers",
"who",
"gave",
"5",
"stars",
"in",
"their",
"reviews",
"in",
"November",
"2012",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "rootbeerreview"
},
{
"id": 3,
"type": "column",
"value": "customerid"
},
{
"id": 4,
"type": "column",
"value": "starrating"
},
{
"id": 6,
"type": "column",
"value": "reviewdate"
},
{
"id": 7,
"type": "value... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
11,103 | codebase_community | bird:dev.json:640 | Calculate the difference in view count from post posted by Mornington and view count from posts posted by Amos. | SELECT SUM(IIF(T1.DisplayName = 'Mornington', T3.ViewCount, 0)) - SUM(IIF(T1.DisplayName = 'Amos', T3.ViewCount, 0)) AS diff FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T3.Id = T2.PostId | [
"Calculate",
"the",
"difference",
"in",
"view",
"count",
"from",
"post",
"posted",
"by",
"Mornington",
"and",
"view",
"count",
"from",
"posts",
"posted",
"by",
"Amos",
"."
] | [
{
"id": 2,
"type": "table",
"value": "posthistory"
},
{
"id": 8,
"type": "column",
"value": "displayname"
},
{
"id": 9,
"type": "value",
"value": "Mornington"
},
{
"id": 6,
"type": "column",
"value": "viewcount"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O"
] |
11,104 | thrombosis_prediction | bird:dev.json:1252 | Among the patients with a normal Ig G level, how many of them have symptoms? | SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T2.IGG BETWEEN 900 AND 2000 AND T3.Symptoms IS NOT NULL | [
"Among",
"the",
"patients",
"with",
"a",
"normal",
"Ig",
"G",
"level",
",",
"how",
"many",
"of",
"them",
"have",
"symptoms",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "examination"
},
{
"id": 3,
"type": "table",
"value": "laboratory"
},
{
"id": 7,
"type": "column",
"value": "symptoms"
},
{
"id": 2,
"type": "table",
"value": "patient"
},
{
"id": 6,
"type": "value",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6,
7
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,105 | cre_Theme_park | spider:train_spider.json:5931 | Which tourist attractions does the visitor with detail 'Vincent' visit? | SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = "Vincent" | [
"Which",
"tourist",
"attractions",
"does",
"the",
"visitor",
"with",
"detail",
"'",
"Vincent",
"'",
"visit",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "tourist_attraction_id"
},
{
"id": 4,
"type": "table",
"value": "tourist_attractions"
},
{
"id": 2,
"type": "column",
"value": "tourist_details"
},
{
"id": 6,
"type": "column",
"value": "tourist_id"
},
{
"id": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
... | [
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
11,106 | epinions_1 | spider:train_spider.json:1709 | For each user, return the name and the average rating of reviews given by them. | SELECT T1.name , avg(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id | [
"For",
"each",
"user",
",",
"return",
"the",
"name",
"and",
"the",
"average",
"rating",
"of",
"reviews",
"given",
"by",
"them",
"."
] | [
{
"id": 2,
"type": "table",
"value": "useracct"
},
{
"id": 3,
"type": "table",
"value": "review"
},
{
"id": 4,
"type": "column",
"value": "rating"
},
{
"id": 0,
"type": "column",
"value": "u_id"
},
{
"id": 1,
"type": "column",
"value": "nam... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entit... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
11,107 | headphone_store | bird:test.json:935 | Find the average price for each headphone construction. | SELECT construction , avg(price) FROM headphone GROUP BY construction | [
"Find",
"the",
"average",
"price",
"for",
"each",
"headphone",
"construction",
"."
] | [
{
"id": 1,
"type": "column",
"value": "construction"
},
{
"id": 0,
"type": "table",
"value": "headphone"
},
{
"id": 2,
"type": "column",
"value": "price"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
11,108 | game_1 | spider:train_spider.json:6009 | How many games are played for all football games by students on scholarship? | SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname = "Football" AND onscholarship = 'Y' | [
"How",
"many",
"games",
"are",
"played",
"for",
"all",
"football",
"games",
"by",
"students",
"on",
"scholarship",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "onscholarship"
},
{
"id": 1,
"type": "column",
"value": "gamesplayed"
},
{
"id": 0,
"type": "table",
"value": "sportsinfo"
},
{
"id": 2,
"type": "column",
"value": "sportname"
},
{
"id": 3,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
11,
12
]
},
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
11,109 | chicago_crime | bird:train.json:8681 | On average, how many community areas are there in a side? | SELECT CAST(COUNT(T1.ward_no) AS REAL) / COUNT(DISTINCT T3.side) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no INNER JOIN Community_Area AS T3 ON T3.community_area_no = T2.community_area_no | [
"On",
"average",
",",
"how",
"many",
"community",
"areas",
"are",
"there",
"in",
"a",
"side",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "community_area_no"
},
{
"id": 0,
"type": "table",
"value": "community_area"
},
{
"id": 5,
"type": "column",
"value": "ward_no"
},
{
"id": 2,
"type": "table",
"value": "crime"
},
{
"id": 1,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": [
5,
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,110 | talkingdata | bird:train.json:1170 | List down the labels' IDs and categories of the app ID "5758400314709850000". | SELECT T1.label_id, T2.category FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id WHERE T1.app_id = 5758400314709850000 | [
"List",
"down",
"the",
"labels",
"'",
"IDs",
"and",
"categories",
"of",
"the",
"app",
"ID",
"\"",
"5758400314709850000",
"\"",
"."
] | [
{
"id": 5,
"type": "value",
"value": "5758400314709850000"
},
{
"id": 3,
"type": "table",
"value": "label_categories"
},
{
"id": 2,
"type": "table",
"value": "app_labels"
},
{
"id": 0,
"type": "column",
"value": "label_id"
},
{
"id": 1,
"type":... | [
{
"entity_id": 0,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
11,111 | boat_1 | bird:test.json:843 | Return name and age for sailors who are younger than 30. | SELECT name , age FROM Sailors WHERE age < 30 | [
"Return",
"name",
"and",
"age",
"for",
"sailors",
"who",
"are",
"younger",
"than",
"30",
"."
] | [
{
"id": 0,
"type": "table",
"value": "sailors"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "age"
},
{
"id": 3,
"type": "value",
"value": "30"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,112 | formula_1 | bird:dev.json:946 | Please list the location coordinates of the US circuits. | SELECT lat, lng FROM circuits WHERE country = 'USA' | [
"Please",
"list",
"the",
"location",
"coordinates",
"of",
"the",
"US",
"circuits",
"."
] | [
{
"id": 0,
"type": "table",
"value": "circuits"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "column",
"value": "lat"
},
{
"id": 2,
"type": "column",
"value": "lng"
},
{
"id": 4,
"type": "value",
"value": "USA"
... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
11,113 | car_road_race | bird:test.json:1348 | List the names of drivers that do not participate in any race. | SELECT Driver_Name FROM driver WHERE Driver_ID NOT IN (SELECT Driver_ID FROM race) | [
"List",
"the",
"names",
"of",
"drivers",
"that",
"do",
"not",
"participate",
"in",
"any",
"race",
"."
] | [
{
"id": 1,
"type": "column",
"value": "driver_name"
},
{
"id": 2,
"type": "column",
"value": "driver_id"
},
{
"id": 0,
"type": "table",
"value": "driver"
},
{
"id": 3,
"type": "table",
"value": "race"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,114 | local_govt_and_lot | spider:train_spider.json:4845 | How many services has each resident requested? List the resident id, details, and the count in descending order of the count. | SELECT T1.resident_id , T1.other_details , count(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY count(*) DESC | [
"How",
"many",
"services",
"has",
"each",
"resident",
"requested",
"?",
"List",
"the",
"resident",
"i",
"d",
",",
"details",
",",
"and",
"the",
"count",
"in",
"descending",
"order",
"of",
"the",
"count",
"."
] | [
{
"id": 3,
"type": "table",
"value": "residents_services"
},
{
"id": 1,
"type": "column",
"value": "other_details"
},
{
"id": 0,
"type": "column",
"value": "resident_id"
},
{
"id": 2,
"type": "table",
"value": "residents"
}
] | [
{
"entity_id": 0,
"token_idxs": [
11,
12
]
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,115 | retails | bird:train.json:6792 | Indicate the name of the product that is close to being sold out and that has the lowest cost price. | SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_availqty < 10 ORDER BY T2.ps_supplycost LIMIT 1 | [
"Indicate",
"the",
"name",
"of",
"the",
"product",
"that",
"is",
"close",
"to",
"being",
"sold",
"out",
"and",
"that",
"has",
"the",
"lowest",
"cost",
"price",
"."
] | [
{
"id": 5,
"type": "column",
"value": "ps_supplycost"
},
{
"id": 3,
"type": "column",
"value": "ps_availqty"
},
{
"id": 7,
"type": "column",
"value": "ps_partkey"
},
{
"id": 6,
"type": "column",
"value": "p_partkey"
},
{
"id": 2,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,116 | books | bird:train.json:5929 | How many orders has Cordy Dumbarton made? | SELECT COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Cordy' AND T1.last_name = 'Dumbarton' | [
"How",
"many",
"orders",
"has",
"Cordy",
"Dumbarton",
"made",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "table",
"value": "cust_order"
},
{
"id": 3,
"type": "column",
"value": "first_name"
},
{
"id": 5,
"type": "column",
"value": "last_name"
},
{
"id": 6,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O"
] |
11,117 | dorm_1 | spider:train_spider.json:5696 | Find the capacity and gender type of the dorm whose name has substring ‘Donor’. | SELECT student_capacity , gender FROM dorm WHERE dorm_name LIKE '%Donor%' | [
"Find",
"the",
"capacity",
"and",
"gender",
"type",
"of",
"the",
"dorm",
"whose",
"name",
"has",
"substring",
"‘",
"Donor",
"’",
"."
] | [
{
"id": 1,
"type": "column",
"value": "student_capacity"
},
{
"id": 3,
"type": "column",
"value": "dorm_name"
},
{
"id": 4,
"type": "value",
"value": "%Donor%"
},
{
"id": 2,
"type": "column",
"value": "gender"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
11,118 | cre_Drama_Workshop_Groups | spider:train_spider.json:5161 | Which status code is the most common of all the bookings? | SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1 | [
"Which",
"status",
"code",
"is",
"the",
"most",
"common",
"of",
"all",
"the",
"bookings",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "status_code"
},
{
"id": 0,
"type": "table",
"value": "bookings"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,120 | musical | spider:train_spider.json:266 | List the nominees that have been nominated more than two musicals. | SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2 | [
"List",
"the",
"nominees",
"that",
"have",
"been",
"nominated",
"more",
"than",
"two",
"musicals",
"."
] | [
{
"id": 0,
"type": "table",
"value": "musical"
},
{
"id": 1,
"type": "column",
"value": "nominee"
},
{
"id": 2,
"type": "value",
"value": "2"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,121 | soccer_2016 | bird:train.json:1859 | List the players' names who were born in 1971. | SELECT Player_name FROM Player WHERE DOB LIKE '1971%' | [
"List",
"the",
"players",
"'",
"names",
"who",
"were",
"born",
"in",
"1971",
"."
] | [
{
"id": 1,
"type": "column",
"value": "player_name"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 3,
"type": "value",
"value": "1971%"
},
{
"id": 2,
"type": "column",
"value": "dob"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,122 | department_store | spider:train_spider.json:4729 | What is the name and job title of the staff who was assigned the latest? | SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"and",
"job",
"title",
"of",
"the",
"staff",
"who",
"was",
"assigned",
"the",
"latest",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "staff_department_assignments"
},
{
"id": 4,
"type": "column",
"value": "date_assigned_to"
},
{
"id": 1,
"type": "column",
"value": "job_title_code"
},
{
"id": 0,
"type": "column",
"value": "staff_name"
},
{
"id... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
11,123 | retail_complains | bird:train.json:277 | Calculate the average age of clients from the Midwest region. | SELECT CAST(SUM(T1.age) AS REAL) / COUNT(T3.Region) AS average FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T3.Region = 'Midwest' | [
"Calculate",
"the",
"average",
"age",
"of",
"clients",
"from",
"the",
"Midwest",
"region",
"."
] | [
{
"id": 5,
"type": "column",
"value": "state_abbrev"
},
{
"id": 7,
"type": "column",
"value": "district_id"
},
{
"id": 6,
"type": "column",
"value": "statecode"
},
{
"id": 4,
"type": "table",
"value": "district"
},
{
"id": 2,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
11,124 | shop_membership | spider:train_spider.json:5430 | Show the member name and hometown who registered a branch in 2016. | SELECT T2.name , T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016 | [
"Show",
"the",
"member",
"name",
"and",
"hometown",
"who",
"registered",
"a",
"branch",
"in",
"2016",
"."
] | [
{
"id": 2,
"type": "table",
"value": "membership_register_branch"
},
{
"id": 4,
"type": "column",
"value": "register_year"
},
{
"id": 6,
"type": "column",
"value": "member_id"
},
{
"id": 1,
"type": "column",
"value": "hometown"
},
{
"id": 3,
"t... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
7,
8
]... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
11,125 | retails | bird:train.json:6781 | List by order number the 3 items with the lowest price after applying the discount. | SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice * (1 - l_discount) LIMIT 3 | [
"List",
"by",
"order",
"number",
"the",
"3",
"items",
"with",
"the",
"lowest",
"price",
"after",
"applying",
"the",
"discount",
"."
] | [
{
"id": 2,
"type": "column",
"value": "l_extendedprice"
},
{
"id": 1,
"type": "column",
"value": "l_orderkey"
},
{
"id": 4,
"type": "column",
"value": "l_discount"
},
{
"id": 0,
"type": "table",
"value": "lineitem"
},
{
"id": 3,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,126 | music_4 | spider:train_spider.json:6148 | Return the average age across all artists. | SELECT avg(Age) FROM artist | [
"Return",
"the",
"average",
"age",
"across",
"all",
"artists",
"."
] | [
{
"id": 0,
"type": "table",
"value": "artist"
},
{
"id": 1,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
11,128 | chinook_1 | spider:train_spider.json:818 | What are the names of artist who have the letter 'a' in their names? | SELECT Name FROM ARTIST WHERE Name LIKE "%a%" | [
"What",
"are",
"the",
"names",
"of",
"artist",
"who",
"have",
"the",
"letter",
"'",
"a",
"'",
"in",
"their",
"names",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "artist"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "%a%"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,129 | soccer_2016 | bird:train.json:1873 | Among the players out in match ID 392187, calculate the percentage of players out by bowl. | SELECT CAST(SUM(CASE WHEN T2.Out_Name = 'bowled' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Player_Out) FROM Wicket_Taken AS T1 INNER JOIN Out_Type AS T2 ON T2.Out_Id = T1.Kind_Out WHERE T1.Match_Id = 392187 | [
"Among",
"the",
"players",
"out",
"in",
"match",
"ID",
"392187",
",",
"calculate",
"the",
"percentage",
"of",
"players",
"out",
"by",
"bowl",
"."
] | [
{
"id": 0,
"type": "table",
"value": "wicket_taken"
},
{
"id": 7,
"type": "column",
"value": "player_out"
},
{
"id": 1,
"type": "table",
"value": "out_type"
},
{
"id": 2,
"type": "column",
"value": "match_id"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.