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,158
customers_card_transactions
spider:train_spider.json:699
Show ids, customer ids, card type codes, card numbers for all cards.
SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards
[ "Show", "ids", ",", "customer", "ids", ",", "card", "type", "codes", ",", "card", "numbers", "for", "all", "cards", "." ]
[ { "id": 0, "type": "table", "value": "customers_cards" }, { "id": 3, "type": "column", "value": "card_type_code" }, { "id": 2, "type": "column", "value": "customer_id" }, { "id": 4, "type": "column", "value": "card_number" }, { "id": 1, "type":...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 4, "token_idx...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O" ]
5,159
mondial_geo
bird:train.json:8265
Which country has the highest GDP per capita?
SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.GDP / T1.Population DESC LIMIT 1
[ "Which", "country", "has", "the", "highest", "GDP", "per", "capita", "?" ]
[ { "id": 6, "type": "column", "value": "population" }, { "id": 1, "type": "table", "value": "country" }, { "id": 2, "type": "table", "value": "economy" }, { "id": 4, "type": "column", "value": "country" }, { "id": 0, "type": "column", "value...
[ { "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": [ 1 ] }, { "entity_id": 5, "token_idxs": [ 5 ...
[ "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
5,160
video_games
bird:train.json:3397
What is the average number of games published by a publisher?
SELECT CAST(COUNT(T.game_id) AS REAL) / COUNT(DISTINCT T.publisher_id) FROM game_publisher AS T
[ "What", "is", "the", "average", "number", "of", "games", "published", "by", "a", "publisher", "?" ]
[ { "id": 0, "type": "table", "value": "game_publisher" }, { "id": 1, "type": "column", "value": "publisher_id" }, { "id": 2, "type": "column", "value": "game_id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O" ]
5,161
european_football_2
bird:dev.json:1067
Which teams have build up play passing more than 70? Please list their short names.
SELECT DISTINCT t1.team_short_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.buildUpPlayPassing > 70
[ "Which", "teams", "have", "build", "up", "play", "passing", "more", "than", "70", "?", "Please", "list", "their", "short", "names", "." ]
[ { "id": 3, "type": "column", "value": "buildupplaypassing" }, { "id": 0, "type": "column", "value": "team_short_name" }, { "id": 2, "type": "table", "value": "team_attributes" }, { "id": 5, "type": "column", "value": "team_api_id" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [ 13, 14, 15 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3, 4, 5, 6 ] }, { "entity_id": 4, "to...
[ "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
5,162
olympics
bird:train.json:5064
What is the NOC code of the region of the competitors weighted 77 kg?
SELECT T1.noc FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.weight = 77
[ "What", "is", "the", "NOC", "code", "of", "the", "region", "of", "the", "competitors", "weighted", "77", "kg", "?" ]
[ { "id": 5, "type": "table", "value": "person_region" }, { "id": 4, "type": "table", "value": "noc_region" }, { "id": 6, "type": "column", "value": "person_id" }, { "id": 8, "type": "column", "value": "region_id" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "O" ]
5,163
warehouse_1
bird:test.json:1695
Find the content that has the highest total values in all boxes.
SELECT CONTENTS FROM boxes ORDER BY value DESC LIMIT 1
[ "Find", "the", "content", "that", "has", "the", "highest", "total", "values", "in", "all", "boxes", "." ]
[ { "id": 1, "type": "column", "value": "contents" }, { "id": 0, "type": "table", "value": "boxes" }, { "id": 2, "type": "column", "value": "value" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
5,164
public_review_platform
bird:train.json:4027
List out the category name of business id 5.
SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T2.business_id = 5
[ "List", "out", "the", "category", "name", "of", "business", "i", "d", "5", "." ]
[ { "id": 2, "type": "table", "value": "business_categories" }, { "id": 0, "type": "column", "value": "category_name" }, { "id": 3, "type": "column", "value": "business_id" }, { "id": 5, "type": "column", "value": "category_id" }, { "id": 1, "typ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
5,165
driving_school
spider:train_spider.json:6643
In what city does Janessa Sawayn live?
SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
[ "In", "what", "city", "does", "Janessa", "Sawayn", "live", "?" ]
[ { "id": 4, "type": "column", "value": "staff_address_id" }, { "id": 3, "type": "column", "value": "address_id" }, { "id": 5, "type": "column", "value": "first_name" }, { "id": 1, "type": "table", "value": "addresses" }, { "id": 7, "type": "colu...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-COLUMN", "O", "O" ]
5,166
game_1
spider:train_spider.json:6038
What are the ids of all students who played video games and sports?
SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games
[ "What", "are", "the", "ids", "of", "all", "students", "who", "played", "video", "games", "and", "sports", "?" ]
[ { "id": 1, "type": "table", "value": "plays_games" }, { "id": 0, "type": "table", "value": "sportsinfo" }, { "id": 2, "type": "column", "value": "stuid" } ]
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O", "B-TABLE", "O" ]
5,167
student_club
bird:dev.json:1358
Who was the first one paid his/her dues? Tell the full name.
SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T2.source = 'Dues' ORDER BY T2.date_received LIMIT 1
[ "Who", "was", "the", "first", "one", "paid", "his", "/", "her", "dues", "?", "Tell", "the", "full", "name", "." ]
[ { "id": 8, "type": "column", "value": "link_to_member" }, { "id": 6, "type": "column", "value": "date_received" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 7, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O" ]
5,169
hospital_1
spider:train_spider.json:3963
What are the names of departments that have primarily affiliated physicians.
SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1
[ "What", "are", "the", "names", "of", "departments", "that", "have", "primarily", "affiliated", "physicians", "." ]
[ { "id": 3, "type": "column", "value": "primaryaffiliation" }, { "id": 1, "type": "table", "value": "affiliated_with" }, { "id": 6, "type": "column", "value": "departmentid" }, { "id": 2, "type": "table", "value": "department" }, { "id": 5, "typ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "B-TABLE", "O", "O" ]
5,170
public_review_platform
bird:train.json:3963
For the user who joined Yelp in "2010", with an average of "4.5" stars review and has got uber number of fans, how many "funny" compliments has he/she received from other users?
SELECT COUNT(T2.user_id) FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id INNER JOIN Compliments AS T3 ON T2.compliment_id = T3.compliment_id WHERE T1.user_yelping_since_year = 2010 AND T1.user_average_stars = 4.5 AND T1.user_fans = 'Uber' AND T3.compliment_type = 'funny'
[ "For", "the", "user", "who", "joined", "Yelp", "in", "\"", "2010", "\"", ",", "with", "an", "average", "of", "\"", "4.5", "\"", "stars", "review", "and", "has", "got", "uber", "number", "of", "fans", ",", "how", "many", "\"", "funny", "\"", "complime...
[ { "id": 5, "type": "column", "value": "user_yelping_since_year" }, { "id": 7, "type": "column", "value": "user_average_stars" }, { "id": 3, "type": "table", "value": "users_compliments" }, { "id": 11, "type": "column", "value": "compliment_type" }, { ...
[ { "entity_id": 0, "token_idxs": [ 33 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 41 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", ...
5,171
public_review_platform
bird:train.json:3937
List at least 10 users ID that has 4 as an average ratings of all reviews sent.
SELECT COUNT(user_id) FROM Users WHERE user_average_stars = 4 LIMIT 10
[ "List", "at", "least", "10", "users", "ID", "that", "has", "4", "as", "an", "average", "ratings", "of", "all", "reviews", "sent", "." ]
[ { "id": 1, "type": "column", "value": "user_average_stars" }, { "id": 3, "type": "column", "value": "user_id" }, { "id": 0, "type": "table", "value": "users" }, { "id": 2, "type": "value", "value": "4" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,172
formula_1
bird:dev.json:931
What was the fastest lap speed among all drivers in the 2009 Spanish Grand Prix?
SELECT T2.fastestLapSpeed FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.name = 'Spanish Grand Prix' AND T1.year = 2009 AND T2.fastestLapSpeed IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1
[ "What", "was", "the", "fastest", "lap", "speed", "among", "all", "drivers", "in", "the", "2009", "Spanish", "Grand", "Prix", "?" ]
[ { "id": 5, "type": "value", "value": "Spanish Grand Prix" }, { "id": 0, "type": "column", "value": "fastestlapspeed" }, { "id": 2, "type": "table", "value": "results" }, { "id": 3, "type": "column", "value": "raceid" }, { "id": 1, "type": "tabl...
[ { "entity_id": 0, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_id...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
5,173
country_language
bird:test.json:1359
Count the number of languages.
SELECT count(*) FROM languages
[ "Count", "the", "number", "of", "languages", "." ]
[ { "id": 0, "type": "table", "value": "languages" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O" ]
5,174
talkingdata
bird:train.json:1110
How many users belong to "game-Art Style" category?
SELECT COUNT(T1.app_id) FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id WHERE T2.category = 'game-Art Style'
[ "How", "many", "users", "belong", "to", "\"", "game", "-", "Art", "Style", "\"", "category", "?" ]
[ { "id": 1, "type": "table", "value": "label_categories" }, { "id": 3, "type": "value", "value": "game-Art Style" }, { "id": 0, "type": "table", "value": "app_labels" }, { "id": 2, "type": "column", "value": "category" }, { "id": 5, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 6, 7, 8, 9 ] }, { "entity_id": 4, "token_idxs": [] }, ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "B-COLUMN", "O" ]
5,175
student_loan
bird:train.json:4414
How many female students joined a marines and air force organization?
SELECT COUNT(name) FROM enlist WHERE organ IN ('marines', 'air_force') AND name NOT IN ( SELECT name FROM male )
[ "How", "many", "female", "students", "joined", "a", "marines", "and", "air", "force", "organization", "?" ]
[ { "id": 4, "type": "value", "value": "air_force" }, { "id": 3, "type": "value", "value": "marines" }, { "id": 0, "type": "table", "value": "enlist" }, { "id": 2, "type": "column", "value": "organ" }, { "id": 1, "type": "column", "value": "n...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 8, 9 ] }, { "entity_id"...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O" ]
5,176
college_3
spider:train_spider.json:4675
Find the name of the department that has the fewest members.
SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1
[ "Find", "the", "name", "of", "the", "department", "that", "has", "the", "fewest", "members", "." ]
[ { "id": 2, "type": "table", "value": "department" }, { "id": 3, "type": "table", "value": "member_of" }, { "id": 1, "type": "column", "value": "dname" }, { "id": 0, "type": "column", "value": "dno" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]
5,177
art_1
bird:test.json:1211
What mediums were used for the painting with id 80 ?
select medium from paintings where paintingid = 80
[ "What", "mediums", "were", "used", "for", "the", "painting", "with", "i", "d", "80", "?" ]
[ { "id": 2, "type": "column", "value": "paintingid" }, { "id": 0, "type": "table", "value": "paintings" }, { "id": 1, "type": "column", "value": "medium" }, { "id": 3, "type": "value", "value": "80" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
5,178
card_games
bird:dev.json:474
Among the sets of cards that have an Italian translation, how many of them have a base set number of under 100?
SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation IS NOT NULL AND T1.baseSetSize < 100 AND T2.language = 'Italian'
[ "Among", "the", "sets", "of", "cards", "that", "have", "an", "Italian", "translation", ",", "how", "many", "of", "them", "have", "a", "base", "set", "number", "of", "under", "100", "?" ]
[ { "id": 1, "type": "table", "value": "set_translations" }, { "id": 5, "type": "column", "value": "translation" }, { "id": 6, "type": "column", "value": "basesetsize" }, { "id": 8, "type": "column", "value": "language" }, { "id": 3, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
5,179
cars
bird:train.json:3146
What is the average weight of Japanese cars with 4 cylinders that were produced from 1975 to 1980?
SELECT AVG(T1.weight) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T2.model_year BETWEEN 1975 AND 1980 AND T1.cylinders = 4 AND T3.country = 'Japan'
[ "What", "is", "the", "average", "weight", "of", "Japanese", "cars", "with", "4", "cylinders", "that", "were", "produced", "from", "1975", "to", "1980", "?" ]
[ { "id": 3, "type": "table", "value": "production" }, { "id": 6, "type": "column", "value": "model_year" }, { "id": 9, "type": "column", "value": "cylinders" }, { "id": 0, "type": "table", "value": "country" }, { "id": 5, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-VALUE", "O" ]
5,181
car_racing
bird:test.json:1634
What are the total and average points of drivers?
SELECT sum(Points) , avg(Points) FROM driver
[ "What", "are", "the", "total", "and", "average", "points", "of", "drivers", "?" ]
[ { "id": 0, "type": "table", "value": "driver" }, { "id": 1, "type": "column", "value": "points" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
5,182
image_and_language
bird:train.json:7507
How many images have at least 25 attributes?
SELECT COUNT(*) FROM ( SELECT IMG_ID FROM IMG_OBJ_att GROUP BY IMG_ID HAVING COUNT(ATT_CLASS_ID) > 25 ) T1
[ "How", "many", "images", "have", "at", "least", "25", "attributes", "?" ]
[ { "id": 3, "type": "column", "value": "att_class_id" }, { "id": 0, "type": "table", "value": "img_obj_att" }, { "id": 1, "type": "column", "value": "img_id" }, { "id": 2, "type": "value", "value": "25" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "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", "O", "O", "O", "B-VALUE", "O", "O" ]
5,184
food_inspection_2
bird:train.json:6192
Tell the address of employee who did inspection ID 52238?
SELECT T1.address FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 52238
[ "Tell", "the", "address", "of", "employee", "who", "did", "inspection", "ID", "52238", "?" ]
[ { "id": 3, "type": "column", "value": "inspection_id" }, { "id": 5, "type": "column", "value": "employee_id" }, { "id": 2, "type": "table", "value": "inspection" }, { "id": 1, "type": "table", "value": "employee" }, { "id": 0, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, {...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
5,185
authors
bird:train.json:3514
How many papers were published in 2011 in the journal whose short name is "Mol Brain"?
SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Year = 2011 AND T1.ShortName = 'Mol Brain'
[ "How", "many", "papers", "were", "published", "in", "2011", "in", "the", "journal", "whose", "short", "name", "is", "\"", "Mol", "Brain", "\"", "?" ]
[ { "id": 3, "type": "column", "value": "journalid" }, { "id": 6, "type": "column", "value": "shortname" }, { "id": 7, "type": "value", "value": "Mol Brain" }, { "id": 0, "type": "table", "value": "journal" }, { "id": 1, "type": "table", "val...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "O" ]
5,186
student_1
spider:train_spider.json:4052
Find the last names of teachers teaching in classroom 109.
SELECT lastname FROM teachers WHERE classroom = 109
[ "Find", "the", "last", "names", "of", "teachers", "teaching", "in", "classroom", "109", "." ]
[ { "id": 2, "type": "column", "value": "classroom" }, { "id": 0, "type": "table", "value": "teachers" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 3, "type": "value", "value": "109" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
5,187
works_cycles
bird:train.json:7272
What is the total profit gained by the company from the product that has the highest amount of quantity ordered from online customers? Indicate the name of the product.
SELECT (T2.ListPrice - T2.StandardCost) * SUM(T1.Quantity), T2.Name FROM ShoppingCartItem AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID, T2.Name, T2.ListPrice, T2.StandardCost, T1.Quantity ORDER BY SUM(T1.Quantity) DESC LIMIT 1
[ "What", "is", "the", "total", "profit", "gained", "by", "the", "company", "from", "the", "product", "that", "has", "the", "highest", "amount", "of", "quantity", "ordered", "from", "online", "customers", "?", "Indicate", "the", "name", "of", "the", "product",...
[ { "id": 5, "type": "table", "value": "shoppingcartitem" }, { "id": 3, "type": "column", "value": "standardcost" }, { "id": 0, "type": "column", "value": "productid" }, { "id": 2, "type": "column", "value": "listprice" }, { "id": 4, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 26 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 18 ] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
5,188
books
bird:train.json:6071
Which language is 'El plan infinito' written in?
SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'El plan infinito'
[ "Which", "language", "is", "'", "El", "plan", "infinito", "'", "written", "in", "?" ]
[ { "id": 4, "type": "value", "value": "El plan infinito" }, { "id": 0, "type": "column", "value": "language_name" }, { "id": 2, "type": "table", "value": "book_language" }, { "id": 5, "type": "column", "value": "language_id" }, { "id": 3, "type"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 5, "token_id...
[ "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O" ]
5,189
machine_repair
spider:train_spider.json:2245
Show different teams of technicians and the number of technicians in each team.
SELECT Team , COUNT(*) FROM technician GROUP BY Team
[ "Show", "different", "teams", "of", "technicians", "and", "the", "number", "of", "technicians", "in", "each", "team", "." ]
[ { "id": 0, "type": "table", "value": "technician" }, { "id": 1, "type": "column", "value": "team" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,190
cre_Doc_Tracking_DB
spider:train_spider.json:4235
List the names of the employees who authorized the destruction of documents 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;
[ "List", "the", "names", "of", "the", "employees", "who", "authorized", "the", "destruction", "of", "documents", "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": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 11, 12, 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
5,191
european_football_2
bird:dev.json:1070
Which country is the league Italy Serie A from?
SELECT t1.name FROM Country AS t1 INNER JOIN League AS t2 ON t1.id = t2.country_id WHERE t2.name = 'Italy Serie A'
[ "Which", "country", "is", "the", "league", "Italy", "Serie", "A", "from", "?" ]
[ { "id": 3, "type": "value", "value": "Italy Serie A" }, { "id": 5, "type": "column", "value": "country_id" }, { "id": 1, "type": "table", "value": "country" }, { "id": 2, "type": "table", "value": "league" }, { "id": 0, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "B-TABLE", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
5,192
cre_Students_Information_Systems
bird:test.json:462
Find the biographical data and details of students who got not only the most common result but also a result that is obtained by 3 students in behaviour monitoring.
SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 ) INTERSECT SELECT...
[ "Find", "the", "biographical", "data", "and", "details", "of", "students", "who", "got", "not", "only", "the", "most", "common", "result", "but", "also", "a", "result", "that", "is", "obtained", "by", "3", "students", "in", "behaviour", "monitoring", "." ]
[ { "id": 4, "type": "column", "value": "behaviour_monitoring_details" }, { "id": 3, "type": "table", "value": "behaviour_monitoring" }, { "id": 1, "type": "column", "value": "student_details" }, { "id": 5, "type": "column", "value": "student_id" }, { ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 27, 28 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O" ]
5,193
e_learning
spider:train_spider.json:3842
Find the personal names of students not enrolled in any course.
SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id
[ "Find", "the", "personal", "names", "of", "students", "not", "enrolled", "in", "any", "course", "." ]
[ { "id": 2, "type": "table", "value": "student_course_enrolment" }, { "id": 1, "type": "column", "value": "personal_name" }, { "id": 3, "type": "column", "value": "student_id" }, { "id": 0, "type": "table", "value": "students" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "B-TABLE", "I-TABLE", "O", "O", "O", "O" ]
5,194
soccer_2016
bird:train.json:1830
Which season played the highest number of matches at M Chinnaswamy Stadium?
SELECT T1.Season_Id FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE T2.Venue_Name = 'M Chinnaswamy Stadium' GROUP BY T1.Season_Id ORDER BY COUNT(T1.Season_Id) DESC LIMIT 1
[ "Which", "season", "played", "the", "highest", "number", "of", "matches", "at", "M", "Chinnaswamy", "Stadium", "?" ]
[ { "id": 4, "type": "value", "value": "M Chinnaswamy Stadium" }, { "id": 3, "type": "column", "value": "venue_name" }, { "id": 0, "type": "column", "value": "season_id" }, { "id": 5, "type": "column", "value": "venue_id" }, { "id": 1, "type": "t...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9, 10, 11 ] }, { "...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
5,195
simpson_episodes
bird:train.json:4181
What is the percentage ratio between uncredited and credited roles on the episode that won the 2017 Jupiter Award for Best International TV Series? Please include the title of the episode and the names of the persons who were uncredited alongside their role in that episode.
SELECT CAST(SUM(CASE WHEN T2.credited = 'false' THEN 1 END) AS REAL) * 100 / SUM(CASE WHEN T2.credited = 'true' THEN 1 END), T3.title, T2.person FROM Award AS T1 INNER JOIN Credit AS T2 ON T2.episode_id = T1.episode_id INNER JOIN Episode AS T3 ON T1.episode_id = T3.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2017' AND T1...
[ "What", "is", "the", "percentage", "ratio", "between", "uncredited", "and", "credited", "roles", "on", "the", "episode", "that", "won", "the", "2017", "Jupiter", "Award", "for", "Best", "International", "TV", "Series", "?", "Please", "include", "the", "title",...
[ { "id": 10, "type": "value", "value": "Best International TV Series" }, { "id": 7, "type": "column", "value": "award_category" }, { "id": 8, "type": "value", "value": "Jupiter Award" }, { "id": 5, "type": "column", "value": "episode_id" }, { "id": ...
[ { "entity_id": 0, "token_idxs": [ 28 ] }, { "entity_id": 1, "token_idxs": [ 37 ] }, { "entity_id": 2, "token_idxs": [ 46 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "enti...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-VALUE", "B-COLUMN", "B-COLUMN", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", ...
5,196
european_football_2
bird:dev.json:1082
Please list the leagues from Germany.
SELECT t2.name FROM Country AS t1 INNER JOIN League AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Germany'
[ "Please", "list", "the", "leagues", "from", "Germany", "." ]
[ { "id": 5, "type": "column", "value": "country_id" }, { "id": 1, "type": "table", "value": "country" }, { "id": 3, "type": "value", "value": "Germany" }, { "id": 2, "type": "table", "value": "league" }, { "id": 0, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
5,197
chinook_1
spider:train_spider.json:809
List the names of all music genres.
SELECT Name FROM GENRE
[ "List", "the", "names", "of", "all", "music", "genres", "." ]
[ { "id": 0, "type": "table", "value": "genre" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
5,199
phone_1
spider:train_spider.json:1038
List the hardware model name for the phones that have screen mode type "Text" or RAM size greater than 32.
SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = "Text" OR T1.RAM_MiB > 32;
[ "List", "the", "hardware", "model", "name", "for", "the", "phones", "that", "have", "screen", "mode", "type", "\"", "Text", "\"", "or", "RAM", "size", "greater", "than", "32", "." ]
[ { "id": 0, "type": "column", "value": "hardware_model_name" }, { "id": 5, "type": "column", "value": "graphics_mode" }, { "id": 1, "type": "table", "value": "screen_mode" }, { "id": 4, "type": "column", "value": "screen_mode" }, { "id": 2, "typ...
[ { "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": [ 10, 11 ] }, { "entity_id...
[ "O", "O", "B-COLUMN", "B-COLUMN", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
5,200
small_bank_1
spider:train_spider.json:1823
What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances?
SELECT T1.name , T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance
[ "What", "are", "the", "names", "of", "customers", "who", "have", "a", "savings", "balance", "lower", "than", "their", "checking", "balance", ",", "and", "what", "is", "the", "total", "of", "their", "checking", "and", "savings", "balances", "?" ]
[ { "id": 3, "type": "table", "value": "accounts" }, { "id": 4, "type": "table", "value": "checking" }, { "id": 1, "type": "table", "value": "savings" }, { "id": 2, "type": "column", "value": "balance" }, { "id": 5, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,201
talkingdata
bird:train.json:1055
How many users belong to the MOBA category?
SELECT COUNT(T2.app_id) FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T2.label_id = T1.label_id WHERE T1.category = 'MOBA'
[ "How", "many", "users", "belong", "to", "the", "MOBA", "category", "?" ]
[ { "id": 0, "type": "table", "value": "label_categories" }, { "id": 1, "type": "table", "value": "app_labels" }, { "id": 2, "type": "column", "value": "category" }, { "id": 5, "type": "column", "value": "label_id" }, { "id": 4, "type": "column",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
5,202
superhero
bird:dev.json:718
How many superheroes have the super power of "Super Strength"?
SELECT COUNT(T1.hero_id) FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T2.power_name = 'Super Strength'
[ "How", "many", "superheroes", "have", "the", "super", "power", "of", "\"", "Super", "Strength", "\"", "?" ]
[ { "id": 3, "type": "value", "value": "Super Strength" }, { "id": 0, "type": "table", "value": "hero_power" }, { "id": 1, "type": "table", "value": "superpower" }, { "id": 2, "type": "column", "value": "power_name" }, { "id": 5, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "O" ]
5,203
codebase_comments
bird:train.json:594
Which solution contains files within a more popular repository, the solution ID18 or solution ID19?
SELECT CASE WHEN SUM(CASE WHEN T2.Id = 18 THEN T1.Watchers ELSE 0 END) > SUM(CASE WHEN T2.Id = 19 THEN T1.Watchers ELSE 0 END) THEN 'SolutionID18' WHEN SUM(CASE WHEN T2.Id = 18 THEN T1.Watchers ELSE 0 END) < SUM(CASE WHEN T2.Id = 19 THEN T1.Watchers ELSE 0 END) THEN 'SolutionID19' END isMorePopular FROM Repo AS T1 INNE...
[ "Which", "solution", "contains", "files", "within", "a", "more", "popular", "repository", ",", "the", "solution", "ID18", "or", "solution", "ID19", "?" ]
[ { "id": 4, "type": "value", "value": "SolutionID18" }, { "id": 5, "type": "value", "value": "SolutionID19" }, { "id": 1, "type": "table", "value": "solution" }, { "id": 7, "type": "column", "value": "watchers" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-VALUE", "O", "B-VALUE", "B-VALUE", "O" ]
5,204
school_bus
spider:train_spider.json:6351
Show the name of drivers in descending order of age.
SELECT name FROM driver ORDER BY age DESC
[ "Show", "the", "name", "of", "drivers", "in", "descending", "order", "of", "age", "." ]
[ { "id": 0, "type": "table", "value": "driver" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,205
synthea
bird:train.json:1525
How many male patients have been described as immune to quadrivalent HPV?
SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'HPV quadrivalent' AND T1.gender = 'M'
[ "How", "many", "male", "patients", "have", "been", "described", "as", "immune", "to", "quadrivalent", "HPV", "?" ]
[ { "id": 4, "type": "value", "value": "HPV quadrivalent" }, { "id": 1, "type": "table", "value": "immunizations" }, { "id": 3, "type": "column", "value": "description" }, { "id": 0, "type": "table", "value": "patients" }, { "id": 2, "type": "co...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 8, 9 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "B-VALUE", "O", "O" ]
5,206
college_2
spider:train_spider.json:1423
Give the title of the prerequisite to the course International Finance.
SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')
[ "Give", "the", "title", "of", "the", "prerequisite", "to", "the", "course", "International", "Finance", "." ]
[ { "id": 5, "type": "value", "value": "International Finance" }, { "id": 2, "type": "column", "value": "course_id" }, { "id": 3, "type": "column", "value": "prereq_id" }, { "id": 0, "type": "table", "value": "course" }, { "id": 4, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "O" ]
5,207
airline
bird:train.json:5824
Please list the departure airports of the flights on 2018/8/1 that were delayed.
SELECT T1.Description FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T2.FL_DATE = '2018/8/1' AND T2.DEP_DELAY > 0 GROUP BY T1.Description
[ "Please", "list", "the", "departure", "airports", "of", "the", "flights", "on", "2018/8/1", "that", "were", "delayed", "." ]
[ { "id": 0, "type": "column", "value": "description" }, { "id": 7, "type": "column", "value": "dep_delay" }, { "id": 1, "type": "table", "value": "airports" }, { "id": 2, "type": "table", "value": "airlines" }, { "id": 6, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O" ]
5,208
address
bird:train.json:5154
Give the area code of the city with the white population ranging between 1700 to 2000.
SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.white_population BETWEEN 1700 AND 2000
[ "Give", "the", "area", "code", "of", "the", "city", "with", "the", "white", "population", "ranging", "between", "1700", "to", "2000", "." ]
[ { "id": 3, "type": "column", "value": "white_population" }, { "id": 0, "type": "column", "value": "area_code" }, { "id": 1, "type": "table", "value": "area_code" }, { "id": 2, "type": "table", "value": "zip_data" }, { "id": 6, "type": "column",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
5,209
card_games
bird:dev.json:342
List the card names with value that cost more converted mana for the face.
SELECT name FROM cards ORDER BY faceConvertedManaCost LIMIT 1
[ "List", "the", "card", "names", "with", "value", "that", "cost", "more", "converted", "mana", "for", "the", "face", "." ]
[ { "id": 2, "type": "column", "value": "faceconvertedmanacost" }, { "id": 0, "type": "table", "value": "cards" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
5,210
thrombosis_prediction
bird:dev.json:1185
For the patient who was born on 1959/2/18, what is the decrease rate for his/her total cholesterol from November to December in 1981?
SELECT CAST((SUM(CASE WHEN T2.Date LIKE '1981-11-%' THEN T2.`T-CHO` ELSE 0 END) - SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END)) AS REAL) / SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-02...
[ "For", "the", "patient", "who", "was", "born", "on", "1959/2/18", ",", "what", "is", "the", "decrease", "rate", "for", "his", "/", "her", "total", "cholesterol", "from", "November", "to", "December", "in", "1981", "?" ]
[ { "id": 1, "type": "table", "value": "laboratory" }, { "id": 3, "type": "value", "value": "1959-02-18" }, { "id": 8, "type": "value", "value": "1981-12-%" }, { "id": 9, "type": "value", "value": "1981-11-%" }, { "id": 2, "type": "column", "...
[ { "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", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
5,211
school_player
spider:train_spider.json:4865
What is the list of school locations sorted in descending order of school foundation year?
SELECT LOCATION FROM school ORDER BY Founded DESC
[ "What", "is", "the", "list", "of", "school", "locations", "sorted", "in", "descending", "order", "of", "school", "foundation", "year", "?" ]
[ { "id": 1, "type": "column", "value": "location" }, { "id": 2, "type": "column", "value": "founded" }, { "id": 0, "type": "table", "value": "school" } ]
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O" ]
5,212
customers_and_addresses
spider:train_spider.json:6072
Return the the details of all products.
SELECT DISTINCT product_details FROM products
[ "Return", "the", "the", "details", "of", "all", "products", "." ]
[ { "id": 1, "type": "column", "value": "product_details" }, { "id": 0, "type": "table", "value": "products" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
5,213
products_gen_characteristics
spider:train_spider.json:5543
What are the descriptions of the categories that products with product descriptions that contain the letter t are in?
SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'
[ "What", "are", "the", "descriptions", "of", "the", "categories", "that", "products", "with", "product", "descriptions", "that", "contain", "the", "letter", "t", "are", "in", "?" ]
[ { "id": 0, "type": "column", "value": "product_category_description" }, { "id": 1, "type": "table", "value": "ref_product_categories" }, { "id": 5, "type": "column", "value": "product_category_code" }, { "id": 3, "type": "column", "value": "product_descrip...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,214
movie
bird:train.json:761
What is the name of male and white actor with actor ID 439?
SELECT Name FROM actor WHERE ActorID = 439 AND Gender = 'Male' AND Ethnicity = 'White'
[ "What", "is", "the", "name", "of", "male", "and", "white", "actor", "with", "actor", "ID", "439", "?" ]
[ { "id": 6, "type": "column", "value": "ethnicity" }, { "id": 2, "type": "column", "value": "actorid" }, { "id": 4, "type": "column", "value": "gender" }, { "id": 0, "type": "table", "value": "actor" }, { "id": 7, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "enti...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
5,215
world
bird:train.json:7824
How many cities are there in England?
SELECT COUNT(ID) FROM City WHERE District = 'England'
[ "How", "many", "cities", "are", "there", "in", "England", "?" ]
[ { "id": 1, "type": "column", "value": "district" }, { "id": 2, "type": "value", "value": "England" }, { "id": 0, "type": "table", "value": "city" }, { "id": 3, "type": "column", "value": "id" } ]
[ { "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-TABLE", "O", "O", "O", "B-VALUE", "O" ]
5,216
company_employee
spider:train_spider.json:4106
Show the names of companies and of employees.
SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID
[ "Show", "the", "names", "of", "companies", "and", "of", "employees", "." ]
[ { "id": 2, "type": "table", "value": "employment" }, { "id": 4, "type": "column", "value": "company_id" }, { "id": 5, "type": "column", "value": "people_id" }, { "id": 1, "type": "table", "value": "company" }, { "id": 3, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "O" ]
5,217
college_2
spider:train_spider.json:1443
What are the ids of instructors who didnt' teach?
SELECT id FROM instructor EXCEPT SELECT id FROM teaches
[ "What", "are", "the", "ids", "of", "instructors", "who", "did", "nt", "'", "teach", "?" ]
[ { "id": 0, "type": "table", "value": "instructor" }, { "id": 1, "type": "table", "value": "teaches" }, { "id": 2, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
5,218
bike_racing
bird:test.json:1485
What are the names of the bikes that have substring 'fiber' in their material?
SELECT product_name FROM bike WHERE material LIKE "%fiber%"
[ "What", "are", "the", "names", "of", "the", "bikes", "that", "have", "substring", "'", "fiber", "'", "in", "their", "material", "?" ]
[ { "id": 1, "type": "column", "value": "product_name" }, { "id": 2, "type": "column", "value": "material" }, { "id": 3, "type": "column", "value": "%fiber%" }, { "id": 0, "type": "table", "value": "bike" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
5,219
movie_platform
bird:train.json:81
What's the average rating score of the movie "A Way of Life"?
SELECT AVG(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life'
[ "What", "'s", "the", "average", "rating", "score", "of", "the", "movie", "\"", "A", "Way", "of", "Life", "\"", "?" ]
[ { "id": 3, "type": "value", "value": "A Way of Life" }, { "id": 4, "type": "column", "value": "rating_score" }, { "id": 2, "type": "column", "value": "movie_title" }, { "id": 5, "type": "column", "value": "movie_id" }, { "id": 0, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10, 11, 12, 13 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
5,220
works_cycles
bird:train.json:7042
What is the total number of employees that worked in the Finance department?
SELECT COUNT(T2.BusinessEntityID) FROM Department AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 USING (DepartmentID) WHERE T1.Name = 'Finance'
[ "What", "is", "the", "total", "number", "of", "employees", "that", "worked", "in", "the", "Finance", "department", "?" ]
[ { "id": 1, "type": "table", "value": "employeedepartmenthistory" }, { "id": 4, "type": "column", "value": "businessentityid" }, { "id": 0, "type": "table", "value": "department" }, { "id": 3, "type": "value", "value": "Finance" }, { "id": 2, "t...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
5,221
advertising_agencies
bird:test.json:2111
Show all the different invoice ids and statuses of the payments
SELECT DISTINCT T1.invoice_id , T1.invoice_status FROM Invoices AS T1 JOIN Payments AS T2 ON T1.invoice_id = T2.invoice_id
[ "Show", "all", "the", "different", "invoice", "ids", "and", "statuses", "of", "the", "payments" ]
[ { "id": 1, "type": "column", "value": "invoice_status" }, { "id": 0, "type": "column", "value": "invoice_id" }, { "id": 2, "type": "table", "value": "invoices" }, { "id": 3, "type": "table", "value": "payments" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE" ]
5,222
chicago_crime
bird:train.json:8724
In the South side community, what is the name of the community with the most reported incidents of unlawful taking, carrying, leading, or riding away of property from the possession or constructive possession of another person?
SELECT T3.community_area_name FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.side = 'South' AND T1.description = 'The unlawful taking, carrying, leading, or riding away of property FROM the possession ...
[ "In", "the", "South", "side", "community", ",", "what", "is", "the", "name", "of", "the", "community", "with", "the", "most", "reported", "incidents", "of", "unlawful", "taking", ",", "carrying", ",", "leading", ",", "or", "riding", "away", "of", "property...
[ { "id": 8, "type": "value", "value": "The unlawful taking, carrying, leading, or riding away of property FROM the possession or constructive possession of another person." }, { "id": 0, "type": "column", "value": "community_area_name" }, { "id": 4, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-VALUE", "B-COLUMN", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "...
5,223
cs_semester
bird:train.json:958
What percentage of students are highly satisfied with the Intro to Database 2 course?
SELECT CAST(( SELECT COUNT(*) FROM course WHERE name = 'Intro to Database 2' AND course_id IN ( SELECT course_id FROM registration WHERE sat = ( SELECT MAX(sat) FROM registration ) ) ) AS REAL) * 100 / COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.name = '...
[ "What", "percentage", "of", "students", "are", "highly", "satisfied", "with", "the", "Intro", "to", "Database", "2", "course", "?" ]
[ { "id": 3, "type": "value", "value": "Intro to Database 2" }, { "id": 0, "type": "table", "value": "registration" }, { "id": 6, "type": "column", "value": "student_id" }, { "id": 4, "type": "column", "value": "course_id" }, { "id": 1, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10, 11, 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O" ]
5,224
chicago_crime
bird:train.json:8664
List the case numbers of domestic violence crimes reported in Lincoln Square.
SELECT T2.case_number FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no WHERE T1.community_area_name = 'Lincoln Square' AND T2.domestic = 'TRUE'
[ "List", "the", "case", "numbers", "of", "domestic", "violence", "crimes", "reported", "in", "Lincoln", "Square", "." ]
[ { "id": 4, "type": "column", "value": "community_area_name" }, { "id": 3, "type": "column", "value": "community_area_no" }, { "id": 1, "type": "table", "value": "community_area" }, { "id": 5, "type": "value", "value": "Lincoln Square" }, { "id": 0,...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O" ]
5,225
retail_world
bird:train.json:6609
Sir Rodney's Marmalade is supplied by which company and who is the contact for this company?
SELECT T2.CompanyName, T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName LIKE 'Sir Rodney%s Marmalade'
[ "Sir", "Rodney", "'s", "Marmalade", "is", "supplied", "by", "which", "company", "and", "who", "is", "the", "contact", "for", "this", "company", "?" ]
[ { "id": 5, "type": "value", "value": "Sir Rodney%s Marmalade" }, { "id": 0, "type": "column", "value": "companyname" }, { "id": 1, "type": "column", "value": "contactname" }, { "id": 4, "type": "column", "value": "productname" }, { "id": 6, "ty...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { "entity...
[ "B-VALUE", "B-COLUMN", "B-VALUE", "I-VALUE", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
5,226
architecture
spider:train_spider.json:6949
What are the names and year of construction for the mills of 'Grondzeiler' type?
SELECT name , built_year FROM mill WHERE TYPE = 'Grondzeiler'
[ "What", "are", "the", "names", "and", "year", "of", "construction", "for", "the", "mills", "of", "'", "Grondzeiler", "'", "type", "?" ]
[ { "id": 4, "type": "value", "value": "Grondzeiler" }, { "id": 2, "type": "column", "value": "built_year" }, { "id": 0, "type": "table", "value": "mill" }, { "id": 1, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "enti...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "B-COLUMN", "O" ]
5,227
formula_1
bird:dev.json:919
Which circuit did the 2009 Spanish Grand Prix use?
SELECT T1.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2009 AND T2.name = 'Spanish Grand Prix'
[ "Which", "circuit", "did", "the", "2009", "Spanish", "Grand", "Prix", "use", "?" ]
[ { "id": 6, "type": "value", "value": "Spanish Grand Prix" }, { "id": 3, "type": "column", "value": "circuitid" }, { "id": 1, "type": "table", "value": "circuits" }, { "id": 2, "type": "table", "value": "races" }, { "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": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
5,228
works_cycles
bird:train.json:7238
What is the credit card number for Michelle E Cox?
SELECT T3.CreditCardID FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T1.FirstName = 'Michelle' AND T1.MiddleName = 'E' AND T1.LastName = 'Cox'
[ "What", "is", "the", "credit", "card", "number", "for", "Michelle", "E", "Cox", "?" ]
[ { "id": 3, "type": "table", "value": "personcreditcard" }, { "id": 10, "type": "column", "value": "businessentityid" }, { "id": 0, "type": "column", "value": "creditcardid" }, { "id": 1, "type": "table", "value": "creditcard" }, { "id": 6, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "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, "token_idxs": [ ...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-VALUE", "B-VALUE", "B-VALUE", "O" ]
5,229
european_football_2
bird:dev.json:1101
What is the average number of goals made by Parma as the away team while playing in Italy?
SELECT CAST(SUM(T1.away_team_goal) AS REAL) / COUNT(T1.id) FROM "Match" AS T1 INNER JOIN TEAM AS T2 ON T1.away_team_api_id = T2.team_api_id INNER JOIN Country AS T3 ON T1.country_id = T3.id WHERE T2.team_long_name = 'Parma' AND T3.name = 'Italy'
[ "What", "is", "the", "average", "number", "of", "goals", "made", "by", "Parma", "as", "the", "away", "team", "while", "playing", "in", "Italy", "?" ]
[ { "id": 9, "type": "column", "value": "away_team_api_id" }, { "id": 5, "type": "column", "value": "team_long_name" }, { "id": 11, "type": "column", "value": "away_team_goal" }, { "id": 10, "type": "column", "value": "team_api_id" }, { "id": 3, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
5,230
department_store
spider:train_spider.json:4718
Return the staff ids and genders for any staff with the title Department Manager.
SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager"
[ "Return", "the", "staff", "ids", "and", "genders", "for", "any", "staff", "with", "the", "title", "Department", "Manager", "." ]
[ { "id": 3, "type": "table", "value": "staff_department_assignments" }, { "id": 5, "type": "column", "value": "Department Manager" }, { "id": 4, "type": "column", "value": "job_title_code" }, { "id": 1, "type": "column", "value": "staff_gender" }, { ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,231
public_review_platform
bird:train.json:3954
Give the number of "4" stars Yelp businesses in "Mesa" city.
SELECT COUNT(business_id) FROM Business WHERE stars = 4 AND city = 'Mesa'
[ "Give", "the", "number", "of", "\"", "4", "\"", "stars", "Yelp", "businesses", "in", "\"", "Mesa", "\"", "city", "." ]
[ { "id": 1, "type": "column", "value": "business_id" }, { "id": 0, "type": "table", "value": "business" }, { "id": 2, "type": "column", "value": "stars" }, { "id": 4, "type": "column", "value": "city" }, { "id": 5, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity...
[ "O", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "B-COLUMN", "O" ]
5,232
student_loan
bird:train.json:4403
What is the percentage ratio of students who are enlisted in foreign legions that have a due payment?
SELECT CAST(SUM(IIF(T1.bool = 'pos', 1, 0)) AS REAL) * 100 / SUM(IIF(T1.bool = 'neg', 1, 0)) FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'foreign_legion'
[ "What", "is", "the", "percentage", "ratio", "of", "students", "who", "are", "enlisted", "in", "foreign", "legions", "that", "have", "a", "due", "payment", "?" ]
[ { "id": 0, "type": "table", "value": "no_payment_due" }, { "id": 3, "type": "value", "value": "foreign_legion" }, { "id": 1, "type": "table", "value": "enlist" }, { "id": 2, "type": "column", "value": "organ" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "enti...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O" ]
5,233
student_1
spider:train_spider.json:4084
Which classroom has the most students?
SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1
[ "Which", "classroom", "has", "the", "most", "students", "?" ]
[ { "id": 1, "type": "column", "value": "classroom" }, { "id": 0, "type": "table", "value": "list" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
5,234
e_commerce
bird:test.json:102
What is the product average price?
SELECT avg(product_price) FROM Products
[ "What", "is", "the", "product", "average", "price", "?" ]
[ { "id": 1, "type": "column", "value": "product_price" }, { "id": 0, "type": "table", "value": "products" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "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, "toke...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O" ]
5,235
student_loan
bird:train.json:4511
Which male students are unemployed, disable and were absent for 5 month?
SELECT T1.name FROM unemployed AS T1 INNER JOIN disabled AS T2 ON T2.name = T1.name INNER JOIN longest_absense_from_school AS T3 ON T3.name = T2.name WHERE T3.month = 5
[ "Which", "male", "students", "are", "unemployed", ",", "disable", "and", "were", "absent", "for", "5", "month", "?" ]
[ { "id": 1, "type": "table", "value": "longest_absense_from_school" }, { "id": 4, "type": "table", "value": "unemployed" }, { "id": 5, "type": "table", "value": "disabled" }, { "id": 2, "type": "column", "value": "month" }, { "id": 0, "type": "c...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
5,236
soccer_2
spider:train_spider.json:4995
What are the different states that have students trying out?
SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName
[ "What", "are", "the", "different", "states", "that", "have", "students", "trying", "out", "?" ]
[ { "id": 1, "type": "table", "value": "college" }, { "id": 2, "type": "table", "value": "tryout" }, { "id": 0, "type": "column", "value": "state" }, { "id": 3, "type": "column", "value": "cname" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
5,237
retails
bird:train.json:6857
Please list the names of all the products under the type "promo brushed steel".
SELECT p_name FROM part WHERE p_type = 'PROMO BRUSHED STEEL'
[ "Please", "list", "the", "names", "of", "all", "the", "products", "under", "the", "type", "\"", "promo", "brushed", "steel", "\"", "." ]
[ { "id": 3, "type": "value", "value": "PROMO BRUSHED STEEL" }, { "id": 1, "type": "column", "value": "p_name" }, { "id": 2, "type": "column", "value": "p_type" }, { "id": 0, "type": "table", "value": "part" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 12, 13, 14 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
5,239
mental_health_survey
bird:train.json:4587
Please list all the answers to the question "Any additional notes or comments" that are not null in 2014's survey.
SELECT T2.AnswerText FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T1.questiontext = 'Any additional notes or comments' AND T2.SurveyID = 2014 AND T2.AnswerText <> -1
[ "Please", "list", "all", "the", "answers", "to", "the", "question", "\"", "Any", "additional", "notes", "or", "comments", "\"", "that", "are", "not", "null", "in", "2014", "'s", "survey", "." ]
[ { "id": 5, "type": "value", "value": "Any additional notes or comments" }, { "id": 4, "type": "column", "value": "questiontext" }, { "id": 0, "type": "column", "value": "answertext" }, { "id": 3, "type": "column", "value": "questionid" }, { "id": 1...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O" ]
5,240
products_gen_characteristics
spider:train_spider.json:5601
Count the number of colors that are not used in any products.
SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
[ "Count", "the", "number", "of", "colors", "that", "are", "not", "used", "in", "any", "products", "." ]
[ { "id": 0, "type": "table", "value": "ref_colors" }, { "id": 1, "type": "column", "value": "color_code" }, { "id": 2, "type": "table", "value": "products" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
5,241
flight_4
spider:train_spider.json:6841
Which countries has the most number of airlines?
SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1
[ "Which", "countries", "has", "the", "most", "number", "of", "airlines", "?" ]
[ { "id": 0, "type": "table", "value": "airlines" }, { "id": 1, "type": "column", "value": "country" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
5,242
sakila_1
spider:train_spider.json:2935
What are the city name, id, and number of addresses corresponding to the city with the most addressed?
SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1
[ "What", "are", "the", "city", "name", ",", "i", "d", ",", "and", "number", "of", "addresses", "corresponding", "to", "the", "city", "with", "the", "most", "addressed", "?" ]
[ { "id": 0, "type": "column", "value": "city_id" }, { "id": 2, "type": "table", "value": "address" }, { "id": 1, "type": "column", "value": "city" }, { "id": 3, "type": "table", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
5,243
tracking_orders
spider:train_spider.json:6900
Find the id of the customer who made the most orders.
SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
[ "Find", "the", "i", "d", "of", "the", "customer", "who", "made", "the", "most", "orders", "." ]
[ { "id": 0, "type": "column", "value": "customer_id" }, { "id": 1, "type": "table", "value": "customers" }, { "id": 2, "type": "table", "value": "orders" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]
5,244
music_4
spider:train_spider.json:6158
Give the maximum and minimum weeks on top across all volumes.
SELECT max(Weeks_on_Top) , min(Weeks_on_Top) FROM volume
[ "Give", "the", "maximum", "and", "minimum", "weeks", "on", "top", "across", "all", "volumes", "." ]
[ { "id": 1, "type": "column", "value": "weeks_on_top" }, { "id": 0, "type": "table", "value": "volume" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5,...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O" ]
5,245
debate
spider:train_spider.json:1500
Show the distinct venues of debates
SELECT DISTINCT Venue FROM debate
[ "Show", "the", "distinct", "venues", "of", "debates" ]
[ { "id": 0, "type": "table", "value": "debate" }, { "id": 1, "type": "column", "value": "venue" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE" ]
5,246
college_completion
bird:train.json:3724
What was the number of female Hispanic students who graduated within 100 percent of expected time for "Pennsylvania State University-Altoona"?
SELECT SUM(T2.grad_100) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Pennsylvania State University-Altoona' AND T2.gender = 'F' AND T2.race = 'H'
[ "What", "was", "the", "number", "of", "female", "Hispanic", "students", "who", "graduated", "within", "100", "percent", "of", "expected", "time", "for", "\"", "Pennsylvania", "State", "University", "-", "Altoona", "\"", "?" ]
[ { "id": 5, "type": "value", "value": "Pennsylvania State University-Altoona" }, { "id": 0, "type": "table", "value": "institution_details" }, { "id": 1, "type": "table", "value": "institution_grads" }, { "id": 4, "type": "column", "value": "chronname" },...
[ { "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": [ 18, 19, ...
[ "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
5,247
law_episode
bird:train.json:1264
How many awards has Rene Balcer been nominated for?
SELECT COUNT(T2.award_id) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T1.name = 'Rene Balcer'
[ "How", "many", "awards", "has", "Rene", "Balcer", "been", "nominated", "for", "?" ]
[ { "id": 3, "type": "value", "value": "Rene Balcer" }, { "id": 5, "type": "column", "value": "person_id" }, { "id": 4, "type": "column", "value": "award_id" }, { "id": 0, "type": "table", "value": "person" }, { "id": 1, "type": "table", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4, 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O" ]
5,248
legislator
bird:train.json:4867
What are the full names of the non-google female entity legislators that have not been registered in Federal Election Commission data?
SELECT first_name, last_name FROM historical WHERE gender_bio = 'F' AND google_entity_id_id IS NULL AND fec_id IS NULL
[ "What", "are", "the", "full", "names", "of", "the", "non", "-", "google", "female", "entity", "legislators", "that", "have", "not", "been", "registered", "in", "Federal", "Election", "Commission", "data", "?" ]
[ { "id": 5, "type": "column", "value": "google_entity_id_id" }, { "id": 0, "type": "table", "value": "historical" }, { "id": 1, "type": "column", "value": "first_name" }, { "id": 3, "type": "column", "value": "gender_bio" }, { "id": 2, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": [ 9, ...
[ "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,249
customers_and_invoices
spider:train_spider.json:1611
What is the customer last name, id and phone number with most number of orders?
SELECT T2.customer_last_name , T1.customer_id , T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "customer", "last", "name", ",", "i", "d", "and", "phone", "number", "with", "most", "number", "of", "orders", "?" ]
[ { "id": 1, "type": "column", "value": "customer_last_name" }, { "id": 2, "type": "column", "value": "phone_number" }, { "id": 0, "type": "column", "value": "customer_id" }, { "id": 4, "type": "table", "value": "customers" }, { "id": 3, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 3 ] ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
5,250
works_cycles
bird:train.json:7255
What is the age of the oldest Marketing Specialist by 12/31/2015 and what is his/her hourly rate?
SELECT 2015 - STRFTIME('%Y', T1.BirthDate), T2.Rate FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle = 'Marketing Specialist' ORDER BY 2015 - STRFTIME('%Y', T1.BirthDate) DESC LIMIT 1
[ "What", "is", "the", "age", "of", "the", "oldest", "Marketing", "Specialist", "by", "12/31/2015", "and", "what", "is", "his", "/", "her", "hourly", "rate", "?" ]
[ { "id": 4, "type": "value", "value": "Marketing Specialist" }, { "id": 2, "type": "table", "value": "employeepayhistory" }, { "id": 6, "type": "column", "value": "businessentityid" }, { "id": 8, "type": "column", "value": "birthdate" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [ 18 ] }, { "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, "tok...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,251
movie_1
spider:train_spider.json:2470
What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?
SELECT T2.title , T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = "James Cameron")
[ "What", "are", "the", "titles", "and", "directors", "of", "the", "movies", "whose", "star", "is", "greater", "than", "the", "average", "stars", "of", "the", "movies", "directed", "by", "James", "Cameron", "?" ]
[ { "id": 6, "type": "column", "value": "James Cameron" }, { "id": 1, "type": "column", "value": "director" }, { "id": 2, "type": "table", "value": "rating" }, { "id": 0, "type": "column", "value": "title" }, { "id": 3, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,252
card_games
bird:dev.json:477
Which of these artists have designed a card in the set Coldsnap, Jeremy Jarvis, Aaron Miller or Chippy?
SELECT T1.artist FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE (T2.name = 'Coldsnap' AND T1.artist = 'Chippy') OR (T2.name = 'Coldsnap' AND T1.artist = 'Aaron Miller') OR (T2.name = 'Coldsnap' AND T1.artist = 'Jeremy Jarvis') GROUP BY T1.artist
[ "Which", "of", "these", "artists", "have", "designed", "a", "card", "in", "the", "set", "Coldsnap", ",", "Jeremy", "Jarvis", ",", "Aaron", "Miller", "or", "Chippy", "?" ]
[ { "id": 9, "type": "value", "value": "Jeremy Jarvis" }, { "id": 8, "type": "value", "value": "Aaron Miller" }, { "id": 6, "type": "value", "value": "Coldsnap" }, { "id": 4, "type": "column", "value": "setcode" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "O" ]
5,253
college_3
spider:train_spider.json:4694
What are the full names of faculty members who are a part of department 520?
SELECT T1.Fname , T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520
[ "What", "are", "the", "full", "names", "of", "faculty", "members", "who", "are", "a", "part", "of", "department", "520", "?" ]
[ { "id": 3, "type": "table", "value": "member_of" }, { "id": 2, "type": "table", "value": "faculty" }, { "id": 0, "type": "column", "value": "fname" }, { "id": 1, "type": "column", "value": "lname" }, { "id": 6, "type": "column", "value": "f...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
5,254
student_loan
bird:train.json:4374
Among the students from the navy department, how many of them have payment due?
SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN no_payment_due AS T2 ON T1.`name` = T2.`name` WHERE T1.organ = 'navy' AND T2.bool = 'pos'
[ "Among", "the", "students", "from", "the", "navy", "department", ",", "how", "many", "of", "them", "have", "payment", "due", "?" ]
[ { "id": 1, "type": "table", "value": "no_payment_due" }, { "id": 0, "type": "table", "value": "enlist" }, { "id": 3, "type": "column", "value": "organ" }, { "id": 2, "type": "column", "value": "name" }, { "id": 4, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 13, 14 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
5,255
public_review_platform
bird:train.json:4087
Calculate the difference between running business in Glendale City and Mesa City.
SELECT SUM(CASE WHEN city = 'Glendale' THEN 1 ELSE 0 END) - SUM(CASE WHEN city = 'Mesa' THEN 1 ELSE 0 END) AS diff FROM Business WHERE active = 'true'
[ "Calculate", "the", "difference", "between", "running", "business", "in", "Glendale", "City", "and", "Mesa", "City", "." ]
[ { "id": 0, "type": "table", "value": "business" }, { "id": 6, "type": "value", "value": "Glendale" }, { "id": 1, "type": "column", "value": "active" }, { "id": 2, "type": "value", "value": "true" }, { "id": 5, "type": "column", "value": "ci...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 11 ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
5,256
art_1
bird:test.json:1216
What are the first and last names of all distinct artists who made sculptures before 1900?
SELECT DISTINCT T1.lname , T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID WHERE T2.year < 1900
[ "What", "are", "the", "first", "and", "last", "names", "of", "all", "distinct", "artists", "who", "made", "sculptures", "before", "1900", "?" ]
[ { "id": 3, "type": "table", "value": "sculptures" }, { "id": 7, "type": "column", "value": "sculptorid" }, { "id": 6, "type": "column", "value": "artistid" }, { "id": 2, "type": "table", "value": "artists" }, { "id": 0, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
5,257
phone_market
spider:train_spider.json:1988
Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market.
SELECT T3.Name , T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID ORDER BY T2.Ranking
[ "Show", "the", "names", "of", "phones", "and", "the", "districts", "of", "markets", "they", "are", "on", ",", "in", "ascending", "order", "of", "the", "ranking", "of", "the", "market", "." ]
[ { "id": 4, "type": "table", "value": "phone_market" }, { "id": 7, "type": "column", "value": "market_id" }, { "id": 1, "type": "column", "value": "district" }, { "id": 6, "type": "column", "value": "phone_id" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 19 ] }, { "entity_id": 4, "token_idxs": [ 21 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-TABLE", "O" ]
5,258
soccer_2016
bird:train.json:1897
Among the players, what percentage are both captain and keeper?
SELECT CAST(SUM(CASE WHEN T2.Role_Desc = 'CaptainKeeper' THEN 1 ELSE 0 END) AS REAL) * 100 / TOTAL(T1.Player_Id) FROM Player_Match AS T1 INNER JOIN Rolee AS T2 ON T1.Role_Id = T2.Role_Id
[ "Among", "the", "players", ",", "what", "percentage", "are", "both", "captain", "and", "keeper", "?" ]
[ { "id": 8, "type": "value", "value": "CaptainKeeper" }, { "id": 0, "type": "table", "value": "player_match" }, { "id": 4, "type": "column", "value": "player_id" }, { "id": 7, "type": "column", "value": "role_desc" }, { "id": 2, "type": "column"...
[ { "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": [ 2 ] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
5,259
college_2
spider:train_spider.json:1438
Find the name of instructor who is the advisor of the student who has the highest number of total credits.
SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1
[ "Find", "the", "name", "of", "instructor", "who", "is", "the", "advisor", "of", "the", "student", "who", "has", "the", "highest", "number", "of", "total", "credits", "." ]
[ { "id": 4, "type": "table", "value": "instructor" }, { "id": 2, "type": "column", "value": "tot_cred" }, { "id": 1, "type": "table", "value": "student" }, { "id": 3, "type": "table", "value": "advisor" }, { "id": 0, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 18, 19 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 4 ...
[ "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,260
works_cycles
bird:train.json:7416
How many departments have David Bradley been in?
SELECT COUNT(T3.DepartmentID) FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley'
[ "How", "many", "departments", "have", "David", "Bradley", "been", "in", "?" ]
[ { "id": 3, "type": "table", "value": "employeedepartmenthistory" }, { "id": 8, "type": "column", "value": "businessentityid" }, { "id": 1, "type": "column", "value": "departmentid" }, { "id": 0, "type": "table", "value": "department" }, { "id": 4, ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "B-TABLE", "O", "B-VALUE", "B-VALUE", "O", "O", "O" ]
5,261
soccer_3
bird:test.json:32
List the name of clubs that do not have players.
SELECT Name FROM club WHERE Club_ID NOT IN (SELECT Club_ID FROM player)
[ "List", "the", "name", "of", "clubs", "that", "do", "not", "have", "players", "." ]
[ { "id": 2, "type": "column", "value": "club_id" }, { "id": 3, "type": "table", "value": "player" }, { "id": 0, "type": "table", "value": "club" }, { "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": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]
5,262
epinions_1
spider:train_spider.json:1697
Find the number of items that did not receive any review.
SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review)
[ "Find", "the", "number", "of", "items", "that", "did", "not", "receive", "any", "review", "." ]
[ { "id": 2, "type": "table", "value": "review" }, { "id": 0, "type": "table", "value": "item" }, { "id": 1, "type": "column", "value": "i_id" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "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", "O", "B-TABLE", "O" ]