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
12,200
student_loan
bird:train.json:4529
Calculate the ratio of disabled students who have never been absent from school.
SELECT 100 * SUM(IIF(T2.month = 0, 1, 0)) AS num FROM disabled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name
[ "Calculate", "the", "ratio", "of", "disabled", "students", "who", "have", "never", "been", "absent", "from", "school", "." ]
[ { "id": 1, "type": "table", "value": "longest_absense_from_school" }, { "id": 0, "type": "table", "value": "disabled" }, { "id": 6, "type": "column", "value": "month" }, { "id": 3, "type": "column", "value": "name" }, { "id": 2, "type": "value"...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 10, 11, 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
12,201
customers_card_transactions
spider:train_spider.json:705
How many cards does customer Art Turcotte have?
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
[ "How", "many", "cards", "does", "customer", "Art", "Turcotte", "have", "?" ]
[ { "id": 3, "type": "column", "value": "customer_first_name" }, { "id": 5, "type": "column", "value": "customer_last_name" }, { "id": 0, "type": "table", "value": "customers_cards" }, { "id": 2, "type": "column", "value": "customer_id" }, { "id": 1,...
[ { "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": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O" ]
12,202
video_games
bird:train.json:3505
What is the diffrence between the number of games produced by Culture Brain that can be played on SNES and DS?
SELECT COUNT(CASE WHEN T1.platform_name = 'SNES' THEN T3.game_id ELSE NULL END) - COUNT(CASE WHEN T1.platform_name = 'DS' THEN T3.game_id ELSE NULL END) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id INNER JOIN publisher AS T4...
[ "What", "is", "the", "diffrence", "between", "the", "number", "of", "games", "produced", "by", "Culture", "Brain", "that", "can", "be", "played", "on", "SNES", "and", "DS", "?" ]
[ { "id": 8, "type": "column", "value": "game_publisher_id" }, { "id": 1, "type": "column", "value": "publisher_name" }, { "id": 3, "type": "table", "value": "game_publisher" }, { "id": 2, "type": "value", "value": "Culture Brain" }, { "id": 7, "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": []...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
12,203
legislator
bird:train.json:4749
For how many terms has current legislator Sherrod Brown served?
SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Sherrod Brown'
[ "For", "how", "many", "terms", "has", "current", "legislator", "Sherrod", "Brown", "served", "?" ]
[ { "id": 2, "type": "column", "value": "official_full_name" }, { "id": 1, "type": "table", "value": "current-terms" }, { "id": 3, "type": "value", "value": "Sherrod Brown" }, { "id": 4, "type": "column", "value": "bioguide_id" }, { "id": 5, "typ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O" ]
12,204
thrombosis_prediction
bird:dev.json:1241
For patients with abnormal platelet level, state the number of patients with lower than normal range. How is it compare to the number of patients with higher than normal range?
SELECT SUM(CASE WHEN T2.PLT <= 100 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.PLT >= 400 THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID
[ "For", "patients", "with", "abnormal", "platelet", "level", ",", "state", "the", "number", "of", "patients", "with", "lower", "than", "normal", "range", ".", "How", "is", "it", "compare", "to", "the", "number", "of", "patients", "with", "higher", "than", "...
[ { "id": 1, "type": "table", "value": "laboratory" }, { "id": 0, "type": "table", "value": "patient" }, { "id": 5, "type": "column", "value": "plt" }, { "id": 6, "type": "value", "value": "100" }, { "id": 7, "type": "value", "value": "400" ...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
12,206
student_1
spider:train_spider.json:4094
Find the number of students in one classroom.
SELECT count(*) , classroom FROM list GROUP BY classroom
[ "Find", "the", "number", "of", "students", "in", "one", "classroom", "." ]
[ { "id": 1, "type": "column", "value": "classroom" }, { "id": 0, "type": "table", "value": "list" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
12,207
works_cycles
bird:train.json:7086
What is the percentage, by number of sales order units, for orders with quantities not greater than 3 and a discount of 0.2?
SELECT CAST(SUM(CASE WHEN OrderQty < 3 AND UnitPriceDiscount = 0.2 THEN 1 ELSE 0 END) AS REAL) / COUNT(SalesOrderID) FROM SalesOrderDetail
[ "What", "is", "the", "percentage", ",", "by", "number", "of", "sales", "order", "units", ",", "for", "orders", "with", "quantities", "not", "greater", "than", "3", "and", "a", "discount", "of", "0.2", "?" ]
[ { "id": 6, "type": "column", "value": "unitpricediscount" }, { "id": 0, "type": "table", "value": "salesorderdetail" }, { "id": 1, "type": "column", "value": "salesorderid" }, { "id": 4, "type": "column", "value": "orderqty" }, { "id": 7, "type...
[ { "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": [ 9 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
12,208
match_season
spider:train_spider.json:1055
What are the names and capitals of each country?
SELECT Country_name , Capital FROM country
[ "What", "are", "the", "names", "and", "capitals", "of", "each", "country", "?" ]
[ { "id": 1, "type": "column", "value": "country_name" }, { "id": 0, "type": "table", "value": "country" }, { "id": 2, "type": "column", "value": "capital" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
12,209
card_games
bird:dev.json:513
Among the sets whose expansion type is Commander, which set has the highest total number of cards including promotional and related supplemental products but excluding Alchemy modifications? Indicate the id of the set.
SELECT id FROM sets WHERE type = 'commander' ORDER BY totalSetSize DESC LIMIT 1
[ "Among", "the", "sets", "whose", "expansion", "type", "is", "Commander", ",", "which", "set", "has", "the", "highest", "total", "number", "of", "cards", "including", "promotional", "and", "related", "supplemental", "products", "but", "excluding", "Alchemy", "mod...
[ { "id": 4, "type": "column", "value": "totalsetsize" }, { "id": 3, "type": "value", "value": "commander" }, { "id": 0, "type": "table", "value": "sets" }, { "id": 2, "type": "column", "value": "type" }, { "id": 1, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 31, 32 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 14 ...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
12,210
tracking_orders
spider:train_spider.json:6936
What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?
SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"
[ "What", "are", "the", "distinct", "details", "of", "invoices", "created", "before", "1989", "-", "09", "-", "03", "or", "after", "2007", "-", "12", "-", "25", "?" ]
[ { "id": 1, "type": "column", "value": "invoice_details" }, { "id": 2, "type": "column", "value": "invoice_date" }, { "id": 3, "type": "column", "value": "1989-09-03" }, { "id": 4, "type": "column", "value": "2007-12-25" }, { "id": 0, "type": "t...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 9, 10, 11, 12, 13 ] }, { "entity_id": 4, "token_idxs...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
12,211
codebase_comments
bird:train.json:615
How many solutions does the repository which has 1445 Forks contain?
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks = 1445
[ "How", "many", "solutions", "does", "the", "repository", "which", "has", "1445", "Forks", "contain", "?" ]
[ { "id": 1, "type": "table", "value": "solution" }, { "id": 4, "type": "column", "value": "repoid" }, { "id": 2, "type": "column", "value": "forks" }, { "id": 0, "type": "table", "value": "repo" }, { "id": 3, "type": "value", "value": "1445"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-COLUMN", "O", "O" ]
12,212
cre_Doc_Workflow
bird:test.json:2024
How many documents does has the author Era Kerluke written?
SELECT count(*) FROM Documents WHERE author_name = "Era Kerluke"
[ "How", "many", "documents", "does", "has", "the", "author", "Era", "Kerluke", "written", "?" ]
[ { "id": 1, "type": "column", "value": "author_name" }, { "id": 2, "type": "column", "value": "Era Kerluke" }, { "id": 0, "type": "table", "value": "documents" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O" ]
12,213
retail_world
bird:train.json:6336
Which territory does Ms. Laura Callahan's direct supervisor work in? Give the name of the territory.
SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.EmployeeID = ( SELECT ReportsTo FROM Employees WHERE TitleOfCourtesy = 'Ms.' AND FirstName = 'Laura' AND LastName = 'Callahan...
[ "Which", "territory", "does", "Ms.", "Laura", "Callahan", "'s", "direct", "supervisor", "work", "in", "?", "Give", "the", "name", "of", "the", "territory", "." ]
[ { "id": 0, "type": "column", "value": "territorydescription" }, { "id": 4, "type": "table", "value": "employeeterritories" }, { "id": 7, "type": "column", "value": "titleofcourtesy" }, { "id": 1, "type": "table", "value": "territories" }, { "id": 5...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 1 ...
[ "O", "B-COLUMN", "B-TABLE", "B-VALUE", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
12,214
works_cycles
bird:train.json:7427
How many products were on the LL Road Frame Sale?
SELECT COUNT(DISTINCT ProductID) FROM SpecialOffer AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID WHERE T1.Description = 'LL Road Frame Sale'
[ "How", "many", "products", "were", "on", "the", "LL", "Road", "Frame", "Sale", "?" ]
[ { "id": 1, "type": "table", "value": "specialofferproduct" }, { "id": 3, "type": "value", "value": "LL Road Frame Sale" }, { "id": 5, "type": "column", "value": "specialofferid" }, { "id": 0, "type": "table", "value": "specialoffer" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6, 7, 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
12,215
ice_hockey_draft
bird:train.json:6982
How many teams did the heaviest player drafted by Arizona Coyotes have played for?
SELECT COUNT(T2.TEAM) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN weight_info AS T3 ON T1.weight = T3.weight_id WHERE T1.overallby = 'Arizona Coyotes' ORDER BY T3.weight_in_lbs DESC LIMIT 1
[ "How", "many", "teams", "did", "the", "heaviest", "player", "drafted", "by", "Arizona", "Coyotes", "have", "played", "for", "?" ]
[ { "id": 2, "type": "value", "value": "Arizona Coyotes" }, { "id": 3, "type": "column", "value": "weight_in_lbs" }, { "id": 6, "type": "table", "value": "seasonstatus" }, { "id": 0, "type": "table", "value": "weight_info" }, { "id": 5, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "tok...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O" ]
12,216
network_2
spider:train_spider.json:4461
Who are the friends of Alice that are doctors?
SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor'
[ "Who", "are", "the", "friends", "of", "Alice", "that", "are", "doctors", "?" ]
[ { "id": 2, "type": "table", "value": "personfriend" }, { "id": 0, "type": "column", "value": "friend" }, { "id": 1, "type": "table", "value": "person" }, { "id": 5, "type": "column", "value": "gender" }, { "id": 8, "type": "value", "value":...
[ { "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-COLUMN", "O", "B-VALUE", "O", "O", "B-VALUE", "O" ]
12,217
formula_1
spider:train_spider.json:2158
What are the names of all the races that occurred in the year 2017?
SELECT name FROM races WHERE YEAR = 2017
[ "What", "are", "the", "names", "of", "all", "the", "races", "that", "occurred", "in", "the", "year", "2017", "?" ]
[ { "id": 0, "type": "table", "value": "races" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "year" }, { "id": 3, "type": "value", "value": "2017" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
12,218
codebase_community
bird:dev.json:638
List all the name of users that obtained the Organizer Badges.
SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.`Name` = 'Organizer'
[ "List", "all", "the", "name", "of", "users", "that", "obtained", "the", "Organizer", "Badges", "." ]
[ { "id": 0, "type": "column", "value": "displayname" }, { "id": 4, "type": "value", "value": "Organizer" }, { "id": 2, "type": "table", "value": "badges" }, { "id": 6, "type": "column", "value": "userid" }, { "id": 1, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
12,219
cs_semester
bird:train.json:917
Describe the full names and graduated universities of the professors who advised Olia Rabier.
SELECT T1.first_name, T1.last_name, T1.graduate_from FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Olia' AND T3.l_name = 'Rabier'
[ "Describe", "the", "full", "names", "and", "graduated", "universities", "of", "the", "professors", "who", "advised", "Olia", "Rabier", "." ]
[ { "id": 2, "type": "column", "value": "graduate_from" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 6, "type": "column", "value": "student_id" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 3, "type": "table"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O" ]
12,220
genes
bird:train.json:2505
What percentage of genes located in the cytoskeleton are of unknown class? And of these, how many are not conditional phenotypes?
SELECT SUM(Localization = 'cytoskeleton' AND Phenotype = 'Conditional phenotypes') , CAST(SUM(Localization = 'cytoskeleton') AS REAL) * 100 / COUNT(GeneID) FROM Genes;
[ "What", "percentage", "of", "genes", "located", "in", "the", "cytoskeleton", "are", "of", "unknown", "class", "?", "And", "of", "these", ",", "how", "many", "are", "not", "conditional", "phenotypes", "?" ]
[ { "id": 6, "type": "value", "value": "Conditional phenotypes" }, { "id": 3, "type": "column", "value": "localization" }, { "id": 4, "type": "value", "value": "cytoskeleton" }, { "id": 5, "type": "column", "value": "phenotype" }, { "id": 2, "typ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4, 5 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id":...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
12,221
flight_4
spider:train_spider.json:6881
Find the busiest source airport that runs most number of routes in China.
SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1
[ "Find", "the", "busiest", "source", "airport", "that", "runs", "most", "number", "of", "routes", "in", "China", "." ]
[ { "id": 1, "type": "table", "value": "airports" }, { "id": 6, "type": "column", "value": "src_apid" }, { "id": 3, "type": "column", "value": "country" }, { "id": 2, "type": "table", "value": "routes" }, { "id": 4, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entit...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-VALUE", "O" ]
12,222
csu_1
spider:train_spider.json:2326
What are the names of all campuses located at Chico?
SELECT campus FROM campuses WHERE LOCATION = "Chico"
[ "What", "are", "the", "names", "of", "all", "campuses", "located", "at", "Chico", "?" ]
[ { "id": 0, "type": "table", "value": "campuses" }, { "id": 2, "type": "column", "value": "location" }, { "id": 1, "type": "column", "value": "campus" }, { "id": 3, "type": "column", "value": "Chico" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "O" ]
12,223
professional_basketball
bird:train.json:2904
Percentage of games lost out of total games played by the Houston Mavericks
SELECT CAST(SUM(lost) AS REAL) * 100 / SUM(games) FROM teams WHERE name = 'Houston Mavericks'
[ "Percentage", "of", "games", "lost", "out", "of", "total", "games", "played", "by", "the", "Houston", "Mavericks" ]
[ { "id": 2, "type": "value", "value": "Houston Mavericks" }, { "id": 0, "type": "table", "value": "teams" }, { "id": 4, "type": "column", "value": "games" }, { "id": 1, "type": "column", "value": "name" }, { "id": 5, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE" ]
12,224
store_product
spider:train_spider.json:4908
Which district has the largest population?
SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
[ "Which", "district", "has", "the", "largest", "population", "?" ]
[ { "id": 2, "type": "column", "value": "city_population" }, { "id": 1, "type": "column", "value": "district_name" }, { "id": 0, "type": "table", "value": "district" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
12,225
codebase_comments
bird:train.json:570
What is the id of the repository with the highest number of solution path?
SELECT RepoId FROM solution GROUP BY RepoId ORDER BY COUNT(Path) DESC LIMIT 1
[ "What", "is", "the", "i", "d", "of", "the", "repository", "with", "the", "highest", "number", "of", "solution", "path", "?" ]
[ { "id": 0, "type": "table", "value": "solution" }, { "id": 1, "type": "column", "value": "repoid" }, { "id": 2, "type": "column", "value": "path" } ]
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
12,226
synthea
bird:train.json:1448
Indicate the full name of the patients who have 3 different allergies.
SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT GROUP BY T1.patient ORDER BY COUNT(DISTINCT T2.DESCRIPTION) > 3
[ "Indicate", "the", "full", "name", "of", "the", "patients", "who", "have", "3", "different", "allergies", "." ]
[ { "id": 6, "type": "column", "value": "description" }, { "id": 4, "type": "table", "value": "allergies" }, { "id": 3, "type": "table", "value": "patients" }, { "id": 0, "type": "column", "value": "patient" }, { "id": 1, "type": "column", "v...
[ { "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": [ 11 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-TABLE", "O" ]
12,227
video_games
bird:train.json:3414
How many video game publishers have Interactive in their names?
SELECT COUNT(T.id) FROM publisher AS T WHERE T.publisher_name LIKE '%Interactive%'
[ "How", "many", "video", "game", "publishers", "have", "Interactive", "in", "their", "names", "?" ]
[ { "id": 1, "type": "column", "value": "publisher_name" }, { "id": 2, "type": "value", "value": "%Interactive%" }, { "id": 0, "type": "table", "value": "publisher" }, { "id": 3, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O", "O", "O", "O" ]
12,228
book_1
bird:test.json:571
What is the average sale price of books written by George Orwell?
SELECT avg(saleprice) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = "George Orwell"
[ "What", "is", "the", "average", "sale", "price", "of", "books", "written", "by", "George", "Orwell", "?" ]
[ { "id": 2, "type": "column", "value": "George Orwell" }, { "id": 5, "type": "table", "value": "author_book" }, { "id": 3, "type": "column", "value": "saleprice" }, { "id": 7, "type": "column", "value": "idauthor" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [ 4, 5 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "...
[ "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
12,229
book_1
bird:test.json:554
What is the name of the client who has ordered the greatest total amount of books?
SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient ORDER BY sum(T3.amount) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "client", "who", "has", "ordered", "the", "greatest", "total", "amount", "of", "books", "?" ]
[ { "id": 2, "type": "table", "value": "books_order" }, { "id": 0, "type": "column", "value": "idclient" }, { "id": 5, "type": "column", "value": "idorder" }, { "id": 3, "type": "table", "value": "orders" }, { "id": 4, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
12,230
cre_Docs_and_Epenses
spider:train_spider.json:6460
What are the ids of documents with the type code CV that do not have expenses.
SELECT document_id FROM Documents WHERE document_type_code = "CV" EXCEPT SELECT document_id FROM Documents_with_expenses
[ "What", "are", "the", "ids", "of", "documents", "with", "the", "type", "code", "CV", "that", "do", "not", "have", "expenses", "." ]
[ { "id": 1, "type": "table", "value": "documents_with_expenses" }, { "id": 3, "type": "column", "value": "document_type_code" }, { "id": 2, "type": "column", "value": "document_id" }, { "id": 0, "type": "table", "value": "documents" }, { "id": 4, ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6, 7, 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
12,231
movie_3
bird:train.json:9290
Where is store number 2 located?
SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 2
[ "Where", "is", "store", "number", "2", "located", "?" ]
[ { "id": 7, "type": "column", "value": "address_id" }, { "id": 1, "type": "column", "value": "address2" }, { "id": 2, "type": "column", "value": "district" }, { "id": 5, "type": "column", "value": "store_id" }, { "id": 0, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O" ]
12,232
e_learning
spider:train_spider.json:3844
How many students did not have any course enrollment?
SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)
[ "How", "many", "students", "did", "not", "have", "any", "course", "enrollment", "?" ]
[ { "id": 2, "type": "table", "value": "student_course_enrolment" }, { "id": 1, "type": "column", "value": "student_id" }, { "id": 0, "type": "table", "value": "students" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
12,233
works_cycles
bird:train.json:7031
Of the products that has a reorder inventory point of no more than 600, how many manufactured in-house products that takes 1 day to manufacture with BOM Level 4 are there?
SELECT COUNT(T1.ProductID) FROM Product AS T1 INNER JOIN BillOfMaterials AS T2 ON T1.ProductID = T2.ProductAssemblyID WHERE T1.MakeFlag = 1 AND T1.DaysToManufacture = 1 AND T2.BOMLevel = 4 AND T1.ReorderPoint <= 600
[ "Of", "the", "products", "that", "has", "a", "reorder", "inventory", "point", "of", "no", "more", "than", "600", ",", "how", "many", "manufactured", "in", "-", "house", "products", "that", "takes", "1", "day", "to", "manufacture", "with", "BOM", "Level", ...
[ { "id": 3, "type": "column", "value": "productassemblyid" }, { "id": 6, "type": "column", "value": "daystomanufacture" }, { "id": 1, "type": "table", "value": "billofmaterials" }, { "id": 9, "type": "column", "value": "reorderpoint" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [ 21 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O" ]
12,234
loan_1
spider:train_spider.json:3071
What are the names of the different banks that have provided loans?
SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id
[ "What", "are", "the", "names", "of", "the", "different", "banks", "that", "have", "provided", "loans", "?" ]
[ { "id": 3, "type": "column", "value": "branch_id" }, { "id": 0, "type": "column", "value": "bname" }, { "id": 1, "type": "table", "value": "bank" }, { "id": 2, "type": "table", "value": "loan" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O" ]
12,235
retails
bird:train.json:6837
What proportion of suppliers are from Asia?
SELECT CAST(SUM(IIF(T1.r_name = 'ASIA', 1, 0)) AS REAL) * 100 / COUNT(T1.r_regionkey) 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
[ "What", "proportion", "of", "suppliers", "are", "from", "Asia", "?" ]
[ { "id": 3, "type": "column", "value": "n_nationkey" }, { "id": 4, "type": "column", "value": "s_nationkey" }, { "id": 6, "type": "column", "value": "r_regionkey" }, { "id": 7, "type": "column", "value": "n_regionkey" }, { "id": 0, "type": "tabl...
[ { "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", "B-VALUE", "O" ]
12,236
icfp_1
spider:train_spider.json:2916
Find the last name of the author with first name "Amal".
SELECT lname FROM authors WHERE fname = "Amal"
[ "Find", "the", "last", "name", "of", "the", "author", "with", "first", "name", "\"", "Amal", "\"", "." ]
[ { "id": 0, "type": "table", "value": "authors" }, { "id": 1, "type": "column", "value": "lname" }, { "id": 2, "type": "column", "value": "fname" }, { "id": 3, "type": "column", "value": "Amal" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
12,237
donor
bird:train.json:3226
How many schools which have suburban metro are there in Bethlehem?
SELECT COUNT(schoolid) FROM projects WHERE school_city = 'Bethlehem' AND school_metro = 'suburban'
[ "How", "many", "schools", "which", "have", "suburban", "metro", "are", "there", "in", "Bethlehem", "?" ]
[ { "id": 4, "type": "column", "value": "school_metro" }, { "id": 2, "type": "column", "value": "school_city" }, { "id": 3, "type": "value", "value": "Bethlehem" }, { "id": 0, "type": "table", "value": "projects" }, { "id": 1, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O" ]
12,238
planet_1
bird:test.json:1904
What is the name of the planet with the most shipments?
SELECT T2.Name FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet ORDER BY count(*) DESC LIMIT 1;
[ "What", "is", "the", "name", "of", "the", "planet", "with", "the", "most", "shipments", "?" ]
[ { "id": 2, "type": "table", "value": "shipment" }, { "id": 4, "type": "column", "value": "planetid" }, { "id": 0, "type": "column", "value": "planet" }, { "id": 3, "type": "table", "value": "planet" }, { "id": 1, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O" ]
12,240
apartment_rentals
spider:train_spider.json:1208
What is the average number of bedrooms of all apartments?
SELECT avg(bedroom_count) FROM Apartments
[ "What", "is", "the", "average", "number", "of", "bedrooms", "of", "all", "apartments", "?" ]
[ { "id": 1, "type": "column", "value": "bedroom_count" }, { "id": 0, "type": "table", "value": "apartments" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
12,241
student_loan
bird:train.json:4383
What is the percentage of male students in the navy department?
SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM enlist AS T1 LEFT JOIN male AS T2 ON T1.`name` = T2.`name` WHERE T1.organ = 'navy'
[ "What", "is", "the", "percentage", "of", "male", "students", "in", "the", "navy", "department", "?" ]
[ { "id": 0, "type": "table", "value": "enlist" }, { "id": 2, "type": "column", "value": "organ" }, { "id": 1, "type": "table", "value": "male" }, { "id": 3, "type": "value", "value": "navy" }, { "id": 4, "type": "column", "value": "name" }...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "O" ]
12,242
loan_1
spider:train_spider.json:3064
Find the name and account balance of the customers who have loans with a total amount of more than 5000.
SELECT T1.cust_name , T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING sum(T2.amount) > 5000
[ "Find", "the", "name", "and", "account", "balance", "of", "the", "customers", "who", "have", "loans", "with", "a", "total", "amount", "of", "more", "than", "5000", "." ]
[ { "id": 0, "type": "column", "value": "cust_name" }, { "id": 1, "type": "column", "value": "acc_type" }, { "id": 2, "type": "table", "value": "customer" }, { "id": 5, "type": "column", "value": "cust_id" }, { "id": 6, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
12,243
movie_3
bird:train.json:9229
List the actor's last name that starred the film with the description of "A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies".
SELECT T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.description = 'A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies'
[ "List", "the", "actor", "'s", "last", "name", "that", "starred", "the", "film", "with", "the", "description", "of", "\"", "A", "Thoughtful", "Drama", "of", "a", "Composer", "And", "a", "Feminist", "who", "must", "Meet", "a", "Secret", "Agent", "in", "The...
[ { "id": 3, "type": "value", "value": "A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies" }, { "id": 2, "type": "column", "value": "description" }, { "id": 5, "type": "table", "value": "film_actor" }, { "id": 0, ...
[ { "entity_id": 0, "token_idxs": [ 4, 5 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 15, 16, 17, 18, 19, 20, 21, ...
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE"...
12,244
college_1
spider:train_spider.json:3270
What is the name of the department with the fewest professors?
SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) LIMIT 1
[ "What", "is", "the", "name", "of", "the", "department", "with", "the", "fewest", "professors", "?" ]
[ { "id": 3, "type": "table", "value": "department" }, { "id": 0, "type": "column", "value": "dept_code" }, { "id": 1, "type": "column", "value": "dept_name" }, { "id": 2, "type": "table", "value": "professor" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
12,245
world
bird:train.json:7845
What are the official languages used in Belgium?
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belgium' AND T2.IsOfficial = 'T'
[ "What", "are", "the", "official", "languages", "used", "in", "Belgium", "?" ]
[ { "id": 2, "type": "table", "value": "countrylanguage" }, { "id": 4, "type": "column", "value": "countrycode" }, { "id": 7, "type": "column", "value": "isofficial" }, { "id": 0, "type": "column", "value": "language" }, { "id": 1, "type": "table...
[ { "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", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
12,246
authors
bird:train.json:3539
In papers with journal IDs from 200 to 300 and with its short name starts with A, what is the percentage of papers with conference ID of 0?
SELECT CAST(SUM(CASE WHEN T1.ConferenceId = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ConferenceId) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.JournalId BETWEEN 200 AND 300 AND T2.ShortName LIKE 'A%'
[ "In", "papers", "with", "journal", "IDs", "from", "200", "to", "300", "and", "with", "its", "short", "name", "starts", "with", "A", ",", "what", "is", "the", "percentage", "of", "papers", "with", "conference", "ID", "of", "0", "?" ]
[ { "id": 9, "type": "column", "value": "conferenceid" }, { "id": 2, "type": "column", "value": "journalid" }, { "id": 6, "type": "column", "value": "shortname" }, { "id": 1, "type": "table", "value": "journal" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 26 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, ...
[ "O", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "O" ]
12,248
pilot_1
bird:test.json:1114
Count the number of B-52 Bombers owned by pilots under 35.
SELECT count(*) FROM pilotskills WHERE age < 35 AND plane_name = 'B-52 Bomber'
[ "Count", "the", "number", "of", "B-52", "Bombers", "owned", "by", "pilots", "under", "35", "." ]
[ { "id": 0, "type": "table", "value": "pilotskills" }, { "id": 4, "type": "value", "value": "B-52 Bomber" }, { "id": 3, "type": "column", "value": "plane_name" }, { "id": 1, "type": "column", "value": "age" }, { "id": 2, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4, 5 ] }, { "entity_id"...
[ "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
12,249
warehouse_1
bird:test.json:1735
Find the total value and number of boxes for each content type.
SELECT sum(value) , count(*) , CONTENTS FROM boxes GROUP BY CONTENTS
[ "Find", "the", "total", "value", "and", "number", "of", "boxes", "for", "each", "content", "type", "." ]
[ { "id": 1, "type": "column", "value": "contents" }, { "id": 0, "type": "table", "value": "boxes" }, { "id": 2, "type": "column", "value": "value" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O" ]
12,250
workshop_paper
spider:train_spider.json:5837
How many workshops did each author submit to? Return the author name and the number of workshops.
SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author
[ "How", "many", "workshops", "did", "each", "author", "submit", "to", "?", "Return", "the", "author", "name", "and", "the", "number", "of", "workshops", "." ]
[ { "id": 4, "type": "column", "value": "submission_id" }, { "id": 3, "type": "column", "value": "workshop_id" }, { "id": 1, "type": "table", "value": "acceptance" }, { "id": 2, "type": "table", "value": "submission" }, { "id": 0, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 2, 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
12,251
icfp_1
spider:train_spider.json:2911
Which authors have written a paper with title containing the word "Monadic"? Return their last names.
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Monadic%"
[ "Which", "authors", "have", "written", "a", "paper", "with", "title", "containing", "the", "word", "\"", "Monadic", "\"", "?", "Return", "their", "last", "names", "." ]
[ { "id": 5, "type": "table", "value": "authorship" }, { "id": 3, "type": "column", "value": "%Monadic%" }, { "id": 4, "type": "table", "value": "authors" }, { "id": 6, "type": "column", "value": "paperid" }, { "id": 1, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [ 18 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
12,252
professional_basketball
bird:train.json:2827
For the players who belongs to the east conference, please list the name of the college they went to.
SELECT DISTINCT T1.college FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.conference = 'East'
[ "For", "the", "players", "who", "belongs", "to", "the", "east", "conference", ",", "please", "list", "the", "name", "of", "the", "college", "they", "went", "to", "." ]
[ { "id": 2, "type": "table", "value": "player_allstar" }, { "id": 3, "type": "column", "value": "conference" }, { "id": 5, "type": "column", "value": "playerid" }, { "id": 0, "type": "column", "value": "college" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
12,253
language_corpus
bird:train.json:5780
Please list the title of the pages on which the word "grec" occurred for over 20 times.
SELECT T3.title FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'grec' AND T2.occurrences > 20
[ "Please", "list", "the", "title", "of", "the", "pages", "on", "which", "the", "word", "\"", "grec", "\"", "occurred", "for", "over", "20", "times", "." ]
[ { "id": 3, "type": "table", "value": "pages_words" }, { "id": 7, "type": "column", "value": "occurrences" }, { "id": 0, "type": "column", "value": "title" }, { "id": 1, "type": "table", "value": "pages" }, { "id": 2, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
12,255
olympics
bird:train.json:4996
Among the Olympic games held in Los Angeles, what is the name of the Olympic game that has the most number of competitors?
SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN games_city AS T3 ON T2.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id WHERE T4.city_name = 'Los Angeles' GROUP BY T1.id ORDER BY COUNT(T2.person_id) DESC LIMIT 1
[ "Among", "the", "Olympic", "games", "held", "in", "Los", "Angeles", ",", "what", "is", "the", "name", "of", "the", "Olympic", "game", "that", "has", "the", "most", "number", "of", "competitors", "?" ]
[ { "id": 9, "type": "table", "value": "games_competitor" }, { "id": 4, "type": "value", "value": "Los Angeles" }, { "id": 1, "type": "column", "value": "games_name" }, { "id": 5, "type": "table", "value": "games_city" }, { "id": 3, "type": "colu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 6, 7 ] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
12,256
law_episode
bird:train.json:1338
What is the average rating for each episode in season 9?
SELECT SUM(rating) / COUNT(episode_id) FROM Episode WHERE season = 9
[ "What", "is", "the", "average", "rating", "for", "each", "episode", "in", "season", "9", "?" ]
[ { "id": 4, "type": "column", "value": "episode_id" }, { "id": 0, "type": "table", "value": "episode" }, { "id": 1, "type": "column", "value": "season" }, { "id": 3, "type": "column", "value": "rating" }, { "id": 2, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O" ]
12,258
world
bird:train.json:7876
List down the name of countries whereby English is their official language.
SELECT T1.Name FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T'
[ "List", "down", "the", "name", "of", "countries", "whereby", "English", "is", "their", "official", "language", "." ]
[ { "id": 2, "type": "table", "value": "countrylanguage" }, { "id": 4, "type": "column", "value": "countrycode" }, { "id": 7, "type": "column", "value": "isofficial" }, { "id": 5, "type": "column", "value": "language" }, { "id": 1, "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": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
12,259
regional_sales
bird:train.json:2587
Name the sales team name who had orders with the greatest net profit in 2020.
SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/20' GROUP BY T2.`Sales Team` ORDER BY SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) DESC LIMIT 1
[ "Name", "the", "sales", "team", "name", "who", "had", "orders", "with", "the", "greatest", "net", "profit", "in", "2020", "." ]
[ { "id": 1, "type": "table", "value": "Sales Orders" }, { "id": 6, "type": "column", "value": "_salesteamid" }, { "id": 5, "type": "column", "value": "salesteamid" }, { "id": 0, "type": "column", "value": "Sales Team" }, { "id": 2, "type": "tabl...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 2, 3 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O" ]
12,260
retails
bird:train.json:6838
Please indicate the total price of order key 32.
SELECT o_totalprice FROM orders WHERE o_orderkey = 32
[ "Please", "indicate", "the", "total", "price", "of", "order", "key", "32", "." ]
[ { "id": 1, "type": "column", "value": "o_totalprice" }, { "id": 2, "type": "column", "value": "o_orderkey" }, { "id": 0, "type": "table", "value": "orders" }, { "id": 3, "type": "value", "value": "32" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
12,261
address_1
bird:test.json:768
What are the names, codes, states, and countries for all cities?
SELECT city_name , city_code , state , country FROM City
[ "What", "are", "the", "names", ",", "codes", ",", "states", ",", "and", "countries", "for", "all", "cities", "?" ]
[ { "id": 1, "type": "column", "value": "city_name" }, { "id": 2, "type": "column", "value": "city_code" }, { "id": 4, "type": "column", "value": "country" }, { "id": 3, "type": "column", "value": "state" }, { "id": 0, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
12,262
language_corpus
bird:train.json:5741
What is the percentage of words in the Catalan language that have a repetition of more than 16,000 times?
SELECT CAST(COUNT(CASE WHEN occurrences > 16000 THEN lid ELSE NULL END) AS REAL) * 100 / COUNT(lid) FROM langs_words
[ "What", "is", "the", "percentage", "of", "words", "in", "the", "Catalan", "language", "that", "have", "a", "repetition", "of", "more", "than", "16,000", "times", "?" ]
[ { "id": 0, "type": "table", "value": "langs_words" }, { "id": 3, "type": "column", "value": "occurrences" }, { "id": 4, "type": "value", "value": "16000" }, { "id": 1, "type": "value", "value": "100" }, { "id": 2, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 17 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
12,263
codebase_comments
bird:train.json:650
What is the percentage of respositories that receive more than 2,000 stars?
SELECT CAST(SUM(CASE WHEN Stars > 2000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Stars) FROM Repo
[ "What", "is", "the", "percentage", "of", "respositories", "that", "receive", "more", "than", "2,000", "stars", "?" ]
[ { "id": 2, "type": "column", "value": "stars" }, { "id": 0, "type": "table", "value": "repo" }, { "id": 5, "type": "value", "value": "2000" }, { "id": 1, "type": "value", "value": "100" }, { "id": 3, "type": "value", "value": "0" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "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": [ 10 ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
12,264
books
bird:train.json:6039
On what dates were books ordered at a price of 16.54?
SELECT T1.order_date FROM cust_order AS T1 INNER JOIN order_line AS T2 ON T1.order_id = T2.order_id WHERE T2.price = 16.54
[ "On", "what", "dates", "were", "books", "ordered", "at", "a", "price", "of", "16.54", "?" ]
[ { "id": 0, "type": "column", "value": "order_date" }, { "id": 1, "type": "table", "value": "cust_order" }, { "id": 2, "type": "table", "value": "order_line" }, { "id": 5, "type": "column", "value": "order_id" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
12,265
bike_1
spider:train_spider.json:132
What are the different names for each station that has ever had 7 bikes available?
SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7
[ "What", "are", "the", "different", "names", "for", "each", "station", "that", "has", "ever", "had", "7", "bikes", "available", "?" ]
[ { "id": 3, "type": "column", "value": "bikes_available" }, { "id": 6, "type": "column", "value": "station_id" }, { "id": 1, "type": "table", "value": "station" }, { "id": 2, "type": "table", "value": "status" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 13, 14 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O" ]
12,266
movielens
bird:train.json:2258
Among the most rated UK movies, how many of them has running time of less than 2?
SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'UK' AND T2.runningtime < 2 AND T1.rating = 5
[ "Among", "the", "most", "rated", "UK", "movies", ",", "how", "many", "of", "them", "has", "running", "time", "of", "less", "than", "2", "?" ]
[ { "id": 5, "type": "column", "value": "runningtime" }, { "id": 2, "type": "column", "value": "movieid" }, { "id": 3, "type": "column", "value": "country" }, { "id": 0, "type": "table", "value": "u2base" }, { "id": 1, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
12,267
network_2
spider:train_spider.json:4445
What are the names of every person who has a friend over 40 and under 30?
SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)
[ "What", "are", "the", "names", "of", "every", "person", "who", "has", "a", "friend", "over", "40", "and", "under", "30", "?" ]
[ { "id": 2, "type": "table", "value": "personfriend" }, { "id": 1, "type": "table", "value": "person" }, { "id": 3, "type": "column", "value": "friend" }, { "id": 0, "type": "column", "value": "name" }, { "id": 4, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 7, 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "I-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-VALUE", "O" ]
12,268
sales
bird:train.json:5395
Tally the product name and quantity of the first ten sales.
SELECT T3.Name, T2.Quantity FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T2.SalesID BETWEEN 1 AND 10
[ "Tally", "the", "product", "name", "and", "quantity", "of", "the", "first", "ten", "sales", "." ]
[ { "id": 9, "type": "column", "value": "customerid" }, { "id": 6, "type": "table", "value": "customers" }, { "id": 8, "type": "column", "value": "productid" }, { "id": 1, "type": "column", "value": "quantity" }, { "id": 2, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
12,269
boat_1
bird:test.json:889
How many sailors whose name starts with letter D exist ?
select count(*) from sailors where name like 'd%'
[ "How", "many", "sailors", "whose", "name", "starts", "with", "letter", "D", "exist", "?" ]
[ { "id": 0, "type": "table", "value": "sailors" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "value", "value": "d%" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O" ]
12,270
works_cycles
bird:train.json:7082
What percentage of male employees hired throughout the years 2009 are married?
SELECT CAST(SUM(CASE WHEN MaritalStatus = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(BusinessEntityID) FROM Employee WHERE SUBSTR(HireDate, 1, 4) = '2009' AND Gender = 'M'
[ "What", "percentage", "of", "male", "employees", "hired", "throughout", "the", "years", "2009", "are", "married", "?" ]
[ { "id": 5, "type": "column", "value": "businessentityid" }, { "id": 10, "type": "column", "value": "maritalstatus" }, { "id": 0, "type": "table", "value": "employee" }, { "id": 6, "type": "column", "value": "hiredate" }, { "id": 2, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O" ]
12,271
flight_4
spider:train_spider.json:6821
Find the number of airports whose name contain the word 'International'.
SELECT count(*) FROM airports WHERE name LIKE '%International%'
[ "Find", "the", "number", "of", "airports", "whose", "name", "contain", "the", "word", "'", "International", "'", "." ]
[ { "id": 2, "type": "value", "value": "%International%" }, { "id": 0, "type": "table", "value": "airports" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
12,273
authors
bird:train.json:3521
How many papers whose authors include Thomas Wiegand were published in 1995?
SELECT COUNT(T2.Title) FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Thomas Wiegand' AND T2.Year = 1995
[ "How", "many", "papers", "whose", "authors", "include", "Thomas", "Wiegand", "were", "published", "in", "1995", "?" ]
[ { "id": 6, "type": "value", "value": "Thomas Wiegand" }, { "id": 0, "type": "table", "value": "paperauthor" }, { "id": 3, "type": "column", "value": "paperid" }, { "id": 1, "type": "table", "value": "paper" }, { "id": 2, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "O" ]
12,274
debit_card_specializing
bird:dev.json:1494
What percentage of Slovakian gas stations are premium?
SELECT CAST(SUM(IIF(Segment = 'Premium', 1, 0)) AS FLOAT) * 100 / COUNT(GasStationID) FROM gasstations WHERE Country = 'SVK'
[ "What", "percentage", "of", "Slovakian", "gas", "stations", "are", "premium", "?" ]
[ { "id": 4, "type": "column", "value": "gasstationid" }, { "id": 0, "type": "table", "value": "gasstations" }, { "id": 1, "type": "column", "value": "country" }, { "id": 7, "type": "column", "value": "segment" }, { "id": 8, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 4, 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "B-VALUE", "O" ]
12,275
wine_1
spider:train_spider.json:6527
List the area and county of all appelations.
SELECT Area , County FROM APPELLATIONS
[ "List", "the", "area", "and", "county", "of", "all", "appelations", "." ]
[ { "id": 0, "type": "table", "value": "appellations" }, { "id": 2, "type": "column", "value": "county" }, { "id": 1, "type": "column", "value": "area" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
12,276
student_loan
bird:train.json:4478
Calculate the average number of female students who are disabled and who joined Foreign Legion organization.
SELECT CAST(SUM(IIF(T3.name IS NULL, 1, 0)) AS REAL) / COUNT(T1.name) FROM disabled AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T2.name = T3.name WHERE T2.organ = 'foreign_legion'
[ "Calculate", "the", "average", "number", "of", "female", "students", "who", "are", "disabled", "and", "who", "joined", "Foreign", "Legion", "organization", "." ]
[ { "id": 2, "type": "value", "value": "foreign_legion" }, { "id": 3, "type": "table", "value": "disabled" }, { "id": 4, "type": "table", "value": "enlist" }, { "id": 1, "type": "column", "value": "organ" }, { "id": 0, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "O" ]
12,277
shipping
bird:train.json:5660
List all the cities where Zachery Hicks transported goods.
SELECT DISTINCT T3.city_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id INNER JOIN city AS T3 ON T1.city_id = T3.city_id WHERE T2.first_name = 'Zachery' AND T2.last_name = 'Hicks'
[ "List", "all", "the", "cities", "where", "Zachery", "Hicks", "transported", "goods", "." ]
[ { "id": 5, "type": "column", "value": "first_name" }, { "id": 0, "type": "column", "value": "city_name" }, { "id": 7, "type": "column", "value": "last_name" }, { "id": 9, "type": "column", "value": "driver_id" }, { "id": 2, "type": "table", ...
[ { "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": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "B-VALUE", "B-VALUE", "O", "O", "O" ]
12,278
card_games
bird:dev.json:360
cards are not directly linked to language but through table 'set'. you need to add set in covered table & rephrase your question What are the languages available for the set that card 'Angel of Mercy' is in?
SELECT language FROM set_translations WHERE id IN ( SELECT id FROM cards WHERE name = 'Angel of Mercy' )
[ "cards", "are", "not", "directly", "linked", "to", "language", "but", "through", "table", "'", "set", "'", ".", "you", "need", "to", "add", "set", "in", "covered", "table", "&", "rephrase", "your", "question", "\n", "What", "are", "the", "languages", "av...
[ { "id": 0, "type": "table", "value": "set_translations" }, { "id": 5, "type": "value", "value": "Angel of Mercy" }, { "id": 1, "type": "column", "value": "language" }, { "id": 3, "type": "table", "value": "cards" }, { "id": 4, "type": "column",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 0 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", ...
12,280
student_club
bird:dev.json:1348
For all the budgets for "November Meeting", how many of them had exceeded the budget?
SELECT COUNT(T2.event_id) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'November Meeting' AND T1.remaining < 0
[ "For", "all", "the", "budgets", "for", "\"", "November", "Meeting", "\"", ",", "how", "many", "of", "them", "had", "exceeded", "the", "budget", "?" ]
[ { "id": 5, "type": "value", "value": "November Meeting" }, { "id": 3, "type": "column", "value": "link_to_event" }, { "id": 4, "type": "column", "value": "event_name" }, { "id": 6, "type": "column", "value": "remaining" }, { "id": 2, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "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": [ 6, ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
12,281
theme_gallery
spider:train_spider.json:1664
Count the number of exhibitions that happened in or after 2005.
SELECT count(*) FROM exhibition WHERE YEAR >= 2005
[ "Count", "the", "number", "of", "exhibitions", "that", "happened", "in", "or", "after", "2005", "." ]
[ { "id": 0, "type": "table", "value": "exhibition" }, { "id": 1, "type": "column", "value": "year" }, { "id": 2, "type": "value", "value": "2005" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
12,282
e_commerce
bird:test.json:73
What are the different names, prices, and descriptions for all products bought by female customers?
SELECT DISTINCT T1.product_name , T1.product_price , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T2.order_id = T3.order_id JOIN Customers AS T4 ON T3.customer_id = T4.customer_id WHERE T4.gender_code = 'Female'
[ "What", "are", "the", "different", "names", ",", "prices", ",", "and", "descriptions", "for", "all", "products", "bought", "by", "female", "customers", "?" ]
[ { "id": 2, "type": "column", "value": "product_description" }, { "id": 1, "type": "column", "value": "product_price" }, { "id": 0, "type": "column", "value": "product_name" }, { "id": 4, "type": "column", "value": "gender_code" }, { "id": 7, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-TABLE", "O" ]
12,283
flight_1
spider:train_spider.json:426
What are the names of all employees who have a certificate to fly Boeing 737-800?
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800"
[ "What", "are", "the", "names", "of", "all", "employees", "who", "have", "a", "certificate", "to", "fly", "Boeing", "737", "-", "800", "?" ]
[ { "id": 2, "type": "column", "value": "Boeing 737-800" }, { "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": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13, 14, 15, 16 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
12,284
school_bus
spider:train_spider.json:6356
Show all home cities except for those having a driver older than 40.
SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40
[ "Show", "all", "home", "cities", "except", "for", "those", "having", "a", "driver", "older", "than", "40", "." ]
[ { "id": 1, "type": "column", "value": "home_city" }, { "id": 0, "type": "table", "value": "driver" }, { "id": 2, "type": "column", "value": "age" }, { "id": 3, "type": "value", "value": "40" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
12,285
bakery_1
bird:test.json:1548
What are all the receipt numbers that have a good with a price above 10 or have the earliest date?
SELECT T1.Receipt FROM items AS T1 JOIN goods AS T2 ON T1.item = T2.id WHERE T2.price > 10 UNION SELECT ReceiptNumber FROM receipts WHERE date = (SELECT date FROM receipts ORDER BY date LIMIT 1)
[ "What", "are", "all", "the", "receipt", "numbers", "that", "have", "a", "good", "with", "a", "price", "above", "10", "or", "have", "the", "earliest", "date", "?" ]
[ { "id": 6, "type": "column", "value": "receiptnumber" }, { "id": 0, "type": "table", "value": "receipts" }, { "id": 1, "type": "column", "value": "receipt" }, { "id": 2, "type": "table", "value": "items" }, { "id": 3, "type": "table", "valu...
[ { "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-COLUMN", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O" ]
12,286
county_public_safety
spider:train_spider.json:2557
How many cities are in counties that have populations of over 20000?
SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)
[ "How", "many", "cities", "are", "in", "counties", "that", "have", "populations", "of", "over", "20000", "?" ]
[ { "id": 2, "type": "table", "value": "county_public_safety" }, { "id": 3, "type": "column", "value": "population" }, { "id": 1, "type": "column", "value": "county_id" }, { "id": 4, "type": "value", "value": "20000" }, { "id": 0, "type": "table"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
12,287
soccer_3
bird:test.json:10
What is the name of the player with the highest earnings?
SELECT Name FROM player ORDER BY Earnings DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "player", "with", "the", "highest", "earnings", "?" ]
[ { "id": 2, "type": "column", "value": "earnings" }, { "id": 0, "type": "table", "value": "player" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
12,288
voter_2
spider:train_spider.json:5485
What are the first names and last names of the students who are 18 years old and have vice president votes.
SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18
[ "What", "are", "the", "first", "names", "and", "last", "names", "of", "the", "students", "who", "are", "18", "years", "old", "and", "have", "vice", "president", "votes", "." ]
[ { "id": 7, "type": "column", "value": "vice_president_vote" }, { "id": 3, "type": "table", "value": "voting_record" }, { "id": 2, "type": "table", "value": "student" }, { "id": 0, "type": "column", "value": "fname" }, { "id": 1, "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": [ 12 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
12,289
image_and_language
bird:train.json:7609
Give the X and Y coordinates of the sample object of image ID 23 that has the 'cast' attribute class.
SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 23 AND T1.ATT_CLASS = 'cast'
[ "Give", "the", "X", "and", "Y", "coordinates", "of", "the", "sample", "object", "of", "image", "ID", "23", "that", "has", "the", "'", "cast", "'", "attribute", "class", "." ]
[ { "id": 0, "type": "column", "value": "obj_sample_id" }, { "id": 10, "type": "column", "value": "att_class_id" }, { "id": 4, "type": "table", "value": "att_classes" }, { "id": 5, "type": "table", "value": "img_obj_att" }, { "id": 8, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O" ]
12,290
law_episode
bird:train.json:1258
How many keywords are there in the episode Disciple?
SELECT COUNT(T2.keyword) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Disciple'
[ "How", "many", "keywords", "are", "there", "in", "the", "episode", "Disciple", "?" ]
[ { "id": 5, "type": "column", "value": "episode_id" }, { "id": 3, "type": "value", "value": "Disciple" }, { "id": 0, "type": "table", "value": "episode" }, { "id": 1, "type": "table", "value": "keyword" }, { "id": 4, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "O" ]
12,291
public_review_platform
bird:train.json:3839
How many businesses of Yelp are in Scottsdale?
SELECT COUNT(business_id) FROM Business WHERE city LIKE 'Scottsdale'
[ "How", "many", "businesses", "of", "Yelp", "are", "in", "Scottsdale", "?" ]
[ { "id": 3, "type": "column", "value": "business_id" }, { "id": 2, "type": "value", "value": "Scottsdale" }, { "id": 0, "type": "table", "value": "business" }, { "id": 1, "type": "column", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O" ]
12,292
music_1
spider:train_spider.json:3580
What are the names of all songs that are ordered by their resolution numbers?
SELECT song_name FROM song ORDER BY resolution
[ "What", "are", "the", "names", "of", "all", "songs", "that", "are", "ordered", "by", "their", "resolution", "numbers", "?" ]
[ { "id": 2, "type": "column", "value": "resolution" }, { "id": 1, "type": "column", "value": "song_name" }, { "id": 0, "type": "table", "value": "song" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "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", "B-COLUMN", "O", "O" ]
12,293
cre_Drama_Workshop_Groups
spider:train_spider.json:5092
List the order dates of all the bookings.
SELECT Order_Date FROM BOOKINGS
[ "List", "the", "order", "dates", "of", "all", "the", "bookings", "." ]
[ { "id": 1, "type": "column", "value": "order_date" }, { "id": 0, "type": "table", "value": "bookings" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "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", "B-TABLE", "O" ]
12,294
books
bird:train.json:6047
Who is the author of the book with the biggest page count?
SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id ORDER BY T1.num_pages DESC LIMIT 1
[ "Who", "is", "the", "author", "of", "the", "book", "with", "the", "biggest", "page", "count", "?" ]
[ { "id": 0, "type": "column", "value": "author_name" }, { "id": 4, "type": "table", "value": "book_author" }, { "id": 2, "type": "column", "value": "num_pages" }, { "id": 5, "type": "column", "value": "author_id" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O" ]
12,295
department_store
spider:train_spider.json:4753
Find the ids of all distinct customers who made order after some orders that were Cancelled.
SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = "Cancelled")
[ "Find", "the", "ids", "of", "all", "distinct", "customers", "who", "made", "order", "after", "some", "orders", "that", "were", "Cancelled", "." ]
[ { "id": 3, "type": "column", "value": "order_status_code" }, { "id": 0, "type": "table", "value": "customer_orders" }, { "id": 1, "type": "column", "value": "customer_id" }, { "id": 2, "type": "column", "value": "order_date" }, { "id": 4, "type...
[ { "entity_id": 0, "token_idxs": [ 11, 12 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "B-COLUMN", "O" ]
12,296
computer_student
bird:train.json:991
Please list the levels of the all courses taught by teacher no.79.
SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 79
[ "Please", "list", "the", "levels", "of", "the", "all", "courses", "taught", "by", "teacher", "no.79", "." ]
[ { "id": 0, "type": "column", "value": "courselevel" }, { "id": 5, "type": "column", "value": "course_id" }, { "id": 2, "type": "table", "value": "taughtby" }, { "id": 1, "type": "table", "value": "course" }, { "id": 3, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "O", "O", "O" ]
12,297
video_games
bird:train.json:3504
When was the game ID 156 released?
SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id WHERE T2.game_id = 156
[ "When", "was", "the", "game", "ID", "156", "released", "?" ]
[ { "id": 5, "type": "column", "value": "game_publisher_id" }, { "id": 2, "type": "table", "value": "game_publisher" }, { "id": 1, "type": "table", "value": "game_platform" }, { "id": 0, "type": "column", "value": "release_year" }, { "id": 3, "ty...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "B-VALUE", "B-COLUMN", "O" ]
12,298
mondial_geo
bird:train.json:8305
How many volcanic mountains are there in countries whose population is no more than 5000000?
SELECT COUNT(DISTINCT T3.Name) FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country INNER JOIN mountain AS T3 ON T3.Name = T2.Mountain WHERE T3.Type = 'volcanic' AND T1.Population <= 5000000
[ "How", "many", "volcanic", "mountains", "are", "there", "in", "countries", "whose", "population", "is", "no", "more", "than", "5000000", "?" ]
[ { "id": 3, "type": "table", "value": "geo_mountain" }, { "id": 7, "type": "column", "value": "population" }, { "id": 0, "type": "table", "value": "mountain" }, { "id": 4, "type": "column", "value": "mountain" }, { "id": 6, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
12,299
cs_semester
bird:train.json:919
Calculate the GPA of the semester for Laughton Antonio.
SELECT CAST(SUM(T3.credit * CASE T1.grade WHEN 'A' THEN 4 WHEN 'B' THEN 3 WHEN 'C' THEN 2 WHEN 'D' THEN 1 ELSE 1 END) AS REAL) / COUNT(T3.credit) FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T1.course_id = T3.course_id WHERE T2.f_name = 'Laughton' AND T2.l...
[ "Calculate", "the", "GPA", "of", "the", "semester", "for", "Laughton", "Antonio", "." ]
[ { "id": 1, "type": "table", "value": "registration" }, { "id": 9, "type": "column", "value": "student_id" }, { "id": 3, "type": "column", "value": "course_id" }, { "id": 5, "type": "value", "value": "Laughton" }, { "id": 2, "type": "table", ...
[ { "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": [ 7 ] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O" ]
12,300
thrombosis_prediction
bird:dev.json:1273
How many patients have a normal anti-SSB and are diagnosed with SLE in the examination?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSB = 'negative' OR '0' AND T1.Diagnosis = 'SLE'
[ "How", "many", "patients", "have", "a", "normal", "anti", "-", "SSB", "and", "are", "diagnosed", "with", "SLE", "in", "the", "examination", "?" ]
[ { "id": 1, "type": "table", "value": "laboratory" }, { "id": 6, "type": "column", "value": "diagnosis" }, { "id": 4, "type": "value", "value": "negative" }, { "id": 0, "type": "table", "value": "patient" }, { "id": 3, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "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", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O" ]
12,301
customers_card_transactions
spider:train_spider.json:716
What are the ids and full names of customers who hold two or more cards?
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2
[ "What", "are", "the", "ids", "and", "full", "names", "of", "customers", "who", "hold", "two", "or", "more", "cards", "?" ]
[ { "id": 1, "type": "column", "value": "customer_first_name" }, { "id": 2, "type": "column", "value": "customer_last_name" }, { "id": 3, "type": "table", "value": "customers_cards" }, { "id": 0, "type": "column", "value": "customer_id" }, { "id": 4,...
[ { "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": [ 8 ] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O" ]
12,304
tracking_software_problems
spider:train_spider.json:5377
For each product with some problems, list the count of problems and the product id.
SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id
[ "For", "each", "product", "with", "some", "problems", ",", "list", "the", "count", "of", "problems", "and", "the", "product", "i", "d." ]
[ { "id": 0, "type": "column", "value": "product_id" }, { "id": 1, "type": "table", "value": "problems" }, { "id": 2, "type": "table", "value": "product" } ]
[ { "entity_id": 0, "token_idxs": [ 15, 16 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN" ]
12,305
retail_world
bird:train.json:6644
How many orders were handled by Michael Suyama. State the order ID.
SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Michael' AND T1.LastName = 'Suyama'
[ "How", "many", "orders", "were", "handled", "by", "Michael", "Suyama", ".", "State", "the", "order", "ID", "." ]
[ { "id": 3, "type": "column", "value": "employeeid" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 4, "type": "column", "value": "firstname" }, { "id": 6, "type": "column", "value": "lastname" }, { "id": 2, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-VALUE", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O" ]
12,307
browser_web
spider:train_spider.json:1833
What are the ids and names of the web accelerators that are compatible with two or more browsers?
SELECT T1.id , T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id HAVING count(*) >= 2
[ "What", "are", "the", "ids", "and", "names", "of", "the", "web", "accelerators", "that", "are", "compatible", "with", "two", "or", "more", "browsers", "?" ]
[ { "id": 3, "type": "table", "value": "accelerator_compatible_browser" }, { "id": 2, "type": "table", "value": "web_client_accelerator" }, { "id": 5, "type": "column", "value": "accelerator_id" }, { "id": 1, "type": "column", "value": "name" }, { "i...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10, 11, 12 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "B-TABLE", "I-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O" ]
12,308
sports_competition
spider:train_spider.json:3372
What are the names of all clubs that do not have any players?
SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)
[ "What", "are", "the", "names", "of", "all", "clubs", "that", "do", "not", "have", "any", "players", "?" ]
[ { "id": 2, "type": "column", "value": "club_id" }, { "id": 3, "type": "table", "value": "player" }, { "id": 0, "type": "table", "value": "club" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
12,309
manufactory_1
spider:train_spider.json:5323
What are the names of all products?
SELECT Name FROM Products
[ "What", "are", "the", "names", "of", "all", "products", "?" ]
[ { "id": 0, "type": "table", "value": "products" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]