question_id
int64
0
16.1k
db_id
stringclasses
259 values
dber_id
stringlengths
15
29
question
stringlengths
16
325
SQL
stringlengths
18
1.25k
tokens
listlengths
4
62
entities
listlengths
0
21
entity_to_token
listlengths
20
20
dber_tags
listlengths
4
62
5,370
world_development_indicators
bird:train.json:2186
What country have the series code of SP.DYN.CBRT.IN?
SELECT T1.ShortName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.SeriesCode = 'SP.DYN.CBRT.IN'
[ "What", "country", "have", "the", "series", "code", "of", "SP.DYN.CBRT.IN", "?" ]
[ { "id": 4, "type": "value", "value": "SP.DYN.CBRT.IN" }, { "id": 2, "type": "table", "value": "countrynotes" }, { "id": 5, "type": "column", "value": "countrycode" }, { "id": 3, "type": "column", "value": "seriescode" }, { "id": 0, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4, 5 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id":...
[ "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
5,371
soccer_2
spider:train_spider.json:5042
Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.
SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')
[ "Find", "names", "of", "all", "colleges", "whose", "enrollment", "is", "greater", "than", "that", "of", "all", "colleges", "in", "the", "FL", "state", "." ]
[ { "id": 0, "type": "table", "value": "college" }, { "id": 1, "type": "column", "value": "cname" }, { "id": 3, "type": "column", "value": "state" }, { "id": 2, "type": "column", "value": "enr" }, { "id": 4, "type": "value", "value": "FL" }...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "enti...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
5,372
art_1
bird:test.json:1222
What is the age of the artist who had the shortest life?
SELECT deathYear - birthYear FROM artists ORDER BY deathYear - birthYear LIMIT 1
[ "What", "is", "the", "age", "of", "the", "artist", "who", "had", "the", "shortest", "life", "?" ]
[ { "id": 1, "type": "column", "value": "deathyear" }, { "id": 2, "type": "column", "value": "birthyear" }, { "id": 0, "type": "table", "value": "artists" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
5,373
car_racing
bird:test.json:1639
What are the manager and car owner of the team that has at least 2 drivers?
SELECT t1.manager , t1.car_owner FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id HAVING count(*) >= 2
[ "What", "are", "the", "manager", "and", "car", "owner", "of", "the", "team", "that", "has", "at", "least", "2", "drivers", "?" ]
[ { "id": 4, "type": "table", "value": "team_driver" }, { "id": 2, "type": "column", "value": "car_owner" }, { "id": 0, "type": "column", "value": "team_id" }, { "id": 1, "type": "column", "value": "manager" }, { "id": 3, "type": "table", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
5,374
financial
bird:dev.json:137
How many accounts have running contracts in Branch location 1?
SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T1.district_id = 1 AND (T3.status = 'C' OR T3.status = 'D')
[ "How", "many", "accounts", "have", "running", "contracts", "in", "Branch", "location", "1", "?" ]
[ { "id": 4, "type": "column", "value": "district_id" }, { "id": 1, "type": "column", "value": "account_id" }, { "id": 3, "type": "table", "value": "district" }, { "id": 2, "type": "table", "value": "account" }, { "id": 6, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "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", "O", "O", "B-TABLE", "B-VALUE", "O" ]
5,375
gas_company
spider:train_spider.json:2009
List the main industry with highest total market value and its number of companies.
SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1
[ "List", "the", "main", "industry", "with", "highest", "total", "market", "value", "and", "its", "number", "of", "companies", "." ]
[ { "id": 1, "type": "column", "value": "main_industry" }, { "id": 2, "type": "column", "value": "market_value" }, { "id": 0, "type": "table", "value": "company" } ]
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "e...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
5,376
wine_1
spider:train_spider.json:6547
Find the the grape whose white color grapes are used to produce wines with scores higher than 90.
SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" AND T2.score > 90
[ "Find", "the", "the", "grape", "whose", "white", "color", "grapes", "are", "used", "to", "produce", "wines", "with", "scores", "higher", "than", "90", "." ]
[ { "id": 1, "type": "table", "value": "grapes" }, { "id": 0, "type": "column", "value": "grape" }, { "id": 3, "type": "column", "value": "color" }, { "id": 4, "type": "column", "value": "White" }, { "id": 5, "type": "column", "value": "score...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-COLUMN", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
5,377
soccer_2016
bird:train.json:1884
What is the city of M Chinnaswamy Stadium?
SELECT T1.City_Name FROM City AS T1 INNER JOIN Venue AS T2 ON T2.City_Id = T1.City_Id WHERE T2.Venue_Name = 'M Chinnaswamy Stadium'
[ "What", "is", "the", "city", "of", "M", "Chinnaswamy", "Stadium", "?" ]
[ { "id": 4, "type": "value", "value": "M Chinnaswamy Stadium" }, { "id": 3, "type": "column", "value": "venue_name" }, { "id": 0, "type": "column", "value": "city_name" }, { "id": 5, "type": "column", "value": "city_id" }, { "id": 2, "type": "ta...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
5,379
news_report
spider:train_spider.json:2813
Show the names of journalists and the names of the events they reported in ascending order
SELECT T3.Name , T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance ASC
[ "Show", "the", "names", "of", "journalists", "and", "the", "names", "of", "the", "events", "they", "reported", "in", "ascending", "order" ]
[ { "id": 2, "type": "column", "value": "event_attendance" }, { "id": 5, "type": "column", "value": "journalist_id" }, { "id": 3, "type": "table", "value": "news_report" }, { "id": 1, "type": "table", "value": "journalist" }, { "id": 6, "type": "...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entit...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "O" ]
5,380
browser_web
spider:train_spider.json:1834
What is the id and name of the browser that is compatible with the most web accelerators?
SELECT T1.id , T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "i", "d", "and", "name", "of", "the", "browser", "that", "is", "compatible", "with", "the", "most", "web", "accelerators", "?" ]
[ { "id": 3, "type": "table", "value": "accelerator_compatible_browser" }, { "id": 4, "type": "column", "value": "browser_id" }, { "id": 2, "type": "table", "value": "browser" }, { "id": 1, "type": "column", "value": "name" }, { "id": 0, "type": ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,381
shakespeare
bird:train.json:3030
From 1593 onwards, what is the difference between the number of comedy works and history works?
SELECT SUM(IIF(GenreType = 'Comedy', 1, 0)) - SUM(IIF(GenreType = 'History', 1, 0)) FROM works WHERE Date > 1593
[ "From", "1593", "onwards", ",", "what", "is", "the", "difference", "between", "the", "number", "of", "comedy", "works", "and", "history", "works", "?" ]
[ { "id": 5, "type": "column", "value": "genretype" }, { "id": 7, "type": "value", "value": "History" }, { "id": 6, "type": "value", "value": "Comedy" }, { "id": 0, "type": "table", "value": "works" }, { "id": 1, "type": "column", "value": "d...
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "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-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-VALUE", "B-TABLE", "O" ]
5,382
world_development_indicators
bird:train.json:2102
How many footnotes did Aruba got on different series code in the year 2002?
SELECT COUNT(T2.SeriesCode) FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Year = 'YR2002'
[ "How", "many", "footnotes", "did", "Aruba", "got", "on", "different", "series", "code", "in", "the", "year", "2002", "?" ]
[ { "id": 3, "type": "column", "value": "countrycode" }, { "id": 2, "type": "column", "value": "seriescode" }, { "id": 1, "type": "table", "value": "footnotes" }, { "id": 4, "type": "column", "value": "shortname" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
5,383
school_finance
spider:train_spider.json:1898
Show the names of all the donors except those whose donation amount less than 9.
SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9
[ "Show", "the", "names", "of", "all", "the", "donors", "except", "those", "whose", "donation", "amount", "less", "than", "9", "." ]
[ { "id": 1, "type": "column", "value": "donator_name" }, { "id": 0, "type": "table", "value": "endowment" }, { "id": 2, "type": "column", "value": "amount" }, { "id": 3, "type": "value", "value": "9" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
5,384
works_cycles
bird:train.json:7145
Which sales person made the sale of 1635823.3967 last year? Give the Business Entity ID.
SELECT BusinessEntityID FROM SalesPerson WHERE SalesLastYear = '1635823.3967'
[ "Which", "sales", "person", "made", "the", "sale", "of", "1635823.3967", "last", "year", "?", "Give", "the", "Business", "Entity", "ID", "." ]
[ { "id": 1, "type": "column", "value": "businessentityid" }, { "id": 2, "type": "column", "value": "saleslastyear" }, { "id": 3, "type": "value", "value": "1635823.3967" }, { "id": 0, "type": "table", "value": "salesperson" } ]
[ { "entity_id": 0, "token_idxs": [ 1, 2 ] }, { "entity_id": 1, "token_idxs": [ 13, 14, 15 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, ...
[ "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
5,385
public_review_platform
bird:train.json:3891
Among the active businesses located at Chandler, AZ, list the category and atrributes of business with a medium review count.
SELECT T3.category_name, T5.attribute_name FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id INNER JOIN Business_Attributes AS T4 ON T1.business_id = T4.business_id INNER JOIN Attributes ...
[ "Among", "the", "active", "businesses", "located", "at", "Chandler", ",", "AZ", ",", "list", "the", "category", "and", "atrributes", "of", "business", "with", "a", "medium", "review", "count", "." ]
[ { "id": 3, "type": "table", "value": "business_attributes" }, { "id": 16, "type": "table", "value": "business_categories" }, { "id": 1, "type": "column", "value": "attribute_name" }, { "id": 0, "type": "column", "value": "category_name" }, { "id": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2 ...
[ "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O" ]
5,386
customers_and_invoices
spider:train_spider.json:1599
Show the invoice number and the number of transactions for each invoice.
SELECT invoice_number , count(*) FROM Financial_transactions GROUP BY invoice_number
[ "Show", "the", "invoice", "number", "and", "the", "number", "of", "transactions", "for", "each", "invoice", "." ]
[ { "id": 0, "type": "table", "value": "financial_transactions" }, { "id": 1, "type": "column", "value": "invoice_number" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "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", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
5,387
soccer_2016
bird:train.json:1995
Provide the losing team's name in the match ID 336039.
SELECT Team_Name FROM Team WHERE Team_Id = ( SELECT CASE WHEN Team_1 = Match_Winner THEN Team_2 ELSE Team_1 END FROM Match WHERE match_id = 336039 )
[ "Provide", "the", "losing", "team", "'s", "name", "in", "the", "match", "ID", "336039", "." ]
[ { "id": 8, "type": "column", "value": "match_winner" }, { "id": 1, "type": "column", "value": "team_name" }, { "id": 4, "type": "column", "value": "match_id" }, { "id": 2, "type": "column", "value": "team_id" }, { "id": 5, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
5,388
boat_1
bird:test.json:898
How many reservations exist for each boat that has more than 1 reservation already?
SELECT bid , count(*) FROM Reserves GROUP BY bid HAVING count(*) > 1
[ "How", "many", "reservations", "exist", "for", "each", "boat", "that", "has", "more", "than", "1", "reservation", "already", "?" ]
[ { "id": 0, "type": "table", "value": "reserves" }, { "id": 1, "type": "column", "value": "bid" }, { "id": 2, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O" ]
5,389
sales
bird:train.json:5403
How many sales people managed to sell Headlights - Weatherproof?
SELECT COUNT(T2.SalesPersonID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Headlights - Weatherproof'
[ "How", "many", "sales", "people", "managed", "to", "sell", "Headlights", "-", "Weatherproof", "?" ]
[ { "id": 3, "type": "value", "value": "Headlights - Weatherproof" }, { "id": 4, "type": "column", "value": "salespersonid" }, { "id": 5, "type": "column", "value": "productid" }, { "id": 0, "type": "table", "value": "products" }, { "id": 1, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "en...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
5,390
pilot_1
bird:test.json:1115
Who is the youngest pilot to fly the plane Piper Cub?
SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' ORDER BY age LIMIT 1
[ "Who", "is", "the", "youngest", "pilot", "to", "fly", "the", "plane", "Piper", "Cub", "?" ]
[ { "id": 0, "type": "table", "value": "pilotskills" }, { "id": 1, "type": "column", "value": "pilot_name" }, { "id": 2, "type": "column", "value": "plane_name" }, { "id": 3, "type": "value", "value": "Piper Cub" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "O" ]
5,391
beer_factory
bird:train.json:5292
Calculate the percentage of sales done at Sac State American River Courtyard.
SELECT CAST(COUNT(CASE WHEN T2.LocationName = 'Sac State American River Courtyard' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.TransactionID) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID
[ "Calculate", "the", "percentage", "of", "sales", "done", "at", "Sac", "State", "American", "River", "Courtyard", "." ]
[ { "id": 7, "type": "value", "value": "Sac State American River Courtyard" }, { "id": 4, "type": "column", "value": "transactionid" }, { "id": 6, "type": "column", "value": "locationname" }, { "id": 0, "type": "table", "value": "transaction" }, { "i...
[ { "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", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
5,392
university
bird:train.json:8051
How many universities had above 30% of international students in 2013?
SELECT COUNT(*) FROM university_year WHERE pct_international_students > 30 AND year = 2013
[ "How", "many", "universities", "had", "above", "30", "%", "of", "international", "students", "in", "2013", "?" ]
[ { "id": 1, "type": "column", "value": "pct_international_students" }, { "id": 0, "type": "table", "value": "university_year" }, { "id": 3, "type": "column", "value": "year" }, { "id": 4, "type": "value", "value": "2013" }, { "id": 2, "type": "v...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 8, 9 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
5,393
club_1
spider:train_spider.json:4286
Find the location of the club "Pen and Paper Gaming".
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming"
[ "Find", "the", "location", "of", "the", "club", "\"", "Pen", "and", "Paper", "Gaming", "\"", "." ]
[ { "id": 3, "type": "column", "value": "Pen and Paper Gaming" }, { "id": 1, "type": "column", "value": "clublocation" }, { "id": 2, "type": "column", "value": "clubname" }, { "id": 0, "type": "table", "value": "club" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8, 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O" ]
5,394
flight_1
spider:train_spider.json:365
Show ids for all employees with at least 100000 salary.
SELECT eid FROM Employee WHERE salary > 100000
[ "Show", "ids", "for", "all", "employees", "with", "at", "least", "100000", "salary", "." ]
[ { "id": 0, "type": "table", "value": "employee" }, { "id": 2, "type": "column", "value": "salary" }, { "id": 3, "type": "value", "value": "100000" }, { "id": 1, "type": "column", "value": "eid" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
5,395
olympics
bird:train.json:4925
What is the average height of the male Olympic competitors from Finland?
SELECT AVG(T3.height) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland' AND T3.gender = 'M'
[ "What", "is", "the", "average", "height", "of", "the", "male", "Olympic", "competitors", "from", "Finland", "?" ]
[ { "id": 3, "type": "table", "value": "person_region" }, { "id": 6, "type": "column", "value": "region_name" }, { "id": 2, "type": "table", "value": "noc_region" }, { "id": 4, "type": "column", "value": "person_id" }, { "id": 10, "type": "column...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
5,396
aan_1
bird:test.json:968
Count the number of affiliations.
SELECT count(*) FROM Affiliation
[ "Count", "the", "number", "of", "affiliations", "." ]
[ { "id": 0, "type": "table", "value": "affiliation" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O" ]
5,397
planet_1
bird:test.json:1875
What are the contents of package sent by John Zoidfarb?
SELECT T1.Contents FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber WHERE T2.Name = "John Zoidfarb";
[ "What", "are", "the", "contents", "of", "package", "sent", "by", "John", "Zoidfarb", "?" ]
[ { "id": 4, "type": "column", "value": "John Zoidfarb" }, { "id": 6, "type": "column", "value": "accountnumber" }, { "id": 0, "type": "column", "value": "contents" }, { "id": 1, "type": "table", "value": "package" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8, 9 ] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,398
cre_Doc_Tracking_DB
spider:train_spider.json:4214
Show the names of employees with role name Editor.
SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Editor"
[ "Show", "the", "names", "of", "employees", "with", "role", "name", "Editor", "." ]
[ { "id": 0, "type": "column", "value": "employee_name" }, { "id": 1, "type": "table", "value": "employees" }, { "id": 3, "type": "column", "value": "role_name" }, { "id": 5, "type": "column", "value": "role_code" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O" ]
5,399
shakespeare
bird:train.json:2978
How many chapters does the character Demetrius show in the story?
SELECT COUNT(DISTINCT T2.chapter_id) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Demetrius'
[ "How", "many", "chapters", "does", "the", "character", "Demetrius", "show", "in", "the", "story", "?" ]
[ { "id": 6, "type": "column", "value": "character_id" }, { "id": 0, "type": "table", "value": "characters" }, { "id": 1, "type": "table", "value": "paragraphs" }, { "id": 4, "type": "column", "value": "chapter_id" }, { "id": 3, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "O" ]
5,400
authors
bird:train.json:3573
Identify by conference full name all papers in which a journal was not published but a conference.
SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.ConferenceId != 0 AND T1.JournalId = 0 AND T1.Year != 0
[ "Identify", "by", "conference", "full", "name", "all", "papers", "in", "which", "a", "journal", "was", "not", "published", "but", "a", "conference", "." ]
[ { "id": 3, "type": "column", "value": "conferenceid" }, { "id": 2, "type": "table", "value": "conference" }, { "id": 6, "type": "column", "value": "journalid" }, { "id": 0, "type": "column", "value": "fullname" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,401
codebase_community
bird:dev.json:634
Among posts by Harvey Motulsky and Noah Snyder, which one has higher popularity?
SELECT T1.DisplayName FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'Harvey Motulsky' OR T1.DisplayName = 'Noah Snyder' GROUP BY T1.DisplayName ORDER BY SUM(T3.ViewCount) DESC LIMIT 1
[ "Among", "posts", "by", "Harvey", "Motulsky", "and", "Noah", "Snyder", ",", "which", "one", "has", "higher", "popularity", "?" ]
[ { "id": 6, "type": "value", "value": "Harvey Motulsky" }, { "id": 0, "type": "column", "value": "displayname" }, { "id": 3, "type": "table", "value": "posthistory" }, { "id": 7, "type": "value", "value": "Noah Snyder" }, { "id": 8, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "B-TABLE", "B-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O" ]
5,402
theme_gallery
spider:train_spider.json:1680
Return the themes, dates, and attendance for exhibitions that happened in 2004.
SELECT T2.theme , T1.date , T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004
[ "Return", "the", "themes", ",", "dates", ",", "and", "attendance", "for", "exhibitions", "that", "happened", "in", "2004", "." ]
[ { "id": 3, "type": "table", "value": "exhibition_record" }, { "id": 7, "type": "column", "value": "exhibition_id" }, { "id": 2, "type": "column", "value": "attendance" }, { "id": 4, "type": "table", "value": "exhibition" }, { "id": 0, "type": "...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
5,403
sing_contest
bird:test.json:758
What are the name and popularity of participants who have sung a song both in 'Croatian' language and in 'English' language?
SELECT T1.name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'Croatian' INTERSECT SELECT T1.name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOI...
[ "What", "are", "the", "name", "and", "popularity", "of", "participants", "who", "have", "sung", "a", "song", "both", "in", "'", "Croatian", "'", "language", "and", "in", "'", "English", "'", "language", "?" ]
[ { "id": 7, "type": "table", "value": "performance_score" }, { "id": 10, "type": "column", "value": "participant_id" }, { "id": 6, "type": "table", "value": "participants" }, { "id": 1, "type": "column", "value": "popularity" }, { "id": 3, "type...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O" ]
5,404
talkingdata
bird:train.json:1115
What is the age group of most OPPO users?
SELECT T.`group` FROM ( SELECT T1.`group`, COUNT(T1.`group`) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'OPPO' GROUP BY T1.`group` ) AS T ORDER BY T.num DESC LIMIT 1
[ "What", "is", "the", "age", "group", "of", "most", "OPPO", "users", "?" ]
[ { "id": 3, "type": "table", "value": "phone_brand_device_model2" }, { "id": 4, "type": "column", "value": "phone_brand" }, { "id": 2, "type": "table", "value": "gender_age" }, { "id": 6, "type": "column", "value": "device_id" }, { "id": 0, "typ...
[ { "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": [ 7 ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
5,405
formula_1
bird:dev.json:971
Please state the reference name of the oldest German driver.
SELECT driverRef FROM drivers WHERE nationality = 'German' ORDER BY JULIANDAY(dob) ASC LIMIT 1
[ "Please", "state", "the", "reference", "name", "of", "the", "oldest", "German", "driver", "." ]
[ { "id": 2, "type": "column", "value": "nationality" }, { "id": 1, "type": "column", "value": "driverref" }, { "id": 0, "type": "table", "value": "drivers" }, { "id": 3, "type": "value", "value": "German" }, { "id": 4, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
5,406
video_games
bird:train.json:3466
State the game publisher IDs of the games with a platform ID of 16.
SELECT T.game_publisher_id FROM game_platform AS T WHERE T.platform_id = 16
[ "State", "the", "game", "publisher", "IDs", "of", "the", "games", "with", "a", "platform", "ID", "of", "16", "." ]
[ { "id": 1, "type": "column", "value": "game_publisher_id" }, { "id": 0, "type": "table", "value": "game_platform" }, { "id": 2, "type": "column", "value": "platform_id" }, { "id": 3, "type": "value", "value": "16" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_i...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
5,407
address
bird:train.json:5145
State the county for Arecibo City.
SELECT DISTINCT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Arecibo'
[ "State", "the", "county", "for", "Arecibo", "City", "." ]
[ { "id": 2, "type": "table", "value": "zip_data" }, { "id": 5, "type": "column", "value": "zip_code" }, { "id": 1, "type": "table", "value": "country" }, { "id": 4, "type": "value", "value": "Arecibo" }, { "id": 0, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "B-COLUMN", "O" ]
5,408
card_games
bird:dev.json:386
How many cards are having future frame version and what are the legality status of these cards?
SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.frameVersion = 'future'
[ "How", "many", "cards", "are", "having", "future", "frame", "version", "and", "what", "are", "the", "legality", "status", "of", "these", "cards", "?" ]
[ { "id": 2, "type": "column", "value": "frameversion" }, { "id": 1, "type": "table", "value": "legalities" }, { "id": 3, "type": "value", "value": "future" }, { "id": 0, "type": "table", "value": "cards" }, { "id": 5, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O" ]
5,410
school_player
spider:train_spider.json:4882
Show the denomination of the school that has the most players.
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
[ "Show", "the", "denomination", "of", "the", "school", "that", "has", "the", "most", "players", "." ]
[ { "id": 1, "type": "column", "value": "denomination" }, { "id": 0, "type": "column", "value": "school_id" }, { "id": 2, "type": "table", "value": "player" }, { "id": 3, "type": "table", "value": "school" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]
5,411
cre_Doc_Control_Systems
spider:train_spider.json:2111
What is the document status description of the document with id 1?
SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1;
[ "What", "is", "the", "document", "status", "description", "of", "the", "document", "with", "i", "d", "1", "?" ]
[ { "id": 0, "type": "column", "value": "document_status_description" }, { "id": 5, "type": "column", "value": "document_status_code" }, { "id": 1, "type": "table", "value": "ref_document_status" }, { "id": 3, "type": "column", "value": "document_id" }, ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { ...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
5,412
works_cycles
bird:train.json:7388
What is the profit on net of the products that have exactly 200 maximum order quantity? Indicate the name of the vendors to which these products were purchased from.
SELECT T1.LastReceiptCost - T1.StandardPrice, T2.Name FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.MaxOrderQty = 200
[ "What", "is", "the", "profit", "on", "net", "of", "the", "products", "that", "have", "exactly", "200", "maximum", "order", "quantity", "?", "Indicate", "the", "name", "of", "the", "vendors", "to", "which", "these", "products", "were", "purchased", "from", ...
[ { "id": 7, "type": "column", "value": "businessentityid" }, { "id": 5, "type": "column", "value": "lastreceiptcost" }, { "id": 1, "type": "table", "value": "productvendor" }, { "id": 6, "type": "column", "value": "standardprice" }, { "id": 3, "...
[ { "entity_id": 0, "token_idxs": [ 19 ] }, { "entity_id": 1, "token_idxs": [ 26, 27 ] }, { "entity_id": 2, "token_idxs": [ 22 ] }, { "entity_id": 3, "token_idxs": [ 13, 14, 15 ] }, { "entity_id": 4, "tok...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O" ]
5,414
cre_Doc_Workflow
bird:test.json:2047
List all process ids with a document.
SELECT DISTINCT process_id FROM Documents_processes
[ "List", "all", "process", "ids", "with", "a", "document", "." ]
[ { "id": 0, "type": "table", "value": "documents_processes" }, { "id": 1, "type": "column", "value": "process_id" } ]
[ { "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" ]
5,415
financial
bird:dev.json:189
Name the account numbers of female clients who are oldest and have lowest average salary?
SELECT T3.account_id FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN account AS T3 ON T2.district_id = T3.district_id INNER JOIN disp AS T4 ON T1.client_id = T4.client_id AND T4.account_id = T3.account_id WHERE T1.gender = 'F' ORDER BY T1.birth_date ASC, T2.A11 ASC LIMIT 1
[ "Name", "the", "account", "numbers", "of", "female", "clients", "who", "are", "oldest", "and", "have", "lowest", "average", "salary", "?" ]
[ { "id": 9, "type": "column", "value": "district_id" }, { "id": 0, "type": "column", "value": "account_id" }, { "id": 4, "type": "column", "value": "birth_date" }, { "id": 10, "type": "column", "value": "client_id" }, { "id": 8, "type": "table",...
[ { "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": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,416
mondial_geo
bird:train.json:8232
What is the number of growth population for country with the lowest infant mortality?
SELECT T2.Population_Growth * T1.Population FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country WHERE T2.Infant_Mortality IS NOT NULL ORDER BY T2.Infant_Mortality ASC LIMIT 1
[ "What", "is", "the", "number", "of", "growth", "population", "for", "country", "with", "the", "lowest", "infant", "mortality", "?" ]
[ { "id": 3, "type": "column", "value": "population_growth" }, { "id": 2, "type": "column", "value": "infant_mortality" }, { "id": 1, "type": "table", "value": "population" }, { "id": 4, "type": "column", "value": "population" }, { "id": 0, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12, 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,417
flight_1
spider:train_spider.json:436
What is the salaray and name of the employee that is certified to fly the most planes?
SELECT T1.name , T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "salaray", "and", "name", "of", "the", "employee", "that", "is", "certified", "to", "fly", "the", "most", "planes", "?" ]
[ { "id": 4, "type": "table", "value": "certificate" }, { "id": 3, "type": "table", "value": "employee" }, { "id": 2, "type": "column", "value": "salary" }, { "id": 1, "type": "column", "value": "name" }, { "id": 0, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
5,418
app_store
bird:train.json:2538
How many negative comments are there in all the apps with 100,000,000+ installs?
SELECT COUNT(T2.Sentiment) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Installs = '100,000,000+' AND T2.Sentiment = 'Negative'
[ "How", "many", "negative", "comments", "are", "there", "in", "all", "the", "apps", "with", "100,000,000", "+", "installs", "?" ]
[ { "id": 1, "type": "table", "value": "user_reviews" }, { "id": 5, "type": "value", "value": "100,000,000+" }, { "id": 0, "type": "table", "value": "playstore" }, { "id": 2, "type": "column", "value": "sentiment" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O" ]
5,419
e_learning
spider:train_spider.json:3797
Sort the information about course authors and tutors in alphabetical order of the personal name.
SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name
[ "Sort", "the", "information", "about", "course", "authors", "and", "tutors", "in", "alphabetical", "order", "of", "the", "personal", "name", "." ]
[ { "id": 0, "type": "table", "value": "course_authors_and_tutors" }, { "id": 1, "type": "column", "value": "personal_name" } ]
[ { "entity_id": 0, "token_idxs": [ 4, 5, 6, 7 ] }, { "entity_id": 1, "token_idxs": [ 13, 14 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,420
sales
bird:train.json:5383
Among customers with IDs from 1 to 100, what is the highest price of products they purchased?
SELECT T1.Price FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.CustomerID BETWEEN 1 AND 100 ORDER BY T1.Price DESC LIMIT 1
[ "Among", "customers", "with", "IDs", "from", "1", "to", "100", ",", "what", "is", "the", "highest", "price", "of", "products", "they", "purchased", "?" ]
[ { "id": 3, "type": "column", "value": "customerid" }, { "id": 6, "type": "column", "value": "productid" }, { "id": 1, "type": "table", "value": "products" }, { "id": 0, "type": "column", "value": "price" }, { "id": 2, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entit...
[ "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O" ]
5,422
hockey
bird:train.json:7624
State the goalie who has the lowest percentage of goals against among all the shots against recorded. Name the players and season where he played.
SELECT T1.firstName, T1.lastName, T2.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE CAST(T2.GA AS REAL) / T2.SA IS NOT NULL ORDER BY CAST(T2.GA AS REAL) / T2.SA LIMIT 1
[ "State", "the", "goalie", "who", "has", "the", "lowest", "percentage", "of", "goals", "against", "among", "all", "the", "shots", "against", "recorded", ".", "Name", "the", "players", "and", "season", "where", "he", "played", "." ]
[ { "id": 0, "type": "column", "value": "firstname" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 5, "type": "column", "value": "playerid" }, { "id": 4, "type": "table", "value": "goalies" }, { "id": 3, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4, 5 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id"...
[ "O", "O", "B-TABLE", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,423
bike_share_1
bird:train.json:9027
Among the subscriber, how many of them finished the 2nd at Folsom and Civic Center BART (7th at Market) as their start and end stations respectively for no more than 490 seconds under minimum visibility of 4 miles.
SELECT COUNT(T1.id) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.subscription_type = 'Subscriber' AND T2.min_visibility_miles = 4 AND T1.duration < 490 AND T1.start_station_name = '2nd at Folsom' AND T1.end_station_name = 'Civic Center BART (7th at Market)'
[ "Among", "the", "subscriber", ",", "how", "many", "of", "them", "finished", "the", "2nd", "at", "Folsom", "and", "Civic", "Center", "BART", "(", "7th", "at", "Market", ")", "as", "their", "start", "and", "end", "stations", "respectively", "for", "no", "m...
[ { "id": 13, "type": "value", "value": "Civic Center BART (7th at Market)" }, { "id": 6, "type": "column", "value": "min_visibility_miles" }, { "id": 10, "type": "column", "value": "start_station_name" }, { "id": 4, "type": "column", "value": "subscription_...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 23 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2 ...
[ "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-COLUMN", "B-COLUMN", "O", "O", ...
5,424
works_cycles
bird:train.json:7025
Which currency pair's average exchange rate for the day is the highest?
SELECT FromCurrencyCode, ToCurrencyCode FROM CurrencyRate ORDER BY AverageRate DESC LIMIT 1
[ "Which", "currency", "pair", "'s", "average", "exchange", "rate", "for", "the", "day", "is", "the", "highest", "?" ]
[ { "id": 1, "type": "column", "value": "fromcurrencycode" }, { "id": 2, "type": "column", "value": "tocurrencycode" }, { "id": 0, "type": "table", "value": "currencyrate" }, { "id": 3, "type": "column", "value": "averagerate" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,426
social_media
bird:train.json:799
Give the location id of West Sussex State.
SELECT DISTINCT LocationID FROM location WHERE State = 'West Sussex'
[ "Give", "the", "location", "i", "d", "of", "West", "Sussex", "State", "." ]
[ { "id": 3, "type": "value", "value": "West Sussex" }, { "id": 1, "type": "column", "value": "locationid" }, { "id": 0, "type": "table", "value": "location" }, { "id": 2, "type": "column", "value": "state" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 6, 7 ] }, { "entity_id": 4, "token_idxs": [] }...
[ "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O" ]
5,427
station_weather
spider:train_spider.json:3169
Find the id and local authority of the station with has the highest average high temperature.
SELECT t2.id , t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY avg(high_temperature) DESC LIMIT 1
[ "Find", "the", "i", "d", "and", "local", "authority", "of", "the", "station", "with", "has", "the", "highest", "average", "high", "temperature", "." ]
[ { "id": 5, "type": "column", "value": "high_temperature" }, { "id": 2, "type": "column", "value": "local_authority" }, { "id": 3, "type": "table", "value": "weekly_weather" }, { "id": 0, "type": "column", "value": "station_id" }, { "id": 4, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "en...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,428
movies_4
bird:train.json:427
Tell the number of movies made by Paramount Animation.
SELECT COUNT(T2.movie_id) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id WHERE T1.company_name = 'Paramount Animation'
[ "Tell", "the", "number", "of", "movies", "made", "by", "Paramount", "Animation", "." ]
[ { "id": 3, "type": "value", "value": "Paramount Animation" }, { "id": 0, "type": "table", "value": "production_company" }, { "id": 1, "type": "table", "value": "movie_company" }, { "id": 2, "type": "column", "value": "company_name" }, { "id": 5, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "en...
[ "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "B-VALUE", "I-VALUE", "O" ]
5,429
european_football_2
bird:dev.json:1120
Sum up the away team goal scored by both Daan Smith and Filipe Ferreira.
SELECT SUM(t2.away_team_goal) FROM Player AS t1 INNER JOIN match AS t2 ON t1.player_api_id = t2.away_player_5 WHERE t1.player_name IN ('Daan Smith', 'Filipe Ferreira')
[ "Sum", "up", "the", "away", "team", "goal", "scored", "by", "both", "Daan", "Smith", "and", "Filipe", "Ferreira", "." ]
[ { "id": 4, "type": "value", "value": "Filipe Ferreira" }, { "id": 5, "type": "column", "value": "away_team_goal" }, { "id": 6, "type": "column", "value": "player_api_id" }, { "id": 7, "type": "column", "value": "away_player_5" }, { "id": 2, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 12, 13 ] }, { "entity_i...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O" ]
5,430
student_club
bird:dev.json:1360
What percentage was the budget for Parking to the total budget for the "November Speaker"?
SELECT CAST(SUM(CASE WHEN T1.category = 'Parking' THEN T1.amount ELSE 0 END) AS REAL) * 100 / SUM(T1.amount) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'November Speaker'
[ "What", "percentage", "was", "the", "budget", "for", "Parking", "to", "the", "total", "budget", "for", "the", "\"", "November", "Speaker", "\"", "?" ]
[ { "id": 3, "type": "value", "value": "November Speaker" }, { "id": 4, "type": "column", "value": "link_to_event" }, { "id": 2, "type": "column", "value": "event_name" }, { "id": 5, "type": "column", "value": "event_id" }, { "id": 9, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 14, 15 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O" ]
5,431
student_club
bird:dev.json:1332
How much did the Student_Club members spend on food in September Meeting?
SELECT T2.spent FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'September Meeting' AND T2.category = 'Food' AND SUBSTR(T1.event_date, 6, 2) = '09'
[ "How", "much", "did", "the", "Student_Club", "members", "spend", "on", "food", "in", "September", "Meeting", "?" ]
[ { "id": 6, "type": "value", "value": "September Meeting" }, { "id": 4, "type": "column", "value": "link_to_event" }, { "id": 5, "type": "column", "value": "event_name" }, { "id": 10, "type": "column", "value": "event_date" }, { "id": 3, "type":...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "I-VALUE", "O" ]
5,432
products_gen_characteristics
spider:train_spider.json:5529
Return the names of products in the category 'Spices'.
SELECT product_name FROM products WHERE product_category_code = "Spices"
[ "Return", "the", "names", "of", "products", "in", "the", "category", "'", "Spices", "'", "." ]
[ { "id": 2, "type": "column", "value": "product_category_code" }, { "id": 1, "type": "column", "value": "product_name" }, { "id": 0, "type": "table", "value": "products" }, { "id": 3, "type": "column", "value": "Spices" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O" ]
5,433
loan_1
spider:train_spider.json:3039
What are the names of customers who do not have saving accounts?
SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'
[ "What", "are", "the", "names", "of", "customers", "who", "do", "not", "have", "saving", "accounts", "?" ]
[ { "id": 1, "type": "column", "value": "cust_name" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 2, "type": "column", "value": "acc_type" }, { "id": 3, "type": "value", "value": "saving" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
5,434
products_gen_characteristics
spider:train_spider.json:5532
How many products are there under the category "Seeds"?
SELECT count(*) FROM products WHERE product_category_code = "Seeds"
[ "How", "many", "products", "are", "there", "under", "the", "category", "\"", "Seeds", "\"", "?" ]
[ { "id": 1, "type": "column", "value": "product_category_code" }, { "id": 0, "type": "table", "value": "products" }, { "id": 2, "type": "column", "value": "Seeds" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
5,435
hockey
bird:train.json:7634
Name the goalies who are good at left hand and also has become a coach after retirement. Name all teams he had played before.
SELECT DISTINCT firstName, lastName, T3.name FROM Goalies AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T1.playerID IS NOT NULL AND T2.coachID IS NOT NULL AND T2.shootCatch = 'L' AND T2.pos = 'G'
[ "Name", "the", "goalies", "who", "are", "good", "at", "left", "hand", "and", "also", "has", "become", "a", "coach", "after", "retirement", ".", "Name", "all", "teams", "he", "had", "played", "before", "." ]
[ { "id": 9, "type": "column", "value": "shootcatch" }, { "id": 0, "type": "column", "value": "firstname" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 7, "type": "column", "value": "playerid" }, { "id": 4, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 18 ] }, { "entity_id": 3, "token_idxs": [ 20 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O" ]
5,436
cars
bird:train.json:3131
Calculate the percentage of cars that belong to the USA.
SELECT CAST(SUM(CASE WHEN T2.country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin
[ "Calculate", "the", "percentage", "of", "cars", "that", "belong", "to", "the", "USA", "." ]
[ { "id": 0, "type": "table", "value": "production" }, { "id": 1, "type": "table", "value": "country" }, { "id": 2, "type": "column", "value": "country" }, { "id": 3, "type": "column", "value": "origin" }, { "id": 4, "type": "value", "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": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
5,437
book_publishing_company
bird:train.json:232
In 1994 which title had less order quanty than the average order quantity? Find the title name, type and price.
SELECT DISTINCT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE T2.ord_date LIKE '1994%' AND T2.Qty < ( SELECT CAST(SUM(T4.qty) AS REAL) / COUNT(T3.title_id) FROM titles AS T3 INNER JOIN sales AS T4 ON T3.title_id = T4.title_id )
[ "In", "1994", "which", "title", "had", "less", "order", "quanty", "than", "the", "average", "order", "quantity", "?", "Find", "the", "title", "name", ",", "type", "and", "price", "." ]
[ { "id": 5, "type": "column", "value": "title_id" }, { "id": 6, "type": "column", "value": "ord_date" }, { "id": 3, "type": "table", "value": "titles" }, { "id": 0, "type": "column", "value": "title" }, { "id": 2, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 19 ] }, { "entity_id": 2, "token_idxs": [ 21 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "enti...
[ "O", "B-VALUE", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
5,438
shakespeare
bird:train.json:3037
Please list all of the character descriptions in paragraph 20.
SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 20
[ "Please", "list", "all", "of", "the", "character", "descriptions", "in", "paragraph", "20", "." ]
[ { "id": 3, "type": "column", "value": "paragraphnum" }, { "id": 6, "type": "column", "value": "character_id" }, { "id": 0, "type": "column", "value": "description" }, { "id": 1, "type": "table", "value": "characters" }, { "id": 2, "type": "tabl...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "B-VALUE", "O" ]
5,439
music_2
spider:train_spider.json:5182
Find all the songs performed by artist with last name "Heilo"
SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = "Heilo"
[ "Find", "all", "the", "songs", "performed", "by", "artist", "with", "last", "name", "\"", "Heilo", "\"" ]
[ { "id": 4, "type": "table", "value": "performance" }, { "id": 2, "type": "column", "value": "lastname" }, { "id": 7, "type": "column", "value": "bandmate" }, { "id": 6, "type": "column", "value": "songid" }, { "id": 0, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { ...
[ "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O" ]
5,440
student_1
spider:train_spider.json:4030
Find the last names of students studying in room 111.
SELECT lastname FROM list WHERE classroom = 111
[ "Find", "the", "last", "names", "of", "students", "studying", "in", "room", "111", "." ]
[ { "id": 2, "type": "column", "value": "classroom" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 0, "type": "table", "value": "list" }, { "id": 3, "type": "value", "value": "111" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
5,441
entrepreneur
spider:train_spider.json:2294
What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?
SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested
[ "What", "are", "the", "names", "of", "entrepreneurs", "and", "their", "corresponding", "investors", ",", "ordered", "descending", "by", "the", "amount", "of", "money", "requested", "?" ]
[ { "id": 4, "type": "column", "value": "money_requested" }, { "id": 2, "type": "table", "value": "entrepreneur" }, { "id": 5, "type": "column", "value": "people_id" }, { "id": 1, "type": "column", "value": "company" }, { "id": 3, "type": "table"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 17, 18 ] }, { "entity_id...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,443
works_cycles
bird:train.json:7423
What is the e-mail address of the employee who switched departments for the most times?
SELECT T2.EmailAddress FROM EmployeeDepartmentHistory AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID GROUP BY T2.BusinessEntityID ORDER BY COUNT(T1.DepartmentID) DESC LIMIT 1
[ "What", "is", "the", "e", "-", "mail", "address", "of", "the", "employee", "who", "switched", "departments", "for", "the", "most", "times", "?" ]
[ { "id": 2, "type": "table", "value": "employeedepartmenthistory" }, { "id": 0, "type": "column", "value": "businessentityid" }, { "id": 1, "type": "column", "value": "emailaddress" }, { "id": 3, "type": "table", "value": "emailaddress" }, { "id": 4...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9, 10, 11, 13 ] }, { "entity_id": 3, "token_idxs": [ 3, 4, 5, 6 ] }, { "entity_id": 4, "token_...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "I-TABLE", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "B-COLUMN", "B-TABLE", "O", "O", "O", "O" ]
5,444
culture_company
spider:train_spider.json:6992
What is the average, maximum, and minimum budget for all movies before 2000.
SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000
[ "What", "is", "the", "average", ",", "maximum", ",", "and", "minimum", "budget", "for", "all", "movies", "before", "2000", "." ]
[ { "id": 3, "type": "column", "value": "budget_million" }, { "id": 0, "type": "table", "value": "movie" }, { "id": 1, "type": "column", "value": "year" }, { "id": 2, "type": "value", "value": "2000" } ]
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
5,445
bike_1
spider:train_spider.json:116
What is the station station and end station for the trips with the three smallest ids?
SELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3
[ "What", "is", "the", "station", "station", "and", "end", "station", "for", "the", "trips", "with", "the", "three", "smallest", "ids", "?" ]
[ { "id": 1, "type": "column", "value": "start_station_name" }, { "id": 2, "type": "column", "value": "end_station_name" }, { "id": 0, "type": "table", "value": "trip" }, { "id": 3, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,446
european_football_2
bird:dev.json:1117
What are the player api id of 10 heaviest players?
SELECT player_api_id FROM Player ORDER BY weight DESC LIMIT 10
[ "What", "are", "the", "player", "api", "i", "d", "of", "10", "heaviest", "players", "?" ]
[ { "id": 1, "type": "column", "value": "player_api_id" }, { "id": 0, "type": "table", "value": "player" }, { "id": 2, "type": "column", "value": "weight" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 0 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O" ]
5,447
california_schools
bird:dev.json:70
How many active and closed District Community Day Schools are there in the county of Alpine?
SELECT COUNT(School) FROM schools WHERE (StatusType = 'Closed' OR StatusType = 'Active') AND SOC = 69 AND County = 'Alpine'
[ "How", "many", "active", "and", "closed", "District", "Community", "Day", "Schools", "are", "there", "in", "the", "county", "of", "Alpine", "?" ]
[ { "id": 6, "type": "column", "value": "statustype" }, { "id": 0, "type": "table", "value": "schools" }, { "id": 1, "type": "column", "value": "school" }, { "id": 4, "type": "column", "value": "county" }, { "id": 5, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
5,448
institution_sports
bird:test.json:1674
What are the nicknames of institutions, ordered descending by their capacities?
SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID ORDER BY T2.Capacity DESC
[ "What", "are", "the", "nicknames", "of", "institutions", ",", "ordered", "descending", "by", "their", "capacities", "?" ]
[ { "id": 4, "type": "column", "value": "institution_id" }, { "id": 1, "type": "table", "value": "championship" }, { "id": 2, "type": "table", "value": "institution" }, { "id": 0, "type": "column", "value": "nickname" }, { "id": 3, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,449
sales
bird:train.json:5369
List down the product name for products from id 1 to 10.
SELECT Name FROM Products WHERE ProductID BETWEEN 1 AND 10
[ "List", "down", "the", "product", "name", "for", "products", "from", "i", "d", "1", "to", "10", "." ]
[ { "id": 2, "type": "column", "value": "productid" }, { "id": 0, "type": "table", "value": "products" }, { "id": 1, "type": "column", "value": "name" }, { "id": 4, "type": "value", "value": "10" }, { "id": 3, "type": "value", "value": "1" ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, ...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
5,450
voter_2
spider:train_spider.json:5452
Find the last names of students with major 50.
SELECT LName FROM STUDENT WHERE Major = 50
[ "Find", "the", "last", "names", "of", "students", "with", "major", "50", "." ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "lname" }, { "id": 2, "type": "column", "value": "major" }, { "id": 3, "type": "value", "value": "50" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O" ]
5,451
real_estate_rentals
bird:test.json:1425
Return the ids of users who have performed two or more searches, as well as their search sequence.
SELECT search_seq , user_id FROM User_Searches GROUP BY user_id HAVING count(*) >= 2;
[ "Return", "the", "ids", "of", "users", "who", "have", "performed", "two", "or", "more", "searches", ",", "as", "well", "as", "their", "search", "sequence", "." ]
[ { "id": 0, "type": "table", "value": "user_searches" }, { "id": 2, "type": "column", "value": "search_seq" }, { "id": 1, "type": "column", "value": "user_id" }, { "id": 3, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,452
superhero
bird:dev.json:789
Find the average weight of the heroes who are aliens.
SELECT CAST(SUM(T1.weight_kg) AS REAL) / COUNT(T1.id) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'
[ "Find", "the", "average", "weight", "of", "the", "heroes", "who", "are", "aliens", "." ]
[ { "id": 0, "type": "table", "value": "superhero" }, { "id": 6, "type": "column", "value": "weight_kg" }, { "id": 4, "type": "column", "value": "race_id" }, { "id": 3, "type": "value", "value": "Alien" }, { "id": 1, "type": "table", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 0 ...
[ "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
5,453
swimming
spider:train_spider.json:5614
How many stadiums are not in country "Russia"?
SELECT count(*) FROM stadium WHERE country != 'Russia'
[ "How", "many", "stadiums", "are", "not", "in", "country", "\"", "Russia", "\"", "?" ]
[ { "id": 0, "type": "table", "value": "stadium" }, { "id": 1, "type": "column", "value": "country" }, { "id": 2, "type": "value", "value": "Russia" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "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, "...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
5,454
donor
bird:train.json:3157
Name the vendors who provide resources for project 'Lights, Camera, Action!'. List all the item names and unit price for each.
SELECT T1.vendor_name, T1.item_name, T1.item_unit_price FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN essays AS T3 ON T2.projectid = T3.projectid WHERE T3.title = 'Lights, Camera, Action!'
[ "Name", "the", "vendors", "who", "provide", "resources", "for", "project", "'", "Lights", ",", "Camera", ",", "Action", "!", "'", ".", "List", "all", "the", "item", "names", "and", "unit", "price", "for", "each", "." ]
[ { "id": 5, "type": "value", "value": "Lights, Camera, Action!" }, { "id": 2, "type": "column", "value": "item_unit_price" }, { "id": 0, "type": "column", "value": "vendor_name" }, { "id": 1, "type": "column", "value": "item_name" }, { "id": 6, ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 21 ] }, { "entity_id": 2, "token_idxs": [ 23, 24 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 20 ] }, {...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O" ]
5,455
retails
bird:train.json:6884
Please list the phone numbers of all the suppliers for the parts ordered in order no.1.
SELECT T2.s_phone FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = T2.s_suppkey WHERE T1.l_orderkey = 1
[ "Please", "list", "the", "phone", "numbers", "of", "all", "the", "suppliers", "for", "the", "parts", "ordered", "in", "order", "no.1", "." ]
[ { "id": 3, "type": "column", "value": "l_orderkey" }, { "id": 5, "type": "column", "value": "l_suppkey" }, { "id": 6, "type": "column", "value": "s_suppkey" }, { "id": 1, "type": "table", "value": "lineitem" }, { "id": 2, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
5,456
works_cycles
bird:train.json:7342
What is the highest possible discount rate for 'Excess Inventory'?
SELECT DiscountPct FROM SpecialOffer WHERE Type = 'Excess Inventory' ORDER BY DiscountPct DESC LIMIT 1
[ "What", "is", "the", "highest", "possible", "discount", "rate", "for", "'", "Excess", "Inventory", "'", "?" ]
[ { "id": 3, "type": "value", "value": "Excess Inventory" }, { "id": 0, "type": "table", "value": "specialoffer" }, { "id": 1, "type": "column", "value": "discountpct" }, { "id": 2, "type": "column", "value": "type" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O" ]
5,457
train_station
spider:train_spider.json:6599
How many train stations are there?
SELECT count(*) FROM station
[ "How", "many", "train", "stations", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "station" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O" ]
5,458
driving_school
spider:train_spider.json:6625
How many vehicles exist?
SELECT count(*) FROM Vehicles;
[ "How", "many", "vehicles", "exist", "?" ]
[ { "id": 0, "type": "table", "value": "vehicles" } ]
[ { "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" ]
5,459
world
bird:train.json:7902
What are the official languages of the country where you can find the city with the least population?
SELECT T2.Language FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.Population ASC LIMIT 1
[ "What", "are", "the", "official", "languages", "of", "the", "country", "where", "you", "can", "find", "the", "city", "with", "the", "least", "population", "?" ]
[ { "id": 2, "type": "table", "value": "countrylanguage" }, { "id": 6, "type": "column", "value": "countrycode" }, { "id": 3, "type": "column", "value": "isofficial" }, { "id": 5, "type": "column", "value": "population" }, { "id": 0, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
5,460
movie_3
bird:train.json:9329
How many customers have an address in Abu Dhabi city? List those customer names.
SELECT COUNT(T1.city_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Abu Dhabi'
[ "How", "many", "customers", "have", "an", "address", "in", "Abu", "Dhabi", "city", "?", "List", "those", "customer", "names", "." ]
[ { "id": 6, "type": "column", "value": "address_id" }, { "id": 2, "type": "value", "value": "Abu Dhabi" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 3, "type": "column", "value": "city_id" }, { "id": 5, "type": "table", "val...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id"...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O" ]
5,461
retails
bird:train.json:6739
Among the suppliers from Middle East region, how many suppliers were in debt?
SELECT COUNT(T3.s_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey INNER JOIN supplier AS T3 ON T2.n_nationkey = T3.s_nationkey WHERE T3.s_acctbal < 0 AND T1.r_name = 'MIDDLE EAST'
[ "Among", "the", "suppliers", "from", "Middle", "East", "region", ",", "how", "many", "suppliers", "were", "in", "debt", "?" ]
[ { "id": 4, "type": "column", "value": "n_nationkey" }, { "id": 5, "type": "column", "value": "s_nationkey" }, { "id": 9, "type": "value", "value": "MIDDLE EAST" }, { "id": 10, "type": "column", "value": "r_regionkey" }, { "id": 11, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "B-VALUE", "B-TABLE", "I-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
5,462
csu_1
spider:train_spider.json:2335
What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?
SELECT campus FROM campuses WHERE LOCATION = "Northridge" AND county = "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION = "San Francisco" AND county = "San Francisco"
[ "What", "campuses", "are", "located", "in", "Northridge", ",", "Los", "Angeles", "or", "in", "San", "Francisco", ",", "San", "Francisco", "?" ]
[ { "id": 6, "type": "column", "value": "San Francisco" }, { "id": 5, "type": "column", "value": "Los Angeles" }, { "id": 3, "type": "column", "value": "Northridge" }, { "id": 0, "type": "table", "value": "campuses" }, { "id": 2, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
5,463
art_1
bird:test.json:1248
What are the numbers of paintings created before 1900 in different places?
SELECT count(*) , LOCATION FROM paintings WHERE YEAR < 1900 GROUP BY LOCATION
[ "What", "are", "the", "numbers", "of", "paintings", "created", "before", "1900", "in", "different", "places", "?" ]
[ { "id": 0, "type": "table", "value": "paintings" }, { "id": 1, "type": "column", "value": "location" }, { "id": 2, "type": "column", "value": "year" }, { "id": 3, "type": "value", "value": "1900" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "O" ]
5,465
movielens
bird:train.json:2314
What horror movies have a running time of at least 2? Please list movie IDs.
SELECT T1.movieid FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.runningtime >= 2 AND T1.genre = 'Horror'
[ "What", "horror", "movies", "have", "a", "running", "time", "of", "at", "least", "2", "?", "Please", "list", "movie", "IDs", "." ]
[ { "id": 1, "type": "table", "value": "movies2directors" }, { "id": 3, "type": "column", "value": "runningtime" }, { "id": 0, "type": "column", "value": "movieid" }, { "id": 2, "type": "table", "value": "movies" }, { "id": 6, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 14, 15 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [ 10 ] ...
[ "O", "B-VALUE", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,466
soccer_2016
bird:train.json:2018
Which teams did SC Ganguly join in season year 2008?
SELECT T5.Team_Name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id INNER JOIN Team AS T5 ON T3.Team_Id = T5.Team_Id WHERE T4.Season_Year = 2008 AND T1.Player_Name = 'SC Gan...
[ "Which", "teams", "did", "SC", "Ganguly", "join", "in", "season", "year", "2008", "?" ]
[ { "id": 13, "type": "column", "value": "man_of_the_match" }, { "id": 8, "type": "table", "value": "player_match" }, { "id": 4, "type": "column", "value": "season_year" }, { "id": 6, "type": "column", "value": "player_name" }, { "id": 7, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-TABLE", "B-COLUMN", "B-VALUE", "I-VALUE", "O", "O", "B-TABLE", "B-TABLE", "B-VALUE", "O" ]
5,467
works_cycles
bird:train.json:7412
Please show the credit card number of David Bradley.
SELECT T3.CardNumber FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley'
[ "Please", "show", "the", "credit", "card", "number", "of", "David", "Bradley", "." ]
[ { "id": 3, "type": "table", "value": "personcreditcard" }, { "id": 9, "type": "column", "value": "businessentityid" }, { "id": 4, "type": "column", "value": "creditcardid" }, { "id": 0, "type": "column", "value": "cardnumber" }, { "id": 1, "typ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "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-TABLE", "I-TABLE", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "O" ]
5,468
codebase_community
bird:dev.json:598
What is the percentage difference of student badges given during 2010 and 2011?
SELECT CAST(SUM(IIF(STRFTIME('%Y', Date) = '2010', 1, 0)) AS REAL) * 100 / COUNT(Id) - CAST(SUM(IIF(STRFTIME('%Y', Date) = '2011', 1, 0)) AS REAL) * 100 / COUNT(Id) FROM badges WHERE Name = 'Student'
[ "What", "is", "the", "percentage", "difference", "of", "student", "badges", "given", "during", "2010", "and", "2011", "?" ]
[ { "id": 2, "type": "value", "value": "Student" }, { "id": 0, "type": "table", "value": "badges" }, { "id": 1, "type": "column", "value": "name" }, { "id": 7, "type": "value", "value": "2010" }, { "id": 8, "type": "value", "value": "2011" ...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
5,469
flight_1
spider:train_spider.json:423
Show names for all aircrafts of which John Williams has certificates.
SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = "John Williams"
[ "Show", "names", "for", "all", "aircrafts", "of", "which", "John", "Williams", "has", "certificates", "." ]
[ { "id": 2, "type": "column", "value": "John Williams" }, { "id": 4, "type": "table", "value": "certificate" }, { "id": 1, "type": "table", "value": "aircraft" }, { "id": 3, "type": "table", "value": "employee" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { ...
[ "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O" ]
5,470
region_building
bird:test.json:318
What is the list of building names, sorted by the number of stories of each building in ascending order?
SELECT Name FROM building ORDER BY Number_of_Stories ASC
[ "What", "is", "the", "list", "of", "building", "names", ",", "sorted", "by", "the", "number", "of", "stories", "of", "each", "building", "in", "ascending", "order", "?" ]
[ { "id": 2, "type": "column", "value": "number_of_stories" }, { "id": 0, "type": "table", "value": "building" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 11, 12, 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
5,471
theme_gallery
spider:train_spider.json:1686
Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.
SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10
[ "Count", "the", "number", "of", "exhibitions", "that", "have", "had", "an", "attendnance", "of", "over", "100", "or", "a", "ticket", "prices", "under", "10", "." ]
[ { "id": 0, "type": "table", "value": "exhibition_record" }, { "id": 2, "type": "column", "value": "exhibition_id" }, { "id": 5, "type": "column", "value": "ticket_price" }, { "id": 1, "type": "table", "value": "exhibition" }, { "id": 3, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
5,472
perpetrator
spider:train_spider.json:2320
Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.
SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20
[ "Show", "the", "countries", "that", "have", "both", "perpetrators", "with", "injures", "more", "than", "50", "and", "perpetrators", "with", "injures", "smaller", "than", "20", "." ]
[ { "id": 0, "type": "table", "value": "perpetrator" }, { "id": 1, "type": "column", "value": "country" }, { "id": 2, "type": "column", "value": "injured" }, { "id": 3, "type": "value", "value": "50" }, { "id": 4, "type": "value", "value": "2...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 18 ] }, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
5,473
cre_Doc_and_collections
bird:test.json:724
What is the number of documents in the collection named 'Best'?
SELECT count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best";
[ "What", "is", "the", "number", "of", "documents", "in", "the", "collection", "named", "'", "Best", "'", "?" ]
[ { "id": 1, "type": "table", "value": "documents_in_collections" }, { "id": 2, "type": "column", "value": "collection_name" }, { "id": 4, "type": "column", "value": "collection_id" }, { "id": 0, "type": "table", "value": "collections" }, { "id": 3, ...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
5,474
california_schools
bird:dev.json:22
Which school in Contra Costa has the highest number of test takers?
SELECT sname FROM satscores WHERE cname = 'Contra Costa' AND sname IS NOT NULL ORDER BY NumTstTakr DESC LIMIT 1
[ "Which", "school", "in", "Contra", "Costa", "has", "the", "highest", "number", "of", "test", "takers", "?" ]
[ { "id": 4, "type": "value", "value": "Contra Costa" }, { "id": 2, "type": "column", "value": "numtsttakr" }, { "id": 0, "type": "table", "value": "satscores" }, { "id": 1, "type": "column", "value": "sname" }, { "id": 3, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3, 4 ] }, { "entity_id": 5...
[ "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
5,475
video_games
bird:train.json:3424
How many strategy games are there?
SELECT COUNT(CASE WHEN T1.genre_name = 'Strategy' THEN T2.id ELSE NULL END) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id
[ "How", "many", "strategy", "games", "are", "there", "?" ]
[ { "id": 4, "type": "column", "value": "genre_name" }, { "id": 3, "type": "column", "value": "genre_id" }, { "id": 5, "type": "value", "value": "Strategy" }, { "id": 0, "type": "table", "value": "genre" }, { "id": 1, "type": "table", "value"...
[ { "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", "B-VALUE", "B-TABLE", "O", "B-TABLE", "O" ]
5,476
match_season
spider:train_spider.json:1063
What are the different positions of players from UCLA or Duke colleges?
SELECT DISTINCT POSITION FROM match_season WHERE College = "UCLA" OR College = "Duke"
[ "What", "are", "the", "different", "positions", "of", "players", "from", "UCLA", "or", "Duke", "colleges", "?" ]
[ { "id": 0, "type": "table", "value": "match_season" }, { "id": 1, "type": "column", "value": "position" }, { "id": 2, "type": "column", "value": "college" }, { "id": 3, "type": "column", "value": "UCLA" }, { "id": 4, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entit...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-COLUMN", "O" ]