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,753 | legislator | bird:train.json:4775 | Give the YouTube ID of the channel 'RepWassermanSchultz.' | SELECT youtube_id FROM `social-media` WHERE youtube = 'RepWassermanSchultz' | [
"Give",
"the",
"YouTube",
"ID",
"of",
"the",
"channel",
"'",
"RepWassermanSchultz",
".",
"'"
] | [
{
"id": 3,
"type": "value",
"value": "RepWassermanSchultz"
},
{
"id": 0,
"type": "table",
"value": "social-media"
},
{
"id": 1,
"type": "column",
"value": "youtube_id"
},
{
"id": 2,
"type": "column",
"value": "youtube"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
15,219 | sales | bird:train.json:5415 | List the full name of the customer who purchased the most quantity of products. | SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID ORDER BY T2.Quantity DESC LIMIT 1 | [
"List",
"the",
"full",
"name",
"of",
"the",
"customer",
"who",
"purchased",
"the",
"most",
"quantity",
"of",
"products",
"."
] | [
{
"id": 5,
"type": "column",
"value": "customerid"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"type": "table",
"value": "customers"
},
{
"id": 1,
"type": "column",
"value": "lastname"
},
{
"id": 4,
"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": [
7,
8
]
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
4,471 | customers_and_addresses | spider:train_spider.json:6059 | What is the average amount of items ordered in each order? | SELECT avg(order_quantity) FROM order_items | [
"What",
"is",
"the",
"average",
"amount",
"of",
"items",
"ordered",
"in",
"each",
"order",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "order_quantity"
},
{
"id": 0,
"type": "table",
"value": "order_items"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6,
7
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"B-COLUMN",
"O"
] |
5,507 | tracking_share_transactions | spider:train_spider.json:5859 | How many distinct transaction types are used in the transactions? | SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS | [
"How",
"many",
"distinct",
"transaction",
"types",
"are",
"used",
"in",
"the",
"transactions",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "transaction_type_code"
},
{
"id": 0,
"type": "table",
"value": "transactions"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"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",
"O",
"O",
"B-TABLE",
"O"
] |
14,485 | movie_platform | bird:train.json:13 | For movie titled 'Welcome to the Dollhouse', how many percentage of the ratings were rated with highest score. | SELECT CAST(SUM(CASE WHEN T2.rating_score = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'Welcome to the Dollhouse' | [
"For",
"movie",
"titled",
"'",
"Welcome",
"to",
"the",
"Dollhouse",
"'",
",",
"how",
"many",
"percentage",
"of",
"the",
"ratings",
"were",
"rated",
"with",
"highest",
"score",
"."
] | [
{
"id": 3,
"type": "value",
"value": "Welcome to the Dollhouse"
},
{
"id": 8,
"type": "column",
"value": "rating_score"
},
{
"id": 2,
"type": "column",
"value": "movie_title"
},
{
"id": 4,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
4,
5,
6,
7
]
},
{
"entity_id": 4,
"token_idx... | [
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,455 | hockey | bird:train.json:7689 | Did legendsID "P194502" personally attend his Hall of Fame dedication? | SELECT IIF(T1.note = 'posthumous', 'YES', 'NO') FROM AwardsMisc AS T1 RIGHT JOIN Master AS T2 ON T1.ID = T2.playerID WHERE T2.legendsID = 'P194502' | [
"Did",
"legendsID",
"\"",
"P194502",
"\"",
"personally",
"attend",
"his",
"Hall",
"of",
"Fame",
"dedication",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "awardsmisc"
},
{
"id": 9,
"type": "value",
"value": "posthumous"
},
{
"id": 2,
"type": "column",
"value": "legendsid"
},
{
"id": 7,
"type": "column",
"value": "playerid"
},
{
"id": 3,
"type": "value",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
9,883 | manufacturer | spider:train_spider.json:3389 | How many furniture components are there in total? | SELECT sum(num_of_component) FROM furniture | [
"How",
"many",
"furniture",
"components",
"are",
"there",
"in",
"total",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "num_of_component"
},
{
"id": 0,
"type": "table",
"value": "furniture"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"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",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
10,926 | works_cycles | bird:train.json:7148 | What is the minimum shipping charge for "OVERSEAS - DELUXE"? | SELECT ShipBase FROM ShipMethod WHERE Name = 'OVERSEAS - DELUXE' | [
"What",
"is",
"the",
"minimum",
"shipping",
"charge",
"for",
"\"",
"OVERSEAS",
"-",
"DELUXE",
"\"",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "OVERSEAS - DELUXE"
},
{
"id": 0,
"type": "table",
"value": "shipmethod"
},
{
"id": 1,
"type": "column",
"value": "shipbase"
},
{
"id": 2,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
3,295 | car_racing | bird:test.json:1629 | List the names of teams that do not have any drivers. | SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver) | [
"List",
"the",
"names",
"of",
"teams",
"that",
"do",
"not",
"have",
"any",
"drivers",
"."
] | [
{
"id": 3,
"type": "table",
"value": "team_driver"
},
{
"id": 2,
"type": "column",
"value": "team_id"
},
{
"id": 0,
"type": "table",
"value": "team"
},
{
"id": 1,
"type": "column",
"value": "team"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
16,027 | gas_company | spider:train_spider.json:2028 | What are the names of the managers for gas stations that are operated by the ExxonMobil company? | SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil' | [
"What",
"are",
"the",
"names",
"of",
"the",
"managers",
"for",
"gas",
"stations",
"that",
"are",
"operated",
"by",
"the",
"ExxonMobil",
"company",
"?"
] | [
{
"id": 4,
"type": "table",
"value": "station_company"
},
{
"id": 0,
"type": "column",
"value": "manager_name"
},
{
"id": 1,
"type": "table",
"value": "gas_station"
},
{
"id": 3,
"type": "value",
"value": "ExxonMobil"
},
{
"id": 6,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
3,
6
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
11,769 | chicago_crime | bird:train.json:8684 | Find the ward office's address and phone number of the ward where the most crimes without arrest occurred. | SELECT T2.ward_office_address, T2.ward_office_phone FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T1.arrest = 'FALSE' GROUP BY T2.ward_office_address, T2.ward_office_phone ORDER BY COUNT(T1.arrest) DESC LIMIT 1 | [
"Find",
"the",
"ward",
"office",
"'s",
"address",
"and",
"phone",
"number",
"of",
"the",
"ward",
"where",
"the",
"most",
"crimes",
"without",
"arrest",
"occurred",
"."
] | [
{
"id": 0,
"type": "column",
"value": "ward_office_address"
},
{
"id": 1,
"type": "column",
"value": "ward_office_phone"
},
{
"id": 6,
"type": "column",
"value": "ward_no"
},
{
"id": 4,
"type": "column",
"value": "arrest"
},
{
"id": 2,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
2,
3,
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
1... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O"
] |
9,977 | law_episode | bird:train.json:1340 | What is the episode rating with the most award won? | SELECT T1.rating FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T2.result = 'Winner' GROUP BY T1.episode_id ORDER BY COUNT(T2.award_id) DESC LIMIT 1 | [
"What",
"is",
"the",
"episode",
"rating",
"with",
"the",
"most",
"award",
"won",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "episode_id"
},
{
"id": 6,
"type": "column",
"value": "award_id"
},
{
"id": 2,
"type": "table",
"value": "episode"
},
{
"id": 1,
"type": "column",
"value": "rating"
},
{
"id": 4,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
15,063 | music_tracker | bird:train.json:2079 | List the name of artists who have released albums and mixtape from 1980 to 1985 in "dance" genre. | SELECT COUNT(T1.artist) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'dance' AND T1.groupYear BETWEEN 1980 AND 1985 AND T1.releaseType LIKE 'album' OR T1.releaseType LIKE 'mixtape' | [
"List",
"the",
"name",
"of",
"artists",
"who",
"have",
"released",
"albums",
"and",
"mixtape",
"from",
"1980",
"to",
"1985",
"in",
"\"",
"dance",
"\"",
"genre",
"."
] | [
{
"id": 4,
"type": "column",
"value": "releasetype"
},
{
"id": 8,
"type": "column",
"value": "groupyear"
},
{
"id": 0,
"type": "table",
"value": "torrents"
},
{
"id": 5,
"type": "value",
"value": "mixtape"
},
{
"id": 2,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
10,647 | books | bird:train.json:5930 | List the title of the earliest published Japanese book. | SELECT T1.title FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'Japanese' ORDER BY T1.publication_date ASC LIMIT 1 | [
"List",
"the",
"title",
"of",
"the",
"earliest",
"published",
"Japanese",
"book",
"."
] | [
{
"id": 5,
"type": "column",
"value": "publication_date"
},
{
"id": 2,
"type": "table",
"value": "book_language"
},
{
"id": 3,
"type": "column",
"value": "language_name"
},
{
"id": 6,
"type": "column",
"value": "language_id"
},
{
"id": 4,
"type... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"B-TABLE",
"O"
] |
14,327 | store_1 | spider:train_spider.json:601 | List top 10 employee work longest in the company. List employee's first and last name. | SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10; | [
"List",
"top",
"10",
"employee",
"work",
"longest",
"in",
"the",
"company",
".",
"List",
"employee",
"'s",
"first",
"and",
"last",
"name",
"."
] | [
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 2,
"type": "column",
"value": "last_name"
},
{
"id": 3,
"type": "column",
"value": "hire_date"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entit... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
14,097 | bike_share_1 | bird:train.json:9074 | List out all end stations for a bicycle that were making a trip starting from 2nd at South Park station? Only retain the unique value. | SELECT DISTINCT end_station_name FROM trip WHERE start_station_name = '2nd at South Park' | [
"List",
"out",
"all",
"end",
"stations",
"for",
"a",
"bicycle",
"that",
"were",
"making",
"a",
"trip",
"starting",
"from",
"2nd",
"at",
"South",
"Park",
"station",
"?",
"Only",
"retain",
"the",
"unique",
"value",
"."
] | [
{
"id": 2,
"type": "column",
"value": "start_station_name"
},
{
"id": 3,
"type": "value",
"value": "2nd at South Park"
},
{
"id": 1,
"type": "column",
"value": "end_station_name"
},
{
"id": 0,
"type": "table",
"value": "trip"
}
] | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
19
]
},
{
"entity_id": 3,
"token_idxs": [
15,
16,
17,
18
]
},
{
"entity_id": 4,
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
14,834 | customers_card_transactions | spider:train_spider.json:730 | What are the different card type codes? | SELECT DISTINCT card_type_code FROM Customers_Cards | [
"What",
"are",
"the",
"different",
"card",
"type",
"codes",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "customers_cards"
},
{
"id": 1,
"type": "column",
"value": "card_type_code"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4,
5,
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_id... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
12,634 | university_basketball | spider:train_spider.json:987 | What is the highest acc percent score in the competition? | SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1 | [
"What",
"is",
"the",
"highest",
"acc",
"percent",
"score",
"in",
"the",
"competition",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "basketball_match"
},
{
"id": 1,
"type": "column",
"value": "acc_percent"
}
] | [
{
"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",
"O",
"O",
"O",
"O"
] |
9 | shipping | bird:train.json:5667 | What model year of truck delivered the ship ID 1233? | SELECT T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1233' | [
"What",
"model",
"year",
"of",
"truck",
"delivered",
"the",
"ship",
"ID",
"1233",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "model_year"
},
{
"id": 2,
"type": "table",
"value": "shipment"
},
{
"id": 5,
"type": "column",
"value": "truck_id"
},
{
"id": 3,
"type": "column",
"value": "ship_id"
},
{
"id": 1,
"type": "table",
"val... | [
{
"entity_id": 0,
"token_idxs": [
1,
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7,
8
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
}... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
14,494 | movie_3 | bird:train.json:9131 | Among the films that the customer RUTH MARTINEZ has rented, what is the title of the one with the highest replacement cost? | SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ' ORDER BY T4.replacement_cost DESC LIMIT 1 | [
"Among",
"the",
"films",
"that",
"the",
"customer",
"RUTH",
"MARTINEZ",
"has",
"rented",
",",
"what",
"is",
"the",
"title",
"of",
"the",
"one",
"with",
"the",
"highest",
"replacement",
"cost",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "replacement_cost"
},
{
"id": 11,
"type": "column",
"value": "inventory_id"
},
{
"id": 12,
"type": "column",
"value": "customer_id"
},
{
"id": 5,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
21,
22
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_i... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-VALUE",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
128 | college_2 | spider:train_spider.json:1419 | What are the ids of courses without prerequisites? | SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq | [
"What",
"are",
"the",
"ids",
"of",
"courses",
"without",
"prerequisites",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "course_id"
},
{
"id": 0,
"type": "table",
"value": "course"
},
{
"id": 1,
"type": "table",
"value": "prereq"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O"
] |
10,844 | address | bird:train.json:5231 | Calculate the percentage of congress representatives from the Democrat party. Among them, how many postal points are in the Hawaii state? | SELECT CAST(SUM(CASE WHEN T1.party = 'Democrat' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*), SUM(CASE WHEN T1.state = 'Hawaii' THEN 1 ELSE 0 END) FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district | [
"Calculate",
"the",
"percentage",
"of",
"congress",
"representatives",
"from",
"the",
"Democrat",
"party",
".",
"Among",
"them",
",",
"how",
"many",
"postal",
"points",
"are",
"in",
"the",
"Hawaii",
"state",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "cognress_rep_id"
},
{
"id": 1,
"type": "table",
"value": "zip_congress"
},
{
"id": 0,
"type": "table",
"value": "congress"
},
{
"id": 3,
"type": "column",
"value": "district"
},
{
"id": 10,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
21
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
3,164 | bakery_1 | bird:test.json:1570 | Give the ids of cookes that are cheaper than any croissant. | SELECT id FROM goods WHERE food = "Cookie" AND price < (SELECT min(price) FROM goods WHERE food = 'Croissant') | [
"Give",
"the",
"ids",
"of",
"cookes",
"that",
"are",
"cheaper",
"than",
"any",
"croissant",
"."
] | [
{
"id": 5,
"type": "value",
"value": "Croissant"
},
{
"id": 3,
"type": "column",
"value": "Cookie"
},
{
"id": 0,
"type": "table",
"value": "goods"
},
{
"id": 4,
"type": "column",
"value": "price"
},
{
"id": 2,
"type": "column",
"value": "fo... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,169 | loan_1 | spider:train_spider.json:3009 | What is the total number of customers across banks? | SELECT sum(no_of_customers) FROM bank | [
"What",
"is",
"the",
"total",
"number",
"of",
"customers",
"across",
"banks",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "no_of_customers"
},
{
"id": 0,
"type": "table",
"value": "bank"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3,
6
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN"
] |
2,426 | music_tracker | bird:train.json:2055 | Please list the releases that have been downloaded for more than 20000 times. | SELECT groupName FROM torrents WHERE totalSnatched > 20000 | [
"Please",
"list",
"the",
"releases",
"that",
"have",
"been",
"downloaded",
"for",
"more",
"than",
"20000",
"times",
"."
] | [
{
"id": 2,
"type": "column",
"value": "totalsnatched"
},
{
"id": 1,
"type": "column",
"value": "groupname"
},
{
"id": 0,
"type": "table",
"value": "torrents"
},
{
"id": 3,
"type": "value",
"value": "20000"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
7,953 | human_resources | bird:train.json:8961 | If Jose Rodriguez tried his best, how many percentage can his salary raise without changing his position? | SELECT 100 * (CAST(REPLACE(SUBSTR(T2.maxsalary, 4), ',', '') AS REAL) - CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) AS per FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Jose' AND T1.lastname = 'Rodriguez' | [
"If",
"Jose",
"Rodriguez",
"tried",
"his",
"best",
",",
"how",
"many",
"percentage",
"can",
"his",
"salary",
"raise",
"without",
"changing",
"his",
"position",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "positionid"
},
{
"id": 3,
"type": "column",
"value": "firstname"
},
{
"id": 6,
"type": "value",
"value": "Rodriguez"
},
{
"id": 11,
"type": "column",
"value": "maxsalary"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
1
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
12,753 | activity_1 | spider:train_spider.json:6761 | Show the ids for all the faculty members who have at least 2 students. | SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2 | [
"Show",
"the",
"ids",
"for",
"all",
"the",
"faculty",
"members",
"who",
"have",
"at",
"least",
"2",
"students",
"."
] | [
{
"id": 1,
"type": "table",
"value": "faculty"
},
{
"id": 2,
"type": "table",
"value": "student"
},
{
"id": 4,
"type": "column",
"value": "advisor"
},
{
"id": 0,
"type": "column",
"value": "facid"
},
{
"id": 3,
"type": "value",
"value": "2"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
11,612 | works_cycles | bird:train.json:7279 | How many products are out of stock? | SELECT COUNT(ProductID) FROM ProductVendor WHERE OnOrderQty = 0 | [
"How",
"many",
"products",
"are",
"out",
"of",
"stock",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "productvendor"
},
{
"id": 1,
"type": "column",
"value": "onorderqty"
},
{
"id": 3,
"type": "column",
"value": "productid"
},
{
"id": 2,
"type": "value",
"value": "0"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
11,864 | legislator | bird:train.json:4876 | How many districts did John Conyers, Jr. serve in total? | SELECT COUNT(T3.district) FROM ( SELECT T2.district FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'John Conyers, Jr.' GROUP BY T2.district ) T3 | [
"How",
"many",
"districts",
"did",
"John",
"Conyers",
",",
"Jr.",
"serve",
"in",
"total",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "official_full_name"
},
{
"id": 4,
"type": "value",
"value": "John Conyers, Jr."
},
{
"id": 2,
"type": "table",
"value": "current-terms"
},
{
"id": 5,
"type": "column",
"value": "bioguide_id"
},
{
"id": 0,
... | [
{
"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": [
4,
5,
6,
7
]
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O"
] |
8,666 | dorm_1 | spider:train_spider.json:5681 | How many diffrent dorm amenities are there? | SELECT count(*) FROM dorm_amenity | [
"How",
"many",
"diffrent",
"dorm",
"amenities",
"are",
"there",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "dorm_amenity"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3,
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",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O"
] |
7,373 | bike_share_1 | bird:train.json:9034 | List the days in 2013 when rain and fog occurred together and find the id of bikes borrowed on these days. | SELECT T2.date, T1.bike_id FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE SUBSTR(CAST(T2.date AS TEXT), -4) = '2013' AND T2.events = 'Fog-Rain' | [
"List",
"the",
"days",
"in",
"2013",
"when",
"rain",
"and",
"fog",
"occurred",
"together",
"and",
"find",
"the",
"i",
"d",
"of",
"bikes",
"borrowed",
"on",
"these",
"days",
"."
] | [
{
"id": 4,
"type": "column",
"value": "zip_code"
},
{
"id": 7,
"type": "value",
"value": "Fog-Rain"
},
{
"id": 1,
"type": "column",
"value": "bike_id"
},
{
"id": 3,
"type": "table",
"value": "weather"
},
{
"id": 6,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
14,
15,
17
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
1,988 | car_retails | bird:train.json:1583 | How many customers who are in Norway and have credit line under 220000? | SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Norway' | [
"How",
"many",
"customers",
"who",
"are",
"in",
"Norway",
"and",
"have",
"credit",
"line",
"under",
"220000",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "creditlimit"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 2,
"type": "value",
"value": "220000"
},
{
"id": 4,
"type": "value",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
4,499 | retails | bird:train.json:6877 | Please list the names of all the suppliers for parts under Brand#55. | SELECT T3.s_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_brand = 'Brand#55' | [
"Please",
"list",
"the",
"names",
"of",
"all",
"the",
"suppliers",
"for",
"parts",
"under",
"Brand#55",
"."
] | [
{
"id": 6,
"type": "column",
"value": "ps_suppkey"
},
{
"id": 9,
"type": "column",
"value": "ps_partkey"
},
{
"id": 7,
"type": "column",
"value": "s_suppkey"
},
{
"id": 8,
"type": "column",
"value": "p_partkey"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
5,559 | browser_web | spider:train_spider.json:1839 | List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'. | SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'CACHEbox' INTERSECT SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'Fasterfox' | [
"List",
"the",
"names",
"of",
"the",
"browser",
"that",
"are",
"compatible",
"with",
"both",
"'",
"CACHEbox",
"'",
"and",
"'",
"Fasterfox",
"'",
"."
] | [
{
"id": 5,
"type": "table",
"value": "accelerator_compatible_browser"
},
{
"id": 4,
"type": "table",
"value": "web_client_accelerator"
},
{
"id": 8,
"type": "column",
"value": "accelerator_id"
},
{
"id": 6,
"type": "column",
"value": "browser_id"
},
{
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
14,101 | olympics | bird:train.json:5078 | Provide the age of the tallest competitor. | SELECT T2.age FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id ORDER BY T1.height DESC LIMIT 1 | [
"Provide",
"the",
"age",
"of",
"the",
"tallest",
"competitor",
"."
] | [
{
"id": 2,
"type": "table",
"value": "games_competitor"
},
{
"id": 5,
"type": "column",
"value": "person_id"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 3,
"type": "column",
"value": "height"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,085 | vehicle_rent | bird:test.json:434 | Return the name of the discount that corresponds to the most rental history records. | SELECT T2.name FROM renting_history AS T1 JOIN discount AS T2 ON T1.discount_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1 | [
"Return",
"the",
"name",
"of",
"the",
"discount",
"that",
"corresponds",
"to",
"the",
"most",
"rental",
"history",
"records",
"."
] | [
{
"id": 2,
"type": "table",
"value": "renting_history"
},
{
"id": 4,
"type": "column",
"value": "discount_id"
},
{
"id": 3,
"type": "table",
"value": "discount"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
11,
12
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O"
] |
7,668 | allergy_1 | spider:train_spider.json:530 | How many male students (sex is 'M') are allergic to any type of food? | SELECT count(*) FROM Student WHERE sex = "M" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food") | [
"How",
"many",
"male",
"students",
"(",
"sex",
"is",
"'",
"M",
"'",
")",
"are",
"allergic",
"to",
"any",
"type",
"of",
"food",
"?"
] | [
{
"id": 5,
"type": "table",
"value": "allergy_type"
},
{
"id": 4,
"type": "table",
"value": "has_allergy"
},
{
"id": 6,
"type": "column",
"value": "allergytype"
},
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 8,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
15,943 | retails | bird:train.json:6776 | What is the average discount for the parts made by Manufacturer#5? | SELECT AVG(T3.l_discount) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_suppkey = T3.l_suppkey WHERE T1.p_mfgr = 'Manufacturer#5' | [
"What",
"is",
"the",
"average",
"discount",
"for",
"the",
"parts",
"made",
"by",
"Manufacturer#5",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "Manufacturer#5"
},
{
"id": 3,
"type": "column",
"value": "l_discount"
},
{
"id": 6,
"type": "column",
"value": "ps_suppkey"
},
{
"id": 9,
"type": "column",
"value": "ps_partkey"
},
{
"id": 7,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O"
] |
1,612 | chicago_crime | bird:train.json:8694 | List all the crimes of the narcotic type that exist. | SELECT secondary_description FROM IUCR WHERE primary_description = 'NARCOTICS' GROUP BY secondary_description | [
"List",
"all",
"the",
"crimes",
"of",
"the",
"narcotic",
"type",
"that",
"exist",
"."
] | [
{
"id": 1,
"type": "column",
"value": "secondary_description"
},
{
"id": 2,
"type": "column",
"value": "primary_description"
},
{
"id": 3,
"type": "value",
"value": "NARCOTICS"
},
{
"id": 0,
"type": "table",
"value": "iucr"
}
] | [
{
"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": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
12,590 | baseball_1 | spider:train_spider.json:3676 | Find the number of tied games (the value of "ties" is '1') in 1885 postseason. | SELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1; | [
"Find",
"the",
"number",
"of",
"tied",
"games",
"(",
"the",
"value",
"of",
"\"",
"ties",
"\"",
"is",
"'",
"1",
"'",
")",
"in",
"1885",
"postseason",
"."
] | [
{
"id": 0,
"type": "table",
"value": "postseason"
},
{
"id": 1,
"type": "column",
"value": "year"
},
{
"id": 2,
"type": "value",
"value": "1885"
},
{
"id": 3,
"type": "column",
"value": "ties"
},
{
"id": 4,
"type": "value",
"value": "1"
}... | [
{
"entity_id": 0,
"token_idxs": [
20
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
19
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"ent... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
7,633 | works_cycles | bird:train.json:7111 | How many vendors are having their products ordered with an average delivery time of 25 days? | SELECT COUNT(DISTINCT BusinessEntityID) FROM ProductVendor WHERE AverageLeadTime = 25 | [
"How",
"many",
"vendors",
"are",
"having",
"their",
"products",
"ordered",
"with",
"an",
"average",
"delivery",
"time",
"of",
"25",
"days",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "businessentityid"
},
{
"id": 1,
"type": "column",
"value": "averageleadtime"
},
{
"id": 0,
"type": "table",
"value": "productvendor"
},
{
"id": 2,
"type": "value",
"value": "25"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
96 | world_development_indicators | bird:train.json:2216 | What are the full names of the countries in South Asia that belongs to the low income group? | SELECT LongName FROM Country WHERE IncomeGroup = 'Low income' AND Region = 'South Asia' | [
"What",
"are",
"the",
"full",
"names",
"of",
"the",
"countries",
"in",
"South",
"Asia",
"that",
"belongs",
"to",
"the",
"low",
"income",
"group",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "incomegroup"
},
{
"id": 3,
"type": "value",
"value": "Low income"
},
{
"id": 5,
"type": "value",
"value": "South Asia"
},
{
"id": 1,
"type": "column",
"value": "longname"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
17
]
},
{
"entity_id": 3,
"token_idxs": [
15,
16
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
475 | works_cycles | bird:train.json:7181 | What is the stocked quantity of products manufactured from location ID 40? | SELECT COUNT(*) FROM WorkOrderRouting AS T1 INNER JOIN BillOfMaterials AS T2 ON T1.LocationID = T2.ProductAssemblyID INNER JOIN WorkOrder AS T3 ON T3.WorkOrderID = T1.WorkOrderID WHERE T1.LocationID = 40 | [
"What",
"is",
"the",
"stocked",
"quantity",
"of",
"products",
"manufactured",
"from",
"location",
"ID",
"40",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "productassemblyid"
},
{
"id": 3,
"type": "table",
"value": "workorderrouting"
},
{
"id": 4,
"type": "table",
"value": "billofmaterials"
},
{
"id": 5,
"type": "column",
"value": "workorderid"
},
{
"id": 1,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9,
10
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"to... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
15,327 | institution_sports | bird:test.json:1646 | What are the names of institutions, ordered by the years in which they were founded? | SELECT Name FROM institution ORDER BY Founded ASC | [
"What",
"are",
"the",
"names",
"of",
"institutions",
",",
"ordered",
"by",
"the",
"years",
"in",
"which",
"they",
"were",
"founded",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "institution"
},
{
"id": 2,
"type": "column",
"value": "founded"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"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",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
14,746 | works_cycles | bird:train.json:7314 | List all staff in the Shipping and Receiving department who are hired in 2009. | SELECT T1.FirstName, T1.LastName FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN EmployeeDepartmentHistory AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID INNER JOIN Department AS T4 ON T3.DepartmentID = T4.DepartmentID WHERE STRFTIME('%Y', T2.HireDate) = '2009' AND T4.Name = 'Shipping and Receiving' | [
"List",
"all",
"staff",
"in",
"the",
"Shipping",
"and",
"Receiving",
"department",
"who",
"are",
"hired",
"in",
"2009",
"."
] | [
{
"id": 3,
"type": "table",
"value": "employeedepartmenthistory"
},
{
"id": 7,
"type": "value",
"value": "Shipping and Receiving"
},
{
"id": 10,
"type": "column",
"value": "businessentityid"
},
{
"id": 4,
"type": "column",
"value": "departmentid"
},
{
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
13
... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
7,886 | flight_company | spider:train_spider.json:6374 | What are the ids and names of the companies that operated more than one flight? | SELECT T1.id , T1.name FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY T1.id HAVING count(*) > 1 | [
"What",
"are",
"the",
"ids",
"and",
"names",
"of",
"the",
"companies",
"that",
"operated",
"more",
"than",
"one",
"flight",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "operate_company"
},
{
"id": 5,
"type": "column",
"value": "company_id"
},
{
"id": 3,
"type": "table",
"value": "flight"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 0,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
10,770 | talkingdata | bird:train.json:1243 | Which brand is most common among people in their twenties? | SELECT T.phone_brand FROM ( SELECT T2.phone_brand, COUNT(T2.phone_brand) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.age BETWEEN 20 AND 30 GROUP BY T2.phone_brand ) AS T ORDER BY T.num DESC LIMIT 1 | [
"Which",
"brand",
"is",
"most",
"common",
"among",
"people",
"in",
"their",
"twenties",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 0,
"type": "column",
"value": "phone_brand"
},
{
"id": 2,
"type": "table",
"value": "gender_age"
},
{
"id": 7,
"type": "column",
"value": "device_id"
},
{
"id": 1,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O"
] |
2,724 | thrombosis_prediction | bird:dev.json:1243 | For all patients who are older than 55 years old, what is the percentage of female who has abnormal prothrombin time (PT)? | SELECT CAST(SUM(CASE WHEN T2.PT >= 14 AND T1.SEX = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) > 55 | [
"For",
"all",
"patients",
"who",
"are",
"older",
"than",
"55",
"years",
"old",
",",
"what",
"is",
"the",
"percentage",
"of",
"female",
"who",
"has",
"abnormal",
"prothrombin",
"time",
"(",
"PT",
")",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "laboratory"
},
{
"id": 6,
"type": "column",
"value": "birthday"
},
{
"id": 0,
"type": "table",
"value": "patient"
},
{
"id": 4,
"type": "value",
"value": "100"
},
{
"id": 11,
"type": "column",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
11,597 | chinook_1 | spider:train_spider.json:853 | How many distinct cities does the employees live in? | SELECT COUNT(DISTINCT city) FROM EMPLOYEE | [
"How",
"many",
"distinct",
"cities",
"does",
"the",
"employees",
"live",
"in",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "column",
"value": "city"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
4,279 | movie_3 | bird:train.json:9214 | Mention the language of Untouchables Sunrise film and calculate its rental cost per day. | SELECT T2.name, T1.replacement_cost / T1.rental_duration AS cost FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'UNTOUCHABLES SUNRISE' | [
"Mention",
"the",
"language",
"of",
"Untouchables",
"Sunrise",
"film",
"and",
"calculate",
"its",
"rental",
"cost",
"per",
"day",
"."
] | [
{
"id": 4,
"type": "value",
"value": "UNTOUCHABLES SUNRISE"
},
{
"id": 5,
"type": "column",
"value": "replacement_cost"
},
{
"id": 6,
"type": "column",
"value": "rental_duration"
},
{
"id": 7,
"type": "column",
"value": "language_id"
},
{
"id": 2,
... | [
{
"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": [
4,
5
]
},
{
"entity_id":... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O"
] |
12,257 | donor | bird:train.json:3262 | Which resource type is commonly bought by the Los Angeles Unified School District? | SELECT T1.project_resource_type FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_district = 'Los Angeles Unif Sch Dist' GROUP BY T2.school_district ORDER BY COUNT(T1.project_resource_type) DESC LIMIT 1 | [
"Which",
"resource",
"type",
"is",
"commonly",
"bought",
"by",
"the",
"Los",
"Angeles",
"Unified",
"School",
"District",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "Los Angeles Unif Sch Dist"
},
{
"id": 1,
"type": "column",
"value": "project_resource_type"
},
{
"id": 0,
"type": "column",
"value": "school_district"
},
{
"id": 2,
"type": "table",
"value": "resources"
},
{
"i... | [
{
"entity_id": 0,
"token_idxs": [
11,
12
]
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8,
9,
10
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,763 | bakery_1 | bird:test.json:1490 | What is the id and flavor of the cheapest cookie? | SELECT id , flavor FROM goods WHERE food = "Cookie" ORDER BY price LIMIT 1 | [
"What",
"is",
"the",
"i",
"d",
"and",
"flavor",
"of",
"the",
"cheapest",
"cookie",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "flavor"
},
{
"id": 4,
"type": "column",
"value": "Cookie"
},
{
"id": 0,
"type": "table",
"value": "goods"
},
{
"id": 5,
"type": "column",
"value": "price"
},
{
"id": 3,
"type": "column",
"value": "food... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
... | [
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
1,343 | thrombosis_prediction | bird:dev.json:1283 | For the patients with the normal glutamic pylvic transaminase level, how many of them are male? | SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 AND T1.SEX = 'M' | [
"For",
"the",
"patients",
"with",
"the",
"normal",
"glutamic",
"pylvic",
"transaminase",
"level",
",",
"how",
"many",
"of",
"them",
"are",
"male",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "laboratory"
},
{
"id": 0,
"type": "table",
"value": "patient"
},
{
"id": 3,
"type": "column",
"value": "got"
},
{
"id": 5,
"type": "column",
"value": "sex"
},
{
"id": 2,
"type": "column",
"value": "id"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"I-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
10,868 | college_1 | spider:train_spider.json:3284 | What are the course codes for every class that the student with the last name Smithson took? | SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson' | [
"What",
"are",
"the",
"course",
"codes",
"for",
"every",
"class",
"that",
"the",
"student",
"with",
"the",
"last",
"name",
"Smithson",
"took",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "class_code"
},
{
"id": 2,
"type": "column",
"value": "stu_lname"
},
{
"id": 0,
"type": "column",
"value": "crs_code"
},
{
"id": 3,
"type": "value",
"value": "Smithson"
},
{
"id": 1,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
13,
14
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O"
] |
10,975 | driving_school | spider:train_spider.json:6667 | What is the date of birth of every customer whose status code is 'Good Customer'? | SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer' | [
"What",
"is",
"the",
"date",
"of",
"birth",
"of",
"every",
"customer",
"whose",
"status",
"code",
"is",
"'",
"Good",
"Customer",
"'",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "customer_status_code"
},
{
"id": 1,
"type": "column",
"value": "date_of_birth"
},
{
"id": 3,
"type": "value",
"value": "Good Customer"
},
{
"id": 0,
"type": "table",
"value": "customers"
}
] | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
8,
10,
11
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O"
] |
9,224 | airline | bird:train.json:5839 | Give the number of planes that took off from Los Angeles International airport on 2018/8/27. | SELECT SUM(CASE WHEN T2.FL_DATE = '2018/8/27' THEN 1 ELSE 0 END) AS count FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T1.Description = 'Los Angeles, CA: Los Angeles International' | [
"Give",
"the",
"number",
"of",
"planes",
"that",
"took",
"off",
"from",
"Los",
"Angeles",
"International",
"airport",
"on",
"2018/8/27",
"."
] | [
{
"id": 3,
"type": "value",
"value": "Los Angeles, CA: Los Angeles International"
},
{
"id": 2,
"type": "column",
"value": "description"
},
{
"id": 9,
"type": "value",
"value": "2018/8/27"
},
{
"id": 0,
"type": "table",
"value": "airports"
},
{
"id... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"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",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,145 | apartment_rentals | spider:train_spider.json:1249 | How many bookings does each booking status have? List the booking status code and the number of corresponding bookings. | SELECT booking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code | [
"How",
"many",
"bookings",
"does",
"each",
"booking",
"status",
"have",
"?",
"List",
"the",
"booking",
"status",
"code",
"and",
"the",
"number",
"of",
"corresponding",
"bookings",
"."
] | [
{
"id": 1,
"type": "column",
"value": "booking_status_code"
},
{
"id": 0,
"type": "table",
"value": "apartment_bookings"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"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",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
14,385 | college_1 | spider:train_spider.json:3325 | What is the last name of the student who got a grade A in the class with code 10018. | SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018 | [
"What",
"is",
"the",
"last",
"name",
"of",
"the",
"student",
"who",
"got",
"a",
"grade",
"A",
"in",
"the",
"class",
"with",
"code",
"10018",
"."
] | [
{
"id": 4,
"type": "column",
"value": "enroll_grade"
},
{
"id": 6,
"type": "column",
"value": "class_code"
},
{
"id": 0,
"type": "column",
"value": "stu_lname"
},
{
"id": 1,
"type": "table",
"value": "student"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
9,932 | public_review_platform | bird:train.json:3775 | What percentage more for the "Women's Clothing" Yelp businesses to "Men's Clothing"? | SELECT CAST(SUM(CASE WHEN T2.category_name LIKE 'Women''s Clothing' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) - CAST(SUM(CASE WHEN T2.category_name LIKE 'Men''s Clothing' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) AS "more percentage" FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id | [
"What",
"percentage",
"more",
"for",
"the",
"\"",
"Women",
"'s",
"Clothing",
"\"",
"Yelp",
"businesses",
"to",
"\"",
"Men",
"'s",
"Clothing",
"\"",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "business_categories"
},
{
"id": 8,
"type": "value",
"value": "Women's Clothing"
},
{
"id": 9,
"type": "value",
"value": "Men's Clothing"
},
{
"id": 7,
"type": "column",
"value": "category_name"
},
{
"id": 2,
... | [
{
"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": [
11
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
6,888 | student_loan | bird:train.json:4480 | How many students enlisted in the navy? | SELECT COUNT(name) FROM enlist WHERE organ = 'navy' | [
"How",
"many",
"students",
"enlisted",
"in",
"the",
"navy",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "enlist"
},
{
"id": 1,
"type": "column",
"value": "organ"
},
{
"id": 2,
"type": "value",
"value": "navy"
},
{
"id": 3,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O"
] |
14,809 | sales | bird:train.json:5429 | Give the product's name brought by Aaron Alexander. | SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.FirstName = 'Aaron' AND T3.LastName = 'Alexander' | [
"Give",
"the",
"product",
"'s",
"name",
"brought",
"by",
"Aaron",
"Alexander",
"."
] | [
{
"id": 4,
"type": "column",
"value": "customerid"
},
{
"id": 1,
"type": "table",
"value": "customers"
},
{
"id": 5,
"type": "column",
"value": "firstname"
},
{
"id": 8,
"type": "value",
"value": "Alexander"
},
{
"id": 9,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
12,205 | college_2 | spider:train_spider.json:1418 | Find the id of the courses that do not have any prerequisite? | SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq | [
"Find",
"the",
"i",
"d",
"of",
"the",
"courses",
"that",
"do",
"not",
"have",
"any",
"prerequisite",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "course_id"
},
{
"id": 0,
"type": "table",
"value": "course"
},
{
"id": 1,
"type": "table",
"value": "prereq"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
2,
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
15,167 | customers_and_orders | bird:test.json:287 | What is the product type with least number of products? | SELECT product_type_code FROM Products GROUP BY product_type_code ORDER BY count(*) ASC LIMIT 1 | [
"What",
"is",
"the",
"product",
"type",
"with",
"least",
"number",
"of",
"products",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "product_type_code"
},
{
"id": 0,
"type": "table",
"value": "products"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"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",
"O",
"O",
"B-TABLE",
"O"
] |
3,872 | address_1 | bird:test.json:798 | Give the state that has the most students. | SELECT T1.state FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.state ORDER BY count(*) DESC LIMIT 1 | [
"Give",
"the",
"state",
"that",
"has",
"the",
"most",
"students",
"."
] | [
{
"id": 3,
"type": "column",
"value": "city_code"
},
{
"id": 2,
"type": "table",
"value": "student"
},
{
"id": 0,
"type": "column",
"value": "state"
},
{
"id": 1,
"type": "table",
"value": "city"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
7,564 | world_development_indicators | bird:train.json:2165 | Which high income group countries are from Asia? | SELECT CountryCode, Region FROM Country WHERE (IncomeGroup = 'High income: OECD' OR IncomeGroup = 'High income: nonOECD') AND Region LIKE '%Asia%' | [
"Which",
"high",
"income",
"group",
"countries",
"are",
"from",
"Asia",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "High income: nonOECD"
},
{
"id": 5,
"type": "value",
"value": "High income: OECD"
},
{
"id": 1,
"type": "column",
"value": "countrycode"
},
{
"id": 4,
"type": "column",
"value": "incomegroup"
},
{
"id": 0,
... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
2,
3
]
},
{
"entity_id":... | [
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O"
] |
5,663 | formula_1 | spider:train_spider.json:2224 | For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year? | SELECT max(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year | [
"For",
"each",
"race",
"name",
",",
"What",
"is",
"the",
"maximum",
"fastest",
"lap",
"speed",
"for",
"races",
"after",
"2004",
"ordered",
"by",
"year",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "fastestlapspeed"
},
{
"id": 3,
"type": "table",
"value": "results"
},
{
"id": 6,
"type": "column",
"value": "raceid"
},
{
"id": 2,
"type": "table",
"value": "races"
},
{
"id": 0,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
18
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"enti... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O"
] |
14,117 | medicine_enzyme_interaction | spider:train_spider.json:954 | What is the id and name of the enzyme that can interact with the most medicines as an activator? | SELECT T1.id , T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"i",
"d",
"and",
"name",
"of",
"the",
"enzyme",
"that",
"can",
"interact",
"with",
"the",
"most",
"medicines",
"as",
"an",
"activator",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "medicine_enzyme_interaction"
},
{
"id": 4,
"type": "column",
"value": "interaction_type"
},
{
"id": 5,
"type": "value",
"value": "activitor"
},
{
"id": 6,
"type": "column",
"value": "enzyme_id"
},
{
"id": 2,
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
12
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O"
] |
90 | cre_Doc_Tracking_DB | spider:train_spider.json:4234 | What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents? | SELECT T2.employee_name , T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id; | [
"What",
"are",
"the",
"names",
"of",
"the",
"employees",
"who",
"authorised",
"the",
"destruction",
"and",
"the",
"employees",
"who",
"destroyed",
"the",
"corresponding",
"documents",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "destruction_authorised_by_employee_id"
},
{
"id": 2,
"type": "table",
"value": "documents_to_be_destroyed"
},
{
"id": 3,
"type": "column",
"value": "destroyed_by_employee_id"
},
{
"id": 0,
"type": "column",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": [
13,
14,
15
]
},
{
"entity_id": 4,
"token_idxs": []... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
960 | superhero | bird:dev.json:812 | List down at least five full names of superheroes with blue eyes. | SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Blue' LIMIT 5 | [
"List",
"down",
"at",
"least",
"five",
"full",
"names",
"of",
"superheroes",
"with",
"blue",
"eyes",
"."
] | [
{
"id": 0,
"type": "column",
"value": "superhero_name"
},
{
"id": 5,
"type": "column",
"value": "eye_colour_id"
},
{
"id": 1,
"type": "table",
"value": "superhero"
},
{
"id": 2,
"type": "table",
"value": "colour"
},
{
"id": 3,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
6,227 | student_club | bird:dev.json:1384 | How many income generated by Grant Gilmour? | SELECT T2.amount FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Grant' AND T1.last_name = 'Gilmour' | [
"How",
"many",
"income",
"generated",
"by",
"Grant",
"Gilmour",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "link_to_member"
},
{
"id": 5,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type": "column",
"value": "member_id"
},
{
"id": 7,
"type": "column",
"value": "last_name"
},
{
"id": 8,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
9,432 | chinook_1 | spider:train_spider.json:857 | Find all the customer last names that do not have invoice totals larger than 20. | SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20 | [
"Find",
"all",
"the",
"customer",
"last",
"names",
"that",
"do",
"not",
"have",
"invoice",
"totals",
"larger",
"than",
"20",
"."
] | [
{
"id": 5,
"type": "column",
"value": "customerid"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 1,
"type": "column",
"value": "lastname"
},
{
"id": 2,
"type": "table",
"value": "invoice"
},
{
"id": 3,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
14
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
10,177 | boat_1 | bird:test.json:904 | What is the name, rating, and age for every sailor? And order them by rating and age. | SELECT name , rating , age FROM Sailors ORDER BY rating , age | [
"What",
"is",
"the",
"name",
",",
"rating",
",",
"and",
"age",
"for",
"every",
"sailor",
"?",
"And",
"order",
"them",
"by",
"rating",
"and",
"age",
"."
] | [
{
"id": 0,
"type": "table",
"value": "sailors"
},
{
"id": 2,
"type": "column",
"value": "rating"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2,
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,615 | simpson_episodes | bird:train.json:4323 | Which title is the winner of Best International TV Series in 2017? | SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award = 'Best International TV Series' AND SUBSTR(T1.year, 1, 4) = '2017'; | [
"Which",
"title",
"is",
"the",
"winner",
"of",
"Best",
"International",
"TV",
"Series",
"in",
"2017",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Best International TV Series"
},
{
"id": 3,
"type": "column",
"value": "episode_id"
},
{
"id": 2,
"type": "table",
"value": "episode"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 1,
"type": "... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"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",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,218 | works_cycles | bird:train.json:7295 | Please list the website purchasing links of the vendors from whom the product Hex Nut 5 can be purchased. | SELECT T3.PurchasingWebServiceURL FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Vendor AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T2.Name = 'Hex Nut 5' | [
"Please",
"list",
"the",
"website",
"purchasing",
"links",
"of",
"the",
"vendors",
"from",
"whom",
"the",
"product",
"Hex",
"Nut",
"5",
"can",
"be",
"purchased",
"."
] | [
{
"id": 0,
"type": "column",
"value": "purchasingwebserviceurl"
},
{
"id": 6,
"type": "column",
"value": "businessentityid"
},
{
"id": 4,
"type": "table",
"value": "productvendor"
},
{
"id": 3,
"type": "value",
"value": "Hex Nut 5"
},
{
"id": 7,
... | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13,
14,
15
]
},
{
"entity_id": 4,
"token_idxs": []
},... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O"
] |
13,443 | tracking_orders | spider:train_spider.json:6942 | What are the names of the customers who bought product "food" at least once? | SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = "food" GROUP BY T1.customer_id HAVING count(*) >= 1 | [
"What",
"are",
"the",
"names",
"of",
"the",
"customers",
"who",
"bought",
"product",
"\"",
"food",
"\"",
"at",
"least",
"once",
"?"
] | [] | [
{
"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",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
7,752 | ice_hockey_draft | bird:train.json:6952 | How many players who were drafted by the Toronto Maple Leafs have played over 300 games in their first 7 years of the NHL career? | SELECT COUNT(ELITEID) FROM PlayerInfo WHERE overallby = 'Toronto Maple Leafs' AND sum_7yr_GP > 300 | [
"How",
"many",
"players",
"who",
"were",
"drafted",
"by",
"the",
"Toronto",
"Maple",
"Leafs",
"have",
"played",
"over",
"300",
"games",
"in",
"their",
"first",
"7",
"years",
"of",
"the",
"NHL",
"career",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Toronto Maple Leafs"
},
{
"id": 0,
"type": "table",
"value": "playerinfo"
},
{
"id": 4,
"type": "column",
"value": "sum_7yr_gp"
},
{
"id": 2,
"type": "column",
"value": "overallby"
},
{
"id": 1,
"type": "co... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": [
18,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
8,346 | machine_repair | spider:train_spider.json:2241 | Show the name of technicians aged either 36 or 37 | SELECT Name FROM technician WHERE Age = 36 OR Age = 37 | [
"Show",
"the",
"name",
"of",
"technicians",
"aged",
"either",
"36",
"or",
"37"
] | [
{
"id": 0,
"type": "table",
"value": "technician"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "age"
},
{
"id": 3,
"type": "value",
"value": "36"
},
{
"id": 4,
"type": "value",
"value": "37"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE"
] |
916 | tracking_software_problems | spider:train_spider.json:5356 | Find all the ids and dates of the logs for the problem whose id is 10. | SELECT problem_log_id , log_entry_date FROM problem_log WHERE problem_id = 10 | [
"Find",
"all",
"the",
"ids",
"and",
"dates",
"of",
"the",
"logs",
"for",
"the",
"problem",
"whose",
"i",
"d",
"is",
"10",
"."
] | [
{
"id": 1,
"type": "column",
"value": "problem_log_id"
},
{
"id": 2,
"type": "column",
"value": "log_entry_date"
},
{
"id": 0,
"type": "table",
"value": "problem_log"
},
{
"id": 3,
"type": "column",
"value": "problem_id"
},
{
"id": 4,
"type": "... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
11,
13,
14
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
2,608 | superstore | bird:train.json:2357 | What was the original price of Xerox 1952 ordered by Aimee Bixby on 2014/9/10? | SELECT DISTINCT T2.Sales / (1 - T2.Discount) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T3.`Product Name` = 'Xerox 1952' AND T2.`Order Date` = '2014-09-10' | [
"What",
"was",
"the",
"original",
"price",
"of",
"Xerox",
"1952",
"ordered",
"by",
"Aimee",
"Bixby",
"on",
"2014/9/10",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "central_superstore"
},
{
"id": 5,
"type": "column",
"value": "Customer Name"
},
{
"id": 7,
"type": "column",
"value": "Product Name"
},
{
"id": 6,
"type": "value",
"value": "Aimee Bixby"
},
{
"id": 13,
"typ... | [
{
"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",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"O"
] |
12,272 | hr_1 | spider:train_spider.json:3447 | display the employee ID for each employee and the date on which he ended his previous job. | SELECT employee_id , MAX(end_date) FROM job_history GROUP BY employee_id | [
"display",
"the",
"employee",
"ID",
"for",
"each",
"employee",
"and",
"the",
"date",
"on",
"which",
"he",
"ended",
"his",
"previous",
"job",
"."
] | [
{
"id": 0,
"type": "table",
"value": "job_history"
},
{
"id": 1,
"type": "column",
"value": "employee_id"
},
{
"id": 2,
"type": "column",
"value": "end_date"
}
] | [
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,588 | toxicology | bird:dev.json:270 | Among the molecules with element Calcium, are they mostly carcinogenic or non carcinogenic? | SELECT T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'ca' GROUP BY T2.label ORDER BY COUNT(T2.label) DESC LIMIT 1 | [
"Among",
"the",
"molecules",
"with",
"element",
"Calcium",
",",
"are",
"they",
"mostly",
"carcinogenic",
"or",
"non",
"carcinogenic",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "molecule_id"
},
{
"id": 2,
"type": "table",
"value": "molecule"
},
{
"id": 3,
"type": "column",
"value": "element"
},
{
"id": 0,
"type": "column",
"value": "label"
},
{
"id": 1,
"type": "table",
"value... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,608 | book_publishing_company | bird:train.json:184 | List all employees who are at the maximum level in their job designation. | SELECT T1.fname, T1.lname FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.job_lvl = T2.max_lvl | [
"List",
"all",
"employees",
"who",
"are",
"at",
"the",
"maximum",
"level",
"in",
"their",
"job",
"designation",
"."
] | [
{
"id": 2,
"type": "table",
"value": "employee"
},
{
"id": 4,
"type": "column",
"value": "job_lvl"
},
{
"id": 5,
"type": "column",
"value": "max_lvl"
},
{
"id": 6,
"type": "column",
"value": "job_id"
},
{
"id": 0,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
4,386 | soccer_2016 | bird:train.json:1903 | Which player became the man of the series in the year 2012? Give the name and country of this player. | SELECT T2.Player_Name, T3.Country_Name FROM Season AS T1 INNER JOIN Player AS T2 ON T1.Man_of_the_Series = T2.Player_Id INNER JOIN Country AS T3 ON T2.Country_Name = T3.Country_Id WHERE T1.Season_Year = 2012 | [
"Which",
"player",
"became",
"the",
"man",
"of",
"the",
"series",
"in",
"the",
"year",
"2012",
"?",
"Give",
"the",
"name",
"and",
"country",
"of",
"this",
"player",
"."
] | [
{
"id": 8,
"type": "column",
"value": "man_of_the_series"
},
{
"id": 1,
"type": "column",
"value": "country_name"
},
{
"id": 0,
"type": "column",
"value": "player_name"
},
{
"id": 3,
"type": "column",
"value": "season_year"
},
{
"id": 7,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"ent... | [
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
14,013 | hr_1 | spider:train_spider.json:3511 | display the department id and the total salary for those departments which contains at least two employees. | SELECT department_id , SUM(salary) FROM employees GROUP BY department_id HAVING count(*) >= 2 | [
"display",
"the",
"department",
"i",
"d",
"and",
"the",
"total",
"salary",
"for",
"those",
"departments",
"which",
"contains",
"at",
"least",
"two",
"employees",
"."
] | [
{
"id": 1,
"type": "column",
"value": "department_id"
},
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 3,
"type": "column",
"value": "salary"
},
{
"id": 2,
"type": "value",
"value": "2"
}
] | [
{
"entity_id": 0,
"token_idxs": [
17
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
8,834 | superhero | bird:dev.json:725 | How many superheroes are published by Marvel Comics? | SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Marvel Comics' | [
"How",
"many",
"superheroes",
"are",
"published",
"by",
"Marvel",
"Comics",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "publisher_name"
},
{
"id": 3,
"type": "value",
"value": "Marvel Comics"
},
{
"id": 5,
"type": "column",
"value": "publisher_id"
},
{
"id": 0,
"type": "table",
"value": "superhero"
},
{
"id": 1,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
4,351 | legislator | bird:train.json:4840 | Provide the full name and birth date of the legislator with a contact form of http://www.brown.senate.gov/contact/. | SELECT T1.official_full_name, T1.birthday_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.contact_form = 'http://www.brown.senate.gov/contact/' | [
"Provide",
"the",
"full",
"name",
"and",
"birth",
"date",
"of",
"the",
"legislator",
"with",
"a",
"contact",
"form",
"of",
"http://www.brown.senate.gov/contact/."
] | [
{
"id": 5,
"type": "value",
"value": "http://www.brown.senate.gov/contact/"
},
{
"id": 0,
"type": "column",
"value": "official_full_name"
},
{
"id": 3,
"type": "table",
"value": "current-terms"
},
{
"id": 1,
"type": "column",
"value": "birthday_bio"
},
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
15,848 | shipping | bird:train.json:5592 | State the headquarter of the truck which completed shipment no.1045. | SELECT T1.make FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = 1045 | [
"State",
"the",
"headquarter",
"of",
"the",
"truck",
"which",
"completed",
"shipment",
"no.1045",
"."
] | [
{
"id": 2,
"type": "table",
"value": "shipment"
},
{
"id": 5,
"type": "column",
"value": "truck_id"
},
{
"id": 3,
"type": "column",
"value": "ship_id"
},
{
"id": 1,
"type": "table",
"value": "truck"
},
{
"id": 0,
"type": "column",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
0
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_... | [
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
13,353 | boat_1 | bird:test.json:900 | How many reservations for each boat did the sailors with an id greater than 1 make? | SELECT bid , count(*) FROM Reserves WHERE sid > 1 GROUP BY bid | [
"How",
"many",
"reservations",
"for",
"each",
"boat",
"did",
"the",
"sailors",
"with",
"an",
"i",
"d",
"greater",
"than",
"1",
"make",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "reserves"
},
{
"id": 1,
"type": "column",
"value": "bid"
},
{
"id": 2,
"type": "column",
"value": "sid"
},
{
"id": 3,
"type": "value",
"value": "1"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11,
12
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_i... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
6,275 | movie_3 | bird:train.json:9291 | Which city does the address 1623 Kingstown Drive belong to? | SELECT T1.city FROM city AS T1 INNER JOIN address AS T2 ON T2.city_id = T1.city_id WHERE T2.address = '1623 Kingstown Drive' | [
"Which",
"city",
"does",
"the",
"address",
"1623",
"Kingstown",
"Drive",
"belong",
"to",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "1623 Kingstown Drive"
},
{
"id": 2,
"type": "table",
"value": "address"
},
{
"id": 3,
"type": "column",
"value": "address"
},
{
"id": 5,
"type": "column",
"value": "city_id"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
5,
6,
7
]
},
{
"en... | [
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O"
] |
15,126 | movie_platform | bird:train.json:126 | How many critics were given to the movie that got the most movie popularity number. | SELECT COUNT(T1.critic) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_popularity = ( SELECT MAX(movie_popularity) FROM movies ) | [
"How",
"many",
"critics",
"were",
"given",
"to",
"the",
"movie",
"that",
"got",
"the",
"most",
"movie",
"popularity",
"number",
"."
] | [
{
"id": 2,
"type": "column",
"value": "movie_popularity"
},
{
"id": 4,
"type": "column",
"value": "movie_id"
},
{
"id": 0,
"type": "table",
"value": "ratings"
},
{
"id": 1,
"type": "table",
"value": "movies"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
10,280 | music_2 | spider:train_spider.json:5223 | What is the type of vocals that the band member with the last name "Heilo" played the most? | SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = "Heilo" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"type",
"of",
"vocals",
"that",
"the",
"band",
"member",
"with",
"the",
"last",
"name",
"\"",
"Heilo",
"\"",
"played",
"the",
"most",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "lastname"
},
{
"id": 5,
"type": "column",
"value": "bandmate"
},
{
"id": 1,
"type": "table",
"value": "vocals"
},
{
"id": 4,
"type": "column",
"value": "Heilo"
},
{
"id": 0,
"type": "column",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": [
15
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
3,257 | planet_1 | bird:test.json:1929 | Find the number of employees who do not have clearance in Mars . | select count(*) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = "mars" ); | [
"Find",
"the",
"number",
"of",
"employees",
"who",
"do",
"not",
"have",
"clearance",
"in",
"Mars",
"."
] | [
{
"id": 5,
"type": "table",
"value": "has_clearance"
},
{
"id": 1,
"type": "column",
"value": "employeeid"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 7,
"type": "column",
"value": "planetid"
},
{
"id": 8,
"type": "column",
... | [
{
"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": [
11
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"O"
] |
14,153 | soccer_2016 | bird:train.json:1826 | How many umpires are from South Africa? | SELECT SUM(CASE WHEN T1.Country_Name = 'South Africa' THEN 1 ELSE 0 END) FROM Country AS T1 INNER JOIN Umpire AS T2 ON T1.Country_ID = T2.Umpire_Country | [
"How",
"many",
"umpires",
"are",
"from",
"South",
"Africa",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "umpire_country"
},
{
"id": 6,
"type": "column",
"value": "country_name"
},
{
"id": 7,
"type": "value",
"value": "South Africa"
},
{
"id": 2,
"type": "column",
"value": "country_id"
},
{
"id": 0,
"type": "t... | [
{
"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": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,718 | donor | bird:train.json:3244 | For the donation of the project 'Awesome Audiobooks Make Avid Readers', what was the percentage of the tip in the total amount? | SELECT CAST(SUM(T2.donation_optional_support) AS REAL) * 100 / SUM(T2.donation_total) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Awesome Audiobooks Make Avid Readers' | [
"For",
"the",
"donation",
"of",
"the",
"project",
"'",
"Awesome",
"Audiobooks",
"Make",
"Avid",
"Readers",
"'",
",",
"what",
"was",
"the",
"percentage",
"of",
"the",
"tip",
"in",
"the",
"total",
"amount",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Awesome Audiobooks Make Avid Readers"
},
{
"id": 7,
"type": "column",
"value": "donation_optional_support"
},
{
"id": 6,
"type": "column",
"value": "donation_total"
},
{
"id": 1,
"type": "table",
"value": "donations"
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,910 | flight_4 | spider:train_spider.json:6831 | Find the name, city, and country of the airport that has the highest latitude. | SELECT name , city , country FROM airports ORDER BY elevation DESC LIMIT 1 | [
"Find",
"the",
"name",
",",
"city",
",",
"and",
"country",
"of",
"the",
"airport",
"that",
"has",
"the",
"highest",
"latitude",
"."
] | [
{
"id": 4,
"type": "column",
"value": "elevation"
},
{
"id": 0,
"type": "table",
"value": "airports"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8,
9
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,105 | region_building | bird:test.json:326 | List the names of regions in alphabetical order. | SELECT Name FROM region ORDER BY Name ASC | [
"List",
"the",
"names",
"of",
"regions",
"in",
"alphabetical",
"order",
"."
] | [
{
"id": 0,
"type": "table",
"value": "region"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
14,737 | shooting | bird:train.json:2469 | From the cases where the subject are male, list the case number and the location and subject status. | SELECT T1.case_number, T1.location, T1.subject_statuses FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T2.gender = 'M' | [
"From",
"the",
"cases",
"where",
"the",
"subject",
"are",
"male",
",",
"list",
"the",
"case",
"number",
"and",
"the",
"location",
"and",
"subject",
"status",
"."
] | [
{
"id": 2,
"type": "column",
"value": "subject_statuses"
},
{
"id": 0,
"type": "column",
"value": "case_number"
},
{
"id": 3,
"type": "table",
"value": "incidents"
},
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 4,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
11,
12
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
5,514 | synthea | bird:train.json:1420 | List the procedures received by Emmy Waelchi. | SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Emmy' AND T1.last = 'Waelchi' | [
"List",
"the",
"procedures",
"received",
"by",
"Emmy",
"Waelchi",
"."
] | [
{
"id": 0,
"type": "column",
"value": "description"
},
{
"id": 2,
"type": "table",
"value": "procedures"
},
{
"id": 1,
"type": "table",
"value": "patients"
},
{
"id": 3,
"type": "column",
"value": "patient"
},
{
"id": 7,
"type": "value",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
5
... | [
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
53 | cre_Drama_Workshop_Groups | spider:train_spider.json:5162 | What are the names of the workshop groups that have bookings with status code "stop"? | SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" | [
"What",
"are",
"the",
"names",
"of",
"the",
"workshop",
"groups",
"that",
"have",
"bookings",
"with",
"status",
"code",
"\"",
"stop",
"\"",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "drama_workshop_groups"
},
{
"id": 5,
"type": "column",
"value": "workshop_group_id"
},
{
"id": 3,
"type": "column",
"value": "status_code"
},
{
"id": 0,
"type": "column",
"value": "store_name"
},
{
"id": 1,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
16,
17
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE"
] |
9,016 | retail_world | bird:train.json:6617 | Which products by Plutzer Lebensmittelgromrkte AG were discontinued and what are their price? | SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Plutzer Lebensmittelgromrkte AG' AND T1.Discontinued = 1 | [
"Which",
"products",
"by",
"Plutzer",
"Lebensmittelgromrkte",
"AG",
"were",
"discontinued",
"and",
"what",
"are",
"their",
"price",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Plutzer Lebensmittelgromrkte AG"
},
{
"id": 6,
"type": "column",
"value": "discontinued"
},
{
"id": 4,
"type": "column",
"value": "companyname"
},
{
"id": 3,
"type": "column",
"value": "supplierid"
},
{
"id": 0... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7,
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.