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
9,630
movie_2
bird:test.json:1821
Find the name of the cinemas that are playing movies with either rating ‘G’ or rating ‘PG’.
SELECT title FROM movies WHERE rating = 'G' OR rating = 'PG'
[ "Find", "the", "name", "of", "the", "cinemas", "that", "are", "playing", "movies", "with", "either", "rating", "‘", "G", "’", "or", "rating", "‘", "PG", "’", "." ]
[ { "id": 0, "type": "table", "value": "movies" }, { "id": 2, "type": "column", "value": "rating" }, { "id": 1, "type": "column", "value": "title" }, { "id": 4, "type": "value", "value": "PG" }, { "id": 3, "type": "value", "value": "G" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "enti...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
9,631
activity_1
spider:train_spider.json:6760
Give me the the first and last name of the faculty who advises the most students.
SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1
[ "Give", "me", "the", "the", "first", "and", "last", "name", "of", "the", "faculty", "who", "advises", "the", "most", "students", "." ]
[ { "id": 3, "type": "table", "value": "faculty" }, { "id": 4, "type": "table", "value": "student" }, { "id": 5, "type": "column", "value": "advisor" }, { "id": 0, "type": "column", "value": "facid" }, { "id": 1, "type": "column", "value": "f...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
9,632
county_public_safety
spider:train_spider.json:2540
Show the crime rates of counties in ascending order of number of police officers.
SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC
[ "Show", "the", "crime", "rates", "of", "counties", "in", "ascending", "order", "of", "number", "of", "police", "officers", "." ]
[ { "id": 0, "type": "table", "value": "county_public_safety" }, { "id": 2, "type": "column", "value": "police_officers" }, { "id": 1, "type": "column", "value": "crime_rate" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 12, 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,633
formula_1
bird:dev.json:885
State the name and date of the last round of race in year 1999.
SELECT name, date FROM races WHERE year = 1999 ORDER BY round DESC LIMIT 1
[ "State", "the", "name", "and", "date", "of", "the", "last", "round", "of", "race", "in", "year", "1999", "." ]
[ { "id": 0, "type": "table", "value": "races" }, { "id": 5, "type": "column", "value": "round" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "date" }, { "id": 3, "type": "column", "value": "year" ...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O" ]
9,634
online_exams
bird:test.json:205
How many different comments are there for student answers?
SELECT count(DISTINCT Comments) FROM Student_Answers
[ "How", "many", "different", "comments", "are", "there", "for", "student", "answers", "?" ]
[ { "id": 0, "type": "table", "value": "student_answers" }, { "id": 1, "type": "column", "value": "comments" } ]
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
9,635
works_cycles
bird:train.json:7376
What profit will the company gain if they sell 10 items of the product that has the lightest weight?
SELECT 10 * (ListPrice - StandardCost) FROM Product WHERE Weight IS NOT NULL ORDER BY Weight LIMIT 1
[ "What", "profit", "will", "the", "company", "gain", "if", "they", "sell", "10", "items", "of", "the", "product", "that", "has", "the", "lightest", "weight", "?" ]
[ { "id": 4, "type": "column", "value": "standardcost" }, { "id": 3, "type": "column", "value": "listprice" }, { "id": 0, "type": "table", "value": "product" }, { "id": 1, "type": "column", "value": "weight" }, { "id": 2, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,636
assets_maintenance
spider:train_spider.json:3155
How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.
SELECT T1.staff_name , count(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name
[ "How", "many", "engineers", "did", "each", "staff", "contact", "?", "List", "both", "the", "contact", "staff", "name", "and", "number", "of", "engineers", "contacted", "." ]
[ { "id": 4, "type": "column", "value": "contact_staff_id" }, { "id": 2, "type": "table", "value": "engineer_visits" }, { "id": 0, "type": "column", "value": "staff_name" }, { "id": 3, "type": "column", "value": "staff_id" }, { "id": 1, "type": "...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, ...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
9,637
real_estate_rentals
bird:test.json:1462
In which country does the user with first name Robbie live?
SELECT T1.country FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id = T2.user_address_id WHERE T2.first_name = 'Robbie';
[ "In", "which", "country", "does", "the", "user", "with", "first", "name", "Robbie", "live", "?" ]
[ { "id": 6, "type": "column", "value": "user_address_id" }, { "id": 3, "type": "column", "value": "first_name" }, { "id": 5, "type": "column", "value": "address_id" }, { "id": 1, "type": "table", "value": "addresses" }, { "id": 0, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O" ]
9,639
craftbeer
bird:train.json:8861
When compared to the total number of breweries in the US producing American Blonde Ale, how many in the state of Wisconsin produces American Blonde Ale? Indicate your answer in percentage (%).
SELECT CAST(SUM(IIF(T2.state = 'WI', 1, 0)) AS REAL) * 100 / COUNT(T1.id) FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T1.style = 'American Blonde Ale'
[ "When", "compared", "to", "the", "total", "number", "of", "breweries", "in", "the", "US", "producing", "American", "Blonde", "Ale", ",", "how", "many", "in", "the", "state", "of", "Wisconsin", "produces", "American", "Blonde", "Ale", "?", "Indicate", "your",...
[ { "id": 3, "type": "value", "value": "American Blonde Ale" }, { "id": 4, "type": "column", "value": "brewery_id" }, { "id": 1, "type": "table", "value": "breweries" }, { "id": 0, "type": "table", "value": "beers" }, { "id": 2, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12, 13, 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,640
music_1
spider:train_spider.json:3529
What is the name of the song that was released in the most recent year?
SELECT song_name , releasedate FROM song ORDER BY releasedate DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "song", "that", "was", "released", "in", "the", "most", "recent", "year", "?" ]
[ { "id": 2, "type": "column", "value": "releasedate" }, { "id": 1, "type": "column", "value": "song_name" }, { "id": 0, "type": "table", "value": "song" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
9,642
regional_sales
bird:train.json:2630
Please list all sale team names which had orders on 5/31/2018.
SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderDate = '5/31/18' THEN T2.`Sales Team` ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._SalesTeamID ) WHERE T IS NOT NULL
[ "Please", "list", "all", "sale", "team", "names", "which", "had", "orders", "on", "5/31/2018", "." ]
[ { "id": 1, "type": "table", "value": "Sales Orders" }, { "id": 4, "type": "column", "value": "_salesteamid" }, { "id": 3, "type": "column", "value": "salesteamid" }, { "id": 2, "type": "table", "value": "Sales Team" }, { "id": 5, "type": "colum...
[ { "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": [ 3, ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
9,643
culture_company
spider:train_spider.json:6994
List all company names with a book published by Alyson.
SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'
[ "List", "all", "company", "names", "with", "a", "book", "published", "by", "Alyson", "." ]
[ { "id": 1, "type": "table", "value": "culture_company" }, { "id": 0, "type": "column", "value": "company_name" }, { "id": 5, "type": "column", "value": "book_club_id" }, { "id": 2, "type": "table", "value": "book_club" }, { "id": 3, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
9,644
donor
bird:train.json:3174
When was the first ever project went live on the site and what were the names of the resources being requested? If there are multiple projects that have the same date, indicate each of them and their items.
SELECT T2.date_posted, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.date_posted = ( SELECT date_posted FROM projects ORDER BY date_posted ASC LIMIT 1 )
[ "When", "was", "the", "first", "ever", "project", "went", "live", "on", "the", "site", "and", "what", "were", "the", "names", "of", "the", "resources", "being", "requested", "?", "If", "there", "are", "multiple", "projects", "that", "have", "the", "same", ...
[ { "id": 0, "type": "column", "value": "date_posted" }, { "id": 1, "type": "column", "value": "item_name" }, { "id": 2, "type": "table", "value": "resources" }, { "id": 4, "type": "column", "value": "projectid" }, { "id": 3, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14, 15 ] }, { "entity_id": 2, "token_idxs": [ 18 ] }, { "entity_id": 3, "token_idxs": [ 26 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, {...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O"...
9,645
app_store
bird:train.json:2565
How much is the average sentiment polarity score of Golf GPS Rangefinder: Golf Pad and what is it's rating in the Google Play Store?
SELECT AVG(T2.Sentiment_Polarity), T1.Rating FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Golf GPS Rangefinder: Golf Pad'
[ "How", "much", "is", "the", "average", "sentiment", "polarity", "score", "of", "Golf", "GPS", "Rangefinder", ":", "Golf", "Pad", "and", "what", "is", "it", "'s", "rating", "in", "the", "Google", "Play", "Store", "?" ]
[ { "id": 4, "type": "value", "value": "Golf GPS Rangefinder: Golf Pad" }, { "id": 5, "type": "column", "value": "sentiment_polarity" }, { "id": 2, "type": "table", "value": "user_reviews" }, { "id": 1, "type": "table", "value": "playstore" }, { "id"...
[ { "entity_id": 0, "token_idxs": [ 20 ] }, { "entity_id": 1, "token_idxs": [ 24, 25 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9, 10, 11, 1...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
9,646
soccer_3
bird:test.json:23
What are the names of clubs, ordered descending by the average earnings of players within each?
SELECT T1.Name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID GROUP BY T1.Club_ID ORDER BY avg(T2.Earnings) DESC
[ "What", "are", "the", "names", "of", "clubs", ",", "ordered", "descending", "by", "the", "average", "earnings", "of", "players", "within", "each", "?" ]
[ { "id": 4, "type": "column", "value": "earnings" }, { "id": 0, "type": "column", "value": "club_id" }, { "id": 3, "type": "table", "value": "player" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "table", "value": "cl...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O" ]
9,647
talkingdata
bird:train.json:1203
Identify all installed and activated apps by their id.
SELECT app_id FROM app_events WHERE is_active = 1 AND is_installed = 1
[ "Identify", "all", "installed", "and", "activated", "apps", "by", "their", "i", "d." ]
[ { "id": 4, "type": "column", "value": "is_installed" }, { "id": 0, "type": "table", "value": "app_events" }, { "id": 2, "type": "column", "value": "is_active" }, { "id": 1, "type": "column", "value": "app_id" }, { "id": 3, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O" ]
9,648
retail_world
bird:train.json:6413
What product is the least shipped to the postal code 28023?
SELECT T4.ProductName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID WHERE T1.PostalCode = 28023 ORDER BY T3.Quantity LIMIT 1
[ "What", "product", "is", "the", "least", "shipped", "to", "the", "postal", "code", "28023", "?" ]
[ { "id": 5, "type": "table", "value": "Order Details" }, { "id": 0, "type": "column", "value": "productname" }, { "id": 2, "type": "column", "value": "postalcode" }, { "id": 10, "type": "column", "value": "customerid" }, { "id": 6, "type": "colu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "B-VALUE", "O" ]
9,649
customers_and_products_contacts
spider:train_spider.json:5665
Show the names of customers who use Credit Card payment method and have more than 2 orders.
SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.payment_method_code = 'Credit Card' GROUP BY T1.customer_id HAVING count(*) > 2
[ "Show", "the", "names", "of", "customers", "who", "use", "Credit", "Card", "payment", "method", "and", "have", "more", "than", "2", "orders", "." ]
[ { "id": 4, "type": "column", "value": "payment_method_code" }, { "id": 3, "type": "table", "value": "customer_orders" }, { "id": 1, "type": "column", "value": "customer_name" }, { "id": 0, "type": "column", "value": "customer_id" }, { "id": 5, ...
[ { "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": [ 9, 10 ] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
9,650
codebase_comments
bird:train.json:616
Among all the solution of the 'zh-cn' methods, which path is most often used?
SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'zh-cn' GROUP BY T1.Path ORDER BY COUNT(T1.Path) DESC LIMIT 1
[ "Among", "all", "the", "solution", "of", "the", "'", "zh", "-", "cn", "'", "methods", ",", "which", "path", "is", "most", "often", "used", "?" ]
[ { "id": 6, "type": "column", "value": "solutionid" }, { "id": 1, "type": "table", "value": "solution" }, { "id": 2, "type": "table", "value": "method" }, { "id": 4, "type": "value", "value": "zh-cn" }, { "id": 0, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 0 ] }, { "entity_id": 4, "token_idxs": [ 7, 8, ...
[ "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
9,651
codebase_community
bird:dev.json:690
Identify the latest badge awarded to the user with the display name Emmett.
SELECT T1.Name FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Emmett' ORDER BY T1.Date DESC LIMIT 1
[ "Identify", "the", "latest", "badge", "awarded", "to", "the", "user", "with", "the", "display", "name", "Emmett", "." ]
[ { "id": 3, "type": "column", "value": "displayname" }, { "id": 1, "type": "table", "value": "badges" }, { "id": 4, "type": "value", "value": "Emmett" }, { "id": 6, "type": "column", "value": "userid" }, { "id": 2, "type": "table", "value": ...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, ...
[ "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-COLUMN", "B-VALUE", "O" ]
9,652
cars
bird:train.json:3114
What are the names of the cars worth 20000?
SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = 20000
[ "What", "are", "the", "names", "of", "the", "cars", "worth", "20000", "?" ]
[ { "id": 0, "type": "column", "value": "car_name" }, { "id": 2, "type": "table", "value": "price" }, { "id": 3, "type": "column", "value": "price" }, { "id": 4, "type": "value", "value": "20000" }, { "id": 1, "type": "table", "value": "data"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
9,653
student_club
bird:dev.json:1405
Calculate the amount budgeted for 'April Speaker' event. List all the budgeted categories for said event in an ascending order based on their amount budgeted.
SELECT T2.category, SUM(T2.amount) FROM event AS T1 JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'April Speaker' GROUP BY T2.category ORDER BY SUM(T2.amount) ASC
[ "Calculate", "the", "amount", "budgeted", "for", "'", "April", "Speaker", "'", "event", ".", "List", "all", "the", "budgeted", "categories", "for", "said", "event", "in", "an", "ascending", "order", "based", "on", "their", "amount", "budgeted", "." ]
[ { "id": 4, "type": "value", "value": "April Speaker" }, { "id": 7, "type": "column", "value": "link_to_event" }, { "id": 3, "type": "column", "value": "event_name" }, { "id": 0, "type": "column", "value": "category" }, { "id": 6, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6, 7 ] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
9,655
activity_1
spider:train_spider.json:6793
What is the name of the activity with the most students?
SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "activity", "with", "the", "most", "students", "?" ]
[ { "id": 3, "type": "table", "value": "participates_in" }, { "id": 1, "type": "column", "value": "activity_name" }, { "id": 2, "type": "table", "value": "activity" }, { "id": 0, "type": "column", "value": "actid" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
9,656
image_and_language
bird:train.json:7481
Please list the classes of all the object samples in image no.1.
SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 GROUP BY T1.OBJ_CLASS
[ "Please", "list", "the", "classes", "of", "all", "the", "object", "samples", "in", "image", "no.1", "." ]
[ { "id": 5, "type": "column", "value": "obj_class_id" }, { "id": 1, "type": "table", "value": "obj_classes" }, { "id": 0, "type": "column", "value": "obj_class" }, { "id": 2, "type": "table", "value": "img_obj" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,657
customers_and_orders
bird:test.json:246
Return the average price of Clothes.
SELECT avg(product_price) FROM Products WHERE product_type_code = "Clothes"
[ "Return", "the", "average", "price", "of", "Clothes", "." ]
[ { "id": 1, "type": "column", "value": "product_type_code" }, { "id": 3, "type": "column", "value": "product_price" }, { "id": 0, "type": "table", "value": "products" }, { "id": 2, "type": "column", "value": "Clothes" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,658
network_2
spider:train_spider.json:4452
Who are the friends of Bob?
SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'
[ "Who", "are", "the", "friends", "of", "Bob", "?" ]
[ { "id": 2, "type": "table", "value": "personfriend" }, { "id": 0, "type": "column", "value": "friend" }, { "id": 1, "type": "table", "value": "person" }, { "id": 3, "type": "column", "value": "name" }, { "id": 4, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
9,659
hr_1
spider:train_spider.json:3428
Return the full names and salaries for employees with first names that end with the letter m.
SELECT first_name , last_name , salary FROM employees WHERE first_name LIKE '%m'
[ "Return", "the", "full", "names", "and", "salaries", "for", "employees", "with", "first", "names", "that", "end", "with", "the", "letter", "m." ]
[ { "id": 1, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "last_name" }, { "id": 3, "type": "column", "value": "salary" }, { "id": 4, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O" ]
9,660
regional_sales
bird:train.json:2728
How many orders were shipped by the sales team with the highest amount of shipped orders in 2020? Give the name of the said sales team.
SELECT COUNT(T1.OrderNumber), T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.ShipDate LIKE '%/%/20' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1
[ "How", "many", "orders", "were", "shipped", "by", "the", "sales", "team", "with", "the", "highest", "amount", "of", "shipped", "orders", "in", "2020", "?", "Give", "the", "name", "of", "the", "said", "sales", "team", "." ]
[ { "id": 1, "type": "table", "value": "Sales Orders" }, { "id": 7, "type": "column", "value": "_salesteamid" }, { "id": 5, "type": "column", "value": "ordernumber" }, { "id": 6, "type": "column", "value": "salesteamid" }, { "id": 0, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14, 15 ] }, { "entity_id": 2, "token_idxs": [ 25, 26 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
9,661
sakila_1
spider:train_spider.json:3004
What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?
SELECT first_name FROM customer WHERE customer_id NOT IN( SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01' )
[ "What", "are", "the", "first", "names", "of", "customers", "who", "have", "not", "rented", "any", "films", "after", "'", "2005", "-", "08", "-", "23", "02:06:01", "'", "?" ]
[ { "id": 5, "type": "value", "value": "2005-08-23 02:06:01" }, { "id": 2, "type": "column", "value": "customer_id" }, { "id": 4, "type": "column", "value": "rental_date" }, { "id": 1, "type": "column", "value": "first_name" }, { "id": 0, "type":...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
9,662
superstore
bird:train.json:2460
Among the customers from Indiana, what is the percentage of their purchased orders in the Central region with no discount?
SELECT CAST(SUM(CASE WHEN T2.Discount = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Region = 'Central' AND T1.State = 'Indiana'
[ "Among", "the", "customers", "from", "Indiana", ",", "what", "is", "the", "percentage", "of", "their", "purchased", "orders", "in", "the", "Central", "region", "with", "no", "discount", "?" ]
[ { "id": 1, "type": "table", "value": "central_superstore" }, { "id": 2, "type": "column", "value": "Customer ID" }, { "id": 10, "type": "column", "value": "discount" }, { "id": 4, "type": "value", "value": "Central" }, { "id": 6, "type": "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "B-COLUMN", "O" ]
9,663
formula_1
bird:dev.json:890
How many seasons has Silverstone Circuit hosted the United Kindom grand prix?
SELECT COUNT(T2.circuitid) FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Silverstone Circuit' AND T2.name = 'British Grand Prix'
[ "How", "many", "seasons", "has", "Silverstone", "Circuit", "hosted", "the", "United", "Kindom", "grand", "prix", "?" ]
[ { "id": 4, "type": "value", "value": "Silverstone Circuit" }, { "id": 5, "type": "value", "value": "British Grand Prix" }, { "id": 2, "type": "column", "value": "circuitid" }, { "id": 0, "type": "table", "value": "circuits" }, { "id": 1, "type"...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O" ]
9,664
chinook_1
spider:train_spider.json:848
Count the number of customers that have an email containing "gmail.com".
SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"
[ "Count", "the", "number", "of", "customers", "that", "have", "an", "email", "containing", "\"", "gmail.com", "\"", "." ]
[ { "id": 2, "type": "column", "value": "%gmail.com%" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 1, "type": "column", "value": "email" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O" ]
9,665
region_building
bird:test.json:327
What are the capitals of the regions with area bigger than 10000?
SELECT Capital FROM region WHERE Area > 10000
[ "What", "are", "the", "capitals", "of", "the", "regions", "with", "area", "bigger", "than", "10000", "?" ]
[ { "id": 1, "type": "column", "value": "capital" }, { "id": 0, "type": "table", "value": "region" }, { "id": 3, "type": "value", "value": "10000" }, { "id": 2, "type": "column", "value": "area" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
9,666
shop_membership
spider:train_spider.json:5412
Show the city and the number of branches opened before 2010 for each city.
SELECT city , count(*) FROM branch WHERE open_year < 2010 GROUP BY city
[ "Show", "the", "city", "and", "the", "number", "of", "branches", "opened", "before", "2010", "for", "each", "city", "." ]
[ { "id": 2, "type": "column", "value": "open_year" }, { "id": 0, "type": "table", "value": "branch" }, { "id": 1, "type": "column", "value": "city" }, { "id": 3, "type": "value", "value": "2010" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-COLUMN", "O" ]
9,667
law_episode
bird:train.json:1357
Which episode number has the second highest positive viewer comments and has been awarded "Best Television Episode"?
SELECT T2.episode_id FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award = 'Best Television Episode' AND T1.result = 'Winner' ORDER BY T2.rating DESC LIMIT 2
[ "Which", "episode", "number", "has", "the", "second", "highest", "positive", "viewer", "comments", "and", "has", "been", "awarded", "\"", "Best", "Television", "Episode", "\"", "?" ]
[ { "id": 5, "type": "value", "value": "Best Television Episode" }, { "id": 0, "type": "column", "value": "episode_id" }, { "id": 2, "type": "table", "value": "episode" }, { "id": 3, "type": "column", "value": "rating" }, { "id": 6, "type": "colu...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "B-TABLE", "O", "O" ]
9,668
cre_Drama_Workshop_Groups
spider:train_spider.json:5110
What is the name of the most expensive product?
SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "most", "expensive", "product", "?" ]
[ { "id": 2, "type": "column", "value": "product_price" }, { "id": 1, "type": "column", "value": "product_name" }, { "id": 0, "type": "table", "value": "products" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,669
hockey
bird:train.json:7798
How many Haileybury Hockey Club goalies became a hall of famer?
SELECT COUNT(DISTINCT T1.playerID) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T1.tmID = T3.tmID AND T1.year = T3.year WHERE T3.name = 'Haileybury Hockey Club' AND T2.hofID IS NOT NULL
[ "How", "many", "Haileybury", "Hockey", "Club", "goalies", "became", "a", "hall", "of", "famer", "?" ]
[ { "id": 5, "type": "value", "value": "Haileybury Hockey Club" }, { "id": 1, "type": "column", "value": "playerid" }, { "id": 2, "type": "table", "value": "goalies" }, { "id": 3, "type": "table", "value": "master" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,670
bike_share_1
bird:train.json:8997
At what date and time did San Jose Diridon Caltrain Station have most bikes available.
SELECT T2.time FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T1.name = 'San Jose Diridon Caltrain Station' AND T2.bikes_available = ( SELECT MAX(T2.bikes_available) FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T1.name = 'San Jose Diridon Caltrain Station' )
[ "At", "what", "date", "and", "time", "did", "San", "Jose", "Diridon", "Caltrain", "Station", "have", "most", "bikes", "available", "." ]
[ { "id": 6, "type": "value", "value": "San Jose Diridon Caltrain Station" }, { "id": 7, "type": "column", "value": "bikes_available" }, { "id": 3, "type": "column", "value": "station_id" }, { "id": 1, "type": "table", "value": "station" }, { "id": 2...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,671
protein_institute
spider:train_spider.json:1924
Show all the distinct institution types.
SELECT DISTINCT TYPE FROM institution
[ "Show", "all", "the", "distinct", "institution", "types", "." ]
[ { "id": 0, "type": "table", "value": "institution" }, { "id": 1, "type": "column", "value": "type" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
9,672
activity_1
spider:train_spider.json:6756
What are the faculty id and the number of students each faculty has?
SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID
[ "What", "are", "the", "faculty", "i", "d", "and", "the", "number", "of", "students", "each", "faculty", "has", "?" ]
[ { "id": 1, "type": "table", "value": "faculty" }, { "id": 2, "type": "table", "value": "student" }, { "id": 3, "type": "column", "value": "advisor" }, { "id": 0, "type": "column", "value": "facid" } ]
[ { "entity_id": 0, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5,...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
9,673
hockey
bird:train.json:7776
How many penalty minutes did the Montreal Canadiens have in the 1918's Stanley Cup Finals?
SELECT T2.PIM FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' AND T1.year = 1918
[ "How", "many", "penalty", "minutes", "did", "the", "Montreal", "Canadiens", "have", "in", "the", "1918", "'s", "Stanley", "Cup", "Finals", "?" ]
[ { "id": 4, "type": "value", "value": "Montreal Canadiens" }, { "id": 2, "type": "table", "value": "teamssc" }, { "id": 1, "type": "table", "value": "teams" }, { "id": 3, "type": "column", "value": "name" }, { "id": 5, "type": "column", "val...
[ { "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": [ 6, 7 ] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O" ]
9,675
planet_1
bird:test.json:1872
What are all the different package numbers that Leo Wong sent or received?
SELECT DISTINCT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber OR T1.Recipient = T2.AccountNumber WHERE T2.Name = "Leo Wong"
[ "What", "are", "all", "the", "different", "package", "numbers", "that", "Leo", "Wong", "sent", "or", "received", "?" ]
[ { "id": 0, "type": "column", "value": "packagenumber" }, { "id": 6, "type": "column", "value": "accountnumber" }, { "id": 7, "type": "column", "value": "recipient" }, { "id": 4, "type": "column", "value": "Leo Wong" }, { "id": 1, "type": "table...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8, 9 ] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O" ]
9,676
cars
bird:train.json:3140
How many Japanese cars weigh more than 2000 lbs?
SELECT COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'Japan' AND T1.weight > 2000
[ "How", "many", "Japanese", "cars", "weigh", "more", "than", "2000", "lbs", "?" ]
[ { "id": 2, "type": "table", "value": "production" }, { "id": 0, "type": "table", "value": "country" }, { "id": 4, "type": "column", "value": "country" }, { "id": 3, "type": "column", "value": "origin" }, { "id": 6, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2 ] }, { ...
[ "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
9,677
insurance_and_eClaims
spider:train_spider.json:1510
What are the type codes of the policies used by the customer "Dayana Robel"?
SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = "Dayana Robel"
[ "What", "are", "the", "type", "codes", "of", "the", "policies", "used", "by", "the", "customer", "\"", "Dayana", "Robel", "\"", "?" ]
[ { "id": 0, "type": "column", "value": "policy_type_code" }, { "id": 3, "type": "column", "value": "customer_details" }, { "id": 4, "type": "column", "value": "Dayana Robel" }, { "id": 5, "type": "column", "value": "customer_id" }, { "id": 2, "t...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13, 14 ] ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
9,678
beer_factory
bird:train.json:5338
List out the root beer ID for the brand Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's.
SELECT T1.RootBeerID FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T2.BrandID = T1.BrandID WHERE T2.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s')
[ "List", "out", "the", "root", "beer", "ID", "for", "the", "brand", "Bulldog", ",", "Bundaberg", ",", "Dad", "'s", ",", "Dog", "n", "Suds", "and", "Virgil", "'s", "." ]
[ { "id": 2, "type": "table", "value": "rootbeerbrand" }, { "id": 0, "type": "column", "value": "rootbeerid" }, { "id": 7, "type": "value", "value": "Dog n Suds" }, { "id": 3, "type": "column", "value": "brandname" }, { "id": 5, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id":...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "O" ]
9,679
cookbook
bird:train.json:8895
Which ingredient appeared the least in recipes?
SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id GROUP BY T2.ingredient_id ORDER BY COUNT(T2.ingredient_id) ASC LIMIT 1
[ "Which", "ingredient", "appeared", "the", "least", "in", "recipes", "?" ]
[ { "id": 0, "type": "column", "value": "ingredient_id" }, { "id": 2, "type": "table", "value": "ingredient" }, { "id": 3, "type": "table", "value": "quantity" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
9,680
chicago_crime
bird:train.json:8758
How many incidents are considered "severe" in the IUCR classification?
SELECT COUNT(*) FROM IUCR WHERE index_code = 'I'
[ "How", "many", "incidents", "are", "considered", "\"", "severe", "\"", "in", "the", "IUCR", "classification", "?" ]
[ { "id": 1, "type": "column", "value": "index_code" }, { "id": 0, "type": "table", "value": "iucr" }, { "id": 2, "type": "value", "value": "I" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O", "O" ]
9,681
college_1
spider:train_spider.json:3242
What are the total number of students enrolled in ACCT-211?
SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'
[ "What", "are", "the", "total", "number", "of", "students", "enrolled", "in", "ACCT-211", "?" ]
[ { "id": 4, "type": "column", "value": "class_code" }, { "id": 2, "type": "column", "value": "crs_code" }, { "id": 3, "type": "value", "value": "ACCT-211" }, { "id": 1, "type": "table", "value": "enroll" }, { "id": 0, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "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", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
9,682
movies_4
bird:train.json:547
Provide the names and departments of the person who worked as a music editor in the "Pirates of the Caribbean: At World's End" movie.
SELECT T3.person_name, T4.department_name 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 INNER JOIN department AS T4 ON T2.department_id = T4.department_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End' AND T2.job = 'Music...
[ "Provide", "the", "names", "and", "departments", "of", "the", "person", "who", "worked", "as", "a", "music", "editor", "in", "the", "\"", "Pirates", "of", "the", "Caribbean", ":", "At", "World", "'s", "End", "\"", "movie", "." ]
[ { "id": 6, "type": "value", "value": "Pirates of the Caribbean: At World%s End" }, { "id": 1, "type": "column", "value": "department_name" }, { "id": 4, "type": "column", "value": "department_id" }, { "id": 8, "type": "value", "value": "Music Editor" }, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-TABLE", "O" ]
9,683
works_cycles
bird:train.json:7118
How many customers gave a product the best possible rating? Please list their names.
SELECT ReviewerName FROM ProductReview WHERE Rating = 5
[ "How", "many", "customers", "gave", "a", "product", "the", "best", "possible", "rating", "?", "Please", "list", "their", "names", "." ]
[ { "id": 0, "type": "table", "value": "productreview" }, { "id": 1, "type": "column", "value": "reviewername" }, { "id": 2, "type": "column", "value": "rating" }, { "id": 3, "type": "value", "value": "5" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 13, 14 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,684
works_cycles
bird:train.json:7264
What was the first job position that the company needed, and who was hired? Indicate his/her full name.
SELECT T1.JobTitle, T2.FirstName, T2.MiddleName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T1.HireDate LIMIT 1
[ "What", "was", "the", "first", "job", "position", "that", "the", "company", "needed", ",", "and", "who", "was", "hired", "?", "Indicate", "his", "/", "her", "full", "name", "." ]
[ { "id": 7, "type": "column", "value": "businessentityid" }, { "id": 2, "type": "column", "value": "middlename" }, { "id": 1, "type": "column", "value": "firstname" }, { "id": 0, "type": "column", "value": "jobtitle" }, { "id": 3, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 21 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,685
ice_hockey_draft
bird:train.json:6937
How many games did the tallest player have ever played?
SELECT T1.GP FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.ELITEID = ( SELECT t.ELITEID FROM PlayerInfo t ORDER BY t.height DESC LIMIT 1 )
[ "How", "many", "games", "did", "the", "tallest", "player", "have", "ever", "played", "?" ]
[ { "id": 1, "type": "table", "value": "seasonstatus" }, { "id": 2, "type": "table", "value": "playerinfo" }, { "id": 3, "type": "column", "value": "eliteid" }, { "id": 4, "type": "column", "value": "height" }, { "id": 0, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
9,686
movie_platform
bird:train.json:26
What is the URL to the movie director page on Mubi of the director whose movie was critic by user 2452551 and was given 39 likes?
SELECT T2.director_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 2452551 AND T1.critic_likes = 39
[ "What", "is", "the", "URL", "to", "the", "movie", "director", "page", "on", "Mubi", "of", "the", "director", "whose", "movie", "was", "critic", "by", "user", "2452551", "and", "was", "given", "39", "likes", "?" ]
[ { "id": 0, "type": "column", "value": "director_url" }, { "id": 6, "type": "column", "value": "critic_likes" }, { "id": 3, "type": "column", "value": "movie_id" }, { "id": 1, "type": "table", "value": "ratings" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "B-VALUE", "O", "O" ]
9,687
talkingdata
bird:train.json:1067
Describe the ages, genders and numbers of events participated by the users at coordinates of (-102,38).
SELECT DISTINCT T1.age, T1.gender, COUNT(T2.event_id) FROM gender_age AS T1 INNER JOIN `events` AS T2 ON T2.device_id = T1.device_id WHERE T2.longitude = -102 AND T2.latitude = 38 GROUP BY T1.age, T1.gender, T2.longitude, T2.latitude
[ "Describe", "the", "ages", ",", "genders", "and", "numbers", "of", "events", "participated", "by", "the", "users", "at", "coordinates", "of", "(", "-102,38", ")", "." ]
[ { "id": 4, "type": "table", "value": "gender_age" }, { "id": 2, "type": "column", "value": "longitude" }, { "id": 7, "type": "column", "value": "device_id" }, { "id": 3, "type": "column", "value": "latitude" }, { "id": 6, "type": "column", ...
[ { "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": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
9,688
public_review_platform
bird:train.json:3918
List down the business ID with a star range from 3 to 4, located at Tempe.
SELECT business_id FROM Business WHERE city LIKE 'Tempe' AND stars BETWEEN 3 AND 4
[ "List", "down", "the", "business", "ID", "with", "a", "star", "range", "from", "3", "to", "4", ",", "located", "at", "Tempe", "." ]
[ { "id": 1, "type": "column", "value": "business_id" }, { "id": 0, "type": "table", "value": "business" }, { "id": 3, "type": "value", "value": "Tempe" }, { "id": 4, "type": "column", "value": "stars" }, { "id": 2, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "B-VALUE", "O" ]
9,689
epinions_1
spider:train_spider.json:1716
Find the names of users who did not leave any review.
SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)
[ "Find", "the", "names", "of", "users", "who", "did", "not", "leave", "any", "review", "." ]
[ { "id": 0, "type": "table", "value": "useracct" }, { "id": 3, "type": "table", "value": "review" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "u_id" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,690
retail_world
bird:train.json:6604
What is the position of Robert King?
SELECT Title FROM Employees WHERE FirstName = 'Robert' AND LastName = 'King'
[ "What", "is", "the", "position", "of", "Robert", "King", "?" ]
[ { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "firstname" }, { "id": 4, "type": "column", "value": "lastname" }, { "id": 3, "type": "value", "value": "Robert" }, { "id": 1, "type": "column", "valu...
[ { "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": [ 6 ...
[ "O", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O" ]
9,691
menu
bird:train.json:5529
How long has the "Clear Green Turtle" dish appeared on the menu, and tell me when its latest update was?
SELECT T1.last_appeared - T1.first_appeared, T2.updated_at FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Clear green turtle'
[ "How", "long", "has", "the", "\"", "Clear", "Green", "Turtle", "\"", "dish", "appeared", "on", "the", "menu", ",", "and", "tell", "me", "when", "its", "latest", "update", "was", "?" ]
[ { "id": 4, "type": "value", "value": "Clear green turtle" }, { "id": 6, "type": "column", "value": "first_appeared" }, { "id": 5, "type": "column", "value": "last_appeared" }, { "id": 0, "type": "column", "value": "updated_at" }, { "id": 2, "ty...
[ { "entity_id": 0, "token_idxs": [ 21 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [ 5, 6, ...
[ "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O" ]
9,692
retails
bird:train.json:6678
Please give the name of the customer who has made the single order with the highest total price.
SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey ORDER BY T1.o_totalprice DESC LIMIT 1
[ "Please", "give", "the", "name", "of", "the", "customer", "who", "has", "made", "the", "single", "order", "with", "the", "highest", "total", "price", "." ]
[ { "id": 3, "type": "column", "value": "o_totalprice" }, { "id": 4, "type": "column", "value": "o_custkey" }, { "id": 5, "type": "column", "value": "c_custkey" }, { "id": 2, "type": "table", "value": "customer" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 16, 17 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,693
sales
bird:train.json:5398
What is the difference in price between HL Mountain Frame - Black, 42 and LL Mountain Frame - Black, 42?
SELECT ( SELECT Price FROM Products WHERE Name = 'HL Mountain Frame - Black, 42' ) - ( SELECT Price FROM Products WHERE Name = 'LL Mountain Frame - Black, 42' ) AS num
[ "What", "is", "the", "difference", "in", "price", "between", "HL", "Mountain", "Frame", "-", "Black", ",", "42", "and", "LL", "Mountain", "Frame", "-", "Black", ",", "42", "?" ]
[ { "id": 3, "type": "value", "value": "HL Mountain Frame - Black, 42" }, { "id": 4, "type": "value", "value": "LL Mountain Frame - Black, 42" }, { "id": 0, "type": "table", "value": "products" }, { "id": 1, "type": "column", "value": "price" }, { "i...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 7, 8, 10, 11, 12, 13 ] }, { "entity_id": 4, "t...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
9,694
flight_1
spider:train_spider.json:398
What is the flight number and its distance for the one with the maximum price?
SELECT flno , distance FROM Flight ORDER BY price DESC LIMIT 1
[ "What", "is", "the", "flight", "number", "and", "its", "distance", "for", "the", "one", "with", "the", "maximum", "price", "?" ]
[ { "id": 2, "type": "column", "value": "distance" }, { "id": 0, "type": "table", "value": "flight" }, { "id": 3, "type": "column", "value": "price" }, { "id": 1, "type": "column", "value": "flno" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,695
college_1
spider:train_spider.json:3319
Find names of all students who took some course and got A or C.
SELECT T1.stu_fname , T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'
[ "Find", "names", "of", "all", "students", "who", "took", "some", "course", "and", "got", "A", "or", "C." ]
[ { "id": 5, "type": "column", "value": "enroll_grade" }, { "id": 0, "type": "column", "value": "stu_fname" }, { "id": 1, "type": "column", "value": "stu_lname" }, { "id": 2, "type": "table", "value": "student" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE" ]
9,696
university
bird:train.json:8081
Please list the names of all the ranking criteria of Harvard University in 2011.
SELECT T1.criteria_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T3.university_name = 'Harvard University' AND T2.year = 2011
[ "Please", "list", "the", "names", "of", "all", "the", "ranking", "criteria", "of", "Harvard", "University", "in", "2011", "." ]
[ { "id": 3, "type": "table", "value": "university_ranking_year" }, { "id": 10, "type": "column", "value": "ranking_criteria_id" }, { "id": 7, "type": "value", "value": "Harvard University" }, { "id": 2, "type": "table", "value": "ranking_criteria" }, { ...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "B-TABLE", "B-TABLE", "B-VALUE", "O" ]
9,698
region_building
bird:test.json:333
Show the names of buildings and the names of regions they are in.
SELECT T1.Name , T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID = T2.Region_ID
[ "Show", "the", "names", "of", "buildings", "and", "the", "names", "of", "regions", "they", "are", "in", "." ]
[ { "id": 3, "type": "column", "value": "region_id" }, { "id": 1, "type": "table", "value": "building" }, { "id": 2, "type": "table", "value": "region" }, { "id": 0, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O" ]
9,699
student_club
bird:dev.json:1312
What's Angela Sanders's major?
SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Angela' AND T1.last_name = 'Sanders'
[ "What", "'s", "Angela", "Sanders", "'s", "major", "?" ]
[ { "id": 3, "type": "column", "value": "link_to_major" }, { "id": 0, "type": "column", "value": "major_name" }, { "id": 5, "type": "column", "value": "first_name" }, { "id": 7, "type": "column", "value": "last_name" }, { "id": 4, "type": "column...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-VALUE", "B-VALUE", "O", "B-TABLE", "O" ]
9,700
car_racing
bird:test.json:1637
What are the manager and sponsor of the team that has the most drivers?
SELECT t1.manager , t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id ORDER BY count(*) DESC LIMIT 1
[ "What", "are", "the", "manager", "and", "sponsor", "of", "the", "team", "that", "has", "the", "most", "drivers", "?" ]
[ { "id": 4, "type": "table", "value": "team_driver" }, { "id": 0, "type": "column", "value": "team_id" }, { "id": 1, "type": "column", "value": "manager" }, { "id": 2, "type": "column", "value": "sponsor" }, { "id": 3, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]
9,701
movies_4
bird:train.json:437
What is the title of the movie that was made with the most money and resources?
SELECT title FROM movie ORDER BY budget DESC LIMIT 1
[ "What", "is", "the", "title", "of", "the", "movie", "that", "was", "made", "with", "the", "most", "money", "and", "resources", "?" ]
[ { "id": 2, "type": "column", "value": "budget" }, { "id": 0, "type": "table", "value": "movie" }, { "id": 1, "type": "column", "value": "title" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,702
hospital_1
spider:train_spider.json:3912
List the name of physicians who never took any appointment.
SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID
[ "List", "the", "name", "of", "physicians", "who", "never", "took", "any", "appointment", "." ]
[ { "id": 2, "type": "table", "value": "appointment" }, { "id": 4, "type": "column", "value": "employeeid" }, { "id": 0, "type": "table", "value": "physician" }, { "id": 3, "type": "column", "value": "physician" }, { "id": 1, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
9,703
bike_1
spider:train_spider.json:150
What is the average bike availablility for stations not in Palo Alto?
SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = "Palo Alto")
[ "What", "is", "the", "average", "bike", "availablility", "for", "stations", "not", "in", "Palo", "Alto", "?" ]
[ { "id": 1, "type": "column", "value": "bikes_available" }, { "id": 2, "type": "column", "value": "station_id" }, { "id": 6, "type": "column", "value": "Palo Alto" }, { "id": 3, "type": "table", "value": "station" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,704
art_1
bird:test.json:1264
List the names of all distinct paintings ordered by length.
SELECT DISTINCT title FROM paintings ORDER BY height_mm
[ "List", "the", "names", "of", "all", "distinct", "paintings", "ordered", "by", "length", "." ]
[ { "id": 0, "type": "table", "value": "paintings" }, { "id": 2, "type": "column", "value": "height_mm" }, { "id": 1, "type": "column", "value": "title" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
9,705
beer_factory
bird:train.json:5269
How many breweries are there in Australia?
SELECT COUNT(BreweryName) FROM rootbeerbrand WHERE Country = 'Australia'
[ "How", "many", "breweries", "are", "there", "in", "Australia", "?" ]
[ { "id": 0, "type": "table", "value": "rootbeerbrand" }, { "id": 3, "type": "column", "value": "breweryname" }, { "id": 2, "type": "value", "value": "Australia" }, { "id": 1, "type": "column", "value": "country" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
9,706
soccer_2016
bird:train.json:1861
List the match IDs which had players out by hit wickets.
SELECT T1.Match_Id FROM Wicket_Taken AS T1 INNER JOIN Out_Type AS T2 ON T2.Out_Id = T1.Kind_Out WHERE T2.Out_Name = 'hit wicket'
[ "List", "the", "match", "IDs", "which", "had", "players", "out", "by", "hit", "wickets", "." ]
[ { "id": 1, "type": "table", "value": "wicket_taken" }, { "id": 4, "type": "value", "value": "hit wicket" }, { "id": 0, "type": "column", "value": "match_id" }, { "id": 2, "type": "table", "value": "out_type" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9, 10 ] }, { "entity_id": 5,...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
9,707
student_club
bird:dev.json:1463
List the event names which were budgeted for the food.
SELECT T1.event_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T2.category = 'Food'
[ "List", "the", "event", "names", "which", "were", "budgeted", "for", "the", "food", "." ]
[ { "id": 6, "type": "column", "value": "link_to_event" }, { "id": 0, "type": "column", "value": "event_name" }, { "id": 3, "type": "column", "value": "category" }, { "id": 5, "type": "column", "value": "event_id" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_...
[ "B-COLUMN", "I-COLUMN", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
9,708
tracking_share_transactions
spider:train_spider.json:5874
Show the number of transactions for different investors.
SELECT investor_id , COUNT(*) FROM TRANSACTIONS GROUP BY investor_id
[ "Show", "the", "number", "of", "transactions", "for", "different", "investors", "." ]
[ { "id": 0, "type": "table", "value": "transactions" }, { "id": 1, "type": "column", "value": "investor_id" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
9,709
mondial_geo
bird:train.json:8316
What is the average percentage of agriculture of GDP in countries on the African Continent?
SELECT AVG(T4.Agriculture) FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country INNER JOIN economy AS T4 ON T4.Country = T3.Code WHERE T1.Name = 'Africa'
[ "What", "is", "the", "average", "percentage", "of", "agriculture", "of", "GDP", "in", "countries", "on", "the", "African", "Continent", "?" ]
[ { "id": 3, "type": "column", "value": "agriculture" }, { "id": 8, "type": "table", "value": "encompasses" }, { "id": 7, "type": "table", "value": "continent" }, { "id": 9, "type": "column", "value": "continent" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
9,710
thrombosis_prediction
bird:dev.json:1245
For the examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin time?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.Date > '1997-01-01' AND T2.APTT >= 45
[ "For", "the", "examinations", "done", "after", "1997/1/1", ",", "how", "many", "of", "them", "have", "the", "result", "of", "an", "inactivated", "partial", "prothrom", "bin", "time", "?" ]
[ { "id": 1, "type": "table", "value": "laboratory" }, { "id": 4, "type": "value", "value": "1997-01-01" }, { "id": 0, "type": "table", "value": "patient" }, { "id": 3, "type": "column", "value": "date" }, { "id": 5, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,711
movie_3
bird:train.json:9225
Calculate the total payment amount by Diane Collins.
SELECT SUM(T2.amount) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Diane' AND T1.last_name = 'Collins'
[ "Calculate", "the", "total", "payment", "amount", "by", "Diane", "Collins", "." ]
[ { "id": 3, "type": "column", "value": "customer_id" }, { "id": 4, "type": "column", "value": "first_name" }, { "id": 6, "type": "column", "value": "last_name" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "O" ]
9,712
movie_platform
bird:train.json:1
State the most popular movie? When was it released and who is the director for the movie?
SELECT movie_title, movie_release_year, director_name FROM movies ORDER BY movie_popularity DESC LIMIT 1
[ "State", "the", "most", "popular", "movie", "?", "When", "was", "it", "released", "and", "who", "is", "the", "director", "for", "the", "movie", "?" ]
[ { "id": 2, "type": "column", "value": "movie_release_year" }, { "id": 4, "type": "column", "value": "movie_popularity" }, { "id": 3, "type": "column", "value": "director_name" }, { "id": 1, "type": "column", "value": "movie_title" }, { "id": 0, ...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 2, 3 ] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
9,713
regional_sales
bird:train.json:2706
Provide order number, warehouse code of customers Elorac, Corp.
SELECT DISTINCT T1.OrderNumber, T1.WarehouseCode FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Elorac, Corp'
[ "Provide", "order", "number", ",", "warehouse", "code", "of", "customers", "Elorac", ",", "Corp." ]
[ { "id": 4, "type": "column", "value": "Customer Names" }, { "id": 1, "type": "column", "value": "warehousecode" }, { "id": 2, "type": "table", "value": "Sales Orders" }, { "id": 5, "type": "value", "value": "Elorac, Corp" }, { "id": 0, "type": ...
[ { "entity_id": 0, "token_idxs": [ 1, 2 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE" ]
9,714
book_1
bird:test.json:569
List all book titles which have highest purchase prices .
select title from book order by purchaseprice desc limit 1
[ "List", "all", "book", "titles", "which", "have", "highest", "purchase", "prices", "." ]
[ { "id": 2, "type": "column", "value": "purchaseprice" }, { "id": 1, "type": "column", "value": "title" }, { "id": 0, "type": "table", "value": "book" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,715
software_company
bird:train.json:8518
Among the male customers, how many of them come from a place with over 30,000 inhabitants?
SELECT COUNT(T1.GEOID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.SEX = 'Male' AND T2.INHABITANTS_K > 30
[ "Among", "the", "male", "customers", ",", "how", "many", "of", "them", "come", "from", "a", "place", "with", "over", "30,000", "inhabitants", "?" ]
[ { "id": 5, "type": "column", "value": "inhabitants_k" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 1, "type": "table", "value": "demog" }, { "id": 2, "type": "column", "value": "geoid" }, { "id": 4, "type": "value", "value...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,716
csu_1
spider:train_spider.json:2365
How many campuses exist are in the county of LA?
SELECT count(*) FROM campuses WHERE county = "Los Angeles"
[ "How", "many", "campuses", "exist", "are", "in", "the", "county", "of", "LA", "?" ]
[ { "id": 2, "type": "column", "value": "Los Angeles" }, { "id": 0, "type": "table", "value": "campuses" }, { "id": 1, "type": "column", "value": "county" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
9,717
beer_factory
bird:train.json:5325
List the brand names of bottled root beer whose first brewing year is no later than 1930.
SELECT T2.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T2.FirstBrewedYear < '1930-01-01' AND T1.ContainerType = 'Bottle' ORDER BY T2.FirstBrewedYear LIMIT 1
[ "List", "the", "brand", "names", "of", "bottled", "root", "beer", "whose", "first", "brewing", "year", "is", "no", "later", "than", "1930", "." ]
[ { "id": 3, "type": "column", "value": "firstbrewedyear" }, { "id": 2, "type": "table", "value": "rootbeerbrand" }, { "id": 6, "type": "column", "value": "containertype" }, { "id": 5, "type": "value", "value": "1930-01-01" }, { "id": 0, "type": ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "B-TABLE", "I-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O" ]
9,718
thrombosis_prediction
bird:dev.json:1263
Among the patients whose level of Hematoclit isn't normal, which patient has the highest anti-Cardiolipin antibody concentration? Please list his or her ID.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 on T1.ID = T3.ID WHERE (T3.HCT >= 52 OR T3.HCT <= 29) ORDER BY T2.`aCL IgA` DESC LIMIT 1
[ "Among", "the", "patients", "whose", "level", "of", "Hematoclit", "is", "n't", "normal", ",", "which", "patient", "has", "the", "highest", "anti", "-", "Cardiolipin", "antibody", "concentration", "?", "Please", "list", "his", "or", "her", "ID", "." ]
[ { "id": 4, "type": "table", "value": "examination" }, { "id": 1, "type": "table", "value": "laboratory" }, { "id": 2, "type": "column", "value": "aCL IgA" }, { "id": 3, "type": "table", "value": "patient" }, { "id": 5, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 27 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 20 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,719
movie_3
bird:train.json:9196
What is the full name of the customer who rented the highest number of movies of all time?
SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, COUNT(T1.rental_id) AS num FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.first_name, T2.last_name ) AS T ORDER BY T.num DESC LIMIT 1
[ "What", "is", "the", "full", "name", "of", "the", "customer", "who", "rented", "the", "highest", "number", "of", "movies", "of", "all", "time", "?" ]
[ { "id": 6, "type": "column", "value": "customer_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 5, "type": "column", "value": "rental_id" }, { "id": 4, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
9,720
ice_hockey_draft
bird:train.json:6957
What is the weight in kg of Tony Martensson?
SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.PlayerName = 'Tony Martensson'
[ "What", "is", "the", "weight", "in", "kg", "of", "Tony", "Martensson", "?" ]
[ { "id": 4, "type": "value", "value": "Tony Martensson" }, { "id": 0, "type": "column", "value": "weight_in_kg" }, { "id": 2, "type": "table", "value": "weight_info" }, { "id": 1, "type": "table", "value": "playerinfo" }, { "id": 3, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7, 8 ] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
9,721
works_cycles
bird:train.json:7329
Name all products that started selling in 2013. State its respective vendor's name.
SELECT T1.Name, T3.Name FROM Product AS T1 INNER JOIN ProductVendor AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Vendor AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE STRFTIME('%Y', T1.SellStartDate) = '2013'
[ "Name", "all", "products", "that", "started", "selling", "in", "2013", ".", "State", "its", "respective", "vendor", "'s", "name", "." ]
[ { "id": 5, "type": "column", "value": "businessentityid" }, { "id": 4, "type": "table", "value": "productvendor" }, { "id": 7, "type": "column", "value": "sellstartdate" }, { "id": 8, "type": "column", "value": "productid" }, { "id": 3, "type":...
[ { "entity_id": 0, "token_idxs": [ 0 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
9,722
books
bird:train.json:5966
Among the books that cost less than 1 dollar, how many were published by Berkley Trade?
SELECT COUNT(*) FROM publisher AS T1 INNER JOIN book AS T2 ON T1.publisher_id = T2.publisher_id INNER JOIN order_line AS T3 ON T3.book_id = T2.book_id WHERE T1.publisher_name = 'Berkley' AND T3.price < 1
[ "Among", "the", "books", "that", "cost", "less", "than", "1", "dollar", ",", "how", "many", "were", "published", "by", "Berkley", "Trade", "?" ]
[ { "id": 4, "type": "column", "value": "publisher_name" }, { "id": 8, "type": "column", "value": "publisher_id" }, { "id": 0, "type": "table", "value": "order_line" }, { "id": 1, "type": "table", "value": "publisher" }, { "id": 3, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O" ]
9,723
school_player
spider:train_spider.json:4877
What are the teams that have the 5 oldest players?
SELECT Team FROM player ORDER BY Age DESC LIMIT 5
[ "What", "are", "the", "teams", "that", "have", "the", "5", "oldest", "players", "?" ]
[ { "id": 0, "type": "table", "value": "player" }, { "id": 1, "type": "column", "value": "team" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,724
film_rank
spider:train_spider.json:4135
Give the average number of cities within markets that had a low market estimation larger than 10000?
SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000
[ "Give", "the", "average", "number", "of", "cities", "within", "markets", "that", "had", "a", "low", "market", "estimation", "larger", "than", "10000", "?" ]
[ { "id": 0, "type": "table", "value": "film_market_estimation" }, { "id": 4, "type": "column", "value": "number_cities" }, { "id": 2, "type": "column", "value": "low_estimate" }, { "id": 5, "type": "column", "value": "market_id" }, { "id": 1, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 3, 4, 5 ] ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
9,725
public_review_platform
bird:train.json:4011
Identify the percent of long reviews among all 5-star reviews given to businesses by the Yelp users.
SELECT CAST(SUM(CASE WHEN review_length = 'Long' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(review_length) FROM Reviews WHERE review_stars = 5
[ "Identify", "the", "percent", "of", "long", "reviews", "among", "all", "5", "-", "star", "reviews", "given", "to", "businesses", "by", "the", "Yelp", "users", "." ]
[ { "id": 4, "type": "column", "value": "review_length" }, { "id": 1, "type": "column", "value": "review_stars" }, { "id": 0, "type": "table", "value": "reviews" }, { "id": 7, "type": "value", "value": "Long" }, { "id": 3, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entit...
[ "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
9,726
video_games
bird:train.json:3462
How much are the sales of the games in region ID 4?
SELECT SUM(T.num_sales) * 100000 FROM region_sales AS T WHERE T.region_id = 4
[ "How", "much", "are", "the", "sales", "of", "the", "games", "in", "region", "ID", "4", "?" ]
[ { "id": 0, "type": "table", "value": "region_sales" }, { "id": 1, "type": "column", "value": "region_id" }, { "id": 4, "type": "column", "value": "num_sales" }, { "id": 3, "type": "value", "value": "100000" }, { "id": 2, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9, 10 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
9,727
movies_4
bird:train.json:534
Which department has the most people?
SELECT T1.department_name FROM department AS T1 INNER JOIN movie_crew AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY COUNT(T2.department_id) DESC LIMIT 1
[ "Which", "department", "has", "the", "most", "people", "?" ]
[ { "id": 1, "type": "column", "value": "department_name" }, { "id": 0, "type": "column", "value": "department_id" }, { "id": 2, "type": "table", "value": "department" }, { "id": 3, "type": "table", "value": "movie_crew" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "B-TABLE", "O", "O", "O", "O", "O" ]
9,728
customers_and_orders
bird:test.json:311
Show all customer ids without an order.
SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Customer_orders
[ "Show", "all", "customer", "ids", "without", "an", "order", "." ]
[ { "id": 1, "type": "table", "value": "customer_orders" }, { "id": 2, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O" ]
9,729
election_representative
spider:train_spider.json:1190
What states have at least two representatives?
SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2
[ "What", "states", "have", "at", "least", "two", "representatives", "?" ]
[ { "id": 0, "type": "table", "value": "representative" }, { "id": 1, "type": "column", "value": "state" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
9,730
airline
bird:train.json:5823
Please list the dates of the flights that were cancelled due to the most serious reason.
SELECT FL_DATE FROM Airlines WHERE CANCELLATION_CODE = 'A' GROUP BY FL_DATE
[ "Please", "list", "the", "dates", "of", "the", "flights", "that", "were", "cancelled", "due", "to", "the", "most", "serious", "reason", "." ]
[ { "id": 2, "type": "column", "value": "cancellation_code" }, { "id": 0, "type": "table", "value": "airlines" }, { "id": 1, "type": "column", "value": "fl_date" }, { "id": 3, "type": "value", "value": "A" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
9,731
codebase_comments
bird:train.json:585
In "maxild_playground\Playground.sln", what is the time of sampling for the method "GitHubRepo.Cli.GitHubClientWrapper.GetReleases"?
SELECT T2.SampledAt FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maxild_playgroundPlayground.sln' AND T2.Name = 'GitHubRepo.Cli.GitHubClientWrapper.GetReleases'
[ "In", "\"", "maxild_playground\\Playground.sln", "\"", ",", "what", "is", "the", "time", "of", "sampling", "for", "the", "method", "\"", "GitHubRepo", ".", "Cli", ".", "GitHubClientWrapper", ".", "GetReleases", "\"", "?" ]
[ { "id": 8, "type": "value", "value": "GitHubRepo.Cli.GitHubClientWrapper.GetReleases" }, { "id": 6, "type": "value", "value": "maxild_playgroundPlayground.sln" }, { "id": 4, "type": "column", "value": "solutionid" }, { "id": 0, "type": "column", "value": "...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
9,732
insurance_fnol
spider:train_spider.json:913
What are all the policy types of the customer that has the most policies listed?
SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.custo...
[ "What", "are", "all", "the", "policy", "types", "of", "the", "customer", "that", "has", "the", "most", "policies", "listed", "?" ]
[ { "id": 1, "type": "table", "value": "available_policies" }, { "id": 4, "type": "table", "value": "customers_policies" }, { "id": 0, "type": "column", "value": "policy_type_code" }, { "id": 2, "type": "column", "value": "customer_name" }, { "id": 6...
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 12, 13 ] }, { "...
[ "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O" ]
9,733
college_2
spider:train_spider.json:1390
Find the name of the students who have more than one advisor?
SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING count(*) > 1
[ "Find", "the", "name", "of", "the", "students", "who", "have", "more", "than", "one", "advisor", "?" ]
[ { "id": 2, "type": "table", "value": "student" }, { "id": 3, "type": "table", "value": "advisor" }, { "id": 0, "type": "column", "value": "s_id" }, { "id": 1, "type": "column", "value": "name" }, { "id": 5, "type": "column", "value": "id" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,734
game_1
spider:train_spider.json:6013
Show all student IDs with the number of sports and total number of games played
SELECT StuID , count(*) , sum(gamesplayed) FROM Sportsinfo GROUP BY StuID
[ "Show", "all", "student", "IDs", "with", "the", "number", "of", "sports", "and", "total", "number", "of", "games", "played" ]
[ { "id": 2, "type": "column", "value": "gamesplayed" }, { "id": 0, "type": "table", "value": "sportsinfo" }, { "id": 1, "type": "column", "value": "stuid" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 13, 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN" ]