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
3,212
thrombosis_prediction
bird:dev.json:1261
How many patients with a normal RF don't have thrombosis?
SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND T1.Thrombosis = 0
[ "How", "many", "patients", "with", "a", "normal", "RF", "do", "n't", "have", "thrombosis", "?" ]
[ { "id": 0, "type": "table", "value": "examination" }, { "id": 1, "type": "table", "value": "laboratory" }, { "id": 5, "type": "column", "value": "thrombosis" }, { "id": 2, "type": "column", "value": "id" }, { "id": 3, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 10 ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
3,213
cs_semester
bird:train.json:962
Among students that gave satisfaction of value 4 for the course named "Statistical Learning", how many of them have a gpa of 3.8?
SELECT COUNT(T1.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Statistical learning' AND T2.sat = 4 AND T1.gpa = 3.8
[ "Among", "students", "that", "gave", "satisfaction", "of", "value", "4", "for", "the", "course", "named", "\"", "Statistical", "Learning", "\"", ",", "how", "many", "of", "them", "have", "a", "gpa", "of", "3.8", "?" ]
[ { "id": 6, "type": "value", "value": "Statistical learning" }, { "id": 3, "type": "table", "value": "registration" }, { "id": 1, "type": "column", "value": "student_id" }, { "id": 4, "type": "column", "value": "course_id" }, { "id": 2, "type": ...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
3,214
device
spider:train_spider.json:5085
Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?
SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008
[ "Which", "locations", "contains", "both", "shops", "that", "opened", "after", "the", "year", "2012", "and", "shops", "that", "opened", "before", "2008", "?" ]
[ { "id": 2, "type": "column", "value": "open_year" }, { "id": 1, "type": "column", "value": "location" }, { "id": 0, "type": "table", "value": "shop" }, { "id": 3, "type": "value", "value": "2012" }, { "id": 4, "type": "value", "value": "200...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, ...
[ "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
3,215
journal_committee
spider:train_spider.json:653
Show the names of editors of age either 24 or 25.
SELECT Name FROM editor WHERE Age = 24 OR Age = 25
[ "Show", "the", "names", "of", "editors", "of", "age", "either", "24", "or", "25", "." ]
[ { "id": 0, "type": "table", "value": "editor" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "age" }, { "id": 3, "type": "value", "value": "24" }, { "id": 4, "type": "value", "value": "25" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
3,216
formula_1
spider:train_spider.json:2182
What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?
SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Australian Grand Prix" EXCEPT SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T...
[ "What", "are", "the", "first", "and", "last", "names", "of", "all", "drivers", "who", "participated", "in", "the", "Australian", "Grand", "Prix", "but", "not", "the", "Chinese", "Grand", "Prix", "?" ]
[ { "id": 4, "type": "column", "value": "Australian Grand Prix" }, { "id": 5, "type": "column", "value": "Chinese Grand Prix" }, { "id": 0, "type": "column", "value": "forename" }, { "id": 8, "type": "column", "value": "driverid" }, { "id": 1, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 14, 15, 16 ] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
3,217
cre_Doc_and_collections
bird:test.json:712
What is the subset id, name, and number of different documents for each subset?
SELECT T1.Document_Subset_ID , T2.Document_Subset_Name , count(DISTINCT T1.Document_Object_ID) FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID GROUP BY T1.Document_Subset_ID;
[ "What", "is", "the", "subset", "i", "d", ",", "name", ",", "and", "number", "of", "different", "documents", "for", "each", "subset", "?" ]
[ { "id": 2, "type": "table", "value": "document_subset_members" }, { "id": 1, "type": "column", "value": "document_subset_name" }, { "id": 0, "type": "column", "value": "document_subset_id" }, { "id": 4, "type": "column", "value": "document_object_id" }, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 14, 15 ] }, { "entity_...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-TABLE", "O" ]
3,218
vehicle_driver
bird:test.json:166
Count the number of different drivers who have driven vehicles built in 2012.
SELECT count(DISTINCT T1.driver_id) FROM vehicle_driver AS T1 JOIN vehicle AS T2 ON T1.vehicle_id = T2.vehicle_id WHERE T2.build_year = 2012
[ "Count", "the", "number", "of", "different", "drivers", "who", "have", "driven", "vehicles", "built", "in", "2012", "." ]
[ { "id": 0, "type": "table", "value": "vehicle_driver" }, { "id": 2, "type": "column", "value": "build_year" }, { "id": 5, "type": "column", "value": "vehicle_id" }, { "id": 4, "type": "column", "value": "driver_id" }, { "id": 1, "type": "table"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
3,219
icfp_1
spider:train_spider.json:2871
Which institution is the author "Matthias Blume" belong to? Give me the name of the institution.
SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Matthias" AND t1.lname = "Blume"
[ "Which", "institution", "is", "the", "author", "\"", "Matthias", "Blume", "\"", "belong", "to", "?", "Give", "me", "the", "name", "of", "the", "institution", "." ]
[ { "id": 3, "type": "table", "value": "authorship" }, { "id": 6, "type": "column", "value": "Matthias" }, { "id": 2, "type": "table", "value": "authors" }, { "id": 4, "type": "column", "value": "instid" }, { "id": 9, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { "entity_id": 5, ...
[ "O", "B-COLUMN", "B-TABLE", "O", "B-COLUMN", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
3,220
bike_share_1
bird:train.json:9015
Which day in the month of November, 2014 have a foggy weather in the zip code 94301 and in total, how many bikes were borrowed by subscribers from all of the stations in the said day?
SELECT T2.date, COUNT(T1.start_station_name) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.date LIKE '11/%/2014%' AND T2.zip_code = 94301 AND T2.events = 'Fog' AND T1.subscription_type = 'Subscriber'
[ "Which", "day", "in", "the", "month", "of", "November", ",", "2014", "have", "a", "foggy", "weather", "in", "the", "zip", "code", "94301", "and", "in", "total", ",", "how", "many", "bikes", "were", "borrowed", "by", "subscribers", "from", "all", "of", ...
[ { "id": 3, "type": "column", "value": "start_station_name" }, { "id": 9, "type": "column", "value": "subscription_type" }, { "id": 5, "type": "value", "value": "11/%/2014%" }, { "id": 10, "type": "value", "value": "Subscriber" }, { "id": 4, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 15, 16 ] }, { "entity_id": 5, "t...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,221
bakery_1
bird:test.json:1583
What is the three most popular goods in this bakery?
SELECT item FROM items GROUP BY item ORDER BY COUNT (*) DESC LIMIT 3
[ "What", "is", "the", "three", "most", "popular", "goods", "in", "this", "bakery", "?" ]
[ { "id": 0, "type": "table", "value": "items" }, { "id": 1, "type": "column", "value": "item" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1, 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,222
donor
bird:train.json:3286
How many teachers have made some type of donation for projects in Chicago?
SELECT COUNT(DISTINCT T2.teacher_acctid) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.is_teacher_acct = 't' AND T2.school_city = 'Chicago'
[ "How", "many", "teachers", "have", "made", "some", "type", "of", "donation", "for", "projects", "in", "Chicago", "?" ]
[ { "id": 4, "type": "column", "value": "is_teacher_acct" }, { "id": 2, "type": "column", "value": "teacher_acctid" }, { "id": 6, "type": "column", "value": "school_city" }, { "id": 0, "type": "table", "value": "donations" }, { "id": 3, "type": "...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "B-VALUE", "O" ]
3,223
store_1
spider:train_spider.json:562
How many invoices were billed from Chicago, IL?
SELECT COUNT(*) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL";
[ "How", "many", "invoices", "were", "billed", "from", "Chicago", ",", "IL", "?" ]
[ { "id": 3, "type": "column", "value": "billing_state" }, { "id": 1, "type": "column", "value": "billing_city" }, { "id": 0, "type": "table", "value": "invoices" }, { "id": 2, "type": "column", "value": "Chicago" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
3,224
financial
bird:dev.json:143
What are the accounts that have gold credit cards?
SELECT T2.account_id FROM disp AS T2 INNER JOIN card AS T1 ON T1.disp_id = T2.disp_id WHERE T1.type = 'gold'
[ "What", "are", "the", "accounts", "that", "have", "gold", "credit", "cards", "?" ]
[ { "id": 0, "type": "column", "value": "account_id" }, { "id": 5, "type": "column", "value": "disp_id" }, { "id": 1, "type": "table", "value": "disp" }, { "id": 2, "type": "table", "value": "card" }, { "id": 3, "type": "column", "value": "ty...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-TABLE", "O" ]
3,225
airline
bird:train.json:5841
How many flights of Alaska Airlines were delayed on 2018/8/2?
SELECT COUNT(*) FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.FL_DATE = '2018/8/2' AND T2.Description = 'Alaska Airlines Inc.: AS' AND T1.DEP_DELAY > 0
[ "How", "many", "flights", "of", "Alaska", "Airlines", "were", "delayed", "on", "2018/8/2", "?" ]
[ { "id": 7, "type": "value", "value": "Alaska Airlines Inc.: AS" }, { "id": 2, "type": "column", "value": "op_carrier_airline_id" }, { "id": 1, "type": "table", "value": "Air Carriers" }, { "id": 6, "type": "column", "value": "description" }, { "id"...
[ { "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": [ 9 ...
[ "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
3,226
movie_3
bird:train.json:9209
List down the film titles performed by Emily Dee.
SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Emily' AND T1.last_name = 'Dee'
[ "List", "down", "the", "film", "titles", "performed", "by", "Emily", "Dee", "." ]
[ { "id": 3, "type": "table", "value": "film_actor" }, { "id": 5, "type": "column", "value": "first_name" }, { "id": 7, "type": "column", "value": "last_name" }, { "id": 9, "type": "column", "value": "actor_id" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "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-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "B-VALUE", "O" ]
3,227
language_corpus
bird:train.json:5803
How many biword pairs contain the word "base" as the second word?
SELECT COUNT(w1st) FROM biwords WHERE w2nd = ( SELECT wid FROM words WHERE word = 'base' )
[ "How", "many", "biword", "pairs", "contain", "the", "word", "\"", "base", "\"", "as", "the", "second", "word", "?" ]
[ { "id": 0, "type": "table", "value": "biwords" }, { "id": 3, "type": "table", "value": "words" }, { "id": 1, "type": "column", "value": "w2nd" }, { "id": 2, "type": "column", "value": "w1st" }, { "id": 5, "type": "column", "value": "word" ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,229
retail_world
bird:train.json:6518
How old was the oldest employee at the time he or she was hired?
SELECT MAX(TIMESTAMPDIFF(YEAR, BirthDate, HireDate)) FROM Employees
[ "How", "old", "was", "the", "oldest", "employee", "at", "the", "time", "he", "or", "she", "was", "hired", "?" ]
[ { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "birthdate" }, { "id": 3, "type": "column", "value": "hiredate" }, { "id": 1, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "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", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,230
synthea
bird:train.json:1503
What is the start date of the care plan of the patient whose maiden name is Adams?
SELECT DISTINCT T1.START FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.maiden = 'Adams'
[ "What", "is", "the", "start", "date", "of", "the", "care", "plan", "of", "the", "patient", "whose", "maiden", "name", "is", "Adams", "?" ]
[ { "id": 1, "type": "table", "value": "careplans" }, { "id": 2, "type": "table", "value": "patients" }, { "id": 5, "type": "column", "value": "patient" }, { "id": 3, "type": "column", "value": "maiden" }, { "id": 0, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
3,231
talkingdata
bird:train.json:1187
What is the age group of users who use phone brand of vivo?
SELECT T1.`group` FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo'
[ "What", "is", "the", "age", "group", "of", "users", "who", "use", "phone", "brand", "of", "vivo", "?" ]
[ { "id": 2, "type": "table", "value": "phone_brand_device_model2" }, { "id": 3, "type": "column", "value": "phone_brand" }, { "id": 1, "type": "table", "value": "gender_age" }, { "id": 5, "type": "column", "value": "device_id" }, { "id": 0, "typ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "B-VALUE", "O" ]
3,232
music_4
spider:train_spider.json:6167
Please show the songs that have result "nominated" at music festivals.
SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = "Nominated"
[ "Please", "show", "the", "songs", "that", "have", "result", "\"", "nominated", "\"", "at", "music", "festivals", "." ]
[ { "id": 1, "type": "table", "value": "music_festival" }, { "id": 4, "type": "column", "value": "Nominated" }, { "id": 6, "type": "column", "value": "volume_id" }, { "id": 2, "type": "table", "value": "volume" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 11, 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "O" ]
3,233
simpson_episodes
bird:train.json:4316
What is the character that won the award in Primetime Emmy 2009?
SELECT DISTINCT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.award_category = 'Primetime Emmy' AND T1.year = 2009 AND T1.result = 'Winner';
[ "What", "is", "the", "character", "that", "won", "the", "award", "in", "Primetime", "Emmy", "2009", "?" ]
[ { "id": 2, "type": "table", "value": "character_award" }, { "id": 4, "type": "column", "value": "award_category" }, { "id": 5, "type": "value", "value": "Primetime Emmy" }, { "id": 0, "type": "column", "value": "character" }, { "id": 3, "type":...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "B-VALUE", "O" ]
3,234
apartment_rentals
spider:train_spider.json:1232
Show the guest first names, start dates, and end dates of all the apartment bookings.
SELECT T2.guest_first_name , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id
[ "Show", "the", "guest", "first", "names", ",", "start", "dates", ",", "and", "end", "dates", "of", "all", "the", "apartment", "bookings", "." ]
[ { "id": 1, "type": "column", "value": "booking_start_date" }, { "id": 2, "type": "table", "value": "apartment_bookings" }, { "id": 0, "type": "column", "value": "guest_first_name" }, { "id": 4, "type": "column", "value": "guest_id" }, { "id": 3, ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 15, 16 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "...
[ "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
3,235
movie_1
spider:train_spider.json:2506
Find the title and score of the movie with the lowest rating among all movies directed by each director.
SELECT T2.title , T1.stars , T2.director , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director
[ "Find", "the", "title", "and", "score", "of", "the", "movie", "with", "the", "lowest", "rating", "among", "all", "movies", "directed", "by", "each", "director", "." ]
[ { "id": 0, "type": "column", "value": "director" }, { "id": 3, "type": "table", "value": "rating" }, { "id": 1, "type": "column", "value": "title" }, { "id": 2, "type": "column", "value": "stars" }, { "id": 4, "type": "table", "value": "mov...
[ { "entity_id": 0, "token_idxs": [ 18 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entit...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,236
customers_and_orders
bird:test.json:257
List all product names in descending order of price.
SELECT product_name FROM Products ORDER BY product_price DESC
[ "List", "all", "product", "names", "in", "descending", "order", "of", "price", "." ]
[ { "id": 2, "type": "column", "value": "product_price" }, { "id": 1, "type": "column", "value": "product_name" }, { "id": 0, "type": "table", "value": "products" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
3,237
device
spider:train_spider.json:5074
Show the name of the shop that have the largest quantity of devices in stock.
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1
[ "Show", "the", "name", "of", "the", "shop", "that", "have", "the", "largest", "quantity", "of", "devices", "in", "stock", "." ]
[ { "id": 1, "type": "column", "value": "shop_name" }, { "id": 4, "type": "column", "value": "quantity" }, { "id": 0, "type": "column", "value": "shop_id" }, { "id": 2, "type": "table", "value": "stock" }, { "id": 3, "type": "table", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 0, 1, 2 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 10 ] ...
[ "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
3,238
apartment_rentals
spider:train_spider.json:1195
Count the total number of apartment bookings.
SELECT count(*) FROM Apartment_Bookings
[ "Count", "the", "total", "number", "of", "apartment", "bookings", "." ]
[ { "id": 0, "type": "table", "value": "apartment_bookings" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
3,239
disney
bird:train.json:4685
List the movie titles and character names by Bill Thompson.
SELECT movie, character FROM `voice-actors` WHERE 'voice-actor' = 'Bill Thompson'
[ "List", "the", "movie", "titles", "and", "character", "names", "by", "Bill", "Thompson", "." ]
[ { "id": 4, "type": "value", "value": "Bill Thompson" }, { "id": 0, "type": "table", "value": "voice-actors" }, { "id": 3, "type": "value", "value": "voice-actor" }, { "id": 2, "type": "column", "value": "character" }, { "id": 1, "type": "column...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8, 9 ] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O" ]
3,240
cre_Doc_and_collections
bird:test.json:685
List the name of all collections.
SELECT Collection_Name FROM Collections;
[ "List", "the", "name", "of", "all", "collections", "." ]
[ { "id": 1, "type": "column", "value": "collection_name" }, { "id": 0, "type": "table", "value": "collections" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O" ]
3,241
disney
bird:train.json:4682
List the movie titles directed by Jack Kinney.
SELECT name FROM director WHERE director = 'Jack Kinney'
[ "List", "the", "movie", "titles", "directed", "by", "Jack", "Kinney", "." ]
[ { "id": 3, "type": "value", "value": "Jack Kinney" }, { "id": 0, "type": "table", "value": "director" }, { "id": 2, "type": "column", "value": "director" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 6, 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
3,242
student_club
bird:dev.json:1451
Among the members who incurred expenses in more than one event, who paid the most amount?
SELECT T2.member_id FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id INNER JOIN budget AS T3 ON T1.link_to_budget = T3.budget_id INNER JOIN event AS T4 ON T3.link_to_event = T4.event_id GROUP BY T2.member_id HAVING COUNT(DISTINCT T4.event_id) > 1 ORDER BY SUM(T1.cost) DESC LIMIT 1
[ "Among", "the", "members", "who", "incurred", "expenses", "in", "more", "than", "one", "event", ",", "who", "paid", "the", "most", "amount", "?" ]
[ { "id": 9, "type": "column", "value": "link_to_budget" }, { "id": 11, "type": "column", "value": "link_to_member" }, { "id": 4, "type": "column", "value": "link_to_event" }, { "id": 0, "type": "column", "value": "member_id" }, { "id": 10, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
3,243
video_games
bird:train.json:3360
What is the number of sales in region ID 2 with game platform ID 9615?
SELECT T.num_sales * 100000 FROM region_sales AS T WHERE T.region_id = 2 AND T.game_platform_id = 9615
[ "What", "is", "the", "number", "of", "sales", "in", "region", "ID", "2", "with", "game", "platform", "ID", "9615", "?" ]
[ { "id": 5, "type": "column", "value": "game_platform_id" }, { "id": 0, "type": "table", "value": "region_sales" }, { "id": 1, "type": "column", "value": "num_sales" }, { "id": 3, "type": "column", "value": "region_id" }, { "id": 2, "type": "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id":...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
3,244
shakespeare
bird:train.json:2991
How many paragraphs are there in "Ay, surely, mere the truth: I know his lady."?
SELECT ParagraphNum FROM paragraphs WHERE PlainText = 'Ay, surely, mere the truth: I know his lady.'
[ "How", "many", "paragraphs", "are", "there", "in", "\"", "Ay", ",", "surely", ",", "mere", "the", "truth", ":", "I", "know", "his", "lady", ".", "\"", "?" ]
[ { "id": 3, "type": "value", "value": "Ay, surely, mere the truth: I know his lady." }, { "id": 1, "type": "column", "value": "paragraphnum" }, { "id": 0, "type": "table", "value": "paragraphs" }, { "id": 2, "type": "column", "value": "plaintext" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ...
[ "O", "O", "B-TABLE", "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", "I-VALUE", "O", "O" ]
3,245
apartment_rentals
spider:train_spider.json:1261
Which apartment type code appears the most often?
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
[ "Which", "apartment", "type", "code", "appears", "the", "most", "often", "?" ]
[ { "id": 1, "type": "column", "value": "apt_type_code" }, { "id": 0, "type": "table", "value": "apartments" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O" ]
3,246
works_cycles
bird:train.json:7202
What is the projected sales quota amount in 2013 and sales YTD amount for sales person with business entity ID 275?
SELECT SUM(T1.SalesQuota) FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.BusinessEntityID = 275 AND STRFTIME('%Y', QuotaDate) = '2013'
[ "What", "is", "the", "projected", "sales", "quota", "amount", "in", "2013", "and", "sales", "YTD", "amount", "for", "sales", "person", "with", "business", "entity", "ID", "275", "?" ]
[ { "id": 1, "type": "table", "value": "salespersonquotahistory" }, { "id": 3, "type": "column", "value": "businessentityid" }, { "id": 0, "type": "table", "value": "salesperson" }, { "id": 2, "type": "column", "value": "salesquota" }, { "id": 7, ...
[ { "entity_id": 0, "token_idxs": [ 14, 15 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 17, 18, 19 ] }, { "entity_id": 4, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
3,247
legislator
bird:train.json:4764
How many official social media does Mark Warner have?
SELECT CASE WHEN T1.facebook IS NOT NULL THEN 1 END + CASE WHEN T1.instagram IS NOT NULL THEN 1 END + CASE WHEN T1.twitter IS NOT NULL THEN 1 END + CASE WHEN T1.youtube IS NOT NULL THEN 1 END AS COUNTSOCIAL FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.first_name = 'Mark' A...
[ "How", "many", "official", "social", "media", "does", "Mark", "Warner", "have", "?" ]
[ { "id": 0, "type": "table", "value": "social-media" }, { "id": 3, "type": "column", "value": "bioguide_id" }, { "id": 4, "type": "column", "value": "first_name" }, { "id": 6, "type": "column", "value": "last_name" }, { "id": 12, "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": [] }, { "entity_id": 5, "token_idxs": [ ...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "O", "B-VALUE", "B-VALUE", "O", "O" ]
3,248
game_1
spider:train_spider.json:6035
Show ids of students who don't play video game.
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games
[ "Show", "ids", "of", "students", "who", "do", "n't", "play", "video", "game", "." ]
[ { "id": 1, "type": "table", "value": "plays_games" }, { "id": 0, "type": "table", "value": "student" }, { "id": 2, "type": "column", "value": "stuid" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7, 8, 9 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
3,249
online_exams
bird:test.json:225
List the first names of the students who do not have any answers.
SELECT First_Name FROM Students WHERE Student_ID NOT IN (SELECT Student_ID FROM Student_Answers)
[ "List", "the", "first", "names", "of", "the", "students", "who", "do", "not", "have", "any", "answers", "." ]
[ { "id": 3, "type": "table", "value": "student_answers" }, { "id": 1, "type": "column", "value": "first_name" }, { "id": 2, "type": "column", "value": "student_id" }, { "id": 0, "type": "table", "value": "students" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O" ]
3,250
video_games
bird:train.json:3325
State the region id of Japan.
SELECT T.id FROM region AS T WHERE T.region_name = 'Japan'
[ "State", "the", "region", "i", "d", "of", "Japan", "." ]
[ { "id": 2, "type": "column", "value": "region_name" }, { "id": 0, "type": "table", "value": "region" }, { "id": 3, "type": "value", "value": "Japan" }, { "id": 1, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
3,251
college_2
spider:train_spider.json:1447
Which department has the highest average instructor salary?
SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1
[ "Which", "department", "has", "the", "highest", "average", "instructor", "salary", "?" ]
[ { "id": 0, "type": "table", "value": "instructor" }, { "id": 1, "type": "column", "value": "dept_name" }, { "id": 2, "type": "column", "value": "salary" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
3,252
movie_3
bird:train.json:9403
How many films have a duration between 100 to 110 minutes?
SELECT COUNT(film_id) FROM film WHERE length BETWEEN 100 AND 110
[ "How", "many", "films", "have", "a", "duration", "between", "100", "to", "110", "minutes", "?" ]
[ { "id": 4, "type": "column", "value": "film_id" }, { "id": 1, "type": "column", "value": "length" }, { "id": 0, "type": "table", "value": "film" }, { "id": 2, "type": "value", "value": "100" }, { "id": 3, "type": "value", "value": "110" }...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O" ]
3,253
warehouse_1
bird:test.json:1734
What are the average values of boxes for each warehouse than has an average value greater than 150?
SELECT warehouse , avg(value) FROM boxes GROUP BY warehouse HAVING avg(value) > 150
[ "What", "are", "the", "average", "values", "of", "boxes", "for", "each", "warehouse", "than", "has", "an", "average", "value", "greater", "than", "150", "?" ]
[ { "id": 1, "type": "column", "value": "warehouse" }, { "id": 0, "type": "table", "value": "boxes" }, { "id": 3, "type": "column", "value": "value" }, { "id": 2, "type": "value", "value": "150" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
3,254
mondial_geo
bird:train.json:8227
For country with area greater than 600000, what is agriculture percentage of GDP the country contributes?
SELECT T2.Agriculture FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Area > 600000 AND T2.Agriculture IS NOT NULL
[ "For", "country", "with", "area", "greater", "than", "600000", ",", "what", "is", "agriculture", "percentage", "of", "GDP", "the", "country", "contributes", "?" ]
[ { "id": 0, "type": "column", "value": "agriculture" }, { "id": 1, "type": "table", "value": "country" }, { "id": 2, "type": "table", "value": "economy" }, { "id": 4, "type": "column", "value": "country" }, { "id": 6, "type": "value", "value...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
3,255
social_media
bird:train.json:824
What gender of users retweet more than 30 times?
SELECT DISTINCT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.RetweetCount > 30
[ "What", "gender", "of", "users", "retweet", "more", "than", "30", "times", "?" ]
[ { "id": 2, "type": "column", "value": "retweetcount" }, { "id": 1, "type": "table", "value": "twitter" }, { "id": 0, "type": "column", "value": "gender" }, { "id": 4, "type": "column", "value": "userid" }, { "id": 3, "type": "value", "value...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_...
[ "O", "B-COLUMN", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
3,256
cre_Doc_Tracking_DB
spider:train_spider.json:4228
What is the location code with the most documents?
SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "location", "code", "with", "the", "most", "documents", "?" ]
[ { "id": 0, "type": "table", "value": "document_locations" }, { "id": 1, "type": "column", "value": "location_code" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
3,259
store_1
spider:train_spider.json:645
Find the name of tracks which are in both Movies and music playlists.
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name ...
[ "Find", "the", "name", "of", "tracks", "which", "are", "in", "both", "Movies", "and", "music", "playlists", "." ]
[ { "id": 5, "type": "table", "value": "playlist_tracks" }, { "id": 6, "type": "column", "value": "playlist_id" }, { "id": 1, "type": "table", "value": "playlists" }, { "id": 8, "type": "column", "value": "track_id" }, { "id": 2, "type": "value",...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, ...
[ "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "B-TABLE", "O" ]
3,260
music_4
spider:train_spider.json:6151
What are the distinct Famous release dates?
SELECT distinct(Famous_Release_date) FROM artist
[ "What", "are", "the", "distinct", "Famous", "release", "dates", "?" ]
[ { "id": 1, "type": "column", "value": "famous_release_date" }, { "id": 0, "type": "table", "value": "artist" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_id...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
3,261
car_retails
bird:train.json:1612
Compared with the orders happened on 2005-04-08 and two days later, which day's order had a higher value?
SELECT T2.orderDate FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-08' OR STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-10' ORDER BY T1.quantityOrdered * T1.priceEach DESC LIMIT 1
[ "Compared", "with", "the", "orders", "happened", "on", "2005", "-", "04", "-", "08", "and", "two", "days", "later", ",", "which", "day", "'s", "order", "had", "a", "higher", "value", "?" ]
[ { "id": 6, "type": "column", "value": "quantityordered" }, { "id": 1, "type": "table", "value": "orderdetails" }, { "id": 3, "type": "column", "value": "ordernumber" }, { "id": 4, "type": "value", "value": "2005-04-08" }, { "id": 5, "type": "va...
[ { "entity_id": 0, "token_idxs": [ 19 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
3,263
music_platform_2
bird:train.json:7932
For all reviews with the worst rating, state the podcast title as well as the review title and content.
SELECT DISTINCT T1.title, T2.title, T2.content FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.rating = 1
[ "For", "all", "reviews", "with", "the", "worst", "rating", ",", "state", "the", "podcast", "title", "as", "well", "as", "the", "review", "title", "and", "content", "." ]
[ { "id": 6, "type": "column", "value": "podcast_id" }, { "id": 2, "type": "table", "value": "podcasts" }, { "id": 1, "type": "column", "value": "content" }, { "id": 3, "type": "table", "value": "reviews" }, { "id": 4, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [ 19 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
3,264
aan_1
bird:test.json:975
List all venues and years for papers ordered by year.
SELECT DISTINCT venue , YEAR FROM paper ORDER BY YEAR
[ "List", "all", "venues", "and", "years", "for", "papers", "ordered", "by", "year", "." ]
[ { "id": 0, "type": "table", "value": "paper" }, { "id": 1, "type": "column", "value": "venue" }, { "id": 2, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "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", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
3,265
food_inspection_2
bird:train.json:6133
How many inspections done by Lisa Tillman ended up with the result of "Out of Business"?
SELECT COUNT(T1.inspection_id) FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T2.first_name = 'Lisa' AND T2.last_name = 'Tillman' AND T1.results = 'Out of Business'
[ "How", "many", "inspections", "done", "by", "Lisa", "Tillman", "ended", "up", "with", "the", "result", "of", "\"", "Out", "of", "Business", "\"", "?" ]
[ { "id": 9, "type": "value", "value": "Out of Business" }, { "id": 2, "type": "column", "value": "inspection_id" }, { "id": 3, "type": "column", "value": "employee_id" }, { "id": 0, "type": "table", "value": "inspection" }, { "id": 4, "type": "c...
[ { "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": [ 5 ...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
3,266
food_inspection_2
bird:train.json:6234
List all inspection IDs where the employee named "Rosemary Kennedy" was involved.
SELECT DISTINCT T2.inspection_id FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T1.first_name = 'Rosemary' AND T1.last_name = 'Kennedy'
[ "List", "all", "inspection", "IDs", "where", "the", "employee", "named", "\"", "Rosemary", "Kennedy", "\"", "was", "involved", "." ]
[ { "id": 0, "type": "column", "value": "inspection_id" }, { "id": 3, "type": "column", "value": "employee_id" }, { "id": 2, "type": "table", "value": "inspection" }, { "id": 4, "type": "column", "value": "first_name" }, { "id": 6, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O" ]
3,267
icfp_1
spider:train_spider.json:2918
Find the first names of all the authors ordered in alphabetical order.
SELECT fname FROM authors ORDER BY fname
[ "Find", "the", "first", "names", "of", "all", "the", "authors", "ordered", "in", "alphabetical", "order", "." ]
[ { "id": 0, "type": "table", "value": "authors" }, { "id": 1, "type": "column", "value": "fname" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
3,268
university_basketball
spider:train_spider.json:1005
Find the schools that were either founded after 1850 or public.
SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'
[ "Find", "the", "schools", "that", "were", "either", "founded", "after", "1850", "or", "public", "." ]
[ { "id": 4, "type": "column", "value": "affiliation" }, { "id": 0, "type": "table", "value": "university" }, { "id": 2, "type": "column", "value": "founded" }, { "id": 1, "type": "column", "value": "school" }, { "id": 5, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
3,270
synthea
bird:train.json:1451
What gender is more prone to 'dander (animal) allergy'?
SELECT T1.gender FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Dander (animal) allergy' GROUP BY T1.gender ORDER BY COUNT(T1.gender) DESC LIMIT 1
[ "What", "gender", "is", "more", "prone", "to", "'", "dander", "(", "animal", ")", "allergy", "'", "?" ]
[ { "id": 4, "type": "value", "value": "Dander (animal) allergy" }, { "id": 3, "type": "column", "value": "description" }, { "id": 2, "type": "table", "value": "allergies" }, { "id": 1, "type": "table", "value": "patients" }, { "id": 5, "type": "...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7, 8, 9, 10 ] }, ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O", "O" ]
3,271
store_product
spider:train_spider.json:4924
Find the city with the most number of stores.
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1
[ "Find", "the", "city", "with", "the", "most", "number", "of", "stores", "." ]
[ { "id": 0, "type": "column", "value": "headquartered_city" }, { "id": 3, "type": "table", "value": "store_district" }, { "id": 4, "type": "column", "value": "district_id" }, { "id": 1, "type": "table", "value": "district" }, { "id": 5, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
3,272
synthea
bird:train.json:1513
How many Italian patients have the care plan code of 304510005?
SELECT COUNT(DISTINCT T2.patient) FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ethnicity = 'italian' AND T1.CODE = '304510005'
[ "How", "many", "Italian", "patients", "have", "the", "care", "plan", "code", "of", "304510005", "?" ]
[ { "id": 0, "type": "table", "value": "careplans" }, { "id": 3, "type": "column", "value": "ethnicity" }, { "id": 6, "type": "value", "value": "304510005" }, { "id": 1, "type": "table", "value": "patients" }, { "id": 2, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 6, 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id":...
[ "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
3,273
regional_sales
bird:train.json:2675
How many orders through distributor were for the minimum quantity?
SELECT SUM(CASE WHEN `Order Quantity` = 1 AND `Sales Channel` = 'Distributor' THEN 1 ELSE 0 END) FROM `Sales Orders`
[ "How", "many", "orders", "through", "distributor", "were", "for", "the", "minimum", "quantity", "?" ]
[ { "id": 3, "type": "column", "value": "Order Quantity" }, { "id": 4, "type": "column", "value": "Sales Channel" }, { "id": 0, "type": "table", "value": "Sales Orders" }, { "id": 5, "type": "value", "value": "Distributor" }, { "id": 1, "type": "...
[ { "entity_id": 0, "token_idxs": [ 1, 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "B-TABLE", "I-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,274
farm
spider:train_spider.json:19
What is the total horses record for each farm, sorted ascending?
SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC
[ "What", "is", "the", "total", "horses", "record", "for", "each", "farm", ",", "sorted", "ascending", "?" ]
[ { "id": 1, "type": "column", "value": "total_horses" }, { "id": 0, "type": "table", "value": "farm" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
3,275
chicago_crime
bird:train.json:8658
How many aldermen have "James" as their first name?
SELECT COUNT(*) FROM Ward WHERE alderman_first_name = 'James'
[ "How", "many", "aldermen", "have", "\"", "James", "\"", "as", "their", "first", "name", "?" ]
[ { "id": 1, "type": "column", "value": "alderman_first_name" }, { "id": 2, "type": "value", "value": "James" }, { "id": 0, "type": "table", "value": "ward" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5,...
[ "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
3,276
retail_world
bird:train.json:6608
List all product names under Confections.
SELECT T1.ProductName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Confections'
[ "List", "all", "product", "names", "under", "Confections", "." ]
[ { "id": 3, "type": "column", "value": "categoryname" }, { "id": 0, "type": "column", "value": "productname" }, { "id": 4, "type": "value", "value": "Confections" }, { "id": 2, "type": "table", "value": "categories" }, { "id": 5, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "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-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
3,277
hr_1
spider:train_spider.json:3476
What are the employee ids for employees who make more than the average?
SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)
[ "What", "are", "the", "employee", "ids", "for", "employees", "who", "make", "more", "than", "the", "average", "?" ]
[ { "id": 1, "type": "column", "value": "employee_id" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "salary" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O" ]
3,278
aan_1
bird:test.json:1027
How many papers does Stanford University have between 2000 and 2009?
SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year >= 2000 AND T1.year <= 2009 AND T3.name LIKE "Stanford University"
[ "How", "many", "papers", "does", "Stanford", "University", "have", "between", "2000", "and", "2009", "?" ]
[ { "id": 9, "type": "column", "value": "Stanford University" }, { "id": 4, "type": "column", "value": "affiliation_id" }, { "id": 0, "type": "table", "value": "affiliation" }, { "id": 3, "type": "table", "value": "author_list" }, { "id": 1, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
3,279
district_spokesman
bird:test.json:1183
What is the total population of the districts whose areas are in the top 3?
SELECT sum(population) FROM district ORDER BY area_km DESC LIMIT 3
[ "What", "is", "the", "total", "population", "of", "the", "districts", "whose", "areas", "are", "in", "the", "top", "3", "?" ]
[ { "id": 2, "type": "column", "value": "population" }, { "id": 0, "type": "table", "value": "district" }, { "id": 1, "type": "column", "value": "area_km" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
3,280
cookbook
bird:train.json:8871
Please list the names of all the ingredients needed for the recipe "Raspberry Chiffon Pie" that do not need preprocessing.
SELECT T3.name FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Raspberry Chiffon Pie' AND T2.preparation IS NULL
[ "Please", "list", "the", "names", "of", "all", "the", "ingredients", "needed", "for", "the", "recipe", "\"", "Raspberry", "Chiffon", "Pie", "\"", "that", "do", "not", "need", "preprocessing", "." ]
[ { "id": 6, "type": "value", "value": "Raspberry Chiffon Pie" }, { "id": 4, "type": "column", "value": "ingredient_id" }, { "id": 7, "type": "column", "value": "preparation" }, { "id": 1, "type": "table", "value": "ingredient" }, { "id": 8, "typ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,281
game_1
spider:train_spider.json:6004
What are the ids for all sporty students who are on scholarship?
SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'
[ "What", "are", "the", "ids", "for", "all", "sporty", "students", "who", "are", "on", "scholarship", "?" ]
[ { "id": 2, "type": "column", "value": "onscholarship" }, { "id": 0, "type": "table", "value": "sportsinfo" }, { "id": 1, "type": "column", "value": "stuid" }, { "id": 3, "type": "value", "value": "Y" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
3,282
customers_and_invoices
spider:train_spider.json:1572
What are the first names and ids for customers who have two or more accounts?
SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2
[ "What", "are", "the", "first", "names", "and", "ids", "for", "customers", "who", "have", "two", "or", "more", "accounts", "?" ]
[ { "id": 1, "type": "column", "value": "customer_first_name" }, { "id": 0, "type": "column", "value": "customer_id" }, { "id": 3, "type": "table", "value": "customers" }, { "id": 2, "type": "table", "value": "accounts" }, { "id": 4, "type": "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "e...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
3,283
loan_1
spider:train_spider.json:3052
Find the name of customer who has the highest amount of loans.
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1
[ "Find", "the", "name", "of", "customer", "who", "has", "the", "highest", "amount", "of", "loans", "." ]
[ { "id": 0, "type": "column", "value": "cust_name" }, { "id": 1, "type": "table", "value": "customer" }, { "id": 3, "type": "column", "value": "cust_id" }, { "id": 4, "type": "column", "value": "amount" }, { "id": 2, "type": "table", "value"...
[ { "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": [ 9 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
3,284
restaurant
bird:train.json:1744
Please indicate the street names of restaurants with food type is American.
SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'American'
[ "Please", "indicate", "the", "street", "names", "of", "restaurants", "with", "food", "type", "is", "American", "." ]
[ { "id": 0, "type": "column", "value": "street_name" }, { "id": 2, "type": "table", "value": "generalinfo" }, { "id": 3, "type": "column", "value": "food_type" }, { "id": 1, "type": "table", "value": "location" }, { "id": 4, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "e...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
3,285
products_gen_characteristics
spider:train_spider.json:5517
Count the number of products.
SELECT count(*) FROM products
[ "Count", "the", "number", "of", "products", "." ]
[ { "id": 0, "type": "table", "value": "products" } ]
[ { "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" ]
3,286
legislator
bird:train.json:4862
List all the Jewish current legislators that had served in Florida.
SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.religion_bio = 'Jewish' AND T2.state = 'FL' GROUP BY T1.first_name, T1.last_name
[ "List", "all", "the", "Jewish", "current", "legislators", "that", "had", "served", "in", "Florida", "." ]
[ { "id": 3, "type": "table", "value": "current-terms" }, { "id": 6, "type": "column", "value": "religion_bio" }, { "id": 4, "type": "column", "value": "bioguide_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-VALUE", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
3,287
hockey
bird:train.json:7728
Which team recorded the most number of road victories in 2005? Indicate the team ID.
SELECT tmID FROM TeamSplits WHERE YEAR = '2005' ORDER BY rW DESC LIMIT 1
[ "Which", "team", "recorded", "the", "most", "number", "of", "road", "victories", "in", "2005", "?", "Indicate", "the", "team", "ID", "." ]
[ { "id": 0, "type": "table", "value": "teamsplits" }, { "id": 1, "type": "column", "value": "tmid" }, { "id": 2, "type": "column", "value": "year" }, { "id": 3, "type": "value", "value": "2005" }, { "id": 4, "type": "column", "value": "rw" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14, 15 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "t...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
3,288
advertising_agencies
bird:test.json:2124
How many meetings had each meeting outcome?
SELECT meeting_outcome , count(*) FROM Meetings GROUP BY meeting_outcome
[ "How", "many", "meetings", "had", "each", "meeting", "outcome", "?" ]
[ { "id": 1, "type": "column", "value": "meeting_outcome" }, { "id": 0, "type": "table", "value": "meetings" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
3,289
soccer_2016
bird:train.json:1822
How many players were born in the 90s?
SELECT COUNT(Player_Id) AS cnt FROM Player WHERE DOB BETWEEN '1990-01-01' AND '1999-12-31'
[ "How", "many", "players", "were", "born", "in", "the", "90s", "?" ]
[ { "id": 2, "type": "value", "value": "1990-01-01" }, { "id": 3, "type": "value", "value": "1999-12-31" }, { "id": 4, "type": "column", "value": "player_id" }, { "id": 0, "type": "table", "value": "player" }, { "id": 1, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
3,290
social_media
bird:train.json:811
Which state was the tweet `tw-685681052912873473` from? Give the state code.
SELECT T2.StateCode FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.TweetID = 'tw-685681052912873473'
[ "Which", "state", "was", "the", "tweet", "`", "tw-685681052912873473", "`", "from", "?", "Give", "the", "state", "code", "." ]
[ { "id": 4, "type": "value", "value": "tw-685681052912873473" }, { "id": 5, "type": "column", "value": "locationid" }, { "id": 0, "type": "column", "value": "statecode" }, { "id": 2, "type": "table", "value": "location" }, { "id": 1, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 12, 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
3,291
cs_semester
bird:train.json:868
Among the students who took the course Machine Learning Theory, how many of them are undergraduates?
SELECT COUNT(T1.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Machine Learning Theory' AND T1.type = 'UG'
[ "Among", "the", "students", "who", "took", "the", "course", "Machine", "Learning", "Theory", ",", "how", "many", "of", "them", "are", "undergraduates", "?" ]
[ { "id": 6, "type": "value", "value": "Machine Learning Theory" }, { "id": 3, "type": "table", "value": "registration" }, { "id": 1, "type": "column", "value": "student_id" }, { "id": 4, "type": "column", "value": "course_id" }, { "id": 2, "type...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,292
small_bank_1
spider:train_spider.json:1777
What is the total balance of savings accounts not belonging to someone with the name Brown?
SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown'
[ "What", "is", "the", "total", "balance", "of", "savings", "accounts", "not", "belonging", "to", "someone", "with", "the", "name", "Brown", "?" ]
[ { "id": 0, "type": "table", "value": "accounts" }, { "id": 1, "type": "table", "value": "savings" }, { "id": 4, "type": "column", "value": "balance" }, { "id": 5, "type": "column", "value": "custid" }, { "id": 3, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
3,293
inn_1
spider:train_spider.json:2644
Find the name of rooms booked by some customers whose first name contains ROY.
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'
[ "Find", "the", "name", "of", "rooms", "booked", "by", "some", "customers", "whose", "first", "name", "contains", "ROY", "." ]
[ { "id": 1, "type": "table", "value": "reservations" }, { "id": 3, "type": "column", "value": "firstname" }, { "id": 0, "type": "column", "value": "roomname" }, { "id": 6, "type": "column", "value": "roomid" }, { "id": 2, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_i...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
3,294
behavior_monitoring
spider:train_spider.json:3101
List all cities of addresses in alphabetical order.
SELECT city FROM Addresses ORDER BY city
[ "List", "all", "cities", "of", "addresses", "in", "alphabetical", "order", "." ]
[ { "id": 0, "type": "table", "value": "addresses" }, { "id": 1, "type": "column", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O" ]
3,296
csu_1
spider:train_spider.json:2370
What are the degrees conferred in "San Francisco State University" in 2001.
SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND t2.year = 2001
[ "What", "are", "the", "degrees", "conferred", "in", "\"", "San", "Francisco", "State", "University", "\"", "in", "2001", "." ]
[ { "id": 5, "type": "column", "value": "San Francisco State University" }, { "id": 1, "type": "table", "value": "campuses" }, { "id": 0, "type": "column", "value": "degrees" }, { "id": 2, "type": "table", "value": "degrees" }, { "id": 4, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 7, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O" ]
3,297
works_cycles
bird:train.json:7021
Which product has the highest profit on net? State the product name.
SELECT T1.Name FROM Product AS T1 INNER JOIN ProductVendor AS T2 ON T1.ProductID = T2.ProductID ORDER BY T2.LastReceiptCost - T2.StandardPrice DESC LIMIT 1
[ "Which", "product", "has", "the", "highest", "profit", "on", "net", "?", "State", "the", "product", "name", "." ]
[ { "id": 4, "type": "column", "value": "lastreceiptcost" }, { "id": 2, "type": "table", "value": "productvendor" }, { "id": 5, "type": "column", "value": "standardprice" }, { "id": 3, "type": "column", "value": "productid" }, { "id": 1, "type": ...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
3,298
movie_3
bird:train.json:9363
Write down the email addresses of active customers who rented between 5/25/2005 at 7:37:47 PM and 5/26/2005 at 10:06:49 AM.
SELECT T2.email FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T1.rental_date BETWEEN '2005-5-25 07:37:47' AND '2005-5-26 10:06:49' AND T2.active = 1
[ "Write", "down", "the", "email", "addresses", "of", "active", "customers", "who", "rented", "between", "5/25/2005", "at", "7:37:47", "PM", "and", "5/26/2005", "at", "10:06:49", "AM", "." ]
[ { "id": 5, "type": "value", "value": "2005-5-25 07:37:47" }, { "id": 6, "type": "value", "value": "2005-5-26 10:06:49" }, { "id": 3, "type": "column", "value": "customer_id" }, { "id": 4, "type": "column", "value": "rental_date" }, { "id": 2, "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "B-TABLE", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
3,299
donor
bird:train.json:3280
How many schools with the highest level of poverty have received a portion of a donation included corporate sponsored gift card?
SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_campaign_gift_card = 't' AND T1.poverty_level = 'highest poverty'
[ "How", "many", "schools", "with", "the", "highest", "level", "of", "poverty", "have", "received", "a", "portion", "of", "a", "donation", "included", "corporate", "sponsored", "gift", "card", "?" ]
[ { "id": 4, "type": "column", "value": "payment_included_campaign_gift_card" }, { "id": 7, "type": "value", "value": "highest poverty" }, { "id": 6, "type": "column", "value": "poverty_level" }, { "id": 1, "type": "table", "value": "donations" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
3,300
online_exams
bird:test.json:216
Which students have 2 or more answer records? Give me their first names.
SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*) >= 2
[ "Which", "students", "have", "2", "or", "more", "answer", "records", "?", "Give", "me", "their", "first", "names", "." ]
[ { "id": 2, "type": "table", "value": "student_answers" }, { "id": 0, "type": "column", "value": "student_id" }, { "id": 1, "type": "column", "value": "first_name" }, { "id": 3, "type": "table", "value": "students" }, { "id": 4, "type": "value",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 12, 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id...
[ "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
3,301
race_track
spider:train_spider.json:772
What are the classes of races that have two or more corresponding races?
SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2
[ "What", "are", "the", "classes", "of", "races", "that", "have", "two", "or", "more", "corresponding", "races", "?" ]
[ { "id": 1, "type": "column", "value": "class" }, { "id": 0, "type": "table", "value": "race" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,302
flight_1
spider:train_spider.json:363
Show name and salary for all employees sorted by salary.
SELECT name , salary FROM Employee ORDER BY salary
[ "Show", "name", "and", "salary", "for", "all", "employees", "sorted", "by", "salary", "." ]
[ { "id": 0, "type": "table", "value": "employee" }, { "id": 2, "type": "column", "value": "salary" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
3,303
car_road_race
bird:test.json:1355
What are the names of drivers who had both the pole position James Hinchcliffe and the pole position Carl Skerlong?
SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = "Carl Skerlong" INTERSECT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = "James Hinchcliffe"
[ "What", "are", "the", "names", "of", "drivers", "who", "had", "both", "the", "pole", "position", "James", "Hinchcliffe", "and", "the", "pole", "position", "Carl", "Skerlong", "?" ]
[ { "id": 5, "type": "column", "value": "James Hinchcliffe" }, { "id": 3, "type": "column", "value": "pole_position" }, { "id": 4, "type": "column", "value": "Carl Skerlong" }, { "id": 0, "type": "column", "value": "driver_name" }, { "id": 6, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 16, 17 ] }, { "entity_id": 4, "token_idxs": [ 18, 19 ] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "I-COLUMN", "O" ]
3,304
e_commerce
bird:test.json:112
For all the products sold for more than 3 times, list their id and description.
SELECT T1.product_id , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id HAVING count(*) > 3
[ "For", "all", "the", "products", "sold", "for", "more", "than", "3", "times", ",", "list", "their", "i", "d", "and", "description", "." ]
[ { "id": 1, "type": "column", "value": "product_description" }, { "id": 3, "type": "table", "value": "order_items" }, { "id": 0, "type": "column", "value": "product_id" }, { "id": 2, "type": "table", "value": "products" }, { "id": 4, "type": "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,305
manufactory_1
spider:train_spider.json:5294
Find the name of product that is produced by both companies Creative Labs and Sony.
SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony'
[ "Find", "the", "name", "of", "product", "that", "is", "produced", "by", "both", "companies", "Creative", "Labs", "and", "Sony", "." ]
[ { "id": 2, "type": "table", "value": "manufacturers" }, { "id": 3, "type": "value", "value": "Creative Labs" }, { "id": 5, "type": "column", "value": "manufacturer" }, { "id": 1, "type": "table", "value": "products" }, { "id": 0, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "O" ]
3,306
bike_1
spider:train_spider.json:129
How many stations does Mountain View city has?
SELECT COUNT(*) FROM station WHERE city = "Mountain View"
[ "How", "many", "stations", "does", "Mountain", "View", "city", "has", "?" ]
[ { "id": 2, "type": "column", "value": "Mountain View" }, { "id": 0, "type": "table", "value": "station" }, { "id": 1, "type": "column", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 4, 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O" ]
3,307
formula_1
bird:dev.json:926
What's the fastest lap time ever in a race for Lewis Hamilton?
SELECT T2.fastestLapTime FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' AND T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapTime ASC LIMIT 1
[ "What", "'s", "the", "fastest", "lap", "time", "ever", "in", "a", "race", "for", "Lewis", "Hamilton", "?" ]
[ { "id": 0, "type": "column", "value": "fastestlaptime" }, { "id": 3, "type": "column", "value": "driverid" }, { "id": 4, "type": "column", "value": "forename" }, { "id": 7, "type": "value", "value": "Hamilton" }, { "id": 1, "type": "table", ...
[ { "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", "O" ]
3,308
university_rank
bird:test.json:1762
What is the total number of universities located in Illinois or Ohio?
SELECT count(*) FROM University WHERE state = 'Illinois' OR state = 'Ohio'
[ "What", "is", "the", "total", "number", "of", "universities", "located", "in", "Illinois", "or", "Ohio", "?" ]
[ { "id": 0, "type": "table", "value": "university" }, { "id": 2, "type": "value", "value": "Illinois" }, { "id": 1, "type": "column", "value": "state" }, { "id": 3, "type": "value", "value": "Ohio" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
3,309
sales
bird:train.json:5414
Give the full name of the employee who has sold the most quantity.
SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID ORDER BY T2.Quantity DESC LIMIT 1
[ "Give", "the", "full", "name", "of", "the", "employee", "who", "has", "sold", "the", "most", "quantity", "." ]
[ { "id": 6, "type": "column", "value": "salespersonid" }, { "id": 5, "type": "column", "value": "employeeid" }, { "id": 0, "type": "column", "value": "firstname" }, { "id": 2, "type": "table", "value": "employees" }, { "id": 1, "type": "column",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,310
codebase_community
bird:dev.json:608
State the detailed content of the comment which was created on 7/19/2010 7:25:47 PM.
SELECT Text FROM comments WHERE CreationDate = '2010-07-19 19:16:14.0'
[ "State", "the", "detailed", "content", "of", "the", "comment", "which", "was", "created", "on", "7/19/2010", "7:25:47", "PM", "." ]
[ { "id": 3, "type": "value", "value": "2010-07-19 19:16:14.0" }, { "id": 2, "type": "column", "value": "creationdate" }, { "id": 0, "type": "table", "value": "comments" }, { "id": 1, "type": "column", "value": "text" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
3,311
film_rank
spider:train_spider.json:4118
What are the low and high estimates of film markets?
SELECT Low_Estimate , High_Estimate FROM film_market_estimation
[ "What", "are", "the", "low", "and", "high", "estimates", "of", "film", "markets", "?" ]
[ { "id": 0, "type": "table", "value": "film_market_estimation" }, { "id": 2, "type": "column", "value": "high_estimate" }, { "id": 1, "type": "column", "value": "low_estimate" } ]
[ { "entity_id": 0, "token_idxs": [ 8, 9 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O" ]
3,312
bakery_1
bird:test.json:1522
Give the average price for each food type.
SELECT avg(price) , food FROM goods GROUP BY food
[ "Give", "the", "average", "price", "for", "each", "food", "type", "." ]
[ { "id": 0, "type": "table", "value": "goods" }, { "id": 2, "type": "column", "value": "price" }, { "id": 1, "type": "column", "value": "food" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O" ]
3,313
cre_Drama_Workshop_Groups
spider:train_spider.json:5100
Show all the Store_Name of drama workshop groups.
SELECT Store_Name FROM Drama_Workshop_Groups
[ "Show", "all", "the", "Store_Name", "of", "drama", "workshop", "groups", "." ]
[ { "id": 0, "type": "table", "value": "drama_workshop_groups" }, { "id": 1, "type": "column", "value": "store_name" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
3,314
image_and_language
bird:train.json:7501
What is the relationship between "feathers" and "onion" in image no.2345528?
SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE (T4.OBJ_CLASS = 'feathers' OR T4.OBJ_CLASS = 'onion') AND T2.IMG_ID = 2345...
[ "What", "is", "the", "relationship", "between", "\"", "feathers", "\"", "and", "\"", "onion", "\"", "in", "image", "no.2345528", "?" ]
[ { "id": 8, "type": "column", "value": "obj1_sample_id" }, { "id": 9, "type": "column", "value": "obj_sample_id" }, { "id": 13, "type": "column", "value": "pred_class_id" }, { "id": 3, "type": "column", "value": "obj_class_id" }, { "id": 6, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 14 ] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "B-VALUE", "O" ]
3,315
authors
bird:train.json:3524
How many journals have a word "computing" in its full name?
SELECT COUNT(Id) FROM Journal WHERE FullName LIKE '%computing%'
[ "How", "many", "journals", "have", "a", "word", "\"", "computing", "\"", "in", "its", "full", "name", "?" ]
[ { "id": 2, "type": "value", "value": "%computing%" }, { "id": 1, "type": "column", "value": "fullname" }, { "id": 0, "type": "table", "value": "journal" }, { "id": 3, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 11, 12 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
3,316
image_and_language
bird:train.json:7528
How many objects can you spot in image no. 72? What objects may be identified on the same image and within the bounding box represented as (341, 27, 42, 51)?
SELECT SUM(IIF(T1.IMG_ID = 1, 1, 0)), SUM(IIF(T1.X = 341 AND T1.Y = 27 AND T1.W = 42 AND T1.H = 51, 1, 0)) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
[ "How", "many", "objects", "can", "you", "spot", "in", "image", "no", ".", "72", "?", "What", "objects", "may", "be", "identified", "on", "the", "same", "image", "and", "within", "the", "bounding", "box", "represented", "as", "(", "341", ",", "27", ",",...
[ { "id": 2, "type": "column", "value": "obj_class_id" }, { "id": 1, "type": "table", "value": "obj_classes" }, { "id": 0, "type": "table", "value": "img_obj" }, { "id": 5, "type": "column", "value": "img_id" }, { "id": 7, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 35 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "O", "O" ]
3,317
activity_1
spider:train_spider.json:6801
Find the ids of the students who participate in Canoeing and Kayaking.
SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'
[ "Find", "the", "ids", "of", "the", "students", "who", "participate", "in", "Canoeing", "and", "Kayaking", "." ]
[ { "id": 1, "type": "table", "value": "participates_in" }, { "id": 3, "type": "column", "value": "activity_name" }, { "id": 2, "type": "table", "value": "activity" }, { "id": 4, "type": "value", "value": "Canoeing" }, { "id": 5, "type": "value",...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id":...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "B-VALUE", "O", "B-VALUE", "O" ]