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
14,339
musical
spider:train_spider.json:245
Return the duration of the actor with the greatest age.
SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1
[ "Return", "the", "duration", "of", "the", "actor", "with", "the", "greatest", "age", "." ]
[ { "id": 1, "type": "column", "value": "duration" }, { "id": 0, "type": "table", "value": "actor" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "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", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
14,340
works_cycles
bird:train.json:7010
Which product line has the most products that are salable?
SELECT ProductLine FROM Product WHERE FinishedGoodsFlag = 1 GROUP BY ProductLine ORDER BY COUNT(FinishedGoodsFlag) DESC LIMIT 1
[ "Which", "product", "line", "has", "the", "most", "products", "that", "are", "salable", "?" ]
[ { "id": 2, "type": "column", "value": "finishedgoodsflag" }, { "id": 1, "type": "column", "value": "productline" }, { "id": 0, "type": "table", "value": "product" }, { "id": 3, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "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", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O" ]
14,341
store_1
spider:train_spider.json:568
What is the number of invoices and total money billed in them from CA?
SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = "CA";
[ "What", "is", "the", "number", "of", "invoices", "and", "total", "money", "billed", "in", "them", "from", "CA", "?" ]
[ { "id": 1, "type": "column", "value": "billing_state" }, { "id": 0, "type": "table", "value": "invoices" }, { "id": 3, "type": "column", "value": "total" }, { "id": 2, "type": "column", "value": "CA" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O" ]
14,342
hr_1
spider:train_spider.json:3475
Find the employee id for all employees who earn more than the average salary.
SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)
[ "Find", "the", "employee", "i", "d", "for", "all", "employees", "who", "earn", "more", "than", "the", "average", "salary", "." ]
[ { "id": 1, "type": "column", "value": "employee_id" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "salary" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "e...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
14,343
cookbook
bird:train.json:8927
Identify recipes with different maximum and minimum quantities.
SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.max_qty <> T2.min_qty
[ "Identify", "recipes", "with", "different", "maximum", "and", "minimum", "quantities", "." ]
[ { "id": 5, "type": "column", "value": "recipe_id" }, { "id": 2, "type": "table", "value": "quantity" }, { "id": 3, "type": "column", "value": "max_qty" }, { "id": 4, "type": "column", "value": "min_qty" }, { "id": 1, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "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, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
14,344
wedding
spider:train_spider.json:1630
Show the name, open date, and organizer for all churches.
SELECT name , open_date , organized_by FROM Church
[ "Show", "the", "name", ",", "open", "date", ",", "and", "organizer", "for", "all", "churches", "." ]
[ { "id": 3, "type": "column", "value": "organized_by" }, { "id": 2, "type": "column", "value": "open_date" }, { "id": 0, "type": "table", "value": "church" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4, 5 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
14,345
flight_4
spider:train_spider.json:6862
For each airport name, how many routes start at that airport, ordered from most to least?
SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY count(*) DESC
[ "For", "each", " ", "airport", "name", ",", "how", "many", "routes", "start", "at", "that", "airport", ",", "ordered", "from", "most", "to", "least", "?" ]
[ { "id": 1, "type": "table", "value": "airports" }, { "id": 4, "type": "column", "value": "src_apid" }, { "id": 2, "type": "table", "value": "routes" }, { "id": 0, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "a...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
14,346
planet_1
bird:test.json:1908
what is the total weight of all packages shipped on Mars?
SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID WHERE T3.Name = "Mars";
[ "what", "is", "the", "total", "weight", "of", "all", "packages", "shipped", "on", "Mars", "?" ]
[ { "id": 9, "type": "column", "value": "shipmentid" }, { "id": 5, "type": "table", "value": "shipment" }, { "id": 7, "type": "column", "value": "planetid" }, { "id": 8, "type": "column", "value": "shipment" }, { "id": 4, "type": "table", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O" ]
14,347
professional_basketball
bird:train.json:2875
Please list out the first name and last name of player who attended California college and have been selected as all stars?
SELECT DISTINCT T1.firstName, T1.lastName FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.college = 'California'
[ "Please", "list", "out", "the", "first", "name", "and", "last", "name", "of", "player", "who", "attended", "California", "college", "and", "have", "been", "selected", "as", "all", "stars", "?" ]
[ { "id": 3, "type": "table", "value": "player_allstar" }, { "id": 5, "type": "value", "value": "California" }, { "id": 0, "type": "column", "value": "firstname" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 4, 5 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 19, 20, 21 ] }, { "entity_id": 4, ...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
14,348
apartment_rentals
spider:train_spider.json:1216
Return the first names and last names of all guests
SELECT guest_first_name , guest_last_name FROM Guests
[ "Return", "the", "first", "names", "and", "last", "names", "of", "all", "guests" ]
[ { "id": 1, "type": "column", "value": "guest_first_name" }, { "id": 2, "type": "column", "value": "guest_last_name" }, { "id": 0, "type": "table", "value": "guests" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE" ]
14,350
world_development_indicators
bird:train.json:2190
In 1960, what is largest population for country with upper middle income?
SELECT MAX(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Upper middle income' AND T2.Year = 1960 AND T2.IndicatorName = 'Population, total'
[ "In", "1960", ",", "what", "is", "largest", "population", "for", "country", "with", "upper", "middle", "income", "?" ]
[ { "id": 5, "type": "value", "value": "Upper middle income" }, { "id": 9, "type": "value", "value": "Population, total" }, { "id": 8, "type": "column", "value": "indicatorname" }, { "id": 3, "type": "column", "value": "countrycode" }, { "id": 4, ...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "B-TABLE", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O" ]
14,351
headphone_store
bird:test.json:955
Which headphone models do not have any stock in any store?
SELECT model FROM headphone WHERE headphone_id NOT IN (SELECT headphone_id FROM stock)
[ "Which", "headphone", "models", "do", "not", "have", "any", "stock", "in", "any", "store", "?" ]
[ { "id": 2, "type": "column", "value": "headphone_id" }, { "id": 0, "type": "table", "value": "headphone" }, { "id": 1, "type": "column", "value": "model" }, { "id": 3, "type": "table", "value": "stock" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
14,352
college_completion
bird:train.json:3726
Tell the number of 4-year private not-for-profit schools in the home state of "Brevard Community College".
SELECT COUNT(T1.chronname) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state WHERE T2.level = '4-year' AND T2.control = 'Private not-for-profit' AND T1.chronname = 'Brevard Community College'
[ "Tell", "the", "number", "of", "4", "-", "year", "private", "not", "-", "for", "-", "profit", "schools", "in", "the", "home", "state", "of", "\"", "Brevard", "Community", "College", "\"", "." ]
[ { "id": 8, "type": "value", "value": "Brevard Community College" }, { "id": 7, "type": "value", "value": "Private not-for-profit" }, { "id": 1, "type": "table", "value": "state_sector_details" }, { "id": 0, "type": "table", "value": "institution_details" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
14,353
tracking_share_transactions
spider:train_spider.json:5876
Show the transaction type code that occurs the most frequently.
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1
[ "Show", "the", "transaction", "type", "code", "that", "occurs", "the", "most", "frequently", "." ]
[ { "id": 1, "type": "column", "value": "transaction_type_code" }, { "id": 0, "type": "table", "value": "transactions" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "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", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O" ]
14,354
bike_share_1
bird:train.json:9013
Among the subscribers who rented a bike from South Van Ness at Market on 12/1/2013, whose duration was the shortest and to which station was the bike returned to? Indicate South Van Ness's dock count.
SELECT MIN(T2.duration), T2.end_station_name, COUNT(T2.start_station_name) FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name WHERE T2.start_date LIKE '12/1/2013%' AND T2.start_station_name = 'South Van Ness at Market' AND T2.subscription_type = 'Subscriber'
[ "Among", "the", "subscribers", "who", "rented", "a", "bike", "from", "South", "Van", "Ness", "at", "Market", "on", "12/1/2013", ",", "whose", "duration", "was", "the", "shortest", "and", "to", "which", "station", "was", "the", "bike", "returned", "to", "?"...
[ { "id": 8, "type": "value", "value": "South Van Ness at Market" }, { "id": 4, "type": "column", "value": "start_station_name" }, { "id": 9, "type": "column", "value": "subscription_type" }, { "id": 0, "type": "column", "value": "end_station_name" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 24 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O...
14,355
sales_in_weather
bird:train.json:8189
In weather station 17, which store sold the highest quantity of item 45 in October 2012?
SELECT T1.store_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.item_nbr = 45 AND T2.station_nbr = 17 AND T1.`date` LIKE '%2012-10%' GROUP BY T1.store_nbr ORDER BY SUM(T1.units) DESC LIMIT 1
[ "In", "weather", "station", "17", ",", "which", "store", "sold", "the", "highest", "quantity", "of", "item", "45", "in", "October", "2012", "?" ]
[ { "id": 1, "type": "table", "value": "sales_in_weather" }, { "id": 5, "type": "column", "value": "station_nbr" }, { "id": 0, "type": "column", "value": "store_nbr" }, { "id": 8, "type": "value", "value": "%2012-10%" }, { "id": 2, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 0, 1 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 13 ...
[ "B-TABLE", "I-TABLE", "B-TABLE", "B-VALUE", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "O", "O", "B-VALUE", "O" ]
14,356
synthea
bird:train.json:1367
What medication did Elly Koss take when she had Streptococcal sore throat?
SELECT T2.description FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.reasondescription = 'Streptococcal sore throat (disorder)'
[ "What", "medication", "did", "Elly", "Koss", "take", "when", "she", "had", "Streptococcal", "sore", "throat", "?" ]
[ { "id": 9, "type": "value", "value": "Streptococcal sore throat (disorder)" }, { "id": 8, "type": "column", "value": "reasondescription" }, { "id": 0, "type": "column", "value": "description" }, { "id": 2, "type": "table", "value": "medications" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 3 ...
[ "O", "B-TABLE", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
14,357
college_completion
bird:train.json:3712
Give the web site address for "Swarthmore College".
SELECT T FROM ( SELECT DISTINCT CASE WHEN chronname = 'Swarthmore College' THEN site ELSE NULL END AS T FROM institution_details ) WHERE T IS NOT NULL
[ "Give", "the", "web", "site", "address", "for", "\"", "Swarthmore", "College", "\"", "." ]
[ { "id": 1, "type": "table", "value": "institution_details" }, { "id": 4, "type": "value", "value": "Swarthmore College" }, { "id": 3, "type": "column", "value": "chronname" }, { "id": 2, "type": "column", "value": "site" }, { "id": 0, "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": [ 7, 8 ] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O" ]
14,359
flight_4
spider:train_spider.json:6810
What is the number of airlines based in Russia?
SELECT count(*) FROM airlines WHERE country = 'Russia'
[ "What", "is", "the", "number", "of", "airlines", "based", "in", "Russia", "?" ]
[ { "id": 0, "type": "table", "value": "airlines" }, { "id": 1, "type": "column", "value": "country" }, { "id": 2, "type": "value", "value": "Russia" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "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", "B-TABLE", "O", "O", "B-VALUE", "O" ]
14,360
college_3
spider:train_spider.json:4676
What is the name of the department with 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
[ "What", "is", "the", "name", "of", "the", "department", "with", "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": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O" ]
14,361
computer_student
bird:train.json:1000
What is the average number of courses taught by a professor?
SELECT CAST(COUNT(T1.course_id) AS REAL) / COUNT(DISTINCT T2.p_id) AS num FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1
[ "What", "is", "the", "average", "number", "of", "courses", "taught", "by", "a", "professor", "?" ]
[ { "id": 2, "type": "column", "value": "professor" }, { "id": 5, "type": "column", "value": "course_id" }, { "id": 0, "type": "table", "value": "taughtby" }, { "id": 1, "type": "table", "value": "person" }, { "id": 4, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O", "B-COLUMN", "O" ]
14,362
hockey
bird:train.json:7761
What were the penalty minutes in 1923's Stanley Cup finals of the team that ranked second in that year?
SELECT T1.PIM FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = '1923' AND T2.rank = 2
[ "What", "were", "the", "penalty", "minutes", "in", "1923", "'s", "Stanley", "Cup", "finals", "of", "the", "team", "that", "ranked", "second", "in", "that", "year", "?" ]
[ { "id": 1, "type": "table", "value": "teamssc" }, { "id": 2, "type": "table", "value": "teams" }, { "id": 3, "type": "column", "value": "year" }, { "id": 4, "type": "value", "value": "1923" }, { "id": 5, "type": "column", "value": "rank" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 19 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
14,363
authors
bird:train.json:3553
Calculate the differences of the paper number with the journal name of IWC in 2000 and 2010.
SELECT SUM(CASE WHEN T2.Year = 2000 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.Year = 2010 THEN 1 ELSE 0 END) AS DIFF FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = 'IWC'
[ "Calculate", "the", "differences", "of", "the", "paper", "number", "with", "the", "journal", "name", "of", "IWC", "in", "2000", "and", "2010", "." ]
[ { "id": 2, "type": "column", "value": "shortname" }, { "id": 5, "type": "column", "value": "journalid" }, { "id": 0, "type": "table", "value": "journal" }, { "id": 1, "type": "table", "value": "paper" }, { "id": 8, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "O" ]
14,364
public_review_platform
bird:train.json:4114
How many users with a long tip and 2 likes for their tip have a high number of fans?
SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T2.tip_length = 'Long' AND T2.likes = 2 AND T1.user_fans = 'High'
[ "How", "many", "users", "with", "a", "long", "tip", "and", "2", "likes", "for", "their", "tip", "have", "a", "high", "number", "of", "fans", "?" ]
[ { "id": 3, "type": "column", "value": "tip_length" }, { "id": 7, "type": "column", "value": "user_fans" }, { "id": 2, "type": "column", "value": "user_id" }, { "id": 0, "type": "table", "value": "users" }, { "id": 5, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-TABLE", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O" ]
14,365
car_retails
bird:train.json:1667
List down the customer names with a disputed order status.
SELECT t1.customerName FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.status = 'Disputed'
[ "List", "down", "the", "customer", "names", "with", "a", "disputed", "order", "status", "." ]
[ { "id": 5, "type": "column", "value": "customernumber" }, { "id": 0, "type": "column", "value": "customername" }, { "id": 1, "type": "table", "value": "customers" }, { "id": 4, "type": "value", "value": "Disputed" }, { "id": 2, "type": "table",...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, {...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "B-TABLE", "B-COLUMN", "O" ]
14,366
donor
bird:train.json:3173
What are the favorite project types of each of the top 10 donors?
SELECT project_resource_type FROM ( SELECT T1.donor_acctid, T3.project_resource_type FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN resources AS T3 ON T2.projectid = T3.projectid ORDER BY T1.donation_total DESC LIMIT 10 ) GROUP BY project_resource_type ORDER BY COUNT(project_re...
[ "What", "are", "the", "favorite", "project", "types", "of", "each", "of", "the", "top", "10", "donors", "?" ]
[ { "id": 0, "type": "column", "value": "project_resource_type" }, { "id": 3, "type": "column", "value": "donation_total" }, { "id": 1, "type": "column", "value": "donor_acctid" }, { "id": 2, "type": "table", "value": "resources" }, { "id": 4, "t...
[ { "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": [ 12 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
14,367
department_store
spider:train_spider.json:4778
What are the distinct names of customers who have purchased a keyboard?
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = "keyboard"
[ "What", "are", "the", "distinct", "names", "of", "customers", "who", "have", "purchased", "a", "keyboard", "?" ]
[ { "id": 7, "type": "table", "value": "customer_orders" }, { "id": 0, "type": "column", "value": "customer_name" }, { "id": 2, "type": "column", "value": "product_name" }, { "id": 4, "type": "table", "value": "order_items" }, { "id": 9, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
14,368
bakery_1
bird:test.json:1573
What are the ids of goods whose price is above twice the average price of all goods?
SELECT id FROM goods WHERE price > (SELECT avg(price) FROM goods)
[ "What", "are", "the", "ids", "of", "goods", "whose", "price", "is", "above", "twice", "the", "average", "price", "of", "all", "goods", "?" ]
[ { "id": 0, "type": "table", "value": "goods" }, { "id": 2, "type": "column", "value": "price" }, { "id": 1, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "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", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
14,370
address_1
bird:test.json:801
Show names for all cities where at least three students live.
SELECT T1.city_name FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.city_code HAVING count(*) >= 3
[ "Show", "names", "for", "all", "cities", "where", "at", "least", "three", "students", "live", "." ]
[ { "id": 0, "type": "column", "value": "city_code" }, { "id": 1, "type": "column", "value": "city_name" }, { "id": 3, "type": "table", "value": "student" }, { "id": 2, "type": "table", "value": "city" }, { "id": 4, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
14,371
gas_company
spider:train_spider.json:2013
Show gas station id, location, and manager_name for all gas stations ordered by open year.
SELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year
[ "Show", "gas", "station", "i", "d", ",", "location", ",", "and", "manager_name", "for", "all", "gas", "stations", "ordered", "by", "open", "year", "." ]
[ { "id": 3, "type": "column", "value": "manager_name" }, { "id": 0, "type": "table", "value": "gas_station" }, { "id": 1, "type": "column", "value": "station_id" }, { "id": 4, "type": "column", "value": "open_year" }, { "id": 2, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
14,372
world
bird:train.json:7848
Provide the language used by the people of Belize.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belize'
[ "Provide", "the", "language", "used", "by", "the", "people", "of", "Belize", "." ]
[ { "id": 2, "type": "table", "value": "countrylanguage" }, { "id": 6, "type": "column", "value": "countrycode" }, { "id": 0, "type": "column", "value": "language" }, { "id": 1, "type": "table", "value": "country" }, { "id": 4, "type": "value", ...
[ { "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": [ 8 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
14,373
language_corpus
bird:train.json:5704
What is the word pair that occured the highest amount of times in Addicio? Indicate how many times such word pair occured.
SELECT T3.w1st, T3.w2nd, T3.occurrences FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid INNER JOIN biwords AS T3 ON T2.wid = T3.w1st OR T2.wid = T3.w2nd WHERE T1.title = 'Addicio' ORDER BY T3.occurrences DESC LIMIT 1
[ "What", "is", "the", "word", "pair", "that", "occured", "the", "highest", "amount", "of", "times", "in", "Addicio", "?", "Indicate", "how", "many", "times", "such", "word", "pair", "occured", "." ]
[ { "id": 2, "type": "column", "value": "occurrences" }, { "id": 7, "type": "table", "value": "pages_words" }, { "id": 3, "type": "table", "value": "biwords" }, { "id": 5, "type": "value", "value": "Addicio" }, { "id": 4, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 22 ] }, { "entity_id": 3, "token_idxs": [ 20 ] }, { "entity_id": 4, "token_idxs": [ 18 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O" ]
14,374
university_rank
bird:test.json:1801
which states do have more than two universities with enrollment smaller than 3000?
SELECT state FROM university WHERE enrollment < 3000 GROUP BY state HAVING count(*) > 2
[ "which", "states", "do", "have", "more", "than", "two", "universities", "with", "enrollment", "smaller", "than", "3000", "?" ]
[ { "id": 0, "type": "table", "value": "university" }, { "id": 2, "type": "column", "value": "enrollment" }, { "id": 1, "type": "column", "value": "state" }, { "id": 3, "type": "value", "value": "3000" }, { "id": 4, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
14,375
university
bird:train.json:8133
How many universities scored 40 in teaching criteria?
SELECT COUNT(*) FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id WHERE T2.score = 40 AND T1.criteria_name = 'Teaching' AND T2.score = 40
[ "How", "many", "universities", "scored", "40", "in", "teaching", "criteria", "?" ]
[ { "id": 1, "type": "table", "value": "university_ranking_year" }, { "id": 3, "type": "column", "value": "ranking_criteria_id" }, { "id": 0, "type": "table", "value": "ranking_criteria" }, { "id": 6, "type": "column", "value": "criteria_name" }, { "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "B-COLUMN", "O" ]
14,376
customers_and_addresses
spider:train_spider.json:6125
Find the total amount of products ordered before 2018-03-17 07:13:53.
SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < "2018-03-17 07:13:53"
[ "Find", "the", "total", "amount", "of", "products", "ordered", "before", "2018", "-", "03", "-", "17", "07:13:53", "." ]
[ { "id": 3, "type": "column", "value": "2018-03-17 07:13:53" }, { "id": 0, "type": "table", "value": "customer_orders" }, { "id": 4, "type": "column", "value": "order_quantity" }, { "id": 1, "type": "table", "value": "order_items" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10, 11, 12, 13 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
14,377
address
bird:train.json:5105
List all the zip codes in the county of New Castle in Delaware.
SELECT DISTINCT T2.zip_code FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T2.county = 'NEW CASTLE' AND T1.name = 'Delaware'
[ "List", "all", "the", "zip", "codes", "in", "the", "county", "of", "New", "Castle", "in", "Delaware", "." ]
[ { "id": 3, "type": "column", "value": "abbreviation" }, { "id": 6, "type": "value", "value": "NEW CASTLE" }, { "id": 0, "type": "column", "value": "zip_code" }, { "id": 8, "type": "value", "value": "Delaware" }, { "id": 2, "type": "table", ...
[ { "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": [ 0, 1, 2 ] }, { "entity...
[ "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "O" ]
14,378
aan_1
bird:test.json:1043
Find the total number of papers for each affiliation.
SELECT count(DISTINCT T2.paper_id) , T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id GROUP BY T1.affiliation_id
[ "Find", "the", "total", "number", "of", "papers", "for", "each", "affiliation", "." ]
[ { "id": 0, "type": "column", "value": "affiliation_id" }, { "id": 2, "type": "table", "value": "affiliation" }, { "id": 3, "type": "table", "value": "author_list" }, { "id": 4, "type": "column", "value": "paper_id" }, { "id": 1, "type": "column...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
14,379
donor
bird:train.json:3291
In what percentage of counties has the ABC Read project been launched?
SELECT CAST(SUM(CASE WHEN T2.title LIKE 'ABC Read' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.school_county) FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid
[ "In", "what", "percentage", "of", "counties", "has", "the", "ABC", "Read", "project", "been", "launched", "?" ]
[ { "id": 4, "type": "column", "value": "school_county" }, { "id": 2, "type": "column", "value": "projectid" }, { "id": 0, "type": "table", "value": "projects" }, { "id": 8, "type": "value", "value": "ABC Read" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "B-TABLE", "O", "O", "O" ]
14,380
university
bird:train.json:8125
List the countries of universities that scored 70 and below in 2016.
SELECT DISTINCT T3.country_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.score < 70 AND T2.year = 2016
[ "List", "the", "countries", "of", "universities", "that", "scored", "70", "and", "below", "in", "2016", "." ]
[ { "id": 3, "type": "table", "value": "university_ranking_year" }, { "id": 10, "type": "column", "value": "university_id" }, { "id": 0, "type": "column", "value": "country_name" }, { "id": 2, "type": "table", "value": "university" }, { "id": 5, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "B-VALUE", "O" ]
14,381
insurance_fnol
spider:train_spider.json:903
Find the name of services that have been used for more than 2 times in first notification of loss.
SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING count(*) > 2
[ "Find", "the", "name", "of", "services", "that", "have", "been", "used", "for", "more", "than", "2", "times", "in", "first", "notification", "of", "loss", "." ]
[ { "id": 2, "type": "table", "value": "first_notification_of_loss" }, { "id": 1, "type": "column", "value": "service_name" }, { "id": 0, "type": "column", "value": "service_id" }, { "id": 3, "type": "table", "value": "services" }, { "id": 4, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 15, 16, 17, 18 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 12 ] ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "I-TABLE", "O" ]
14,382
candidate_poll
spider:train_spider.json:2418
which gender got the highest average uncertain ratio.
SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1
[ "which", "gender", "got", "the", "highest", "average", "uncertain", "ratio", "." ]
[ { "id": 4, "type": "column", "value": "unsure_rate" }, { "id": 2, "type": "table", "value": "candidate" }, { "id": 3, "type": "column", "value": "people_id" }, { "id": 1, "type": "table", "value": "people" }, { "id": 0, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
14,383
financial
bird:dev.json:91
The average unemployment ratio of 1995 and 1996, which one has higher percentage?
SELECT DISTINCT IIF(AVG(A13) > AVG(A12), '1996', '1995') FROM district
[ "The", "average", "unemployment", "ratio", "of", "1995", "and", "1996", ",", "which", "one", "has", "higher", "percentage", "?" ]
[ { "id": 0, "type": "table", "value": "district" }, { "id": 1, "type": "value", "value": "1996" }, { "id": 2, "type": "value", "value": "1995" }, { "id": 3, "type": "column", "value": "a13" }, { "id": 4, "type": "column", "value": "a12" } ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O" ]
14,384
sakila_1
spider:train_spider.json:3003
Give the address of the staff member who has the first name Elsa.
SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'
[ "Give", "the", "address", "of", "the", "staff", "member", "who", "has", "the", "first", "name", "Elsa", "." ]
[ { "id": 3, "type": "column", "value": "first_name" }, { "id": 5, "type": "column", "value": "address_id" }, { "id": 0, "type": "column", "value": "address" }, { "id": 2, "type": "table", "value": "address" }, { "id": 1, "type": "table", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
14,386
inn_1
spider:train_spider.json:2636
Find the number of rooms that do not have any reservation.
SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
[ "Find", "the", "number", "of", "rooms", "that", "do", "not", "have", "any", "reservation", "." ]
[ { "id": 2, "type": "table", "value": "reservations" }, { "id": 1, "type": "column", "value": "roomid" }, { "id": 0, "type": "table", "value": "rooms" }, { "id": 3, "type": "column", "value": "room" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
14,388
student_loan
bird:train.json:4440
Mention the name of students who filed for bankruptcy and have never been absent from school.
SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name WHERE T1.month = 0
[ "Mention", "the", "name", "of", "students", "who", "filed", "for", "bankruptcy", "and", "have", "never", "been", "absent", "from", "school", "." ]
[ { "id": 1, "type": "table", "value": "longest_absense_from_school" }, { "id": 2, "type": "table", "value": "filed_for_bankrupcy" }, { "id": 3, "type": "column", "value": "month" }, { "id": 0, "type": "column", "value": "name" }, { "id": 4, "typ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 13, 14, 15 ] }, { "entity_id": 2, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 3, "token_idxs": [ 0, 1 ] }, { "entity_id...
[ "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
14,389
codebase_community
bird:dev.json:627
How many users were adult?
SELECT COUNT(id) FROM users WHERE Age BETWEEN 19 AND 65
[ "How", "many", "users", "were", "adult", "?" ]
[ { "id": 0, "type": "table", "value": "users" }, { "id": 1, "type": "column", "value": "age" }, { "id": 2, "type": "value", "value": "19" }, { "id": 3, "type": "value", "value": "65" }, { "id": 4, "type": "column", "value": "id" } ]
[ { "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" ]
14,390
cre_Docs_and_Epenses
spider:train_spider.json:6408
Count the number of documents with the type code BK that correspond to each product id.
SELECT count(*) , project_id FROM Documents WHERE document_type_code = "BK" GROUP BY project_id
[ "Count", "the", "number", "of", "documents", "with", "the", "type", "code", "BK", "that", "correspond", "to", "each", "product", "i", "d." ]
[ { "id": 2, "type": "column", "value": "document_type_code" }, { "id": 1, "type": "column", "value": "project_id" }, { "id": 0, "type": "table", "value": "documents" }, { "id": 3, "type": "column", "value": "BK" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 14, 15, 16 ] }, { "entity_id": 2, "token_idxs": [ 5, 6, 7, 8 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN" ]
14,391
institution_sports
bird:test.json:1669
What is the most common type of affiliation for institutions?
SELECT Affiliation FROM institution GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1
[ "What", "is", "the", "most", "common", "type", "of", "affiliation", "for", "institutions", "?" ]
[ { "id": 0, "type": "table", "value": "institution" }, { "id": 1, "type": "column", "value": "affiliation" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "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", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
14,392
real_estate_rentals
bird:test.json:1418
Which property had the lowest price requested by the vendor? List the id and the price.
SELECT property_id , vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1;
[ "Which", "property", "had", "the", "lowest", "price", "requested", "by", "the", "vendor", "?", "List", "the", "i", "d", "and", "the", "price", "." ]
[ { "id": 2, "type": "column", "value": "vendor_requested_price" }, { "id": 1, "type": "column", "value": "property_id" }, { "id": 0, "type": "table", "value": "properties" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "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", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
14,393
bakery_1
bird:test.json:1565
For each date, return how many distinct customers visited on that day.
SELECT date , COUNT (DISTINCT CustomerId) FROM receipts GROUP BY date
[ "For", "each", "date", ",", "return", "how", "many", "distinct", "customers", "visited", "on", "that", "day", "." ]
[ { "id": 2, "type": "column", "value": "customerid" }, { "id": 0, "type": "table", "value": "receipts" }, { "id": 1, "type": "column", "value": "date" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "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, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
14,394
document_management
spider:train_spider.json:4542
Give the codes of document types that have more than 2 corresponding documents.
SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 2
[ "Give", "the", "codes", "of", "document", "types", "that", "have", "more", "than", "2", "corresponding", "documents", "." ]
[ { "id": 1, "type": "column", "value": "document_type_code" }, { "id": 0, "type": "table", "value": "documents" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O" ]
14,395
entertainment_awards
spider:train_spider.json:4615
List the year in which there are more than one festivals.
SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1
[ "List", "the", "year", "in", "which", "there", "are", "more", "than", "one", "festivals", "." ]
[ { "id": 0, "type": "table", "value": "festival_detail" }, { "id": 1, "type": "column", "value": "year" }, { "id": 2, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
14,397
baseball_1
spider:train_spider.json:3684
List all the salary values players received in 2010 and 2001.
SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001
[ "List", "all", "the", "salary", "values", "players", "received", "in", "2010", "and", "2001", "." ]
[ { "id": 0, "type": "table", "value": "salary" }, { "id": 1, "type": "column", "value": "salary" }, { "id": 2, "type": "column", "value": "year" }, { "id": 3, "type": "value", "value": "2010" }, { "id": 4, "type": "value", "value": "2001" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
14,398
solvency_ii
spider:train_spider.json:4590
Show the most common type code across products.
SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
[ "Show", "the", "most", "common", "type", "code", "across", "products", "." ]
[ { "id": 1, "type": "column", "value": "product_type_code" }, { "id": 0, "type": "table", "value": "products" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "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", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O" ]
14,399
train_station
spider:train_spider.json:6620
Find the names of the trains that do not pass any station located in London.
SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id = T4.station_id WHERE t4.location = "London")
[ "Find", "the", "names", "of", "the", "trains", "that", "do", "not", "pass", "any", "station", "located", "in", "London", "." ]
[ { "id": 1, "type": "table", "value": "train_station" }, { "id": 4, "type": "column", "value": "station_id" }, { "id": 3, "type": "column", "value": "train_id" }, { "id": 6, "type": "column", "value": "location" }, { "id": 5, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O" ]
14,400
college_2
spider:train_spider.json:1411
How many students are in each department?
SELECT count(*) , dept_name FROM student GROUP BY dept_name
[ "How", "many", "students", "are", "in", "each", "department", "?" ]
[ { "id": 1, "type": "column", "value": "dept_name" }, { "id": 0, "type": "table", "value": "student" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "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", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
14,401
art_1
bird:test.json:1229
What is the painting count of the artist with the longest life ?
select count(*) from artists as t1 join paintings as t2 on t1.artistid = t2.painterid group by t2.painterid order by t1.deathyear - t1.birthyear desc limit 1
[ "What", "is", "the", "painting", "count", "of", "the", "artist", "with", "the", "longest", "life", "?" ]
[ { "id": 0, "type": "column", "value": "painterid" }, { "id": 2, "type": "table", "value": "paintings" }, { "id": 4, "type": "column", "value": "deathyear" }, { "id": 5, "type": "column", "value": "birthyear" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
14,402
storm_record
spider:train_spider.json:2707
What are the names and damage in millions for storms, ordered by their max speeds descending?
SELECT name , damage_millions_USD FROM storm ORDER BY max_speed DESC
[ "What", "are", "the", "names", "and", "damage", "in", "millions", "for", "storms", ",", "ordered", "by", "their", "max", "speeds", "descending", "?" ]
[ { "id": 2, "type": "column", "value": "damage_millions_usd" }, { "id": 3, "type": "column", "value": "max_speed" }, { "id": 0, "type": "table", "value": "storm" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 14, 15 ] }, { "entity_id": 4, "token_id...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
14,403
image_and_language
bird:train.json:7519
How many prediction classes with "has" captions are there for image id 3050?
SELECT COUNT(T2.PRED_CLASS_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 3050 AND T2.PRED_CLASS = 'has'
[ "How", "many", "prediction", "classes", "with", "\"", "has", "\"", "captions", "are", "there", "for", "image", "i", "d", "3050", "?" ]
[ { "id": 2, "type": "column", "value": "pred_class_id" }, { "id": 1, "type": "table", "value": "pred_classes" }, { "id": 5, "type": "column", "value": "pred_class" }, { "id": 0, "type": "table", "value": "img_rel" }, { "id": 3, "type": "column",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12, 13, 14 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
14,404
codebase_community
bird:dev.json:563
User No.3025 gave a comment at 20:29:39 on 2014/4/23 to a post, how many favorite counts did that post get?
SELECT T1.FavoriteCount FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T2.CreationDate = '2014-04-23 20:29:39.0' AND T2.UserId = 3025
[ "User", "No.3025", "gave", "a", "comment", "at", "20:29:39", "on", "2014/4/23", "to", "a", "post", ",", "how", "many", "favorite", "counts", "did", "that", "post", "get", "?" ]
[ { "id": 6, "type": "value", "value": "2014-04-23 20:29:39.0" }, { "id": 0, "type": "column", "value": "favoritecount" }, { "id": 5, "type": "column", "value": "creationdate" }, { "id": 2, "type": "table", "value": "comments" }, { "id": 4, "type...
[ { "entity_id": 0, "token_idxs": [ 15, 16 ] }, { "entity_id": 1, "token_idxs": [ 19 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [] }, {...
[ "B-COLUMN", "B-VALUE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "B-TABLE", "O", "O" ]
14,406
financial
bird:dev.json:128
List the top nine districts, by descending order, from the highest to the lowest, the number of female account holders.
SELECT T2.A2, COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' GROUP BY T2.district_id, T2.A2 ORDER BY COUNT(T1.client_id) DESC LIMIT 9
[ "List", "the", "top", "nine", "districts", ",", "by", "descending", "order", ",", "from", "the", "highest", "to", "the", "lowest", ",", "the", "number", "of", "female", "account", "holders", "." ]
[ { "id": 0, "type": "column", "value": "district_id" }, { "id": 6, "type": "column", "value": "client_id" }, { "id": 3, "type": "table", "value": "district" }, { "id": 2, "type": "table", "value": "client" }, { "id": 4, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 0 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O" ]
14,407
superhero
bird:dev.json:797
Which superheroes have blue eyes with brown hair?
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T2.colour = 'Blue' AND T3.colour = 'Brown'
[ "Which", "superheroes", "have", "blue", "eyes", "with", "brown", "hair", "?" ]
[ { "id": 0, "type": "column", "value": "superhero_name" }, { "id": 3, "type": "column", "value": "hair_colour_id" }, { "id": 8, "type": "column", "value": "eye_colour_id" }, { "id": 2, "type": "table", "value": "superhero" }, { "id": 1, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "B-TABLE", "O", "B-VALUE", "O", "O", "B-VALUE", "O", "O" ]
14,408
student_loan
bird:train.json:4470
How many unemployed students have never been absent?
SELECT COUNT(T2.name) FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.month = 0
[ "How", "many", "unemployed", "students", "have", "never", "been", "absent", "?" ]
[ { "id": 0, "type": "table", "value": "longest_absense_from_school" }, { "id": 1, "type": "table", "value": "unemployed" }, { "id": 2, "type": "column", "value": "month" }, { "id": 4, "type": "column", "value": "name" }, { "id": 3, "type": "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
14,409
e_government
spider:train_spider.json:6313
What is the name of the party form that is most common?
SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "party", "form", "that", "is", "most", "common", "?" ]
[ { "id": 3, "type": "table", "value": "party_forms" }, { "id": 1, "type": "column", "value": "form_name" }, { "id": 0, "type": "column", "value": "form_id" }, { "id": 2, "type": "table", "value": "forms" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "O", "O" ]
14,410
farm
spider:train_spider.json:23
Return the themes of farm competitions, sorted by year ascending.
SELECT Theme FROM farm_competition ORDER BY YEAR ASC
[ "Return", "the", "themes", "of", "farm", "competitions", ",", "sorted", "by", "year", "ascending", "." ]
[ { "id": 0, "type": "table", "value": "farm_competition" }, { "id": 1, "type": "column", "value": "theme" }, { "id": 2, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 4, 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-COLUMN", "O", "O" ]
14,411
soccer_2016
bird:train.json:1969
Calculate the win rate of the toss-winners in 2012.
SELECT CAST(SUM(CASE WHEN Toss_Winner = Match_Winner THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN Match_Date LIKE '2012%' THEN 1 ELSE 0 END) FROM `Match`
[ "Calculate", "the", "win", "rate", "of", "the", "toss", "-", "winners", "in", "2012", "." ]
[ { "id": 6, "type": "column", "value": "match_winner" }, { "id": 5, "type": "column", "value": "toss_winner" }, { "id": 3, "type": "column", "value": "match_date" }, { "id": 0, "type": "table", "value": "Match" }, { "id": 4, "type": "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": [ 10 ] }, { "entity_id": 5, "token_idxs": [ 6, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
14,413
language_corpus
bird:train.json:5757
How many words have repetitions greater than 2000 and lower than 5000?
SELECT COUNT(wid) FROM langs_words WHERE occurrences BETWEEN '2000' AND '5000'
[ "How", "many", "words", "have", "repetitions", "greater", "than", "2000", "and", "lower", "than", "5000", "?" ]
[ { "id": 0, "type": "table", "value": "langs_words" }, { "id": 1, "type": "column", "value": "occurrences" }, { "id": 2, "type": "value", "value": "2000" }, { "id": 3, "type": "value", "value": "5000" }, { "id": 4, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 1, 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-VALUE", "O" ]
14,414
coinmarketcap
bird:train.json:6294
How many times was Bytecoin traded in June 2013?
SELECT COUNT(T2.coin_id) FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Bytecoin' AND STRFTIME('%Y-%m', T2.date) = '2013-06'
[ "How", "many", "times", "was", "Bytecoin", "traded", "in", "June", "2013", "?" ]
[ { "id": 1, "type": "table", "value": "historical" }, { "id": 5, "type": "value", "value": "Bytecoin" }, { "id": 2, "type": "column", "value": "coin_id" }, { "id": 6, "type": "value", "value": "2013-06" }, { "id": 0, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
14,415
body_builder
spider:train_spider.json:1153
What is the average snatch score of body builders?
SELECT avg(Snatch) FROM body_builder
[ "What", "is", "the", "average", "snatch", "score", "of", "body", "builders", "?" ]
[ { "id": 0, "type": "table", "value": "body_builder" }, { "id": 1, "type": "column", "value": "snatch" } ]
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "O" ]
14,416
inn_1
spider:train_spider.json:2643
Which rooms cost between 120 and 150? Give me the room names.
SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
[ "Which", "rooms", "cost", "between", "120", "and", "150", "?", "Give", "me", "the", "room", "names", "." ]
[ { "id": 2, "type": "column", "value": "baseprice" }, { "id": 1, "type": "column", "value": "roomname" }, { "id": 0, "type": "table", "value": "rooms" }, { "id": 3, "type": "value", "value": "120" }, { "id": 4, "type": "value", "value": "150...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 11, 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { ...
[ "O", "B-TABLE", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
14,417
image_and_language
bird:train.json:7595
Calculate the ratio of the total number of images with an object class of "man" and "person".
SELECT CAST(COUNT(CASE WHEN T2.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) AS REAL) / COUNT(CASE WHEN T2.OBJ_CLASS = 'person' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
[ "Calculate", "the", "ratio", "of", "the", "total", "number", "of", "images", "with", "an", "object", "class", "of", "\"", "man", "\"", "and", "\"", "person", "\"", "." ]
[ { "id": 2, "type": "column", "value": "obj_class_id" }, { "id": 1, "type": "table", "value": "obj_classes" }, { "id": 5, "type": "column", "value": "obj_class" }, { "id": 0, "type": "table", "value": "img_obj" }, { "id": 6, "type": "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": [] }, { "entity_id": 5, "token_idxs": [ 11, 12 ]...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "B-VALUE", "O", "O" ]
14,418
movie_3
bird:train.json:9110
Please list the titles of all the films that have more than 2 special features.
SELECT title FROM ( SELECT title, COUNT(special_features) AS num FROM film GROUP BY title ) AS T ORDER BY T.num > 2
[ "Please", "list", "the", "titles", "of", "all", "the", "films", "that", "have", "more", "than", "2", "special", "features", "." ]
[ { "id": 4, "type": "column", "value": "special_features" }, { "id": 0, "type": "column", "value": "title" }, { "id": 1, "type": "table", "value": "film" }, { "id": 2, "type": "column", "value": "num" }, { "id": 3, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 13, 14 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O" ]
14,419
donor
bird:train.json:3249
Name the vendors that sell the item Classroom Keepers Management Center.
SELECT DISTINCT vendor_name FROM resources WHERE item_name = 'Classroom Keepers Management Center'
[ "Name", "the", "vendors", "that", "sell", "the", "item", "Classroom", "Keepers", "Management", "Center", "." ]
[ { "id": 3, "type": "value", "value": "Classroom Keepers Management Center" }, { "id": 1, "type": "column", "value": "vendor_name" }, { "id": 0, "type": "table", "value": "resources" }, { "id": 2, "type": "column", "value": "item_name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 7, 8, 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
14,420
retail_world
bird:train.json:6570
Identify the customer, which placed the largest order in terms of value.
SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID GROUP BY T2.CustomerID ORDER BY SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) DESC LIMIT 1
[ "Identify", "the", "customer", ",", "which", "placed", "the", "largest", "order", "in", "terms", "of", "value", "." ]
[ { "id": 2, "type": "table", "value": "Order Details" }, { "id": 1, "type": "column", "value": "companyname" }, { "id": 0, "type": "column", "value": "customerid" }, { "id": 3, "type": "table", "value": "customers" }, { "id": 6, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "O" ]
14,421
retail_world
bird:train.json:6638
State the company name of all suppliers in USA.
SELECT CompanyName FROM Suppliers WHERE Country = 'USA'
[ "State", "the", "company", "name", "of", "all", "suppliers", "in", "USA", "." ]
[ { "id": 1, "type": "column", "value": "companyname" }, { "id": 0, "type": "table", "value": "suppliers" }, { "id": 2, "type": "column", "value": "country" }, { "id": 3, "type": "value", "value": "USA" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
14,422
network_2
spider:train_spider.json:4436
Find the names of all person sorted in the descending order using age.
SELECT name FROM Person ORDER BY age DESC
[ "Find", "the", "names", "of", "all", "person", "sorted", "in", "the", "descending", "order", "using", "age", "." ]
[ { "id": 0, "type": "table", "value": "person" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
14,423
insurance_and_eClaims
spider:train_spider.json:1542
Find the description of the claim status "Open".
SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = "Open"
[ "Find", "the", "description", "of", "the", "claim", "status", "\"", "Open", "\"", "." ]
[ { "id": 0, "type": "table", "value": "claims_processing_stages" }, { "id": 1, "type": "column", "value": "claim_status_description" }, { "id": 2, "type": "column", "value": "claim_status_name" }, { "id": 3, "type": "column", "value": "Open" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O" ]
14,424
movie_platform
bird:train.json:125
Show the head portrait of the user who gave the most "5" ratings.
SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_score = 5
[ "Show", "the", "head", "portrait", "of", "the", "user", "who", "gave", "the", "most", "\"", "5", "\"", "ratings", "." ]
[ { "id": 0, "type": "column", "value": "user_avatar_image_url" }, { "id": 3, "type": "column", "value": "rating_score" }, { "id": 2, "type": "table", "value": "lists_users" }, { "id": 1, "type": "table", "value": "ratings" }, { "id": 5, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O" ]
14,425
music_2
spider:train_spider.json:5208
How many songs have used the instrument "drums"?
SELECT count(*) FROM instruments WHERE instrument = "drums"
[ "How", "many", "songs", "have", "used", "the", "instrument", "\"", "drums", "\"", "?" ]
[ { "id": 0, "type": "table", "value": "instruments" }, { "id": 1, "type": "column", "value": "instrument" }, { "id": 2, "type": "column", "value": "drums" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "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", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
14,426
sales
bird:train.json:5370
What is the name of the product with the lowest quantity?
SELECT T2.Name FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Quantity LIMIT 1
[ "What", "is", "the", "name", "of", "the", "product", "with", "the", "lowest", "quantity", "?" ]
[ { "id": 4, "type": "column", "value": "productid" }, { "id": 2, "type": "table", "value": "products" }, { "id": 3, "type": "column", "value": "quantity" }, { "id": 1, "type": "table", "value": "sales" }, { "id": 0, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
14,427
talkingdata
bird:train.json:1239
How many of the apps belong in the "Equity Fund" 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 = 'Equity Fund'
[ "How", "many", "of", "the", "apps", "belong", "in", "the", "\"", "Equity", "Fund", "\"", "category", "?" ]
[ { "id": 1, "type": "table", "value": "label_categories" }, { "id": 3, "type": "value", "value": "Equity Fund" }, { "id": 0, "type": "table", "value": "app_labels" }, { "id": 2, "type": "column", "value": "category" }, { "id": 5, "type": "column...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-COLUMN", "O" ]
14,429
mondial_geo
bird:train.json:8467
Name all countries in which have border with Bulgaria.
SELECT T3.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 WHERE T1.Name = 'Bulgaria'
[ "Name", "all", "countries", "in", "which", "have", "border", "with", "Bulgaria", "." ]
[ { "id": 2, "type": "value", "value": "Bulgaria" }, { "id": 5, "type": "column", "value": "country2" }, { "id": 6, "type": "column", "value": "country1" }, { "id": 1, "type": "table", "value": "country" }, { "id": 3, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [ 0 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_...
[ "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
14,430
talkingdata
bird:train.json:1229
How many male users have the log of events at the same longitude of 114?
SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE T2.longitude = 114 AND T1.gender = 'M'
[ "How", "many", "male", "users", "have", "the", "log", "of", "events", "at", "the", "same", "longitude", "of", "114", "?" ]
[ { "id": 1, "type": "table", "value": "events_relevant" }, { "id": 0, "type": "table", "value": "gender_age" }, { "id": 2, "type": "column", "value": "device_id" }, { "id": 3, "type": "column", "value": "longitude" }, { "id": 5, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 8, 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
14,431
movie_3
bird:train.json:9200
List the actors' IDs who have "KILMER" as last name.
SELECT actor_id FROM actor WHERE last_name = 'KILMER'
[ "List", "the", "actors", "'", "IDs", "who", "have", "\"", "KILMER", "\"", "as", "last", "name", "." ]
[ { "id": 2, "type": "column", "value": "last_name" }, { "id": 1, "type": "column", "value": "actor_id" }, { "id": 3, "type": "value", "value": "KILMER" }, { "id": 0, "type": "table", "value": "actor" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
14,433
address
bird:train.json:5178
Which city has the most bad aliases?
SELECT T2.city FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T1.bad_alias ORDER BY COUNT(T1.zip_code) DESC LIMIT 1
[ "Which", "city", "has", "the", "most", "bad", "aliases", "?" ]
[ { "id": 0, "type": "column", "value": "bad_alias" }, { "id": 3, "type": "table", "value": "zip_data" }, { "id": 4, "type": "column", "value": "zip_code" }, { "id": 2, "type": "table", "value": "avoid" }, { "id": 1, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
14,434
thrombosis_prediction
bird:dev.json:1296
What is the anti-nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range?
SELECT T3.ANA FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.`T-BIL` < 2.0 ORDER BY T2.`T-BIL` DESC LIMIT 1
[ "What", "is", "the", "anti", "-", "nucleus", "antibody", "concentration", "of", "the", "patient", "whose", "total", "bilirubin", "is", "the", "highest", "in", "the", "normal", "range", "?" ]
[ { "id": 1, "type": "table", "value": "examination" }, { "id": 5, "type": "table", "value": "laboratory" }, { "id": 4, "type": "table", "value": "patient" }, { "id": 2, "type": "column", "value": "T-BIL" }, { "id": 0, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
14,435
talkingdata
bird:train.json:1058
List the app users IDs and installed status for the event ID of 844.
SELECT app_id , IIF(is_installed = 1, 'YES', 'NO') AS status FROM app_events WHERE event_id = 844
[ "List", "the", "app", "users", "IDs", "and", "installed", "status", "for", "the", "event", "ID", "of", "844", "." ]
[ { "id": 6, "type": "column", "value": "is_installed" }, { "id": 0, "type": "table", "value": "app_events" }, { "id": 2, "type": "column", "value": "event_id" }, { "id": 1, "type": "column", "value": "app_id" }, { "id": 3, "type": "value", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
14,436
coinmarketcap
bird:train.json:6262
Name the coin that have higher than average percentage price changed from the previous 24 hours for transaction on 2013/6/22.
SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2020-06-22' GROUP BY T1.name HAVING AVG(T2.percent_change_24h) > T2.PRICE
[ "Name", "the", "coin", "that", "have", "higher", "than", "average", "percentage", "price", "changed", "from", "the", "previous", "24", "hours", "for", "transaction", "on", "2013/6/22", "." ]
[ { "id": 8, "type": "column", "value": "percent_change_24h" }, { "id": 2, "type": "table", "value": "historical" }, { "id": 4, "type": "value", "value": "2020-06-22" }, { "id": 7, "type": "column", "value": "coin_id" }, { "id": 1, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 0 ] }, { "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": ...
[ "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
14,437
network_2
spider:train_spider.json:4398
How many friends does Dan have?
SELECT count(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'
[ "How", "many", "friends", "does", "Dan", "have", "?" ]
[ { "id": 1, "type": "table", "value": "personfriend" }, { "id": 0, "type": "table", "value": "person" }, { "id": 4, "type": "column", "value": "friend" }, { "id": 2, "type": "column", "value": "name" }, { "id": 3, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
14,438
retail_complains
bird:train.json:281
What is the number of complaints related to Credit cards came from female clients?
SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T2.Product = 'Credit card'
[ "What", "is", "the", "number", "of", "complaints", "related", "to", "Credit", "cards", "came", "from", "female", "clients", "?" ]
[ { "id": 6, "type": "value", "value": "Credit card" }, { "id": 3, "type": "column", "value": "client_id" }, { "id": 5, "type": "column", "value": "product" }, { "id": 0, "type": "table", "value": "client" }, { "id": 1, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "B-TABLE", "O" ]
14,439
insurance_policies
spider:train_spider.json:3884
What are all the distinct details of the customers?
SELECT DISTINCT customer_details FROM Customers
[ "What", "are", "all", "the", "distinct", "details", "of", "the", "customers", "?" ]
[ { "id": 1, "type": "column", "value": "customer_details" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
14,440
computer_student
bird:train.json:968
How many professors are teaching course ID 18?
SELECT COUNT(DISTINCT p_id) FROM taughtBy WHERE course_id = 18
[ "How", "many", "professors", "are", "teaching", "course", "ID", "18", "?" ]
[ { "id": 1, "type": "column", "value": "course_id" }, { "id": 0, "type": "table", "value": "taughtby" }, { "id": 3, "type": "column", "value": "p_id" }, { "id": 2, "type": "value", "value": "18" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "B-VALUE", "O" ]
14,442
soccer_2016
bird:train.json:1939
Write down the name of players whose bowling skill is Legbreak.
SELECT T2.Player_Name FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T1.Bowling_Id = T2.Bowling_skill WHERE T1.Bowling_skill = 'Legbreak'
[ "Write", "down", "the", "name", "of", "players", "whose", "bowling", "skill", "is", "Legbreak", "." ]
[ { "id": 1, "type": "table", "value": "bowling_style" }, { "id": 3, "type": "column", "value": "bowling_skill" }, { "id": 0, "type": "column", "value": "player_name" }, { "id": 5, "type": "column", "value": "bowling_id" }, { "id": 4, "type": "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "O" ]
14,443
planet_1
bird:test.json:1900
What are the ids for all shipments on the planet Mars that Turanga Leela manages?
SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" OR T3.Name = "Turanga Leela";
[ "What", "are", "the", "ids", "for", "all", "shipments", "on", "the", "planet", "Mars", "that", "Turanga", "Leela", "manages", "?" ]
[ { "id": 8, "type": "column", "value": "Turanga Leela" }, { "id": 0, "type": "column", "value": "shipmentid" }, { "id": 4, "type": "column", "value": "employeeid" }, { "id": 1, "type": "table", "value": "employee" }, { "id": 2, "type": "table", ...
[ { "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": [ 14 ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O" ]
14,444
driving_school
spider:train_spider.json:6696
List all payment methods and number of payments using each payment methods.
SELECT payment_method_code , count(*) FROM Customer_Payments GROUP BY payment_method_code;
[ "List", "all", "payment", "methods", "and", "number", "of", "payments", "using", "each", "payment", "methods", "." ]
[ { "id": 1, "type": "column", "value": "payment_method_code" }, { "id": 0, "type": "table", "value": "customer_payments" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O", "O", "O", "O", "O" ]
14,445
codebase_comments
bird:train.json:619
Show the solution path for the method "Mosa.Platform.x86.Instructions.IMul.EmitLegacy"?
SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'Mosa.Platform.x86.Instructions.IMul.EmitLegacy'
[ "Show", "the", "solution", "path", "for", "the", "method", "\"", "Mosa", ".", "Platform.x86.Instructions", ".", "IMul", ".", "EmitLegacy", "\"", "?" ]
[ { "id": 4, "type": "value", "value": "Mosa.Platform.x86.Instructions.IMul.EmitLegacy" }, { "id": 6, "type": "column", "value": "solutionid" }, { "id": 1, "type": "table", "value": "solution" }, { "id": 2, "type": "table", "value": "method" }, { "id...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8, 9, 10, 1...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
14,446
region_building
bird:test.json:347
List the names of regions that do not have any buildings.
SELECT Name FROM region WHERE Region_ID NOT IN (SELECT Region_ID FROM building)
[ "List", "the", "names", "of", "regions", "that", "do", "not", "have", "any", "buildings", "." ]
[ { "id": 2, "type": "column", "value": "region_id" }, { "id": 3, "type": "table", "value": "building" }, { "id": 0, "type": "table", "value": "region" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
14,447
restaurant
bird:train.json:1742
How many cities are located in the Bay Area?
SELECT COUNT(city) FROM geographic WHERE region = 'bay area'
[ "How", "many", "cities", "are", "located", "in", "the", "Bay", "Area", "?" ]
[ { "id": 0, "type": "table", "value": "geographic" }, { "id": 2, "type": "value", "value": "bay area" }, { "id": 1, "type": "column", "value": "region" }, { "id": 3, "type": "column", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O" ]
14,448
flight_4
spider:train_spider.json:6812
What is the highest elevation of an airport in the country of Iceland?
SELECT max(elevation) FROM airports WHERE country = 'Iceland'
[ "What", "is", "the", "highest", "elevation", "of", "an", "airport", "in", "the", "country", "of", "Iceland", "?" ]
[ { "id": 3, "type": "column", "value": "elevation" }, { "id": 0, "type": "table", "value": "airports" }, { "id": 1, "type": "column", "value": "country" }, { "id": 2, "type": "value", "value": "Iceland" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
14,449
college_1
spider:train_spider.json:3173
Find the number of professors in accounting department.
SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = "Accounting"
[ "Find", "the", "number", "of", "professors", "in", "accounting", "department", "." ]
[ { "id": 1, "type": "table", "value": "department" }, { "id": 3, "type": "column", "value": "Accounting" }, { "id": 0, "type": "table", "value": "professor" }, { "id": 2, "type": "column", "value": "dept_name" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "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, "...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "O" ]