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
10,481
sales
bird:train.json:5452
How many "Mountain-100 Silver, 38" were sold by Stearns MacFeather?
SELECT SUM(T2.Quantity) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Stearns' AND T1.LastName = 'MacFeather' AND T3.Name = 'Mountain-100 Silver, 38'
[ "How", "many", "\"", "Mountain-100", "Silver", ",", "38", "\"", "were", "sold", "by", "Stearns", "MacFeather", "?" ]
[ { "id": 10, "type": "value", "value": "Mountain-100 Silver, 38" }, { "id": 12, "type": "column", "value": "salespersonid" }, { "id": 8, "type": "value", "value": "MacFeather" }, { "id": 11, "type": "column", "value": "employeeid" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O" ]
10,482
product_catalog
spider:train_spider.json:317
What is the entry name of the most expensive catalog (in USD)?
SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1
[ "What", "is", "the", "entry", "name", "of", "the", "most", "expensive", "catalog", "(", "in", "USD", ")", "?" ]
[ { "id": 1, "type": "column", "value": "catalog_entry_name" }, { "id": 0, "type": "table", "value": "catalog_contents" }, { "id": 2, "type": "column", "value": "price_in_dollars" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
10,483
university
bird:train.json:8022
Give the score and number of international students in university ID 100 in 2015.
SELECT CAST(T1.num_students * T1.pct_international_students AS REAL) / 100, T2.score FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.year = 2015 AND T1.university_id = 100
[ "Give", "the", "score", "and", "number", "of", "international", "students", "in", "university", "ID", "100", "in", "2015", "." ]
[ { "id": 8, "type": "column", "value": "pct_international_students" }, { "id": 2, "type": "table", "value": "university_ranking_year" }, { "id": 1, "type": "table", "value": "university_year" }, { "id": 4, "type": "column", "value": "university_id" }, {...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 9, 10 ] }, { "entity_id...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "B-VALUE", "O" ]
10,484
movie_1
spider:train_spider.json:2485
What are the titles of all movies that were not reviewed by Chris Jackson?
SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson'
[ "What", "are", "the", "titles", "of", "all", "movies", "that", "were", "not", "reviewed", "by", "Chris", "Jackson", "?" ]
[ { "id": 4, "type": "value", "value": "Chris Jackson" }, { "id": 2, "type": "table", "value": "reviewer" }, { "id": 5, "type": "table", "value": "rating" }, { "id": 0, "type": "table", "value": "movie" }, { "id": 1, "type": "column", "value"...
[ { "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": [ 12, 13 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O" ]
10,486
small_bank_1
spider:train_spider.json:1776
Find the total savings balance of all accounts except the account with name ‘Brown’.
SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown'
[ "Find", "the", "total", "savings", "balance", "of", "all", "accounts", "except", "the", "account", "with", "name", "‘", "Brown", "’", "." ]
[ { "id": 0, "type": "table", "value": "accounts" }, { "id": 1, "type": "table", "value": "savings" }, { "id": 4, "type": "column", "value": "balance" }, { "id": 5, "type": "column", "value": "custid" }, { "id": 3, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
10,487
protein_institute
spider:train_spider.json:1922
For each building, show the name of the building and the number of institutions in it.
SELECT T1.name , count(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id
[ "For", "each", "building", ",", "show", "the", "name", "of", "the", "building", "and", "the", "number", "of", "institutions", "in", "it", "." ]
[ { "id": 0, "type": "column", "value": "building_id" }, { "id": 3, "type": "table", "value": "institution" }, { "id": 2, "type": "table", "value": "building" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
10,488
card_games
bird:dev.json:478
What is card number 4 in the set Coldsnap?
SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.number = 4
[ "What", "is", "card", "number", "4", "in", "the", "set", "Coldsnap", "?" ]
[ { "id": 5, "type": "value", "value": "Coldsnap" }, { "id": 4, "type": "column", "value": "setcode" }, { "id": 6, "type": "column", "value": "number" }, { "id": 1, "type": "table", "value": "cards" }, { "id": 0, "type": "column", "value": "n...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_...
[ "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
10,489
culture_company
spider:train_spider.json:6999
What are all company names that have a corresponding movie directed in the year 1999?
SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999
[ "What", "are", "all", "company", "names", "that", "have", "a", "corresponding", "movie", "directed", "in", "the", "year", "1999", "?" ]
[ { "id": 2, "type": "table", "value": "culture_company" }, { "id": 0, "type": "column", "value": "company_name" }, { "id": 5, "type": "column", "value": "movie_id" }, { "id": 1, "type": "table", "value": "movie" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
10,490
simpson_episodes
bird:train.json:4270
How many of the crew members who are taller than 1.70m were born in Canada?
SELECT COUNT(name) FROM Person WHERE height_meters > 1.70 AND birth_country = 'Canada';
[ "How", "many", "of", "the", "crew", "members", "who", "are", "taller", "than", "1.70", "m", "were", "born", "in", "Canada", "?" ]
[ { "id": 2, "type": "column", "value": "height_meters" }, { "id": 4, "type": "column", "value": "birth_country" }, { "id": 0, "type": "table", "value": "person" }, { "id": 5, "type": "value", "value": "Canada" }, { "id": 1, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 15 ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O" ]
10,491
software_company
bird:train.json:8531
List down the customer's geographic identifier who are handlers or cleaners.
SELECT GEOID FROM Customers WHERE OCCUPATION = 'Handlers-cleaners'
[ "List", "down", "the", "customer", "'s", "geographic", "identifier", "who", "are", "handlers", "or", "cleaners", "." ]
[ { "id": 3, "type": "value", "value": "Handlers-cleaners" }, { "id": 2, "type": "column", "value": "occupation" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 1, "type": "column", "value": "geoid" } ]
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "enti...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
10,492
restaurant_bills
bird:test.json:641
Who are the distinct managers of branches?
SELECT DISTINCT Manager FROM branch
[ "Who", "are", "the", "distinct", "managers", "of", "branches", "?" ]
[ { "id": 1, "type": "column", "value": "manager" }, { "id": 0, "type": "table", "value": "branch" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
10,493
public_review_platform
bird:train.json:4086
Which business ID received the review of 4 star and above by 65% of user? Describe their active status and city.
SELECT DISTINCT T2.business_id, T2.city FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_stars >= 4 AND ( SELECT CAST(( SELECT COUNT(DISTINCT T1.user_id) FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_stars >= 4 ) AS REAL) *...
[ "Which", "business", "ID", "received", "the", "review", "of", "4", "star", "and", "above", "by", "65", "%", "of", "user", "?", "Describe", "their", "active", "status", "and", "city", "." ]
[ { "id": 4, "type": "column", "value": "review_stars" }, { "id": 0, "type": "column", "value": "business_id" }, { "id": 3, "type": "table", "value": "business" }, { "id": 2, "type": "table", "value": "reviews" }, { "id": 9, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 22 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [ 6, 8 ...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,494
retail_world
bird:train.json:6663
Calculate the percentage salary of employees who handled orders shipped in 1996.
SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T2.ShippedDate) = '1996' THEN T1.Salary ELSE 0 END) AS REAL) * 100 / SUM(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID
[ "Calculate", "the", "percentage", "salary", "of", "employees", "who", "handled", "orders", "shipped", "in", "1996", "." ]
[ { "id": 8, "type": "column", "value": "shippeddate" }, { "id": 2, "type": "column", "value": "employeeid" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 1, "type": "table", "value": "orders" }, { "id": 4, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
10,495
cre_Drama_Workshop_Groups
spider:train_spider.json:5135
Find the names of the workshop groups where services with product name "film" are performed.
SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = "film"
[ "Find", "the", "names", "of", "the", "workshop", "groups", "where", "services", "with", "product", "name", "\"", "film", "\"", "are", "performed", "." ]
[ { "id": 2, "type": "table", "value": "drama_workshop_groups" }, { "id": 1, "type": "column", "value": "store_email_address" }, { "id": 6, "type": "column", "value": "workshop_group_id" }, { "id": 4, "type": "column", "value": "product_name" }, { "i...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10, 11 ] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O" ]
10,496
cars
bird:train.json:3138
Which car consumes fuel the most and has the highest price?
SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T1.mpg DESC, T2.price DESC LIMIT 1
[ "Which", "car", "consumes", "fuel", "the", "most", "and", "has", "the", "highest", "price", "?" ]
[ { "id": 0, "type": "column", "value": "car_name" }, { "id": 2, "type": "table", "value": "price" }, { "id": 4, "type": "column", "value": "price" }, { "id": 1, "type": "table", "value": "data" }, { "id": 3, "type": "column", "value": "mpg" ...
[ { "entity_id": 0, "token_idxs": [ 1, 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, "tok...
[ "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,497
voter_2
spider:train_spider.json:5491
What is the average age of students who have city code "NYC" and have secretary votes for the spring election cycle?
SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = "NYC" AND T2.Election_Cycle = "Spring"
[ "What", "is", "the", "average", "age", "of", "students", "who", "have", "city", "code", "\"", "NYC", "\"", "and", "have", "secretary", "votes", "for", "the", "spring", "election", "cycle", "?" ]
[ { "id": 4, "type": "column", "value": "secretary_vote" }, { "id": 7, "type": "column", "value": "election_cycle" }, { "id": 1, "type": "table", "value": "voting_record" }, { "id": 5, "type": "column", "value": "city_code" }, { "id": 0, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 16, 17 ] }, { "entity_id...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O" ]
10,498
codebase_comments
bird:train.json:588
Are the comments for the method "HtmlSharp.HtmlParser.Feed" in XML format?
SELECT CASE WHEN CommentIsXml = 0 THEN 'No' WHEN CommentIsXml = 1 THEN 'Yes' END isXMLFormat FROM Method WHERE Name = 'HtmlSharp.HtmlParser.Feed'
[ "Are", "the", "comments", "for", "the", "method", "\"", "HtmlSharp", ".", "HtmlParser", ".", "Feed", "\"", "in", "XML", "format", "?" ]
[ { "id": 2, "type": "value", "value": "HtmlSharp.HtmlParser.Feed" }, { "id": 5, "type": "column", "value": "commentisxml" }, { "id": 0, "type": "table", "value": "method" }, { "id": 1, "type": "column", "value": "name" }, { "id": 4, "type": "val...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7, 8, 9, 10, 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O" ]
10,499
video_games
bird:train.json:3365
List down the name of games published by 3DO.
SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T3.publisher_name = '3DO'
[ "List", "down", "the", "name", "of", "games", "published", "by", "3DO", "." ]
[ { "id": 2, "type": "column", "value": "publisher_name" }, { "id": 5, "type": "table", "value": "game_publisher" }, { "id": 6, "type": "column", "value": "publisher_id" }, { "id": 0, "type": "column", "value": "game_name" }, { "id": 1, "type": "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-TABLE", "O", "B-VALUE", "O" ]
10,500
regional_sales
bird:train.json:2670
Name the products via wholesale channel of the store under Pacific/Honolulu time zone.
SELECT T FROM ( SELECT DISTINCT CASE WHEN T3.`Time Zone` = 'Pacific/Honolulu' AND T2.`Sales Channel` = 'Wholesale' THEN T1.`Product Name` ELSE NULL END AS T FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` T3 ON T3.StoreID = T2._StoreID ) WHERE T IS NOT NULL
[ "Name", "the", "products", "via", "wholesale", "channel", "of", "the", "store", "under", "Pacific", "/", "Honolulu", "time", "zone", "." ]
[ { "id": 10, "type": "value", "value": "Pacific/Honolulu" }, { "id": 1, "type": "table", "value": "Store Locations" }, { "id": 11, "type": "column", "value": "Sales Channel" }, { "id": 3, "type": "table", "value": "Sales Orders" }, { "id": 6, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "I-COLUMN", "O" ]
10,502
chinook_1
spider:train_spider.json:819
Find the title of all the albums of the artist "AC/DC".
SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "AC/DC"
[ "Find", "the", "title", "of", "all", "the", "albums", "of", "the", "artist", "\"", "AC", "/", "DC", "\"", "." ]
[ { "id": 5, "type": "column", "value": "artistid" }, { "id": 2, "type": "table", "value": "artist" }, { "id": 0, "type": "column", "value": "title" }, { "id": 1, "type": "table", "value": "album" }, { "id": 4, "type": "column", "value": "AC/...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11, 12, 13 ] ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O" ]
10,503
advertising_agencies
bird:test.json:2099
List all meeting type codes and details.
SELECT meeting_type , other_details FROM meetings
[ "List", "all", "meeting", "type", "codes", "and", "details", "." ]
[ { "id": 2, "type": "column", "value": "other_details" }, { "id": 1, "type": "column", "value": "meeting_type" }, { "id": 0, "type": "table", "value": "meetings" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "O" ]
10,504
mondial_geo
bird:train.json:8220
Calculate the percentage of country which gained independence as republic after 1970.
SELECT CAST(SUM(CASE WHEN Government = 'republic' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Country) FROM politics WHERE STRFTIME('%Y', Independence) > '1970'
[ "Calculate", "the", "percentage", "of", "country", "which", "gained", "independence", "as", "republic", "after", "1970", "." ]
[ { "id": 3, "type": "column", "value": "independence" }, { "id": 8, "type": "column", "value": "government" }, { "id": 0, "type": "table", "value": "politics" }, { "id": 9, "type": "value", "value": "republic" }, { "id": 5, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
10,505
superstore
bird:train.json:2395
Calculate the total profit by Cisco SPA301 for all regions.
SELECT SUM(T1.Profit) + SUM(T2.Profit) + SUM(T3.Profit) + SUM(T4.Profit) AS totalProfit FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN central_superstore AS T3 ON T3.`Customer ID` = T2.`Customer ID` INNER JOIN south_superstore AS T4 ON T4.`Customer ID` = T3...
[ "Calculate", "the", "total", "profit", "by", "Cisco", "SPA301", "for", "all", "regions", "." ]
[ { "id": 6, "type": "table", "value": "central_superstore" }, { "id": 3, "type": "table", "value": "south_superstore" }, { "id": 8, "type": "table", "value": "west_superstore" }, { "id": 9, "type": "table", "value": "east_superstore" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ ...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O" ]
10,506
customer_complaints
spider:train_spider.json:5776
Find the emails of customers who has filed a complaints of the product with the most complaints.
SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1
[ "Find", "the", "emails", "of", "customers", "who", "has", "filed", "a", "complaints", "of", "the", "product", "with", "the", "most", "complaints", "." ]
[ { "id": 1, "type": "column", "value": "email_address" }, { "id": 0, "type": "column", "value": "customer_id" }, { "id": 3, "type": "table", "value": "complaints" }, { "id": 2, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,507
cre_Doc_Tracking_DB
spider:train_spider.json:4160
How many calendar items do we have?
SELECT count(*) FROM Ref_calendar
[ "How", "many", "calendar", "items", "do", "we", "have", "?" ]
[ { "id": 0, "type": "table", "value": "ref_calendar" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
10,508
menu
bird:train.json:5506
Where is the place that menu with ID 12472 was created for?
SELECT location FROM Menu WHERE id = 12472
[ "Where", "is", "the", "place", "that", "menu", "with", "ID", "12472", "was", "created", "for", "?" ]
[ { "id": 1, "type": "column", "value": "location" }, { "id": 3, "type": "value", "value": "12472" }, { "id": 0, "type": "table", "value": "menu" }, { "id": 2, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O" ]
10,509
codebase_community
bird:dev.json:666
Among the posts that were voted by user 1465, what is the id of the most valuable post?
SELECT T2.Id FROM votes AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 1465 ORDER BY T2.FavoriteCount DESC LIMIT 1
[ "Among", "the", "posts", "that", "were", "voted", "by", "user", "1465", ",", "what", "is", "the", "i", "d", "of", "the", "most", "valuable", "post", "?" ]
[ { "id": 5, "type": "column", "value": "favoritecount" }, { "id": 3, "type": "column", "value": "userid" }, { "id": 6, "type": "column", "value": "postid" }, { "id": 1, "type": "table", "value": "votes" }, { "id": 2, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [ 13, 14 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 8 ...
[ "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,511
cs_semester
bird:train.json:924
How many of the professors are female?
SELECT COUNT(prof_id) FROM prof WHERE gender = 'Female'
[ "How", "many", "of", "the", "professors", "are", "female", "?" ]
[ { "id": 3, "type": "column", "value": "prof_id" }, { "id": 1, "type": "column", "value": "gender" }, { "id": 2, "type": "value", "value": "Female" }, { "id": 0, "type": "table", "value": "prof" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
10,512
university
bird:train.json:8134
Among the universities in United States of America, what is the percentage of female students in year 2016?
SELECT SUM(CAST(T2.pct_female_students * T2.num_students AS REAL) / 100) * 100 / SUM(T2.num_students) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'United States of America' AND T2.year = 2016
[ "Among", "the", "universities", "in", "United", "States", "of", "America", ",", "what", "is", "the", "percentage", "of", "female", "students", "in", "year", "2016", "?" ]
[ { "id": 6, "type": "value", "value": "United States of America" }, { "id": 12, "type": "column", "value": "pct_female_students" }, { "id": 2, "type": "table", "value": "university_year" }, { "id": 11, "type": "column", "value": "university_id" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "O" ]
10,513
tv_shows
bird:test.json:143
Show the different affiliations of city channels and the number of city channels with each affiliation.
SELECT Affiliation , COUNT(*) FROM city_channel GROUP BY Affiliation
[ "Show", "the", "different", "affiliations", "of", "city", "channels", "and", "the", "number", "of", "city", "channels", "with", "each", "affiliation", "." ]
[ { "id": 0, "type": "table", "value": "city_channel" }, { "id": 1, "type": "column", "value": "affiliation" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,514
bike_share_1
bird:train.json:9081
List out all stations name that having a mean temperature 20 degree Celsius in year 2014.
SELECT DISTINCT T2.start_station_name, T2.end_station_name FROM weather AS T1 INNER JOIN trip AS T2 ON T1.zip_code = T2.zip_code WHERE T1.date LIKE '%2014' AND T1.mean_temperature_f = 20 * 1.8 + 32
[ "List", "out", "all", "stations", "name", "that", "having", "a", "mean", "temperature", "20", "degree", "Celsius", "in", "year", "2014", "." ]
[ { "id": 0, "type": "column", "value": "start_station_name" }, { "id": 7, "type": "column", "value": "mean_temperature_f" }, { "id": 1, "type": "column", "value": "end_station_name" }, { "id": 4, "type": "column", "value": "zip_code" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O" ]
10,515
match_season
spider:train_spider.json:1108
Which college have both players with position midfielder and players with position defender?
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender"
[ "Which", "college", "have", "both", "players", "with", "position", "midfielder", "and", "players", "with", "position", "defender", "?" ]
[ { "id": 0, "type": "table", "value": "match_season" }, { "id": 3, "type": "column", "value": "Midfielder" }, { "id": 2, "type": "column", "value": "position" }, { "id": 4, "type": "column", "value": "Defender" }, { "id": 1, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,516
store_1
spider:train_spider.json:552
What are the titles of all the albums?
SELECT title FROM albums;
[ "What", "are", "the", "titles", "of", "all", "the", "albums", "?" ]
[ { "id": 0, "type": "table", "value": "albums" }, { "id": 1, "type": "column", "value": "title" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
10,517
bakery_1
bird:test.json:1571
Give me the ids of Cakes whose price is at least as much as the average price of Tart?
SELECT id FROM goods WHERE food = "Cake" AND price >= (SELECT avg(price) FROM goods WHERE food = "Tart")
[ "Give", "me", "the", "ids", "of", "Cakes", "whose", "price", "is", "at", "least", "as", "much", "as", "the", "average", "price", "of", "Tart", "?" ]
[ { "id": 0, "type": "table", "value": "goods" }, { "id": 4, "type": "column", "value": "price" }, { "id": 2, "type": "column", "value": "food" }, { "id": 3, "type": "column", "value": "Cake" }, { "id": 5, "type": "column", "value": "Tart" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
10,518
customers_card_transactions
spider:train_spider.json:744
Return the type of transaction with the highest total amount.
SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1
[ "Return", "the", "type", "of", "transaction", "with", "the", "highest", "total", "amount", "." ]
[ { "id": 0, "type": "table", "value": "financial_transactions" }, { "id": 2, "type": "column", "value": "transaction_amount" }, { "id": 1, "type": "column", "value": "transaction_type" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
10,519
ship_mission
spider:train_spider.json:4002
What are the type and nationality of ships?
SELECT TYPE , Nationality FROM ship
[ "What", "are", "the", "type", "and", "nationality", "of", "ships", "?" ]
[ { "id": 2, "type": "column", "value": "nationality" }, { "id": 0, "type": "table", "value": "ship" }, { "id": 1, "type": "column", "value": "type" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
10,520
cars
bird:train.json:3124
What is the price of a Chevrolet Bel Air?
SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'chevrolet bel air'
[ "What", "is", "the", "price", "of", "a", "Chevrolet", "Bel", "Air", "?" ]
[ { "id": 4, "type": "value", "value": "chevrolet bel air" }, { "id": 3, "type": "column", "value": "car_name" }, { "id": 0, "type": "column", "value": "price" }, { "id": 2, "type": "table", "value": "price" }, { "id": 1, "type": "table", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
10,521
shipping
bird:train.json:5673
What is the weight of the shipment delivered by Andrea Simons on March 7, 2016?
SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Andrea' AND T2.last_name = 'Simons' AND T1.ship_date = '2016-03-07'
[ "What", "is", "the", "weight", "of", "the", "shipment", "delivered", "by", "Andrea", "Simons", "on", "March", "7", ",", "2016", "?" ]
[ { "id": 4, "type": "column", "value": "first_name" }, { "id": 9, "type": "value", "value": "2016-03-07" }, { "id": 3, "type": "column", "value": "driver_id" }, { "id": 6, "type": "column", "value": "last_name" }, { "id": 8, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "O", "O" ]
10,522
music_1
spider:train_spider.json:3570
What are the different names for all songs that have a higher resolution than English songs?
SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT min(resolution) FROM song WHERE languages = "english")
[ "What", "are", "the", "different", "names", "for", "all", "songs", "that", "have", "a", "higher", "resolution", "than", "English", "songs", "?" ]
[ { "id": 2, "type": "column", "value": "resolution" }, { "id": 1, "type": "column", "value": "song_name" }, { "id": 3, "type": "column", "value": "languages" }, { "id": 4, "type": "column", "value": "english" }, { "id": 0, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
10,523
european_football_1
bird:train.json:2774
For a game had a score of 1-8 in the year of 2011, what division was that game in? Give the full name of the division.
SELECT T2.division, T2.name FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2011 AND T1.FTHG = 1 AND T1.FTAG = 8
[ "For", "a", "game", "had", "a", "score", "of", "1", "-", "8", "in", "the", "year", "of", "2011", ",", "what", "division", "was", "that", "game", "in", "?", "Give", "the", "full", "name", "of", "the", "division", "." ]
[ { "id": 3, "type": "table", "value": "divisions" }, { "id": 0, "type": "column", "value": "division" }, { "id": 2, "type": "table", "value": "matchs" }, { "id": 5, "type": "column", "value": "season" }, { "id": 1, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 29 ] }, { "entity_id": 1, "token_idxs": [ 26 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O" ]
10,524
hockey
bird:train.json:7620
Name the goaltenders who had played in both PCHA and NHL league.
SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID IN ('PCHA', 'NHL') GROUP BY T2.playerID HAVING COUNT(DISTINCT T2.lgID) > 1
[ "Name", "the", "goaltenders", "who", "had", "played", "in", "both", "PCHA", "and", "NHL", "league", "." ]
[ { "id": 1, "type": "column", "value": "firstname" }, { "id": 0, "type": "column", "value": "playerid" }, { "id": 2, "type": "column", "value": "lastname" }, { "id": 4, "type": "table", "value": "goalies" }, { "id": 3, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 0 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "...
[ "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O" ]
10,525
retail_world
bird:train.json:6559
Calculate the total production for each product which were supplied from Japan
SELECT SUM(T1.UnitsInStock + T1.UnitsOnOrder) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Japan'
[ "Calculate", "the", "total", "production", "for", "each", "product", "which", "were", "supplied", "from", "Japan" ]
[ { "id": 5, "type": "column", "value": "unitsinstock" }, { "id": 6, "type": "column", "value": "unitsonorder" }, { "id": 4, "type": "column", "value": "supplierid" }, { "id": 1, "type": "table", "value": "suppliers" }, { "id": 0, "type": "table"...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-VALUE" ]
10,526
medicine_enzyme_interaction
spider:train_spider.json:963
What is the id and trade name of the medicines can interact with at least 3 enzymes?
SELECT T1.id , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3
[ "What", "is", "the", "i", "d", "and", "trade", "name", "of", "the", "medicines", "can", "interact", "with", "at", "least", "3", "enzymes", "?" ]
[ { "id": 3, "type": "table", "value": "medicine_enzyme_interaction" }, { "id": 5, "type": "column", "value": "medicine_id" }, { "id": 1, "type": "column", "value": "trade_name" }, { "id": 2, "type": "table", "value": "medicine" }, { "id": 0, "ty...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_i...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "O", "O", "O", "B-VALUE", "O", "O" ]
10,527
driving_school
spider:train_spider.json:6635
When did the staff member Janessa Sawayn leave the company?
SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";
[ "When", "did", "the", "staff", "member", "Janessa", "Sawayn", "leave", "the", "company", "?" ]
[ { "id": 1, "type": "column", "value": "date_left_staff" }, { "id": 2, "type": "column", "value": "first_name" }, { "id": 4, "type": "column", "value": "last_name" }, { "id": 3, "type": "column", "value": "Janessa" }, { "id": 5, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O" ]
10,528
movie_3
bird:train.json:9145
Give the postal code for the address No.65.
SELECT postal_code FROM address WHERE address_id = 65
[ "Give", "the", "postal", "code", "for", "the", "address", "No.65", "." ]
[ { "id": 1, "type": "column", "value": "postal_code" }, { "id": 2, "type": "column", "value": "address_id" }, { "id": 0, "type": "table", "value": "address" }, { "id": 3, "type": "value", "value": "65" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O" ]
10,529
mondial_geo
bird:train.json:8456
What kind of mountain is Ampato? Which province and nation does this mountain belong to?
SELECT T1.Type, T3.Name, T4.Name FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN country AS T4 ON T3.Country = T4.Code WHERE T1.Name = 'Ampato'
[ "What", "kind", "of", "mountain", "is", "Ampato", "?", "Which", "province", "and", "nation", "does", "this", "mountain", "belong", "to", "?" ]
[ { "id": 8, "type": "table", "value": "geo_mountain" }, { "id": 4, "type": "table", "value": "province" }, { "id": 7, "type": "table", "value": "mountain" }, { "id": 9, "type": "column", "value": "province" }, { "id": 10, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,531
card_games
bird:dev.json:418
What kind of printing is on the card that Daren Bader created?
SELECT DISTINCT availability FROM cards WHERE artist = 'Daren Bader'
[ "What", "kind", "of", "printing", "is", "on", "the", "card", "that", "Daren", "Bader", "created", "?" ]
[ { "id": 1, "type": "column", "value": "availability" }, { "id": 3, "type": "value", "value": "Daren Bader" }, { "id": 2, "type": "column", "value": "artist" }, { "id": 0, "type": "table", "value": "cards" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O" ]
10,533
soccer_2
spider:train_spider.json:5000
Find the name of all students who were in the tryout sorted in alphabetic order.
SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName
[ "Find", "the", "name", "of", "all", "students", "who", "were", "in", "the", "tryout", "sorted", "in", "alphabetic", "order", "." ]
[ { "id": 1, "type": "table", "value": "player" }, { "id": 2, "type": "table", "value": "tryout" }, { "id": 0, "type": "column", "value": "pname" }, { "id": 3, "type": "column", "value": "pid" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "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", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
10,534
bakery_1
bird:test.json:1540
What are the last names of the customers in alphabetical order?
SELECT DISTINCT LastName FROM customers ORDER BY LastName
[ "What", "are", "the", "last", "names", "of", "the", "customers", "in", "alphabetical", "order", "?" ]
[ { "id": 0, "type": "table", "value": "customers" }, { "id": 1, "type": "column", "value": "lastname" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
10,535
toxicology
bird:dev.json:199
In the molecule containing sodium atoms, how many are non-carcinogenic?
SELECT COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'na' AND T2.label = '-'
[ "In", "the", "molecule", "containing", "sodium", "atoms", ",", "how", "many", "are", "non", "-", "carcinogenic", "?" ]
[ { "id": 2, "type": "column", "value": "molecule_id" }, { "id": 1, "type": "table", "value": "molecule" }, { "id": 3, "type": "column", "value": "element" }, { "id": 5, "type": "column", "value": "label" }, { "id": 0, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
10,536
language_corpus
bird:train.json:5798
How many appearances does the word ID No. 2823 have in the Wikipedia page "Astre"?
SELECT SUM(T2.occurrences) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Astre' AND T2.wid = 2823
[ "How", "many", "appearances", "does", "the", "word", "ID", "No", ".", "2823", "have", "in", "the", "Wikipedia", "page", "\"", "Astre", "\"", "?" ]
[ { "id": 1, "type": "table", "value": "pages_words" }, { "id": 2, "type": "column", "value": "occurrences" }, { "id": 0, "type": "table", "value": "pages" }, { "id": 4, "type": "column", "value": "title" }, { "id": 5, "type": "value", "value...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "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": [ 16 ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O" ]
10,537
bakery_1
bird:test.json:1487
What is the most expensive cake and its flavor?
SELECT id , flavor FROM goods WHERE food = "Cake" ORDER BY price DESC LIMIT 1
[ "What", "is", "the", "most", "expensive", "cake", "and", "its", "flavor", "?" ]
[ { "id": 2, "type": "column", "value": "flavor" }, { "id": 0, "type": "table", "value": "goods" }, { "id": 5, "type": "column", "value": "price" }, { "id": 3, "type": "column", "value": "food" }, { "id": 4, "type": "column", "value": "Cake" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O" ]
10,538
books
bird:train.json:5982
How many books were published in Japanese?
SELECT COUNT(T2.book_id) FROM book_language AS T1 INNER JOIN book AS T2 ON T1.language_id = T2.language_id WHERE T1.language_name = 'Japanese'
[ "How", "many", "books", "were", "published", "in", "Japanese", "?" ]
[ { "id": 0, "type": "table", "value": "book_language" }, { "id": 2, "type": "column", "value": "language_name" }, { "id": 5, "type": "column", "value": "language_id" }, { "id": 3, "type": "value", "value": "Japanese" }, { "id": 4, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
10,539
college_2
spider:train_spider.json:1469
What are the names of all instructors who have taught a course, as well as the corresponding course id?
SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID
[ "What", "are", "the", "names", "of", "all", "instructors", "who", "have", "taught", "a", "course", ",", "as", "well", "as", "the", "corresponding", "course", "i", "d", "?" ]
[ { "id": 2, "type": "table", "value": "instructor" }, { "id": 1, "type": "column", "value": "course_id" }, { "id": 3, "type": "table", "value": "teaches" }, { "id": 0, "type": "column", "value": "name" }, { "id": 4, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 19, 20 ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O" ]
10,540
airline
bird:train.json:5882
What is the airport description of the airport code A11?
SELECT Description FROM Airports WHERE Code = 'A11'
[ "What", "is", "the", "airport", "description", "of", "the", "airport", "code", "A11", "?" ]
[ { "id": 1, "type": "column", "value": "description" }, { "id": 0, "type": "table", "value": "airports" }, { "id": 2, "type": "column", "value": "code" }, { "id": 3, "type": "value", "value": "A11" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
10,541
card_games
bird:dev.json:354
How many types of cards does the artist Aaron Boyd illustrated about card art?
SELECT COUNT(type) FROM cards WHERE artist = 'Aaron Boyd'
[ "How", "many", "types", "of", "cards", "does", "the", "artist", "Aaron", "Boyd", "illustrated", "about", "card", "art", "?" ]
[ { "id": 2, "type": "value", "value": "Aaron Boyd" }, { "id": 1, "type": "column", "value": "artist" }, { "id": 0, "type": "table", "value": "cards" }, { "id": 3, "type": "column", "value": "type" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O" ]
10,542
flight_1
spider:train_spider.json:386
What are the numbers of all flights coming from Los Angeles?
SELECT flno FROM Flight WHERE origin = "Los Angeles"
[ "What", "are", "the", "numbers", "of", "all", "flights", "coming", "from", "Los", "Angeles", "?" ]
[ { "id": 3, "type": "column", "value": "Los Angeles" }, { "id": 0, "type": "table", "value": "flight" }, { "id": 2, "type": "column", "value": "origin" }, { "id": 1, "type": "column", "value": "flno" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,543
allergy_1
spider:train_spider.json:486
Provide the last name of the youngest student.
SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student)
[ "Provide", "the", "last", "name", "of", "the", "youngest", "student", "." ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "lname" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
10,544
college_3
spider:train_spider.json:4650
What are the maximum and minumum grade points?
SELECT max(gradepoint) , min(gradepoint) FROM GRADECONVERSION
[ "What", "are", "the", "maximum", "and", "minumum", "grade", "points", "?" ]
[ { "id": 0, "type": "table", "value": "gradeconversion" }, { "id": 1, "type": "column", "value": "gradepoint" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6, 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", "B-COLUMN", "I-COLUMN", "O" ]
10,545
tracking_grants_for_research
spider:train_spider.json:4348
List the project details of the projects with the research outcome described with the substring 'Published'.
SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'
[ "List", "the", "project", "details", "of", "the", "projects", "with", "the", "research", "outcome", "described", "with", "the", "substring", "'", "Published", "'", "." ]
[ { "id": 2, "type": "column", "value": "outcome_description" }, { "id": 1, "type": "table", "value": "research_outcomes" }, { "id": 5, "type": "table", "value": "project_outcomes" }, { "id": 0, "type": "column", "value": "project_details" }, { "id":...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, ...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
10,546
address_1
bird:test.json:835
How far do Linda (first name) Smith (last name) and Tracy (first name) Kim (last name) live?
SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = "Linda" AND T2.Lname = "Smith" AND T3.Fname = "Tracy" AND T3.Lname = "Kim"
[ "How", "far", "do", "Linda", "(", "first", "name", ")", "Smith", "(", "last", "name", ")", "and", "Tracy", "(", "first", "name", ")", "Kim", "(", "last", "name", ")", "live", "?" ]
[ { "id": 2, "type": "table", "value": "direct_distance" }, { "id": 3, "type": "column", "value": "city2_code" }, { "id": 11, "type": "column", "value": "city1_code" }, { "id": 4, "type": "column", "value": "city_code" }, { "id": 0, "type": "colu...
[ { "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": [ 17 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
10,547
world_development_indicators
bird:train.json:2181
How many countries using the 1993 System of National Accounts methodology?
SELECT COUNT(CountryCode) FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 1993 System of National Accounts methodology.'
[ "How", "many", "countries", "using", "the", "1993", "System", "of", "National", "Accounts", "methodology", "?" ]
[ { "id": 2, "type": "value", "value": "Country uses the 1993 System of National Accounts methodology." }, { "id": 1, "type": "column", "value": "systemofnationalaccounts" }, { "id": 3, "type": "column", "value": "countrycode" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6, 7, 8, 9 ] }, { "entity_id": 2, "token_idxs": [ 3, 4, 5, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, ...
[ "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
10,548
epinions_1
spider:train_spider.json:1708
Find the name and id of the good with the highest average rank.
SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rank) DESC LIMIT 1
[ "Find", "the", "name", "and", "i", "d", "of", "the", "good", "with", "the", "highest", "average", "rank", "." ]
[ { "id": 3, "type": "table", "value": "review" }, { "id": 1, "type": "column", "value": "title" }, { "id": 0, "type": "column", "value": "i_id" }, { "id": 2, "type": "table", "value": "item" }, { "id": 4, "type": "column", "value": "rank" ...
[ { "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": [ 13 ] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,549
donor
bird:train.json:3243
What was the title for the project which got the biggest donation?
SELECT T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_total = ( SELECT MAX(donation_total) FROM donations )
[ "What", "was", "the", "title", "for", "the", "project", "which", "got", "the", "biggest", "donation", "?" ]
[ { "id": 3, "type": "column", "value": "donation_total" }, { "id": 2, "type": "table", "value": "donations" }, { "id": 4, "type": "column", "value": "projectid" }, { "id": 1, "type": "table", "value": "essays" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
10,550
synthea
bird:train.json:1473
How many patients with shellfish allergies died when they were under 12 years old? Please give their full names.
SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Shellfish allergy' AND CAST((strftime('%J', T1.deathdate) - strftime('%J', T1.birthdate)) AS REAL) / 365 < 12
[ "How", "many", "patients", "with", "shellfish", "allergies", "died", "when", "they", "were", "under", "12", "years", "old", "?", "Please", "give", "their", "full", "names", "." ]
[ { "id": 6, "type": "value", "value": "Shellfish allergy" }, { "id": 5, "type": "column", "value": "description" }, { "id": 3, "type": "table", "value": "allergies" }, { "id": 10, "type": "column", "value": "deathdate" }, { "id": 11, "type": "co...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
10,551
conference
bird:test.json:1053
How many conferences are there?
SELECT count(*) FROM conference
[ "How", "many", "conferences", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "conference" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O" ]
10,552
books
bird:train.json:6103
List the ISBN of the books that cost 7.5 dollars.
SELECT T1.isbn13 FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.price = 7.5
[ "List", "the", "ISBN", "of", "the", "books", "that", "cost", "7.5", "dollars", "." ]
[ { "id": 2, "type": "table", "value": "order_line" }, { "id": 5, "type": "column", "value": "book_id" }, { "id": 0, "type": "column", "value": "isbn13" }, { "id": 3, "type": "column", "value": "price" }, { "id": 1, "type": "table", "value": ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O" ]
10,553
retails
bird:train.json:6748
Among the customers from Brazil, how many customers are in automobile market segment?
SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'AUTOMOBILE' AND T2.n_name = 'BRAZIL'
[ "Among", "the", "customers", "from", "Brazil", ",", "how", "many", "customers", "are", "in", "automobile", "market", "segment", "?" ]
[ { "id": 5, "type": "column", "value": "c_mktsegment" }, { "id": 3, "type": "column", "value": "c_nationkey" }, { "id": 4, "type": "column", "value": "n_nationkey" }, { "id": 6, "type": "value", "value": "AUTOMOBILE" }, { "id": 2, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 12, ...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O" ]
10,554
school_player
spider:train_spider.json:4869
Take the average of the school enrollment.
SELECT avg(Enrollment) FROM school
[ "Take", "the", "average", "of", "the", "school", "enrollment", "." ]
[ { "id": 1, "type": "column", "value": "enrollment" }, { "id": 0, "type": "table", "value": "school" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "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", "B-TABLE", "B-COLUMN", "O" ]
10,555
planet_1
bird:test.json:1930
What is the number of employees that do not have clearance on Mars ?
select count(*) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = "mars" );
[ "What", "is", "the", "number", "of", "employees", "that", "do", "not", "have", "clearance", "on", "Mars", "?" ]
[ { "id": 5, "type": "table", "value": "has_clearance" }, { "id": 1, "type": "column", "value": "employeeid" }, { "id": 0, "type": "table", "value": "employee" }, { "id": 7, "type": "column", "value": "planetid" }, { "id": 8, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O" ]
10,556
allergy_1
spider:train_spider.json:497
Show all cities and corresponding number of students.
SELECT city_code , count(*) FROM Student GROUP BY city_code
[ "Show", "all", "cities", "and", "corresponding", "number", "of", "students", "." ]
[ { "id": 1, "type": "column", "value": "city_code" }, { "id": 0, "type": "table", "value": "student" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,557
party_people
spider:train_spider.json:2047
Show the minister who took office after 1961 or before 1959.
SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959
[ "Show", "the", "minister", "who", "took", "office", "after", "1961", "or", "before", "1959", "." ]
[ { "id": 2, "type": "column", "value": "took_office" }, { "id": 1, "type": "column", "value": "minister" }, { "id": 0, "type": "table", "value": "party" }, { "id": 3, "type": "value", "value": "1961" }, { "id": 4, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4, 5 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O", "B-VALUE", "O" ]
10,558
bike_share_1
bird:train.json:9082
How many bicycle trip were made within San Jose city during August 2013?
SELECT COUNT(T2.id) FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name WHERE T1.city = 'San Jose' AND T2.start_date LIKE '8/%/2013%' AND T2.start_station_name LIKE 'San Jose%' AND T2.end_station_name LIKE 'San Jose%'
[ "How", "many", "bicycle", "trip", "were", "made", "within", "San", "Jose", "city", "during", "August", "2013", "?" ]
[ { "id": 3, "type": "column", "value": "start_station_name" }, { "id": 10, "type": "column", "value": "end_station_name" }, { "id": 7, "type": "column", "value": "start_date" }, { "id": 8, "type": "value", "value": "8/%/2013%" }, { "id": 9, "typ...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-VALUE", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
10,559
cre_Doc_Tracking_DB
spider:train_spider.json:4171
Find the code of the document type "Paper".
SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper"
[ "Find", "the", "code", "of", "the", "document", "type", "\"", "Paper", "\"", "." ]
[ { "id": 0, "type": "table", "value": "ref_document_types" }, { "id": 1, "type": "column", "value": "document_type_code" }, { "id": 2, "type": "column", "value": "document_type_name" }, { "id": 3, "type": "column", "value": "Paper" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O" ]
10,560
movie_3
bird:train.json:9401
Who among the actors starred in a NC-17 rated film? Provide only the last name of the actors.
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.rating = 'NC-17'
[ "Who", "among", "the", "actors", "starred", "in", "a", "NC-17", "rated", "film", "?", "Provide", "only", "the", "last", "name", "of", "the", "actors", "." ]
[ { "id": 5, "type": "table", "value": "film_actor" }, { "id": 0, "type": "column", "value": "last_name" }, { "id": 7, "type": "column", "value": "actor_id" }, { "id": 6, "type": "column", "value": "film_id" }, { "id": 2, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 14, 15 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
10,561
e_learning
spider:train_spider.json:3809
Which course authors teach two or more courses? Give me their addresses and author IDs.
SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2
[ "Which", "course", "authors", "teach", "two", "or", "more", "courses", "?", "Give", "me", "their", "addresses", "and", "author", "IDs", "." ]
[ { "id": 2, "type": "table", "value": "course_authors_and_tutors" }, { "id": 1, "type": "column", "value": "address_line_1" }, { "id": 0, "type": "column", "value": "author_id" }, { "id": 3, "type": "table", "value": "courses" }, { "id": 4, "typ...
[ { "entity_id": 0, "token_idxs": [ 14, 15 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 1, 2 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,562
movies_4
bird:train.json:421
What is the average revenue of the movie in which Dariusz Wolski works as the director of photography?
SELECT CAST(SUM(T1.revenue) AS REAL) / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography'
[ "What", "is", "the", "average", "revenue", "of", "the", "movie", "in", "which", "Dariusz", "Wolski", "works", "as", "the", "director", "of", "photography", "?" ]
[ { "id": 7, "type": "value", "value": "Director of Photography" }, { "id": 5, "type": "value", "value": "Dariusz Wolski" }, { "id": 4, "type": "column", "value": "person_name" }, { "id": 2, "type": "table", "value": "movie_crew" }, { "id": 3, "t...
[ { "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": [ 10, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
10,563
codebase_community
bird:dev.json:535
Among the users who have more than 100 upvotes, how many of them have more then 1 downvotes?
SELECT COUNT(Id) FROM users WHERE Upvotes > 100 AND Downvotes > 1
[ "Among", "the", "users", "who", "have", "more", "than", "100", "upvotes", ",", "how", "many", "of", "them", "have", "more", "then", "1", "downvotes", "?" ]
[ { "id": 4, "type": "column", "value": "downvotes" }, { "id": 2, "type": "column", "value": "upvotes" }, { "id": 0, "type": "table", "value": "users" }, { "id": 3, "type": "value", "value": "100" }, { "id": 1, "type": "column", "value": "id"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 18 ] }, { "entity...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
10,564
card_games
bird:dev.json:470
When was the set of cards with "Ancestor's Chosen" released?
SELECT DISTINCT T2.releaseDate FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Ancestor''s Chosen'
[ "When", "was", "the", "set", "of", "cards", "with", "\"", "Ancestor", "'s", "Chosen", "\"", "released", "?" ]
[ { "id": 4, "type": "value", "value": "Ancestor's Chosen" }, { "id": 0, "type": "column", "value": "releasedate" }, { "id": 6, "type": "column", "value": "setcode" }, { "id": 1, "type": "table", "value": "cards" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8, 9 ] }, { ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O", "B-COLUMN", "O" ]
10,565
movie_3
bird:train.json:9350
What is the category of film titled "BLADE POLISH"?
SELECT T3.name FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T3.category_id = T2.category_id WHERE T1.title = 'BLADE POLISH'
[ "What", "is", "the", "category", "of", "film", "titled", "\"", "BLADE", "POLISH", "\"", "?" ]
[ { "id": 5, "type": "table", "value": "film_category" }, { "id": 3, "type": "value", "value": "BLADE POLISH" }, { "id": 6, "type": "column", "value": "category_id" }, { "id": 1, "type": "table", "value": "category" }, { "id": 7, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O" ]
10,566
movielens
bird:train.json:2306
Which actor has acted in at least 2 French films? Please list their IDs.
SELECT T2.actorid FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'France' GROUP BY T2.actorid HAVING COUNT(T1.movieid) > 2
[ "Which", "actor", "has", "acted", "in", "at", "least", "2", "French", "films", "?", "Please", "list", "their", "IDs", "." ]
[ { "id": 2, "type": "table", "value": "movies2actors" }, { "id": 0, "type": "column", "value": "actorid" }, { "id": 3, "type": "column", "value": "country" }, { "id": 6, "type": "column", "value": "movieid" }, { "id": 1, "type": "table", "va...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "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", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "O", "O", "O" ]
10,567
mondial_geo
bird:train.json:8465
List all the organisations that where its name contains 'United Nation'. State its full name and its headquarter city.
SELECT Name, City FROM organization WHERE Name LIKE '%United Nation%'
[ "List", "all", "the", "organisations", "that", "where", "its", "name", "contains", "'", "United", "Nation", "'", ".", "State", "its", "full", "name", "and", "its", "headquarter", "city", "." ]
[ { "id": 3, "type": "value", "value": "%United Nation%" }, { "id": 0, "type": "table", "value": "organization" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 21 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,568
book_publishing_company
bird:train.json:171
State the title and royalty percentage for title ID BU2075 between 10000 to 50000 range.
SELECT T1.title, T2.royalty FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange > 10000 AND T2.hirange < 50000 AND T1.title_ID = 'BU2075'
[ "State", "the", "title", "and", "royalty", "percentage", "for", "title", "ID", "BU2075", "between", "10000", "to", "50000", "range", "." ]
[ { "id": 3, "type": "table", "value": "roysched" }, { "id": 4, "type": "column", "value": "title_id" }, { "id": 1, "type": "column", "value": "royalty" }, { "id": 5, "type": "column", "value": "lorange" }, { "id": 7, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7, 8 ] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "B-COLUMN", "O" ]
10,569
public_review_platform
bird:train.json:3956
Which actively running Yelp business in "Gilbert" has got the most reviews? Give the business id.
SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.active = 'true' AND T1.city = 'Gilbert' AND T1.review_count = 'Uber'
[ "Which", "actively", "running", "Yelp", "business", "in", "\"", "Gilbert", "\"", "has", "got", "the", "most", "reviews", "?", "Give", "the", "business", "i", "d." ]
[ { "id": 7, "type": "column", "value": "review_count" }, { "id": 0, "type": "column", "value": "business_id" }, { "id": 1, "type": "table", "value": "business" }, { "id": 2, "type": "table", "value": "reviews" }, { "id": 6, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 18, 19 ] }, { "entity_id": 1, "token_idxs": [ 17 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [] }, {...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN" ]
10,570
shipping
bird:train.json:5606
How many pounds did Sue Newell transport during her first shipment?
SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Sue' AND T2.last_name = 'Newell' ORDER BY T1.ship_date ASC LIMIT 1
[ "How", "many", "pounds", "did", "Sue", "Newell", "transport", "during", "her", "first", "shipment", "?" ]
[ { "id": 5, "type": "column", "value": "first_name" }, { "id": 3, "type": "column", "value": "ship_date" }, { "id": 4, "type": "column", "value": "driver_id" }, { "id": 7, "type": "column", "value": "last_name" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "B-TABLE", "O" ]
10,571
language_corpus
bird:train.json:5811
Please list the titles of the top 3 Wikipedia pages with the most different words on the Catalan language.
SELECT title FROM pages WHERE lid = 1 ORDER BY words DESC LIMIT 3
[ "Please", "list", "the", "titles", "of", "the", "top", "3", "Wikipedia", "pages", "with", "the", "most", "different", "words", "on", "the", "Catalan", "language", "." ]
[ { "id": 0, "type": "table", "value": "pages" }, { "id": 1, "type": "column", "value": "title" }, { "id": 4, "type": "column", "value": "words" }, { "id": 2, "type": "column", "value": "lid" }, { "id": 3, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
10,572
soccer_3
bird:test.json:20
Show names of players from the club with manager "Sam Allardyce".
SELECT T2.Name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.Manager = "Sam Allardyce"
[ "Show", "names", "of", "players", "from", "the", "club", "with", "manager", "\"", "Sam", "Allardyce", "\"", "." ]
[ { "id": 4, "type": "column", "value": "Sam Allardyce" }, { "id": 3, "type": "column", "value": "manager" }, { "id": 5, "type": "column", "value": "club_id" }, { "id": 2, "type": "table", "value": "player" }, { "id": 0, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10, 11 ...
[ "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
10,573
mondial_geo
bird:train.json:8462
Provide a list of all organisations with headquarters in London?
SELECT Name FROM organization WHERE City = 'London'
[ "Provide", "a", "list", "of", "all", "organisations", "with", "headquarters", "in", "London", "?" ]
[ { "id": 0, "type": "table", "value": "organization" }, { "id": 3, "type": "value", "value": "London" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
10,574
flight_1
spider:train_spider.json:418
What are the names for all aircrafts with at least 2 flights?
SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2
[ "What", "are", "the", "names", "for", "all", "aircrafts", "with", "at", "least", "2", "flights", "?" ]
[ { "id": 3, "type": "table", "value": "aircraft" }, { "id": 2, "type": "table", "value": "flight" }, { "id": 1, "type": "column", "value": "name" }, { "id": 0, "type": "column", "value": "aid" }, { "id": 4, "type": "value", "value": "2" } ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
10,576
human_resources
bird:train.json:8938
What is the office phone number of the location at which Sandy Adams works?
SELECT T2.officephone FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T1.lastname = 'Adams' AND T1.firstname = 'Sandy'
[ "What", "is", "the", "office", "phone", "number", "of", "the", "location", "at", "which", "Sandy", "Adams", "works", "?" ]
[ { "id": 0, "type": "column", "value": "officephone" }, { "id": 3, "type": "column", "value": "locationid" }, { "id": 6, "type": "column", "value": "firstname" }, { "id": 1, "type": "table", "value": "employee" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-VALUE", "O", "O" ]
10,577
talkingdata
bird:train.json:1184
How many devices belong to model "A51"?
SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = 'A51'
[ "How", "many", "devices", "belong", "to", "model", "\"", "A51", "\"", "?" ]
[ { "id": 0, "type": "table", "value": "phone_brand_device_model2" }, { "id": 1, "type": "column", "value": "device_model" }, { "id": 3, "type": "column", "value": "device_id" }, { "id": 2, "type": "value", "value": "A51" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
10,578
toxicology
bird:dev.json:328
List all the elements with double bond, consisted in molecule TR024.
SELECT T1.element FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR024' AND T2.bond_type = '='
[ "List", "all", "the", "elements", "with", "double", "bond", ",", "consisted", "in", "molecule", "TR024", "." ]
[ { "id": 3, "type": "column", "value": "molecule_id" }, { "id": 5, "type": "column", "value": "bond_type" }, { "id": 0, "type": "column", "value": "element" }, { "id": 4, "type": "value", "value": "TR024" }, { "id": 1, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
10,579
codebase_community
bird:dev.json:546
Please list the display names of all the users who owns a post that is well-finished.
SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.ClosedDate IS NOT NULL
[ "Please", "list", "the", "display", "names", "of", "all", "the", "users", "who", "owns", "a", "post", "that", "is", "well", "-", "finished", "." ]
[ { "id": 0, "type": "column", "value": "displayname" }, { "id": 4, "type": "column", "value": "owneruserid" }, { "id": 3, "type": "column", "value": "closeddate" }, { "id": 1, "type": "table", "value": "posts" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
10,580
bike_share_1
bird:train.json:9035
Find the longest ride on foggy day. What were the mean visibility, mean wind speed, and weather event during that ride? Also, list the coordinates and names of the start and end stations.
SELECT T3.mean_visibility_miles, T3.mean_wind_speed_mph, T3.events, T1.lat, T1.long , T2.start_station_name, T2.end_station_name FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name INNER JOIN weather AS T3 ON T3.zip_code = T2.zip_code WHERE T3.events = 'Fog' ORDER BY T2.duration DESC LIMIT 1
[ "Find", "the", "longest", "ride", "on", "foggy", "day", ".", "What", "were", "the", "mean", "visibility", ",", "mean", "wind", "speed", ",", "and", "weather", "event", "during", "that", "ride", "?", "Also", ",", "list", "the", "coordinates", "and", "name...
[ { "id": 0, "type": "column", "value": "mean_visibility_miles" }, { "id": 1, "type": "column", "value": "mean_wind_speed_mph" }, { "id": 5, "type": "column", "value": "start_station_name" }, { "id": 6, "type": "column", "value": "end_station_name" }, { ...
[ { "entity_id": 0, "token_idxs": [ 11, 12 ] }, { "entity_id": 1, "token_idxs": [ 14, 15, 16 ] }, { "entity_id": 2, "token_idxs": [ 20 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-...
10,581
bakery_1
bird:test.json:1528
What are the distinct ids and prices for goods that cost less than the average good?
SELECT DISTINCT id , price FROM goods WHERE price < (SELECT avg(price) FROM goods)
[ "What", "are", "the", "distinct", "ids", "and", "prices", "for", "goods", "that", "cost", "less", "than", "the", "average", "good", "?" ]
[ { "id": 0, "type": "table", "value": "goods" }, { "id": 2, "type": "column", "value": "price" }, { "id": 1, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,582
student_1
spider:train_spider.json:4079
Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.
SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != "COVIN" AND T2.lastname != "JEROME"
[ "Which", "students", "in", "third", "grade", "are", "not", "taught", "by", "teacher", "COVIN", "JEROME", "?", "Give", "me", "the", "last", "names", "of", "the", "students", "." ]
[ { "id": 3, "type": "column", "value": "classroom" }, { "id": 6, "type": "column", "value": "firstname" }, { "id": 0, "type": "column", "value": "lastname" }, { "id": 2, "type": "table", "value": "teachers" }, { "id": 8, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entit...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O" ]
10,583
cs_semester
bird:train.json:904
How many students, who have a GPA between 3 to 4, failed a course?
SELECT COUNT(T2.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id WHERE T2.grade IS NULL AND T1.gpa BETWEEN 3 AND 4
[ "How", "many", "students", ",", "who", "have", "a", "GPA", "between", "3", "to", "4", ",", "failed", "a", "course", "?" ]
[ { "id": 1, "type": "table", "value": "registration" }, { "id": 2, "type": "column", "value": "student_id" }, { "id": 0, "type": "table", "value": "student" }, { "id": 3, "type": "column", "value": "grade" }, { "id": 4, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O" ]
10,584
video_games
bird:train.json:3494
List the game IDs of the games produced by Abylight.
SELECT T1.game_id FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Abylight'
[ "List", "the", "game", "IDs", "of", "the", "games", "produced", "by", "Abylight", "." ]
[ { "id": 1, "type": "table", "value": "game_publisher" }, { "id": 3, "type": "column", "value": "publisher_name" }, { "id": 5, "type": "column", "value": "publisher_id" }, { "id": 2, "type": "table", "value": "publisher" }, { "id": 4, "type": "v...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 0, 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id":...
[ "B-TABLE", "I-TABLE", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,585
mondial_geo
bird:train.json:8346
For all cities where Seine is located at, which city has the greatest population? Calculate the difference from the city with least population.
SELECT MAX(T1.Population) - MIN(T1.population) FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = 'Seine'
[ "For", "all", "cities", "where", "Seine", "is", "located", "at", ",", "which", "city", "has", "the", "greatest", "population", "?", "Calculate", "the", "difference", "from", "the", "city", "with", "least", "population", "." ]
[ { "id": 6, "type": "column", "value": "population" }, { "id": 4, "type": "table", "value": "located" }, { "id": 0, "type": "table", "value": "river" }, { "id": 2, "type": "value", "value": "Seine" }, { "id": 5, "type": "column", "value": "r...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
10,586
cre_Drama_Workshop_Groups
spider:train_spider.json:5133
Give me all the phone numbers and email addresses of the workshop groups where services are performed.
SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID
[ "Give", "me", "all", "the", "phone", "numbers", "and", "email", "addresses", "of", "the", "workshop", "groups", "where", "services", "are", "performed", "." ]
[ { "id": 2, "type": "table", "value": "drama_workshop_groups" }, { "id": 1, "type": "column", "value": "store_email_address" }, { "id": 4, "type": "column", "value": "workshop_group_id" }, { "id": 0, "type": "column", "value": "store_phone" }, { "id...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 11, ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O" ]