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 |
|---|---|---|---|---|---|---|---|---|
5,586 | real_estate_rentals | bird:test.json:1421 | What is the average number of rooms in a property? | SELECT avg(room_count) FROM Properties; | [
"What",
"is",
"the",
"average",
"number",
"of",
"rooms",
"in",
"a",
"property",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "properties"
},
{
"id": 1,
"type": "column",
"value": "room_count"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"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",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,587 | formula_1 | bird:dev.json:1004 | How many wins was achieved by the oldest racer? Indicate his/her full name. | SELECT SUM(T1.wins),T2.forename, T2.surname FROM driverStandings AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId ORDER BY T2.dob ASC LIMIT 1 | [
"How",
"many",
"wins",
"was",
"achieved",
"by",
"the",
"oldest",
"racer",
"?",
"Indicate",
"his",
"/",
"her",
"full",
"name",
"."
] | [
{
"id": 2,
"type": "table",
"value": "driverstandings"
},
{
"id": 0,
"type": "column",
"value": "forename"
},
{
"id": 6,
"type": "column",
"value": "driverid"
},
{
"id": 1,
"type": "column",
"value": "surname"
},
{
"id": 3,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
2
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,588 | european_football_1 | bird:train.json:2768 | What was the final score for the game Bursaspor vs Denizlispor on 2009/4/26? | SELECT FTHG, FTAG FROM matchs WHERE Date = '2009-04-26' AND HomeTeam = 'Bursaspor' AND AwayTeam = 'Denizlispor' | [
"What",
"was",
"the",
"final",
"score",
"for",
"the",
"game",
"Bursaspor",
"vs",
"Denizlispor",
"on",
"2009/4/26",
"?"
] | [
{
"id": 8,
"type": "value",
"value": "Denizlispor"
},
{
"id": 4,
"type": "value",
"value": "2009-04-26"
},
{
"id": 6,
"type": "value",
"value": "Bursaspor"
},
{
"id": 5,
"type": "column",
"value": "hometeam"
},
{
"id": 7,
"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": [
12
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
5,589 | regional_sales | bird:train.json:2634 | Which order number has the highest unit price? | SELECT OrderNumber FROM `Sales Orders` WHERE REPLACE(`Unit Price`, ',', '') = ( SELECT REPLACE(`Unit Price`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1 ) | [
"Which",
"order",
"number",
"has",
"the",
"highest",
"unit",
"price",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "Sales Orders"
},
{
"id": 1,
"type": "column",
"value": "ordernumber"
},
{
"id": 2,
"type": "column",
"value": "Unit Price"
},
{
"id": 3,
"type": "value",
"value": ","
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,590 | car_retails | bird:train.json:1573 | State the email of those who are staff of Murphy Diane whose number is 1002 and living in San Francisco | SELECT T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T1.reportsTo = 1002 AND T2.city = 'San Francisco' | [
"State",
"the",
"email",
"of",
"those",
"who",
"are",
"staff",
"of",
"Murphy",
"Diane",
"whose",
"number",
"is",
"1002",
"and",
"living",
"in",
"San",
"Francisco"
] | [
{
"id": 7,
"type": "value",
"value": "San Francisco"
},
{
"id": 3,
"type": "column",
"value": "officecode"
},
{
"id": 1,
"type": "table",
"value": "employees"
},
{
"id": 4,
"type": "column",
"value": "reportsto"
},
{
"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": [
14
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE"
] |
5,591 | address_1 | bird:test.json:764 | What are all the distinct states? | SELECT DISTINCT state FROM City | [
"What",
"are",
"all",
"the",
"distinct",
"states",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "state"
},
{
"id": 0,
"type": "table",
"value": "city"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"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-COLUMN",
"O"
] |
5,592 | public_review_platform | bird:train.json:3951 | Compare and get the difference of the number of businesses that are open in Monday and Tuesday from 10 am to 9 pm. | SELECT SUM(CASE WHEN T3.day_of_week = 'Monday' THEN 1 ELSE 0 END) - SUM(CASE WHEN T3.day_of_week = 'Tuesday' THEN 1 ELSE 0 END) AS DIFF FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.opening_time = '10AM' AND T2.closing_time... | [
"Compare",
"and",
"get",
"the",
"difference",
"of",
"the",
"number",
"of",
"businesses",
"that",
"are",
"open",
"in",
"Monday",
"and",
"Tuesday",
"from",
"10",
"am",
"to",
"9",
"pm",
"."
] | [
{
"id": 2,
"type": "table",
"value": "business_hours"
},
{
"id": 4,
"type": "column",
"value": "opening_time"
},
{
"id": 6,
"type": "column",
"value": "closing_time"
},
{
"id": 8,
"type": "column",
"value": "business_id"
},
{
"id": 11,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
12,
13
]
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-VALUE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,593 | farm | spider:train_spider.json:49 | What are the official names of cities that have not hosted a farm competition? | SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition) | [
"What",
"are",
"the",
"official",
"names",
"of",
"cities",
"that",
"have",
"not",
"hosted",
"a",
"farm",
"competition",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "farm_competition"
},
{
"id": 1,
"type": "column",
"value": "official_name"
},
{
"id": 4,
"type": "column",
"value": "host_city_id"
},
{
"id": 2,
"type": "column",
"value": "city_id"
},
{
"id": 0,
"type": "t... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
5,594 | document_management | spider:train_spider.json:4504 | What are the codes of types of documents of which there are for or more? | SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 4 | [
"What",
"are",
"the",
"codes",
"of",
"types",
"of",
"documents",
"of",
"which",
"there",
"are",
"for",
"or",
"more",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "document_type_code"
},
{
"id": 0,
"type": "table",
"value": "documents"
},
{
"id": 2,
"type": "value",
"value": "4"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"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",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,595 | gas_company | spider:train_spider.json:1995 | List the company name and rank for all companies in the decreasing order of their sales. | SELECT company , rank FROM company ORDER BY Sales_billion DESC | [
"List",
"the",
"company",
"name",
"and",
"rank",
"for",
"all",
"companies",
"in",
"the",
"decreasing",
"order",
"of",
"their",
"sales",
"."
] | [
{
"id": 3,
"type": "column",
"value": "sales_billion"
},
{
"id": 0,
"type": "table",
"value": "company"
},
{
"id": 1,
"type": "column",
"value": "company"
},
{
"id": 2,
"type": "column",
"value": "rank"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,596 | vehicle_rent | bird:test.json:424 | What are the names and total rental hours for each vehicle? | SELECT T2.name , sum(T1.total_hours) FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id | [
"What",
"are",
"the",
"names",
"and",
"total",
"rental",
"hours",
"for",
"each",
"vehicle",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "renting_history"
},
{
"id": 4,
"type": "column",
"value": "total_hours"
},
{
"id": 5,
"type": "column",
"value": "vehicles_id"
},
{
"id": 3,
"type": "table",
"value": "vehicles"
},
{
"id": 1,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
6,
7
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
5,597 | law_episode | bird:train.json:1329 | List down the titles of the top 3 episodes, from highest to lowest, in terms of their weighted stars. | SELECT T2.title FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.stars BETWEEN 1 AND 10 GROUP BY T2.title ORDER BY CAST(SUM(T1.stars * T1.percent) AS REAL) / 100 DESC LIMIT 3 | [
"List",
"down",
"the",
"titles",
"of",
"the",
"top",
"3",
"episodes",
",",
"from",
"highest",
"to",
"lowest",
",",
"in",
"terms",
"of",
"their",
"weighted",
"stars",
"."
] | [
{
"id": 6,
"type": "column",
"value": "episode_id"
},
{
"id": 2,
"type": "table",
"value": "episode"
},
{
"id": 8,
"type": "column",
"value": "percent"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 3,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
20
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,598 | medicine_enzyme_interaction | spider:train_spider.json:974 | What are the names of enzymes that include the string 'ALA'? | SELECT name FROM enzyme WHERE name LIKE "%ALA%" | [
"What",
"are",
"the",
"names",
"of",
"enzymes",
"that",
"include",
"the",
"string",
"'",
"ALA",
"'",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "enzyme"
},
{
"id": 2,
"type": "column",
"value": "%ALA%"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
5,599 | public_review_platform | bird:train.json:3916 | List down the business ID with a low review count in Phoenix. | SELECT business_id FROM Business WHERE city LIKE 'Phoenix' AND review_count LIKE 'Low' | [
"List",
"down",
"the",
"business",
"ID",
"with",
"a",
"low",
"review",
"count",
"in",
"Phoenix",
"."
] | [
{
"id": 4,
"type": "column",
"value": "review_count"
},
{
"id": 1,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "table",
"value": "business"
},
{
"id": 3,
"type": "value",
"value": "Phoenix"
},
{
"id": 2,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
8,
9
]
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
5,600 | public_review_platform | bird:train.json:3772 | User No. 70271 only has given one tip to the Yelp business, which category was that business belonged to? | SELECT T4.category_name FROM Tips AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T1.user_id = 70271 | [
"User",
"No",
".",
"70271",
"only",
"has",
"given",
"one",
"tip",
"to",
"the",
"Yelp",
"business",
",",
"which",
"category",
"was",
"that",
"business",
"belonged",
"to",
"?"
] | [
{
"id": 4,
"type": "table",
"value": "business_categories"
},
{
"id": 0,
"type": "column",
"value": "category_name"
},
{
"id": 5,
"type": "column",
"value": "category_id"
},
{
"id": 8,
"type": "column",
"value": "business_id"
},
{
"id": 1,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
0
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
13,
14
]
},
{
... | [
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"I-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,601 | menu | bird:train.json:5484 | How many dishes are there in total in the menus with the name "Waldorf Astoria"? | SELECT SUM(CASE WHEN T3.name = 'Waldorf Astoria' THEN 1 ELSE 0 END) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id | [
"How",
"many",
"dishes",
"are",
"there",
"in",
"total",
"in",
"the",
"menus",
"with",
"the",
"name",
"\"",
"Waldorf",
"Astoria",
"\"",
"?"
] | [
{
"id": 9,
"type": "value",
"value": "Waldorf Astoria"
},
{
"id": 6,
"type": "column",
"value": "menu_page_id"
},
{
"id": 1,
"type": "table",
"value": "menuitem"
},
{
"id": 2,
"type": "table",
"value": "menupage"
},
{
"id": 3,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"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",
"O",
"B-TABLE",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
5,602 | books | bird:train.json:6081 | What is the order price of the book "The Servant Leader" in 2003? | SELECT T2.price FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Servant Leader' AND STRFTIME('%Y', T1.publication_date) = '2003' | [
"What",
"is",
"the",
"order",
"price",
"of",
"the",
"book",
"\"",
"The",
"Servant",
"Leader",
"\"",
"in",
"2003",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "The Servant Leader"
},
{
"id": 8,
"type": "column",
"value": "publication_date"
},
{
"id": 2,
"type": "table",
"value": "order_line"
},
{
"id": 3,
"type": "column",
"value": "book_id"
},
{
"id": 0,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"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-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
5,603 | chinook_1 | spider:train_spider.json:830 | Find the average unit price for a track. | SELECT AVG(UnitPrice) FROM TRACK | [
"Find",
"the",
"average",
"unit",
"price",
"for",
"a",
"track",
"."
] | [
{
"id": 1,
"type": "column",
"value": "unitprice"
},
{
"id": 0,
"type": "table",
"value": "track"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
5,604 | talkingdata | bird:train.json:1050 | What is the age of the oldest active user that participated in the event held on 5/6/2016 at coordinates 121, 31? | SELECT T3.age FROM app_events AS T1 INNER JOIN events_relevant AS T2 ON T1.event_id = T2.event_id INNER JOIN gender_age AS T3 ON T2.device_id = T3.device_id WHERE T1.is_active = 1 AND T2.longitude = 121 AND T2.latitude = 31 AND SUBSTR(T2.timestamp, 1, 10) = '2016-05-06' ORDER BY T3.age DESC LIMIT 1 | [
"What",
"is",
"the",
"age",
"of",
"the",
"oldest",
"active",
"user",
"that",
"participated",
"in",
"the",
"event",
"held",
"on",
"5/6/2016",
"at",
"coordinates",
"121",
",",
"31",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "events_relevant"
},
{
"id": 1,
"type": "table",
"value": "gender_age"
},
{
"id": 2,
"type": "table",
"value": "app_events"
},
{
"id": 11,
"type": "value",
"value": "2016-05-06"
},
{
"id": 4,
"type": "column... | [
{
"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": [
7
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
5,605 | codebase_comments | bird:train.json:623 | Give the number of solutions that the repository which has 3060 Stars contains. | SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 3060 | [
"Give",
"the",
"number",
"of",
"solutions",
"that",
"the",
"repository",
"which",
"has",
"3060",
"Stars",
"contains",
"."
] | [
{
"id": 1,
"type": "table",
"value": "solution"
},
{
"id": 4,
"type": "column",
"value": "repoid"
},
{
"id": 2,
"type": "column",
"value": "stars"
},
{
"id": 0,
"type": "table",
"value": "repo"
},
{
"id": 3,
"type": "value",
"value": "3060"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entit... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O"
] |
5,606 | university | bird:train.json:8009 | Compute the average percentage of female students. | SELECT AVG(pct_female_students) FROM university_year | [
"Compute",
"the",
"average",
"percentage",
"of",
"female",
"students",
"."
] | [
{
"id": 1,
"type": "column",
"value": "pct_female_students"
},
{
"id": 0,
"type": "table",
"value": "university_year"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5,
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",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,607 | college_2 | spider:train_spider.json:1446 | Find the name of the department which has the highest average salary of professors. | SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1 | [
"Find",
"the",
"name",
"of",
"the",
"department",
"which",
"has",
"the",
"highest",
"average",
"salary",
"of",
"professors",
"."
] | [
{
"id": 0,
"type": "table",
"value": "instructor"
},
{
"id": 1,
"type": "column",
"value": "dept_name"
},
{
"id": 2,
"type": "column",
"value": "salary"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
5,608 | financial | bird:dev.json:103 | Which client issued his/her card in 1994/3/3, give his/her client id. | SELECT T2.client_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T3.issued = '1994-03-03' | [
"Which",
"client",
"issued",
"his",
"/",
"her",
"card",
"in",
"1994/3/3",
",",
"give",
"his",
"/",
"her",
"client",
"i",
"d."
] | [
{
"id": 3,
"type": "value",
"value": "1994-03-03"
},
{
"id": 0,
"type": "column",
"value": "client_id"
},
{
"id": 6,
"type": "column",
"value": "disp_id"
},
{
"id": 2,
"type": "column",
"value": "issued"
},
{
"id": 4,
"type": "table",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
15,
16
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
14
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN"
] |
5,609 | cre_Doc_Workflow | bird:test.json:2038 | List the codes and descriptions for all process status. | SELECT process_status_code , process_status_description FROM Process_status | [
"List",
"the",
"codes",
"and",
"descriptions",
"for",
"all",
"process",
"status",
"."
] | [
{
"id": 2,
"type": "column",
"value": "process_status_description"
},
{
"id": 1,
"type": "column",
"value": "process_status_code"
},
{
"id": 0,
"type": "table",
"value": "process_status"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7,
8
]
},
{
"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",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
5,610 | movie_3 | bird:train.json:9292 | Please name three cities that belong to Algeria. | SELECT T2.city FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T1.country = 'Algeria' | [
"Please",
"name",
"three",
"cities",
"that",
"belong",
"to",
"Algeria",
"."
] | [
{
"id": 5,
"type": "column",
"value": "country_id"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 4,
"type": "value",
"value": "Algeria"
},
{
"id": 0,
"type": "column",
"value... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
5,611 | music_1 | spider:train_spider.json:3617 | What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre? | SELECT f_id FROM song WHERE resolution > (SELECT avg(resolution) FROM song WHERE genre_is = "modern") | [
"What",
"is",
"ids",
"of",
"the",
"songs",
"whose",
"resolution",
"is",
"higher",
"than",
"the",
"average",
"resolution",
"of",
"songs",
"in",
"modern",
"genre",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "resolution"
},
{
"id": 3,
"type": "column",
"value": "genre_is"
},
{
"id": 4,
"type": "column",
"value": "modern"
},
{
"id": 0,
"type": "table",
"value": "song"
},
{
"id": 1,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
18
]
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
{
"ent... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
5,612 | cars | bird:train.json:3080 | Tell the origin country of car no.382. | SELECT DISTINCT T2.country FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T1.ID = 382 | [
"Tell",
"the",
"origin",
"country",
"of",
"car",
"no.382",
"."
] | [
{
"id": 1,
"type": "table",
"value": "production"
},
{
"id": 0,
"type": "column",
"value": "country"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 5,
"type": "column",
"value": "origin"
},
{
"id": 4,
"type": "value",
"value":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O"
] |
5,613 | synthea | bird:train.json:1501 | How many interactions did Lorri Simons have with medical professionals between 2010 and 2017? What percentage of encounters are attributed to prenatal visits? | SELECT COUNT(T1.patient) , CAST(SUM(CASE WHEN T2.DESCRIPTION = 'Prenatal visit' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.patient) FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Lorri' AND T1.last = 'Simonis' AND strftime('%Y', T2.DATE) BETWEEN '2010' AND '2017' | [
"How",
"many",
"interactions",
"did",
"Lorri",
"Simons",
"have",
"with",
"medical",
"professionals",
"between",
"2010",
"and",
"2017",
"?",
"What",
"percentage",
"of",
"encounters",
"are",
"attributed",
"to",
"prenatal",
"visits",
"?"
] | [
{
"id": 15,
"type": "value",
"value": "Prenatal visit"
},
{
"id": 14,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "encounters"
},
{
"id": 0,
"type": "table",
"value": "patients"
},
{
"id": 2,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
18
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,614 | olympics | bird:train.json:4995 | How many athletes over the age of 59 competed in the 2016 Summer Olympics? | SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '2016 Summer' AND T2.age > 59 | [
"How",
"many",
"athletes",
"over",
"the",
"age",
"of",
"59",
"competed",
"in",
"the",
"2016",
"Summer",
"Olympics",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "games_competitor"
},
{
"id": 6,
"type": "value",
"value": "2016 Summer"
},
{
"id": 5,
"type": "column",
"value": "games_name"
},
{
"id": 2,
"type": "column",
"value": "person_id"
},
{
"id": 4,
"type": "colu... | [
{
"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": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
5,615 | scientist_1 | spider:train_spider.json:6514 | What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name. | SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name | [
"What",
"are",
"the",
"names",
"of",
"each",
"scientist",
",",
"the",
"names",
"of",
"the",
"projects",
"that",
"they",
"work",
"on",
",",
"and",
"the",
"hours",
"for",
"each",
"of",
"those",
"projects",
",",
"listed",
"in",
"alphabetical",
"order",
"by"... | [
{
"id": 3,
"type": "table",
"value": "scientists"
},
{
"id": 4,
"type": "table",
"value": "assignedto"
},
{
"id": 8,
"type": "column",
"value": "scientist"
},
{
"id": 2,
"type": "table",
"value": "projects"
},
{
"id": 5,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
33
]
},
{
"entity_id": 1,
"token_idxs": [
20
]
},
{
"entity_id": 2,
"token_idxs": [
25
]
},
{
"entity_id": 3,
"token_idxs": [
36
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"ent... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O"... |
5,616 | superhero | bird:dev.json:758 | Provide the hair colour of the human superhero who is 185 cm tall. | SELECT DISTINCT T3.colour FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T1.height_cm = 185 AND T2.race = 'Human' | [
"Provide",
"the",
"hair",
"colour",
"of",
"the",
"human",
"superhero",
"who",
"is",
"185",
"cm",
"tall",
"."
] | [
{
"id": 4,
"type": "column",
"value": "hair_colour_id"
},
{
"id": 2,
"type": "table",
"value": "superhero"
},
{
"id": 6,
"type": "column",
"value": "height_cm"
},
{
"id": 10,
"type": "column",
"value": "race_id"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
5,618 | activity_1 | spider:train_spider.json:6784 | Find the first and last name of the faculty who is involved in the largest number of activities. | SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1 | [
"Find",
"the",
"first",
"and",
"last",
"name",
"of",
"the",
"faculty",
"who",
"is",
"involved",
"in",
"the",
"largest",
"number",
"of",
"activities",
"."
] | [
{
"id": 4,
"type": "table",
"value": "faculty_participates_in"
},
{
"id": 3,
"type": "table",
"value": "faculty"
},
{
"id": 0,
"type": "column",
"value": "facid"
},
{
"id": 1,
"type": "column",
"value": "fname"
},
{
"id": 2,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
0
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,619 | boat_1 | bird:test.json:914 | What is the maximum rating for sailors? | SELECT max(rating) FROM Sailors | [
"What",
"is",
"the",
"maximum",
"rating",
"for",
"sailors",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "sailors"
},
{
"id": 1,
"type": "column",
"value": "rating"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"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",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
5,620 | hockey | bird:train.json:7770 | Among the coaches who are born in the USA, how many of them used to train the Philadelphia Flyers? | SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthCountry = 'USA' | [
"Among",
"the",
"coaches",
"who",
"are",
"born",
"in",
"the",
"USA",
",",
"how",
"many",
"of",
"them",
"used",
"to",
"train",
"the",
"Philadelphia",
"Flyers",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Philadelphia Flyers"
},
{
"id": 6,
"type": "column",
"value": "birthcountry"
},
{
"id": 1,
"type": "column",
"value": "coachid"
},
{
"id": 2,
"type": "table",
"value": "coaches"
},
{
"id": 0,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,621 | app_store | bird:train.json:2532 | How many of the reviews for the app "Brit + Co" have a comment? | SELECT COUNT(App) FROM user_reviews WHERE App = 'Brit + Co' AND Translated_Review IS NOT NULL | [
"How",
"many",
"of",
"the",
"reviews",
"for",
"the",
"app",
"\"",
"Brit",
"+",
"Co",
"\"",
"have",
"a",
"comment",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "translated_review"
},
{
"id": 0,
"type": "table",
"value": "user_reviews"
},
{
"id": 2,
"type": "value",
"value": "Brit + Co"
},
{
"id": 1,
"type": "column",
"value": "app"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10,
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
5,622 | tracking_software_problems | spider:train_spider.json:5366 | How many problems does the product with the most problems have? List the number of the problems and product name. | SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1 | [
"How",
"many",
"problems",
"does",
"the",
"product",
"with",
"the",
"most",
"problems",
"have",
"?",
"List",
"the",
"number",
"of",
"the",
"problems",
"and",
"product",
"name",
"."
] | [
{
"id": 0,
"type": "column",
"value": "product_name"
},
{
"id": 3,
"type": "column",
"value": "product_id"
},
{
"id": 2,
"type": "table",
"value": "problems"
},
{
"id": 1,
"type": "table",
"value": "product"
}
] | [
{
"entity_id": 0,
"token_idxs": [
19,
20
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,623 | cre_Theme_park | spider:train_spider.json:5932 | Show the tourist attractions visited by the tourist whose detail is 'Vincent'. | 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" | [
"Show",
"the",
"tourist",
"attractions",
"visited",
"by",
"the",
"tourist",
"whose",
"detail",
"is",
"'",
"Vincent",
"'",
"."
] | [
{
"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": []
},
{
"entity_id": 2,
"token_idxs": [
7,
8,
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
5,624 | talkingdata | bird:train.json:1100 | What is the average age of all the vivo device users? | SELECT AVG(age) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo' | [
"What",
"is",
"the",
"average",
"age",
"of",
"all",
"the",
"vivo",
"device",
"users",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 2,
"type": "column",
"value": "phone_brand"
},
{
"id": 0,
"type": "table",
"value": "gender_age"
},
{
"id": 5,
"type": "column",
"value": "device_id"
},
{
"id": 3,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O"
] |
5,625 | college_1 | spider:train_spider.json:3273 | What are the first names of the professors who do not teach a class. | SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num | [
"What",
"are",
"the",
"first",
"names",
"of",
"the",
"professors",
"who",
"do",
"not",
"teach",
"a",
"class",
"."
] | [
{
"id": 2,
"type": "column",
"value": "emp_jobcode"
},
{
"id": 1,
"type": "column",
"value": "emp_fname"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 6,
"type": "column",
"value": "prof_num"
},
{
"id": 5,
"type": "column",
... | [
{
"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": [
13
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,626 | entrepreneur | spider:train_spider.json:2297 | Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000. | SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000 | [
"Show",
"the",
"investors",
"shared",
"by",
"entrepreneurs",
"that",
"requested",
"more",
"than",
"140000",
"and",
"entrepreneurs",
"that",
"requested",
"less",
"than",
"120000",
"."
] | [
{
"id": 2,
"type": "column",
"value": "money_requested"
},
{
"id": 0,
"type": "table",
"value": "entrepreneur"
},
{
"id": 1,
"type": "column",
"value": "investor"
},
{
"id": 3,
"type": "value",
"value": "140000"
},
{
"id": 4,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
17
]
},... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
5,627 | music_1 | spider:train_spider.json:3567 | For each file format, return the number of artists who released songs in that format. | SELECT count(*) , formats FROM files GROUP BY formats | [
"For",
"each",
"file",
"format",
",",
"return",
"the",
"number",
"of",
"artists",
"who",
"released",
"songs",
"in",
"that",
"format",
"."
] | [
{
"id": 1,
"type": "column",
"value": "formats"
},
{
"id": 0,
"type": "table",
"value": "files"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,628 | address_1 | bird:test.json:762 | Count the number of cities. | SELECT count(*) FROM City | [
"Count",
"the",
"number",
"of",
"cities",
"."
] | [
{
"id": 0,
"type": "table",
"value": "city"
}
] | [
{
"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"
] |
5,629 | college_3 | spider:train_spider.json:4698 | What are the last names of faculty who are part of the computer science department? | SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO = T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID = T3.FacID WHERE T1.DName = "Computer Science" | [
"What",
"are",
"the",
"last",
"names",
"of",
"faculty",
"who",
"are",
"part",
"of",
"the",
"computer",
"science",
"department",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "Computer Science"
},
{
"id": 4,
"type": "table",
"value": "department"
},
{
"id": 1,
"type": "table",
"value": "member_of"
},
{
"id": 5,
"type": "table",
"value": "faculty"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"O"
] |
5,630 | disney | bird:train.json:4722 | What is Disney's highest grossing action movie? | SELECT movie_title FROM movies_total_gross WHERE genre = 'Action' ORDER BY CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1 | [
"What",
"is",
"Disney",
"'s",
"highest",
"grossing",
"action",
"movie",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "movies_total_gross"
},
{
"id": 1,
"type": "column",
"value": "movie_title"
},
{
"id": 5,
"type": "column",
"value": "total_gross"
},
{
"id": 3,
"type": "value",
"value": "Action"
},
{
"id": 2,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
5,631 | food_inspection_2 | bird:train.json:6112 | How many inspections were sanitarian Joshua Rosa responsible for in 2010? | SELECT COUNT(T2.inspection_id) FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE strftime('%Y', T2.inspection_date) = '2010' AND T1.first_name = 'Joshua' AND T1.last_name = 'Rosa' | [
"How",
"many",
"inspections",
"were",
"sanitarian",
"Joshua",
"Rosa",
"responsible",
"for",
"in",
"2010",
"?"
] | [
{
"id": 10,
"type": "column",
"value": "inspection_date"
},
{
"id": 2,
"type": "column",
"value": "inspection_id"
},
{
"id": 3,
"type": "column",
"value": "employee_id"
},
{
"id": 1,
"type": "table",
"value": "inspection"
},
{
"id": 5,
"type": ... | [
{
"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": [
10
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
5,632 | simpson_episodes | bird:train.json:4238 | List all keywords associated with the episode 'Take My Life, Please'. | SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Take My Life, Please'; | [
"List",
"all",
"keywords",
"associated",
"with",
"the",
"episode",
"'",
"Take",
"My",
"Life",
",",
"Please",
"'",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Take My Life, Please"
},
{
"id": 5,
"type": "column",
"value": "episode_id"
},
{
"id": 0,
"type": "column",
"value": "keyword"
},
{
"id": 1,
"type": "table",
"value": "episode"
},
{
"id": 2,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8,
9,
10,
11,
12
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
5,633 | music_platform_2 | bird:train.json:7978 | What percentage of podcasts are "technology" podcasts? List all of them. | SELECT CAST(SUM(CASE WHEN T1.category = 'technology' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.title) OR '%' "percentage" FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id | [
"What",
"percentage",
"of",
"podcasts",
"are",
"\"",
"technology",
"\"",
"podcasts",
"?",
"List",
"all",
"of",
"them",
"."
] | [
{
"id": 0,
"type": "table",
"value": "categories"
},
{
"id": 3,
"type": "column",
"value": "podcast_id"
},
{
"id": 9,
"type": "value",
"value": "technology"
},
{
"id": 1,
"type": "table",
"value": "podcasts"
},
{
"id": 8,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,634 | retail_world | bird:train.json:6435 | Please name any three products that have been discontinued in the meat or poultry category. | SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.Discontinued = 1 AND T1.CategoryName = 'Meat/Poultry' LIMIT 3 | [
"Please",
"name",
"any",
"three",
"products",
"that",
"have",
"been",
"discontinued",
"in",
"the",
"meat",
"or",
"poultry",
"category",
"."
] | [
{
"id": 4,
"type": "column",
"value": "discontinued"
},
{
"id": 6,
"type": "column",
"value": "categoryname"
},
{
"id": 7,
"type": "value",
"value": "Meat/Poultry"
},
{
"id": 0,
"type": "column",
"value": "productname"
},
{
"id": 1,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
5,636 | hr_1 | spider:train_spider.json:3444 | What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000? | SELECT job_title , max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000 | [
"What",
"are",
"the",
"job",
"titles",
",",
"and",
"range",
"of",
"salaries",
"for",
"jobs",
"with",
"maximum",
"salary",
"between",
"12000",
"and",
"18000",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "max_salary"
},
{
"id": 5,
"type": "column",
"value": "min_salary"
},
{
"id": 1,
"type": "column",
"value": "job_title"
},
{
"id": 3,
"type": "value",
"value": "12000"
},
{
"id": 4,
"type": "value",
"va... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
18
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
5,637 | works_cycles | bird:train.json:7032 | What is the highest amount of bonus earned by the sales person in Canada? | SELECT T2.Bonus FROM SalesTerritory AS T1 INNER JOIN SalesPerson AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T1.CountryRegionCode = 'CA' ORDER BY T2.SalesQuota DESC LIMIT 1 | [
"What",
"is",
"the",
"highest",
"amount",
"of",
"bonus",
"earned",
"by",
"the",
"sales",
"person",
"in",
"Canada",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "countryregioncode"
},
{
"id": 1,
"type": "table",
"value": "salesterritory"
},
{
"id": 2,
"type": "table",
"value": "salesperson"
},
{
"id": 6,
"type": "column",
"value": "territoryid"
},
{
"id": 5,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"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",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O"
] |
5,638 | wrestler | spider:train_spider.json:1856 | What are the names of wrestlers and the elimination moves? | SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID | [
"What",
"are",
"the",
"names",
"of",
"wrestlers",
"and",
"the",
"elimination",
"moves",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "elimination_move"
},
{
"id": 2,
"type": "table",
"value": "elimination"
},
{
"id": 4,
"type": "column",
"value": "wrestler_id"
},
{
"id": 3,
"type": "table",
"value": "wrestler"
},
{
"id": 0,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
5,639 | thrombosis_prediction | bird:dev.json:1242 | For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level. | SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT BETWEEN 100 AND 400 AND STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday) < 50 AND STRFTIME('%Y', T2.Date) = '1984' | [
"For",
"laboratory",
"examinations",
"take",
"in",
"1984",
",",
"list",
"all",
"patients",
"below",
"50",
"years",
"old",
"with",
"normal",
"platelet",
"level",
"."
] | [
{
"id": 2,
"type": "table",
"value": "laboratory"
},
{
"id": 10,
"type": "column",
"value": "birthday"
},
{
"id": 1,
"type": "table",
"value": "patient"
},
{
"id": 7,
"type": "value",
"value": "1984"
},
{
"id": 9,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,640 | customers_and_addresses | spider:train_spider.json:6116 | Tell me the total quantity of products bought by the customer called "Rodrick Heaney". | SELECT sum(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney" | [
"Tell",
"me",
"the",
"total",
"quantity",
"of",
"products",
"bought",
"by",
"the",
"customer",
"called",
"\"",
"Rodrick",
"Heaney",
"\"",
"."
] | [
{
"id": 5,
"type": "table",
"value": "customer_orders"
},
{
"id": 2,
"type": "column",
"value": "Rodrick Heaney"
},
{
"id": 3,
"type": "column",
"value": "order_quantity"
},
{
"id": 1,
"type": "column",
"value": "customer_name"
},
{
"id": 0,
"t... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13,
14
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
5,641 | synthea | bird:train.json:1472 | Give me the reason, name of the drug, and duration of medication under encounter ID 23c293ec-dbae-4a22-896e-f12cf3c8bac3. Tell me if the patient is still alive. | SELECT T2.REASONDESCRIPTION, T2.DESCRIPTION , strftime('%J', T2.STOP) - strftime('%J', T2.START) AS days , CASE WHEN T1.deathdate IS NULL THEN 'alive' ELSE 'dead' END FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.ENCOUNTER = '23c293ec-dbae-4a22-896e-f12cf3c8bac3' | [
"Give",
"me",
"the",
"reason",
",",
"name",
"of",
"the",
"drug",
",",
"and",
"duration",
"of",
"medication",
"under",
"encounter",
"ID",
"23c293ec",
"-",
"dbae-4a22",
"-",
"896e",
"-",
"f12cf3c8bac3",
".",
"Tell",
"me",
"if",
"the",
"patient",
"is",
"sti... | [
{
"id": 5,
"type": "value",
"value": "23c293ec-dbae-4a22-896e-f12cf3c8bac3"
},
{
"id": 0,
"type": "column",
"value": "reasondescription"
},
{
"id": 1,
"type": "column",
"value": "description"
},
{
"id": 3,
"type": "table",
"value": "medications"
},
{
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
5,642 | local_govt_and_lot | spider:train_spider.json:4855 | When is the last day any resident moved in? | SELECT max(date_moved_in) FROM Residents | [
"When",
"is",
"the",
"last",
"day",
"any",
"resident",
"moved",
"in",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "date_moved_in"
},
{
"id": 0,
"type": "table",
"value": "residents"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,643 | dorm_1 | spider:train_spider.json:5688 | Find the average and total capacity of dorms for the students with gender X. | SELECT avg(student_capacity) , sum(student_capacity) FROM dorm WHERE gender = 'X' | [
"Find",
"the",
"average",
"and",
"total",
"capacity",
"of",
"dorms",
"for",
"the",
"students",
"with",
"gender",
"X."
] | [
{
"id": 3,
"type": "column",
"value": "student_capacity"
},
{
"id": 1,
"type": "column",
"value": "gender"
},
{
"id": 0,
"type": "table",
"value": "dorm"
},
{
"id": 2,
"type": "value",
"value": "X"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE"
] |
5,644 | hospital_1 | spider:train_spider.json:3976 | What is the average cost of procedures that physician John Wen was trained in? | SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" | [
"What",
"is",
"the",
"average",
"cost",
"of",
"procedures",
"that",
"physician",
"John",
"Wen",
"was",
"trained",
"in",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "procedures"
},
{
"id": 5,
"type": "table",
"value": "trained_in"
},
{
"id": 8,
"type": "column",
"value": "employeeid"
},
{
"id": 4,
"type": "table",
"value": "physician"
},
{
"id": 7,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
5,645 | company_employee | spider:train_spider.json:4109 | Show the names of companies and the number of employees they have | SELECT T3.Name , COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name | [
"Show",
"the",
"names",
"of",
"companies",
"and",
"the",
"number",
"of",
"employees",
"they",
"have"
] | [
{
"id": 2,
"type": "table",
"value": "employment"
},
{
"id": 4,
"type": "column",
"value": "company_id"
},
{
"id": 5,
"type": "column",
"value": "people_id"
},
{
"id": 1,
"type": "table",
"value": "company"
},
{
"id": 3,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
5,646 | social_media | bird:train.json:849 | Please list the top 3 cities with the most number of tweets posted in Canada. | SELECT T.City FROM ( SELECT T2.City, COUNT(T1.TweetID) AS num FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.Country = 'Canada' GROUP BY T2.City ) T ORDER BY T.num DESC LIMIT 3 | [
"Please",
"list",
"the",
"top",
"3",
"cities",
"with",
"the",
"most",
"number",
"of",
"tweets",
"posted",
"in",
"Canada",
"."
] | [
{
"id": 7,
"type": "column",
"value": "locationid"
},
{
"id": 3,
"type": "table",
"value": "location"
},
{
"id": 2,
"type": "table",
"value": "twitter"
},
{
"id": 4,
"type": "column",
"value": "country"
},
{
"id": 6,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
5,647 | customers_card_transactions | spider:train_spider.json:735 | Show the number of transaction types. | SELECT count(DISTINCT transaction_type) FROM Financial_Transactions | [
"Show",
"the",
"number",
"of",
"transaction",
"types",
"."
] | [
{
"id": 0,
"type": "table",
"value": "financial_transactions"
},
{
"id": 1,
"type": "column",
"value": "transaction_type"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"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-COLUMN",
"I-COLUMN",
"O"
] |
5,648 | body_builder | spider:train_spider.json:1159 | What are the birth date and birth place of the body builder with the highest total points? | SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1 | [
"What",
"are",
"the",
"birth",
"date",
"and",
"birth",
"place",
"of",
"the",
"body",
"builder",
"with",
"the",
"highest",
"total",
"points",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "body_builder"
},
{
"id": 1,
"type": "column",
"value": "birth_place"
},
{
"id": 0,
"type": "column",
"value": "birth_date"
},
{
"id": 5,
"type": "column",
"value": "people_id"
},
{
"id": 3,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": [
10,
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
5,649 | codebase_community | bird:dev.json:631 | How many posts were created by Daniel Vassallo? | SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Daniel Vassallo' | [
"How",
"many",
"posts",
"were",
"created",
"by",
"Daniel",
"Vassallo",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Daniel Vassallo"
},
{
"id": 1,
"type": "table",
"value": "posthistory"
},
{
"id": 2,
"type": "column",
"value": "displayname"
},
{
"id": 5,
"type": "column",
"value": "userid"
},
{
"id": 0,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,650 | station_weather | spider:train_spider.json:3165 | What is the average high temperature for each day of week? | SELECT avg(high_temperature) , day_of_week FROM weekly_weather GROUP BY day_of_week | [
"What",
"is",
"the",
"average",
"high",
"temperature",
"for",
"each",
"day",
"of",
"week",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "high_temperature"
},
{
"id": 0,
"type": "table",
"value": "weekly_weather"
},
{
"id": 1,
"type": "column",
"value": "day_of_week"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
5,651 | formula_1 | bird:dev.json:978 | How many times the circuits were held in Austria? Please give their location and coordinates. | SELECT DISTINCT location, lat, lng FROM circuits WHERE country = 'Austria' | [
"How",
"many",
"times",
"the",
"circuits",
"were",
"held",
"in",
"Austria",
"?",
"Please",
"give",
"their",
"location",
"and",
"coordinates",
"."
] | [
{
"id": 0,
"type": "table",
"value": "circuits"
},
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 4,
"type": "column",
"value": "country"
},
{
"id": 5,
"type": "value",
"value": "Austria"
},
{
"id": 2,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"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",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
5,652 | world_development_indicators | bird:train.json:2210 | What is the series code for Germany and what is its description? | SELECT T1.Seriescode, T1.Description FROM CountryNotes AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.ShortName = 'Germany' | [
"What",
"is",
"the",
"series",
"code",
"for",
"Germany",
"and",
"what",
"is",
"its",
"description",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "countrynotes"
},
{
"id": 1,
"type": "column",
"value": "description"
},
{
"id": 6,
"type": "column",
"value": "countrycode"
},
{
"id": 0,
"type": "column",
"value": "seriescode"
},
{
"id": 4,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,653 | game_1 | spider:train_spider.json:5986 | What type has the most games? | SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1 | [
"What",
"type",
"has",
"the",
"most",
"games",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "video_games"
},
{
"id": 1,
"type": "column",
"value": "gtype"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,654 | donor | bird:train.json:3202 | Among the donations with a portion using account credits redemption, how many of them are for projects created by teachers working in a public year-round school? | SELECT COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_acct_credit = 't' AND T1.school_year_round = 't' | [
"Among",
"the",
"donations",
"with",
"a",
"portion",
"using",
"account",
"credits",
"redemption",
",",
"how",
"many",
"of",
"them",
"are",
"for",
"projects",
"created",
"by",
"teachers",
"working",
"in",
"a",
"public",
"year",
"-",
"round",
"school",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "payment_included_acct_credit"
},
{
"id": 5,
"type": "column",
"value": "school_year_round"
},
{
"id": 1,
"type": "table",
"value": "donations"
},
{
"id": 2,
"type": "column",
"value": "projectid"
},
{
"id": 0,... | [
{
"entity_id": 0,
"token_idxs": [
17
]
},
{
"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-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O"
] |
5,655 | flight_4 | spider:train_spider.json:6873 | Find the number of routes that have destination John F Kennedy International Airport. | SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport' | [
"Find",
"the",
"number",
"of",
"routes",
"that",
"have",
"destination",
"John",
"F",
"Kennedy",
"International",
"Airport",
"."
] | [
{
"id": 3,
"type": "value",
"value": "John F Kennedy International Airport"
},
{
"id": 0,
"type": "table",
"value": "airports"
},
{
"id": 5,
"type": "column",
"value": "dst_apid"
},
{
"id": 1,
"type": "table",
"value": "routes"
},
{
"id": 2,
"t... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10,
11
]
},
{
"entity_id": 4,
"token_i... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
5,656 | products_for_hire | spider:train_spider.json:1972 | What are all the distinct payment types? | SELECT DISTINCT payment_type_code FROM payments | [
"What",
"are",
"all",
"the",
"distinct",
"payment",
"types",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "payment_type_code"
},
{
"id": 0,
"type": "table",
"value": "payments"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"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",
"B-TABLE",
"B-COLUMN",
"O"
] |
5,657 | pilot_1 | bird:test.json:1118 | What is the name of the plane that is flown the most often? | SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"plane",
"that",
"is",
"flown",
"the",
"most",
"often",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 1,
"type": "column",
"value": "plane_name"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"O"
] |
5,658 | pilot_1 | bird:test.json:1121 | How many pilots whose planes are in Chicago? | SELECT count(DISTINCT T1.pilot_name) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = 'Chicago' | [
"How",
"many",
"pilots",
"whose",
"planes",
"are",
"in",
"Chicago",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 4,
"type": "column",
"value": "pilot_name"
},
{
"id": 5,
"type": "column",
"value": "plane_name"
},
{
"id": 2,
"type": "column",
"value": "location"
},
{
"id": 3,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
5,659 | law_episode | bird:train.json:1284 | What are the keywords of the episode which received the 2nd-highest number of votes? | SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.votes NOT IN ( SELECT MAX(T1.votes) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id ) ORDER BY T1.votes DESC LIMIT 1 | [
"What",
"are",
"the",
"keywords",
"of",
"the",
"episode",
"which",
"received",
"the",
"2nd",
"-",
"highest",
"number",
"of",
"votes",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "episode_id"
},
{
"id": 0,
"type": "column",
"value": "keyword"
},
{
"id": 1,
"type": "table",
"value": "episode"
},
{
"id": 2,
"type": "table",
"value": "keyword"
},
{
"id": 3,
"type": "column",
"value... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,660 | chicago_crime | bird:train.json:8606 | Who is the commander of Morgan Park district? | SELECT commander FROM District WHERE district_name = 'Morgan Park' | [
"Who",
"is",
"the",
"commander",
"of",
"Morgan",
"Park",
"district",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "district_name"
},
{
"id": 3,
"type": "value",
"value": "Morgan Park"
},
{
"id": 1,
"type": "column",
"value": "commander"
},
{
"id": 0,
"type": "table",
"value": "district"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5,
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
5,661 | authors | bird:train.json:3593 | Please provide the full name of the conference where one of the papers of Jean-luc Hainaut were published. | SELECT DISTINCT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T2.Name = 'Jean-luc Hainaut' LIMIT 1 | [
"Please",
"provide",
"the",
"full",
"name",
"of",
"the",
"conference",
"where",
"one",
"of",
"the",
"papers",
"of",
"Jean",
"-",
"luc",
"Hainaut",
"were",
"published",
"."
] | [
{
"id": 3,
"type": "value",
"value": "Jean-luc Hainaut"
},
{
"id": 6,
"type": "column",
"value": "conferenceid"
},
{
"id": 5,
"type": "table",
"value": "paperauthor"
},
{
"id": 1,
"type": "table",
"value": "conference"
},
{
"id": 0,
"type": "co... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
14,
15,
16,
17
]
},
{
"entity_id": 4,
"token_... | [
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O"
] |
5,662 | inn_1 | spider:train_spider.json:2595 | Return the decor of the room named "Recluse and defiance". | SELECT decor FROM Rooms WHERE roomName = "Recluse and defiance"; | [
"Return",
"the",
"decor",
"of",
"the",
"room",
"named",
"\"",
"Recluse",
"and",
"defiance",
"\"",
"."
] | [
{
"id": 3,
"type": "column",
"value": "Recluse and defiance"
},
{
"id": 2,
"type": "column",
"value": "roomname"
},
{
"id": 0,
"type": "table",
"value": "rooms"
},
{
"id": 1,
"type": "column",
"value": "decor"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O"
] |
5,664 | insurance_and_eClaims | spider:train_spider.json:1518 | How much amount in total were claimed in the most recently created document? | SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1) | [
"How",
"much",
"amount",
"in",
"total",
"were",
"claimed",
"in",
"the",
"most",
"recently",
"created",
"document",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "claims_documents"
},
{
"id": 4,
"type": "column",
"value": "claim_header_id"
},
{
"id": 3,
"type": "column",
"value": "amount_claimed"
},
{
"id": 0,
"type": "table",
"value": "claim_headers"
},
{
"id": 2,
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
5,665 | store_1 | spider:train_spider.json:573 | Eduardo Martins is a customer at which company? | SELECT company FROM customers WHERE first_name = "Eduardo" AND last_name = "Martins"; | [
"Eduardo",
"Martins",
"is",
"a",
"customer",
"at",
"which",
"company",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "first_name"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type": "column",
"value": "last_name"
},
{
"id": 1,
"type": "column",
"value": "company"
},
{
"id": 3,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
0
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O"
] |
5,666 | donor | bird:train.json:3271 | On how many projects where the teacher has ordered between 5 to 10 items are from are from Quill.com? | SELECT COUNT(projectid) FROM resources WHERE vendor_name = 'Quill.com' AND item_quantity BETWEEN 5 AND 10 | [
"On",
"how",
"many",
"projects",
"where",
"the",
"teacher",
"has",
"ordered",
"between",
"5",
"to",
"10",
"items",
"are",
"from",
"are",
"from",
"Quill.com",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "item_quantity"
},
{
"id": 2,
"type": "column",
"value": "vendor_name"
},
{
"id": 0,
"type": "table",
"value": "resources"
},
{
"id": 1,
"type": "column",
"value": "projectid"
},
{
"id": 3,
"type": "value",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"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,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
5,667 | disney | bird:train.json:4717 | Calculate the percentage of directors whose films grossed over $100 million. | SELECT CAST(COUNT(DISTINCT CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T3.director ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T3.director) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN director AS T3 ON T1.movie_title... | [
"Calculate",
"the",
"percentage",
"of",
"directors",
"whose",
"films",
"grossed",
"over",
"$",
"100",
"million",
"."
] | [
{
"id": 1,
"type": "table",
"value": "movies_total_gross"
},
{
"id": 3,
"type": "column",
"value": "movie_title"
},
{
"id": 9,
"type": "column",
"value": "total_gross"
},
{
"id": 2,
"type": "table",
"value": "characters"
},
{
"id": 7,
"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": [
10
]
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O"
] |
5,668 | computer_student | bird:train.json:1004 | Provide the position status and IDs of professor who advised student ID "303". | SELECT T2.hasPosition, T1.p_id_dummy FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T1.p_id = 303 | [
"Provide",
"the",
"position",
"status",
"and",
"IDs",
"of",
"professor",
"who",
"advised",
"student",
"ID",
"\"",
"303",
"\"",
"."
] | [
{
"id": 0,
"type": "column",
"value": "hasposition"
},
{
"id": 1,
"type": "column",
"value": "p_id_dummy"
},
{
"id": 2,
"type": "table",
"value": "advisedby"
},
{
"id": 3,
"type": "table",
"value": "person"
},
{
"id": 4,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
5,669 | department_store | spider:train_spider.json:4787 | Find the names of customers who have bought by at least three distinct products. | SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3 | [
"Find",
"the",
"names",
"of",
"customers",
"who",
"have",
"bought",
"by",
"at",
"least",
"three",
"distinct",
"products",
"."
] | [
{
"id": 5,
"type": "table",
"value": "customer_orders"
},
{
"id": 1,
"type": "column",
"value": "customer_name"
},
{
"id": 0,
"type": "column",
"value": "customer_id"
},
{
"id": 2,
"type": "table",
"value": "order_items"
},
{
"id": 7,
"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": [
4
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,670 | thrombosis_prediction | bird:dev.json:1170 | How many patients hadn't undergone a medical examination until at least a year following their initial hospital visit? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '+' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.`First Date`) >= 1 | [
"How",
"many",
"patients",
"had",
"n't",
"undergone",
"a",
"medical",
"examination",
"until",
"at",
"least",
"a",
"year",
"following",
"their",
"initial",
"hospital",
"visit",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "Examination Date"
},
{
"id": 1,
"type": "table",
"value": "examination"
},
{
"id": 8,
"type": "column",
"value": "First Date"
},
{
"id": 3,
"type": "column",
"value": "admission"
},
{
"id": 0,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,671 | voter_2 | spider:train_spider.json:5515 | Which advisors are advising more than 2 students? | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2 | [
"Which",
"advisors",
"are",
"advising",
"more",
"than",
"2",
"students",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 1,
"type": "column",
"value": "advisor"
},
{
"id": 2,
"type": "value",
"value": "2"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
5,672 | mondial_geo | bird:train.json:8457 | Please provide a list of every volcano mountain in the province of Ecuador. | SELECT T1.Name FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province WHERE T3.Name = 'Ecuador' AND T1.Type = 'volcano' | [
"Please",
"provide",
"a",
"list",
"of",
"every",
"volcano",
"mountain",
"in",
"the",
"province",
"of",
"Ecuador",
"."
] | [
{
"id": 3,
"type": "table",
"value": "geo_mountain"
},
{
"id": 1,
"type": "table",
"value": "province"
},
{
"id": 2,
"type": "table",
"value": "mountain"
},
{
"id": 4,
"type": "column",
"value": "province"
},
{
"id": 8,
"type": "column",
"v... | [
{
"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": [
10
]
},
{
"entity_id": 5,
"token_idxs": [
12
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
5,673 | cre_Drama_Workshop_Groups | spider:train_spider.json:5169 | Find the id of the product ordered the most often on invoices. | SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1 | [
"Find",
"the",
"i",
"d",
"of",
"the",
"product",
"ordered",
"the",
"most",
"often",
"on",
"invoices",
"."
] | [
{
"id": 1,
"type": "column",
"value": "product_id"
},
{
"id": 0,
"type": "table",
"value": "invoices"
}
] | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"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",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,674 | products_gen_characteristics | spider:train_spider.json:5531 | What are the names, color descriptions, and product descriptions for products in the 'Herbs' category? | SELECT T1.product_name , T2.color_description , T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = "Herbs" | [
"What",
"are",
"the",
"names",
",",
"color",
"descriptions",
",",
"and",
"product",
"descriptions",
"for",
"products",
"in",
"the",
"'",
"Herbs",
"'",
"category",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "product_category_code"
},
{
"id": 2,
"type": "column",
"value": "product_description"
},
{
"id": 1,
"type": "column",
"value": "color_description"
},
{
"id": 0,
"type": "column",
"value": "product_name"
},
{
"... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
5,675 | food_inspection_2 | bird:train.json:6212 | How many taverns failed in July 2010? | SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE strftime('%Y-%m', T2.inspection_date) = '2010-07' AND T2.results = 'Fail' AND T1.facility_type = 'Restaurant' | [
"How",
"many",
"taverns",
"failed",
"in",
"July",
"2010",
"?"
] | [
{
"id": 9,
"type": "column",
"value": "inspection_date"
},
{
"id": 0,
"type": "table",
"value": "establishment"
},
{
"id": 6,
"type": "column",
"value": "facility_type"
},
{
"id": 1,
"type": "table",
"value": "inspection"
},
{
"id": 2,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
3
... | [
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
5,676 | pilot_1 | bird:test.json:1101 | Find all information of on pilots whose age is less than 30. | SELECT * FROM PilotSkills WHERE age < 30 | [
"Find",
"all",
"information",
"of",
"on",
"pilots",
"whose",
"age",
"is",
"less",
"than",
"30",
"."
] | [
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 1,
"type": "column",
"value": "age"
},
{
"id": 2,
"type": "value",
"value": "30"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
5,677 | school_finance | spider:train_spider.json:1902 | Show each school name, its budgeted amount, and invested amount in year 2002 or after. | SELECT T2.school_name , T1.budgeted , T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.year >= 2002 | [
"Show",
"each",
"school",
"name",
",",
"its",
"budgeted",
"amount",
",",
"and",
"invested",
"amount",
"in",
"year",
"2002",
"or",
"after",
"."
] | [
{
"id": 0,
"type": "column",
"value": "school_name"
},
{
"id": 7,
"type": "column",
"value": "school_id"
},
{
"id": 1,
"type": "column",
"value": "budgeted"
},
{
"id": 2,
"type": "column",
"value": "invested"
},
{
"id": 3,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O"
] |
5,678 | authors | bird:train.json:3542 | Between "Standford University" and "Massachusetts Institute of Technolgy", which organization had affiliated with more author.? | SELECT Affiliation FROM Author WHERE Affiliation IN ('Stanford University', 'Massachusetts Institute of Technology') GROUP BY Affiliation ORDER BY COUNT(Id) DESC LIMIT 1 | [
"Between",
"\"",
"Standford",
"University",
"\"",
"and",
"\"",
"Massachusetts",
"Institute",
"of",
"Technolgy",
"\"",
",",
"which",
"organization",
"had",
"affiliated",
"with",
"more",
"author",
".",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Massachusetts Institute of Technology"
},
{
"id": 2,
"type": "value",
"value": "Stanford University"
},
{
"id": 1,
"type": "column",
"value": "affiliation"
},
{
"id": 0,
"type": "table",
"value": "author"
},
{
... | [
{
"entity_id": 0,
"token_idxs": [
19
]
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": [
2,
3
]
},
{
"entity_id": 3,
"token_idxs": [
7,
8,
9,
10
]
},
{
"entity_id": 4,
... | [
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
5,679 | codebase_community | bird:dev.json:628 | Which users have the highest number of views? | SELECT Id, DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users ) | [
"Which",
"users",
"have",
"the",
"highest",
"number",
"of",
"views",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "displayname"
},
{
"id": 0,
"type": "table",
"value": "users"
},
{
"id": 3,
"type": "column",
"value": "views"
},
{
"id": 1,
"type": "column",
"value": "id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,680 | retail_complains | bird:train.json:253 | How many complaints on credit cards in the year 2016 were filed by male clients? | SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2016' AND T1.sex = 'Male' AND T2.Product = 'Credit card' | [
"How",
"many",
"complaints",
"on",
"credit",
"cards",
"in",
"the",
"year",
"2016",
"were",
"filed",
"by",
"male",
"clients",
"?"
] | [
{
"id": 9,
"type": "column",
"value": "Date received"
},
{
"id": 7,
"type": "value",
"value": "Credit card"
},
{
"id": 3,
"type": "column",
"value": "client_id"
},
{
"id": 6,
"type": "column",
"value": "product"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
5,681 | hospital_1 | spider:train_spider.json:3965 | Find the ids of the nurses who are on call in block floor 1 and block code 1. | SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1 | [
"Find",
"the",
"ids",
"of",
"the",
"nurses",
"who",
"are",
"on",
"call",
"in",
"block",
"floor",
"1",
"and",
"block",
"code",
"1",
"."
] | [
{
"id": 2,
"type": "column",
"value": "blockfloor"
},
{
"id": 4,
"type": "column",
"value": "blockcode"
},
{
"id": 0,
"type": "table",
"value": "on_call"
},
{
"id": 1,
"type": "column",
"value": "nurse"
},
{
"id": 3,
"type": "value",
"value... | [
{
"entity_id": 0,
"token_idxs": [
8,
9
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
11,
12
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
5,682 | cre_Doc_Workflow | bird:test.json:2055 | Show all staff role codes and the number of document processes for each role. | SELECT staff_role_code , count(*) FROM Staff_in_processes GROUP BY staff_role_code | [
"Show",
"all",
"staff",
"role",
"codes",
"and",
"the",
"number",
"of",
"document",
"processes",
"for",
"each",
"role",
"."
] | [
{
"id": 0,
"type": "table",
"value": "staff_in_processes"
},
{
"id": 1,
"type": "column",
"value": "staff_role_code"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"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",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
5,683 | movie_3 | bird:train.json:9340 | List down all of the film IDs with highest rental duration. | SELECT film_id FROM film WHERE rental_duration = ( SELECT MAX(rental_duration) FROM film ) | [
"List",
"down",
"all",
"of",
"the",
"film",
"IDs",
"with",
"highest",
"rental",
"duration",
"."
] | [
{
"id": 2,
"type": "column",
"value": "rental_duration"
},
{
"id": 1,
"type": "column",
"value": "film_id"
},
{
"id": 0,
"type": "table",
"value": "film"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,684 | world_development_indicators | bird:train.json:2142 | Which country had the highest value of indicator belongs to Private Sector & Trade: Exports topic? Please list the country name and indicator name. | SELECT T1.CountryName, T1.IndicatorName FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T2.Topic = 'Private Sector & Trade: Exports' ORDER BY T1.Value DESC LIMIT 1 | [
"Which",
"country",
"had",
"the",
"highest",
"value",
"of",
"indicator",
"belongs",
"to",
"Private",
"Sector",
"&",
"Trade",
":",
"Exports",
"topic",
"?",
"Please",
"list",
"the",
"country",
"name",
"and",
"indicator",
"name",
"."
] | [
{
"id": 5,
"type": "value",
"value": "Private Sector & Trade: Exports"
},
{
"id": 1,
"type": "column",
"value": "indicatorname"
},
{
"id": 0,
"type": "column",
"value": "countryname"
},
{
"id": 2,
"type": "table",
"value": "indicators"
},
{
"id": 3... | [
{
"entity_id": 0,
"token_idxs": [
21,
22
]
},
{
"entity_id": 1,
"token_idxs": [
25
]
},
{
"entity_id": 2,
"token_idxs": [
24
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
5,685 | books | bird:train.json:6092 | Give the author's name of the books that cost 19 dollars and above. | SELECT DISTINCT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN order_line AS T4 ON T4.book_id = T1.book_id WHERE T4.price > 19 | [
"Give",
"the",
"author",
"'s",
"name",
"of",
"the",
"books",
"that",
"cost",
"19",
"dollars",
"and",
"above",
"."
] | [
{
"id": 0,
"type": "column",
"value": "author_name"
},
{
"id": 7,
"type": "table",
"value": "book_author"
},
{
"id": 1,
"type": "table",
"value": "order_line"
},
{
"id": 8,
"type": "column",
"value": "author_id"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id"... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
5,686 | retail_world | bird:train.json:6403 | What is the highest total price paid for an order? | SELECT UnitPrice * Quantity * (1 - Discount) AS THETOP FROM `Order Details` ORDER BY UnitPrice * Quantity * (1 - Discount) DESC LIMIT 1 | [
"What",
"is",
"the",
"highest",
"total",
"price",
"paid",
"for",
"an",
"order",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "Order Details"
},
{
"id": 1,
"type": "column",
"value": "unitprice"
},
{
"id": 2,
"type": "column",
"value": "quantity"
},
{
"id": 4,
"type": "column",
"value": "discount"
},
{
"id": 3,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"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-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
5,687 | hockey | bird:train.json:7632 | State the nick name of the tallest player? If the player had left NHL, mention the last season he was with NHL. | SELECT nameNick, lastNHL FROM Master ORDER BY height DESC LIMIT 1 | [
"State",
"the",
"nick",
"name",
"of",
"the",
"tallest",
"player",
"?",
"If",
"the",
"player",
"had",
"left",
"NHL",
",",
"mention",
"the",
"last",
"season",
"he",
"was",
"with",
"NHL",
"."
] | [
{
"id": 1,
"type": "column",
"value": "namenick"
},
{
"id": 2,
"type": "column",
"value": "lastnhl"
},
{
"id": 0,
"type": "table",
"value": "master"
},
{
"id": 3,
"type": "column",
"value": "height"
}
] | [
{
"entity_id": 0,
"token_idxs": [
18
]
},
{
"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",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,688 | restaurant | bird:train.json:1728 | List all the streets with more than 10 restaurants in Alameda county. | SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.county = 'alameda county' GROUP BY T2.street_name HAVING COUNT(T2.id_restaurant) > 10 | [
"List",
"all",
"the",
"streets",
"with",
"more",
"than",
"10",
"restaurants",
"in",
"Alameda",
"county",
"."
] | [
{
"id": 4,
"type": "value",
"value": "alameda county"
},
{
"id": 7,
"type": "column",
"value": "id_restaurant"
},
{
"id": 0,
"type": "column",
"value": "street_name"
},
{
"id": 1,
"type": "table",
"value": "geographic"
},
{
"id": 2,
"type": "ta... | [
{
"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",
"B-VALUE",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.