question_id
int64
0
16.1k
db_id
stringclasses
259 values
dber_id
stringlengths
15
29
question
stringlengths
16
325
SQL
stringlengths
18
1.25k
tokens
listlengths
4
62
entities
listlengths
0
21
entity_to_token
listlengths
20
20
dber_tags
listlengths
4
62
10,267
customers_and_orders
bird:test.json:266
Give the product type codes of product types that have two or more products.
SELECT product_type_code FROM Products GROUP BY product_type_code HAVING count(*) >= 2
[ "Give", "the", "product", "type", "codes", "of", "product", "types", "that", "have", "two", "or", "more", "products", "." ]
[ { "id": 1, "type": "column", "value": "product_type_code" }, { "id": 0, "type": "table", "value": "products" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5,...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,269
cre_Theme_park
spider:train_spider.json:5917
What is the name of the tourist attraction that is associated with the photo "game1"?
SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1"
[ "What", "is", "the", "name", "of", "the", "tourist", "attraction", "that", "is", "associated", "with", "the", "photo", "\"", "game1", "\"", "?" ]
[ { "id": 4, "type": "column", "value": "tourist_attraction_id" }, { "id": 2, "type": "table", "value": "tourist_attractions" }, { "id": 1, "type": "table", "value": "photos" }, { "id": 3, "type": "column", "value": "game1" }, { "id": 0, "type": ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O" ]
10,270
hr_1
spider:train_spider.json:3505
display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name.
SELECT employee_id , first_name , last_name , salary FROM employees WHERE salary > ( SELECT AVG (salary) FROM employees ) AND department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%J%')
[ "display", "the", "employee", "number", ",", "name", "(", "first", "name", "and", "last", "name", ")", ",", "and", "salary", "for", "all", "employees", "who", "earn", "more", "than", "the", "average", "salary", "and", "who", "work", "in", "a", "departmen...
[ { "id": 5, "type": "column", "value": "department_id" }, { "id": 1, "type": "column", "value": "employee_id" }, { "id": 2, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 3, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 18 ] }, { "entity_id": 1, "token_idxs": [ 34 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O...
10,271
mondial_geo
bird:train.json:8219
State the different ethnic group and percentage of the language in Singapore.
SELECT T1.Name, T1.Percentage FROM ethnicGroup AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Singapore' GROUP BY T1.Name, T1.Percentage
[ "State", "the", "different", "ethnic", "group", "and", "percentage", "of", "the", "language", "in", "Singapore", "." ]
[ { "id": 2, "type": "table", "value": "ethnicgroup" }, { "id": 1, "type": "column", "value": "percentage" }, { "id": 4, "type": "value", "value": "Singapore" }, { "id": 3, "type": "table", "value": "country" }, { "id": 5, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id"...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
10,272
hospital_1
spider:train_spider.json:3978
Find the names of procedures which physician John Wen was trained in.
SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen"
[ "Find", "the", "names", "of", "procedures", "which", "physician", "John", "Wen", "was", "trained", "in", "." ]
[ { "id": 1, "type": "table", "value": "procedures" }, { "id": 4, "type": "table", "value": "trained_in" }, { "id": 7, "type": "column", "value": "employeeid" }, { "id": 3, "type": "table", "value": "physician" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10, 11 ] ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "I-TABLE", "O" ]
10,273
flight_company
spider:train_spider.json:6367
List the vehicle flight number, date and pilot of all the flights, ordered by altitude.
SELECT vehicle_flight_number , date , pilot FROM flight ORDER BY altitude ASC
[ "List", "the", "vehicle", "flight", "number", ",", "date", "and", "pilot", "of", "all", "the", "flights", ",", "ordered", "by", "altitude", "." ]
[ { "id": 1, "type": "column", "value": "vehicle_flight_number" }, { "id": 4, "type": "column", "value": "altitude" }, { "id": 0, "type": "table", "value": "flight" }, { "id": 3, "type": "column", "value": "pilot" }, { "id": 2, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2, 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 16 ...
[ "O", "O", "B-COLUMN", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,274
retails
bird:train.json:6772
List the names of the countries with the below-average number of customers in ascending order of customer numbers.
SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey GROUP BY T2.n_name HAVING COUNT(T1.c_name) > ( SELECT COUNT(customer.c_name) / COUNT(DISTINCT nation.n_name) FROM customer INNER JOIN nation ON customer.c_nationkey = nation.n_nationkey ) ORDER BY COUNT(T1.c_name)
[ "List", "the", "names", "of", "the", "countries", "with", "the", "below", "-", "average", "number", "of", "customers", "in", "ascending", "order", "of", "customer", "numbers", "." ]
[ { "id": 3, "type": "column", "value": "c_nationkey" }, { "id": 4, "type": "column", "value": "n_nationkey" }, { "id": 1, "type": "table", "value": "customer" }, { "id": 0, "type": "column", "value": "n_name" }, { "id": 2, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2 ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
10,275
e_government
spider:train_spider.json:6345
Return the name of the organization which has the most contact individuals.
SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1
[ "Return", "the", "name", "of", "the", "organization", "which", "has", "the", "most", "contact", "individuals", "." ]
[ { "id": 2, "type": "table", "value": "organization_contact_individuals" }, { "id": 0, "type": "column", "value": "organization_name" }, { "id": 3, "type": "column", "value": "organization_id" }, { "id": 1, "type": "table", "value": "organizations" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
10,276
medicine_enzyme_interaction
spider:train_spider.json:961
How many enzymes do not have any interactions?
SELECT count(*) FROM enzyme WHERE id NOT IN ( SELECT enzyme_id FROM medicine_enzyme_interaction );
[ "How", "many", "enzymes", "do", "not", "have", "any", "interactions", "?" ]
[ { "id": 2, "type": "table", "value": "medicine_enzyme_interaction" }, { "id": 3, "type": "column", "value": "enzyme_id" }, { "id": 0, "type": "table", "value": "enzyme" }, { "id": 1, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
10,277
allergy_1
spider:train_spider.json:478
Give the city that the student whose family name is Kim lives in.
SELECT city_code FROM Student WHERE LName = "Kim"
[ "Give", "the", "city", "that", "the", "student", "whose", "family", "name", "is", "Kim", "lives", "in", "." ]
[ { "id": 1, "type": "column", "value": "city_code" }, { "id": 0, "type": "table", "value": "student" }, { "id": 2, "type": "column", "value": "lname" }, { "id": 3, "type": "column", "value": "Kim" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O" ]
10,278
soccer_2
spider:train_spider.json:5018
Which college has any student who is a goalie and succeeded in the tryout.
SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'
[ "Which", "college", "has", "any", "student", "who", "is", "a", "goalie", "and", "succeeded", "in", "the", "tryout", "." ]
[ { "id": 2, "type": "column", "value": "decision" }, { "id": 0, "type": "table", "value": "tryout" }, { "id": 5, "type": "value", "value": "goalie" }, { "id": 1, "type": "column", "value": "cname" }, { "id": 4, "type": "column", "value": "pp...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "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": [ 8 ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O" ]
10,279
culture_company
spider:train_spider.json:6987
Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.
SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1
[ "Return", "the", "title", "and", "director", "of", "the", "movie", "released", "in", "the", "year", "2000", "or", "earlier", "that", "had", "the", "highest", "worldwide", "gross", "." ]
[ { "id": 5, "type": "column", "value": "gross_worldwide" }, { "id": 2, "type": "column", "value": "director" }, { "id": 0, "type": "table", "value": "movie" }, { "id": 1, "type": "column", "value": "title" }, { "id": 3, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
10,281
works_cycles
bird:train.json:7257
Who made the purchase order with the greatest total due before freight? Indicate her employee ID and calculate for his/her age when he/she was hired.
SELECT T2.BusinessEntityID, STRFTIME('%Y', T2.HireDate) - STRFTIME('%Y', T2.BirthDate) FROM PurchaseOrderHeader AS T1 INNER JOIN Employee AS T2 ON T1.EmployeeID = T2.BusinessEntityID ORDER BY T1.TotalDue DESC LIMIT 1
[ "Who", "made", "the", "purchase", "order", "with", "the", "greatest", "total", "due", "before", "freight", "?", "Indicate", "her", "employee", "ID", "and", "calculate", "for", "his", "/", "her", "age", "when", "he", "/", "she", "was", "hired", "." ]
[ { "id": 1, "type": "table", "value": "purchaseorderheader" }, { "id": 0, "type": "column", "value": "businessentityid" }, { "id": 4, "type": "column", "value": "employeeid" }, { "id": 7, "type": "column", "value": "birthdate" }, { "id": 2, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 16 ] ...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,282
regional_sales
bird:train.json:2580
Among orders in 2020, name the customers who had the greatest discount applied for 'Cocktail Glasses'
SELECT DISTINCT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T3.`Product Name` = 'Cocktail Glasses' AND SUBSTR(T2.OrderDate, -2) = '20' AND T2.`Discount Applied` = ( SELECT T2.`Discount Applied`...
[ "Among", "orders", "in", "2020", ",", "name", "the", "customers", "who", "had", "the", "greatest", "discount", "applied", "for", "'", "Cocktail", "Glasses", "'" ]
[ { "id": 7, "type": "value", "value": "Cocktail Glasses" }, { "id": 9, "type": "column", "value": "Discount Applied" }, { "id": 0, "type": "column", "value": "Customer Names" }, { "id": 3, "type": "table", "value": "Sales Orders" }, { "id": 6, "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 0 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O" ]
10,283
music_platform_2
bird:train.json:7966
What is the review with the title "Hosts bring the show down" for?
SELECT title FROM podcasts WHERE podcast_id = ( SELECT podcast_id FROM reviews WHERE title = 'Hosts bring the show down' )
[ "What", "is", "the", "review", "with", "the", "title", "\"", "Hosts", "bring", "the", "show", "down", "\"", "for", "?" ]
[ { "id": 4, "type": "value", "value": "Hosts bring the show down" }, { "id": 2, "type": "column", "value": "podcast_id" }, { "id": 0, "type": "table", "value": "podcasts" }, { "id": 3, "type": "table", "value": "reviews" }, { "id": 1, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 9, 10, 11, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O" ]
10,284
world_development_indicators
bird:train.json:2156
List out the country name of upper middle income group. Which country has the earliest national account base year? List out the region where this country locates.
SELECT DISTINCT T1.CountryName FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IncomeGroup = 'Upper middle income' UNION SELECT longname FROM ( SELECT longname FROM country WHERE NationalAccountsBaseYear <> '' ORDER BY NationalAccountsBaseYear ASC LIMIT 1 )
[ "List", "out", "the", "country", "name", "of", "upper", "middle", "income", "group", ".", "Which", "country", "has", "the", "earliest", "national", "account", "base", "year", "?", "List", "out", "the", "region", "where", "this", "country", "locates", "." ]
[ { "id": 7, "type": "column", "value": "nationalaccountsbaseyear" }, { "id": 4, "type": "value", "value": "Upper middle income" }, { "id": 0, "type": "column", "value": "countryname" }, { "id": 3, "type": "column", "value": "incomegroup" }, { "id": ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 27 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 6, 7 ] ...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
10,285
simpson_episodes
bird:train.json:4340
Among the episodes which have star score greater than 5, how many episodes have air date in 2008?
SELECT COUNT(DISTINCT T2.episode_id) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE strftime('%Y', T1.air_date) = '2008' AND T2.stars > 5;
[ "Among", "the", "episodes", "which", "have", "star", "score", "greater", "than", "5", ",", "how", "many", "episodes", "have", "air", "date", "in", "2008", "?" ]
[ { "id": 2, "type": "column", "value": "episode_id" }, { "id": 7, "type": "column", "value": "air_date" }, { "id": 0, "type": "table", "value": "episode" }, { "id": 4, "type": "column", "value": "stars" }, { "id": 1, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entit...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
10,286
products_for_hire
spider:train_spider.json:1974
How many products are never booked with amount higher than 200?
SELECT count(*) FROM Products_for_hire WHERE product_id NOT IN ( SELECT product_id FROM products_booked WHERE booked_amount > 200 )
[ "How", "many", "products", "are", "never", "booked", "with", "amount", "higher", "than", "200", "?" ]
[ { "id": 0, "type": "table", "value": "products_for_hire" }, { "id": 2, "type": "table", "value": "products_booked" }, { "id": 3, "type": "column", "value": "booked_amount" }, { "id": 1, "type": "column", "value": "product_id" }, { "id": 4, "typ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 4, "token_idxs": [ 10 ] ...
[ "O", "O", "B-COLUMN", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O" ]
10,287
financial
bird:dev.json:134
In the branch where the largest number of crimes were committed in 1996, how many accounts were opened?
SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id GROUP BY T1.A16 ORDER BY T1.A16 DESC LIMIT 1
[ "In", "the", "branch", "where", "the", "largest", "number", "of", "crimes", "were", "committed", "in", "1996", ",", "how", "many", "accounts", "were", "opened", "?" ]
[ { "id": 4, "type": "column", "value": "district_id" }, { "id": 3, "type": "column", "value": "account_id" }, { "id": 1, "type": "table", "value": "district" }, { "id": 2, "type": "table", "value": "account" }, { "id": 0, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
10,288
book_press
bird:test.json:2013
Find the names of the authors who did not have any book with the "Accor" press.
SELECT name FROM author EXCEPT SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id = t2.author_id JOIN press AS t3 ON t2.press_id = t3.press_id WHERE t3.name = 'Accor'
[ "Find", "the", "names", "of", "the", "authors", "who", "did", "not", "have", "any", "book", "with", "the", "\"", "Accor", "\"", "press", "." ]
[ { "id": 6, "type": "column", "value": "author_id" }, { "id": 5, "type": "column", "value": "press_id" }, { "id": 0, "type": "table", "value": "author" }, { "id": 2, "type": "table", "value": "press" }, { "id": 3, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O" ]
10,289
thrombosis_prediction
bird:dev.json:1158
List all patients who were born in 1937 whose total cholesterol was beyond the normal range.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1937' AND T2.`T-CHO` >= 250
[ "List", "all", "patients", "who", "were", "born", "in", "1937", "whose", "total", "cholesterol", "was", "beyond", "the", "normal", "range", "." ]
[ { "id": 2, "type": "table", "value": "laboratory" }, { "id": 7, "type": "column", "value": "birthday" }, { "id": 1, "type": "table", "value": "patient" }, { "id": 4, "type": "column", "value": "T-CHO" }, { "id": 3, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,290
music_2
spider:train_spider.json:5218
Which song has the most vocals?
SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1
[ "Which", "song", "has", "the", "most", "vocals", "?" ]
[ { "id": 0, "type": "column", "value": "songid" }, { "id": 2, "type": "table", "value": "vocals" }, { "id": 1, "type": "column", "value": "title" }, { "id": 3, "type": "table", "value": "songs" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O" ]
10,291
election
spider:train_spider.json:2781
Sort the names of all counties in descending alphabetical order.
SELECT County_name FROM county ORDER BY County_name DESC
[ "Sort", "the", "names", "of", "all", "counties", "in", "descending", "alphabetical", "order", "." ]
[ { "id": 1, "type": "column", "value": "county_name" }, { "id": 0, "type": "table", "value": "county" } ]
[ { "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": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
10,292
decoration_competition
spider:train_spider.json:4493
Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.
SELECT T2.Name , T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC
[ "Show", "the", "names", "of", "members", "and", "the", "locations", "of", "colleges", "they", "go", "to", "in", "ascending", "alphabetical", "order", "of", "member", "names", "." ]
[ { "id": 1, "type": "column", "value": "college_location" }, { "id": 4, "type": "column", "value": "college_id" }, { "id": 2, "type": "table", "value": "college" }, { "id": 3, "type": "table", "value": "member" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
10,293
beer_factory
bird:train.json:5254
State the coordinate of Sac State American River Courtyard.
SELECT T2.Latitude, T2.Longitude FROM location AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID WHERE T1.LocationName = 'Sac State American River Courtyard'
[ "State", "the", "coordinate", "of", "Sac", "State", "American", "River", "Courtyard", "." ]
[ { "id": 5, "type": "value", "value": "Sac State American River Courtyard" }, { "id": 4, "type": "column", "value": "locationname" }, { "id": 3, "type": "table", "value": "geolocation" }, { "id": 6, "type": "column", "value": "locationid" }, { "id":...
[ { "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": [ 4, 5, ...
[ "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
10,294
codebase_comments
bird:train.json:681
List 5 solution path that has sampling time of 636431758961741000.
SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.SampledAt = 636431758961741000 LIMIT 5
[ "List", "5", "solution", "path", "that", "has", "sampling", "time", "of", "636431758961741000", "." ]
[ { "id": 4, "type": "value", "value": "636431758961741000" }, { "id": 6, "type": "column", "value": "solutionid" }, { "id": 3, "type": "column", "value": "sampledat" }, { "id": 1, "type": "table", "value": "solution" }, { "id": 2, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
10,295
student_loan
bird:train.json:4530
How many students in the Air Force?
SELECT COUNT(name) FROM enlist WHERE organ = 'air_force'
[ "How", "many", "students", "in", "the", "Air", "Force", "?" ]
[ { "id": 2, "type": "value", "value": "air_force" }, { "id": 0, "type": "table", "value": "enlist" }, { "id": 1, "type": "column", "value": "organ" }, { "id": 3, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O" ]
10,296
gas_company
spider:train_spider.json:2005
List all headquarters and the number of companies in each headquarter.
SELECT headquarters , count(*) FROM company GROUP BY headquarters
[ "List", "all", "headquarters", "and", "the", "number", "of", "companies", "in", "each", "headquarter", "." ]
[ { "id": 1, "type": "column", "value": "headquarters" }, { "id": 0, "type": "table", "value": "company" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
10,297
local_govt_mdm
spider:train_spider.json:2652
What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?
SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id WHERE T2.source_system_code = 'Electoral' OR T2.source_system_code = 'Tax'
[ "What", "are", "the", "register", "ids", "of", "electoral", "registries", "that", "have", "the", "cross", "reference", "source", "system", "code", "'", "Electoral", "'", "or", "'", "Tax", "'", "?" ]
[ { "id": 0, "type": "column", "value": "electoral_register_id" }, { "id": 2, "type": "table", "value": "cmi_cross_references" }, { "id": 1, "type": "table", "value": "electoral_register" }, { "id": 4, "type": "column", "value": "source_system_code" }, {...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13, 14, 15 ] ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
10,298
donor
bird:train.json:3159
Name and describe all projects created by New York teachers.
SELECT T1.title, T1.short_description FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.teacher_ny_teaching_fellow = 't'
[ "Name", "and", "describe", "all", "projects", "created", "by", "New", "York", "teachers", "." ]
[ { "id": 4, "type": "column", "value": "teacher_ny_teaching_fellow" }, { "id": 1, "type": "column", "value": "short_description" }, { "id": 6, "type": "column", "value": "projectid" }, { "id": 3, "type": "table", "value": "projects" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
10,300
shakespeare
bird:train.json:2987
How many poems did Shakespeare write?
SELECT COUNT(id) FROM works WHERE GenreType = 'Poem'
[ "How", "many", "poems", "did", "Shakespeare", "write", "?" ]
[ { "id": 1, "type": "column", "value": "genretype" }, { "id": 0, "type": "table", "value": "works" }, { "id": 2, "type": "value", "value": "Poem" }, { "id": 3, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O" ]
10,301
legislator
bird:train.json:4908
List down the MapLight ID of the representatives in Maine.
SELECT T1.maplight_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'rep' AND T2.state = 'ME' GROUP BY T1.maplight_id
[ "List", "down", "the", "MapLight", "ID", "of", "the", "representatives", "in", "Maine", "." ]
[ { "id": 2, "type": "table", "value": "historical-terms" }, { "id": 0, "type": "column", "value": "maplight_id" }, { "id": 3, "type": "column", "value": "bioguide_id" }, { "id": 1, "type": "table", "value": "historical" }, { "id": 4, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O" ]
10,302
soccer_2016
bird:train.json:1882
What are the match IDs that were played at Brabourne Stadium?
SELECT T1.Match_Id FROM Match AS T1 INNER JOIN Venue AS T2 ON T2.Venue_Id = T1.Venue_Id WHERE T2.Venue_Name = 'Brabourne Stadium'
[ "What", "are", "the", "match", "IDs", "that", "were", "played", "at", "Brabourne", "Stadium", "?" ]
[ { "id": 4, "type": "value", "value": "Brabourne Stadium" }, { "id": 3, "type": "column", "value": "venue_name" }, { "id": 0, "type": "column", "value": "match_id" }, { "id": 5, "type": "column", "value": "venue_id" }, { "id": 1, "type": "table"...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9, 10 ] }, { "entity_id"...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O" ]
10,303
customers_and_orders
bird:test.json:271
Show all customer ids and customer names.
SELECT customer_id , customer_name FROM Customers
[ "Show", "all", "customer", "ids", "and", "customer", "names", "." ]
[ { "id": 2, "type": "column", "value": "customer_name" }, { "id": 1, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "B-COLUMN", "O" ]
10,304
pilot_1
bird:test.json:1098
Return the name of the oldest pilot.
SELECT pilot_name FROM PilotSkills ORDER BY age DESC LIMIT 1
[ "Return", "the", "name", "of", "the", "oldest", "pilot", "." ]
[ { "id": 0, "type": "table", "value": "pilotskills" }, { "id": 1, "type": "column", "value": "pilot_name" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,305
soccer_2016
bird:train.json:1940
When and for what role did the youngest player appear in his first match?
SELECT T1.Match_Date, T4.Role_Desc FROM `Match` AS T1 INNER JOIN Player_Match AS T2 ON T1.Match_Id = T2.Match_Id INNER JOIN Player AS T3 ON T2.Player_Id = T3.Player_Id INNER JOIN Rolee AS T4 ON T2.Role_Id = T4.Role_Id ORDER BY T3.DOB DESC LIMIT 1
[ "When", "and", "for", "what", "role", "did", "the", "youngest", "player", "appear", "in", "his", "first", "match", "?" ]
[ { "id": 7, "type": "table", "value": "player_match" }, { "id": 0, "type": "column", "value": "match_date" }, { "id": 1, "type": "column", "value": "role_desc" }, { "id": 8, "type": "column", "value": "player_id" }, { "id": 9, "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": [ 8 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]
10,306
donor
bird:train.json:3296
How many donations does the project "Look, Look, We Need a Nook!" have?
SELECT SUM(T3.donation_total) FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Look, Look, We Need a Nook!'
[ "How", "many", "donations", "does", "the", "project", "\"", "Look", ",", "Look", ",", "We", "Need", "a", "Nook", "!", "\"", "have", "?" ]
[ { "id": 2, "type": "value", "value": "Look, Look, We Need a Nook!" }, { "id": 3, "type": "column", "value": "donation_total" }, { "id": 0, "type": "table", "value": "donations" }, { "id": 6, "type": "column", "value": "projectid" }, { "id": 5, ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7, 8, 9, 10, 11, 12, 13, 14, 15 ] }, { "entity_id": 3, "token_idxs": [] }, { "entit...
[ "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O" ]
10,307
authors
bird:train.json:3534
Among the papers with conference ID of 0, list down the authors of papers with a journal ID less than 100.
SELECT DISTINCT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.ConferenceId = 0 AND T1.JournalId < 100
[ "Among", "the", "papers", "with", "conference", "ID", "of", "0", ",", "list", "down", "the", "authors", "of", "papers", "with", "a", "journal", "ID", "less", "than", "100", "." ]
[ { "id": 5, "type": "column", "value": "conferenceid" }, { "id": 2, "type": "table", "value": "paperauthor" }, { "id": 7, "type": "column", "value": "journalid" }, { "id": 4, "type": "column", "value": "paperid" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O" ]
10,308
books
bird:train.json:5974
Provide the contact email of Moss Zarb.
SELECT email FROM customer WHERE first_name = 'Moss' AND last_name = 'Zarb'
[ "Provide", "the", "contact", "email", "of", "Moss", "Zarb", "." ]
[ { "id": 2, "type": "column", "value": "first_name" }, { "id": 4, "type": "column", "value": "last_name" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 1, "type": "column", "value": "email" }, { "id": 3, "type": "value", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "O" ]
10,309
college_completion
bird:train.json:3729
What is the percentage of the number of 4-year public schools from Madison Area Technical College's home state in the Alabama?
SELECT CAST(COUNT(DISTINCT CASE WHEN T1.state = ( SELECT T1.state FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state WHERE T1.chronname = 'Madison Area Technical College' ) AND T1.level = '4-year' AND T1.control = 'Public' THEN T1.chronname ELSE NULL END) AS REAL) * 100 / COUNT(...
[ "What", "is", "the", "percentage", "of", "the", "number", "of", "4", "-", "year", "public", "schools", "from", "Madison", "Area", "Technical", "College", "'s", "home", "state", "in", "the", "Alabama", "?" ]
[ { "id": 10, "type": "value", "value": "Madison Area Technical College" }, { "id": 1, "type": "table", "value": "state_sector_details" }, { "id": 0, "type": "table", "value": "institution_details" }, { "id": 4, "type": "column", "value": "chronname" }, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 20 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-VALUE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
10,310
movies_4
bird:train.json:490
Provide the genre ID of the movie with the title of "The Dark Knight".
SELECT T2.genre_id FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'The Dark Knight'
[ "Provide", "the", "genre", "ID", "of", "the", "movie", "with", "the", "title", "of", "\"", "The", "Dark", "Knight", "\"", "." ]
[ { "id": 4, "type": "value", "value": "The Dark Knight" }, { "id": 2, "type": "table", "value": "movie_genres" }, { "id": 0, "type": "column", "value": "genre_id" }, { "id": 5, "type": "column", "value": "movie_id" }, { "id": 1, "type": "table",...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 0, 1 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "B-TABLE", "I-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
10,311
language_corpus
bird:train.json:5708
What is the average words of the 10 fewest words title?
SELECT CAST(SUM(CASE WHEN words >= 10 THEN words ELSE 0 END) AS REAL) / SUM(CASE WHEN words >= 10 THEN 1 ELSE 0 END) FROM pages
[ "What", "is", "the", "average", "words", "of", "the", "10", "fewest", "words", "title", "?" ]
[ { "id": 0, "type": "table", "value": "pages" }, { "id": 3, "type": "column", "value": "words" }, { "id": 4, "type": "value", "value": "10" }, { "id": 1, "type": "value", "value": "0" }, { "id": 2, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O" ]
10,312
talkingdata
bird:train.json:1181
Between device ID of "-9215352913819630000" and "-9222956879900150000", mention the age and gender of device user who participated more events.
SELECT T.age, T.gender FROM ( SELECT T2.age, T2.gender, COUNT(T1.device_id) AS num FROM events AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T1.device_id BETWEEN -9215352913819630000 AND -9222956879900150000 GROUP BY T2.age, T2.gender ) AS T ORDER BY T.num DESC LIMIT 1
[ "Between", "device", "ID", "of", "\"", "-9215352913819630000", "\"", "and", "\"", "-9222956879900150000", "\"", ",", "mention", "the", "age", "and", "gender", "of", "device", "user", "who", "participated", "more", "events", "." ]
[ { "id": 6, "type": "value", "value": "-9215352913819630000" }, { "id": 7, "type": "value", "value": "-9222956879900150000" }, { "id": 4, "type": "table", "value": "gender_age" }, { "id": 5, "type": "column", "value": "device_id" }, { "id": 1, "...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 23 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,313
synthea
bird:train.json:1375
Why did Mrs. Annabelle Pouros take leucovorin 100 mg injection on 1970/12/19? State the reason.
SELECT T2.reasondescription FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Annabelle' AND T1.last = 'Pouros' AND T2.start = '1970-12-19' AND T2.description = 'Leucovorin 100 MG Injection'
[ "Why", "did", "Mrs.", "Annabelle", "Pouros", "take", "leucovorin", "100", "mg", "injection", "on", "1970/12/19", "?", "State", "the", "reason", "." ]
[ { "id": 13, "type": "value", "value": "Leucovorin 100 MG Injection" }, { "id": 0, "type": "column", "value": "reasondescription" }, { "id": 2, "type": "table", "value": "medications" }, { "id": 12, "type": "column", "value": "description" }, { "id"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2 ...
[ "O", "O", "B-VALUE", "B-VALUE", "B-VALUE", "O", "B-VALUE", "I-VALUE", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O" ]
10,314
olympics
bird:train.json:5014
Give the height of the tallest athlete from Portugal.
SELECT T3.height FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Portugal' ORDER BY T3.height DESC LIMIT 1
[ "Give", "the", "height", "of", "the", "tallest", "athlete", "from", "Portugal", "." ]
[ { "id": 5, "type": "table", "value": "person_region" }, { "id": 2, "type": "column", "value": "region_name" }, { "id": 4, "type": "table", "value": "noc_region" }, { "id": 6, "type": "column", "value": "person_id" }, { "id": 8, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,315
store_1
spider:train_spider.json:644
What are the names of all tracks that are on the Movies playlist but not in the music playlist?
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = ...
[ "What", "are", "the", "names", "of", "all", "tracks", "that", "are", "on", "the", "Movies", "playlist", "but", "not", "in", "the", "music", "playlist", "?" ]
[ { "id": 5, "type": "table", "value": "playlist_tracks" }, { "id": 6, "type": "column", "value": "playlist_id" }, { "id": 1, "type": "table", "value": "playlists" }, { "id": 8, "type": "column", "value": "track_id" }, { "id": 2, "type": "value",...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
10,316
college_2
spider:train_spider.json:1389
What are the names of instructors who advise more than one student?
SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING count(*) > 1
[ "What", "are", "the", "names", "of", "instructors", "who", "advise", "more", "than", "one", "student", "?" ]
[ { "id": 2, "type": "table", "value": "instructor" }, { "id": 3, "type": "table", "value": "advisor" }, { "id": 0, "type": "column", "value": "i_id" }, { "id": 1, "type": "column", "value": "name" }, { "id": 5, "type": "column", "value": "id...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O" ]
10,317
codebase_comments
bird:train.json:626
How many percent more of the stars for the repository of solution No.51424 than No.167053?
SELECT CAST(SUM(CASE WHEN T2.Id = 51424 THEN T1.Stars ELSE 0 END) - SUM(CASE WHEN T2.Id = 167053 THEN T1.Stars ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 167053 THEN T1.Stars ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId
[ "How", "many", "percent", "more", "of", "the", "stars", "for", "the", "repository", "of", "solution", "No.51424", "than", "No.167053", "?" ]
[ { "id": 1, "type": "table", "value": "solution" }, { "id": 3, "type": "column", "value": "repoid" }, { "id": 7, "type": "value", "value": "167053" }, { "id": 6, "type": "column", "value": "stars" }, { "id": 8, "type": "value", "value": "514...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "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", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-VALUE", "O", "B-VALUE", "O" ]
10,319
sakila_1
spider:train_spider.json:2995
Return the full name of the customer who made the first rental.
SELECT T1.first_name , T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1
[ "Return", "the", "full", "name", "of", "the", "customer", "who", "made", "the", "first", "rental", "." ]
[ { "id": 4, "type": "column", "value": "rental_date" }, { "id": 5, "type": "column", "value": "customer_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 2, "type": "table",...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
10,320
formula_1
bird:dev.json:876
For the race happened in 2015/11/29, how many drivers did not finish the game?
SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '2015-11-29' AND T2.time IS NULL
[ "For", "the", "race", "happened", "in", "2015/11/29", ",", "how", "many", "drivers", "did", "not", "finish", "the", "game", "?" ]
[ { "id": 5, "type": "value", "value": "2015-11-29" }, { "id": 2, "type": "column", "value": "driverid" }, { "id": 1, "type": "table", "value": "results" }, { "id": 3, "type": "column", "value": "raceid" }, { "id": 0, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O" ]
10,321
authors
bird:train.json:3560
Among the papers published in 2009, pick 10 and list down the conference's short name of these papers.
SELECT T2.PaperId, T4.ShortName FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id INNER JOIN Conference AS T4 ON T3.ConferenceId = T4.Id WHERE T3.Year = 2009 LIMIT 10
[ "Among", "the", "papers", "published", "in", "2009", ",", "pick", "10", "and", "list", "down", "the", "conference", "'s", "short", "name", "of", "these", "papers", "." ]
[ { "id": 6, "type": "column", "value": "conferenceid" }, { "id": 9, "type": "table", "value": "paperauthor" }, { "id": 2, "type": "table", "value": "conference" }, { "id": 1, "type": "column", "value": "shortname" }, { "id": 10, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 15, 16 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_i...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O" ]
10,322
books
bird:train.json:6040
List the titles of all the books that Peter H. Smith wrote.
SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Peter H. Smith'
[ "List", "the", "titles", "of", "all", "the", "books", "that", "Peter", "H.", "Smith", "wrote", "." ]
[ { "id": 3, "type": "value", "value": "Peter H. Smith" }, { "id": 2, "type": "column", "value": "author_name" }, { "id": 5, "type": "table", "value": "book_author" }, { "id": 6, "type": "column", "value": "author_id" }, { "id": 7, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "e...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
10,323
college_2
spider:train_spider.json:1410
Find the total number of students in each department.
SELECT count(*) , dept_name FROM student GROUP BY dept_name
[ "Find", "the", "total", "number", "of", "students", "in", "each", "department", "." ]
[ { "id": 1, "type": "column", "value": "dept_name" }, { "id": 0, "type": "table", "value": "student" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
10,324
city_record
spider:train_spider.json:6281
IN which year did city "Taizhou ( Zhejiang )" serve as a host city?
SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = "Taizhou ( Zhejiang )"
[ "IN", "which", "year", "did", "city", "\"", "Taizhou", "(", "Zhejiang", ")", "\"", "serve", "as", "a", "host", "city", "?" ]
[ { "id": 4, "type": "column", "value": "Taizhou ( Zhejiang )" }, { "id": 2, "type": "table", "value": "hosting_city" }, { "id": 6, "type": "column", "value": "host_city" }, { "id": 5, "type": "column", "value": "city_id" }, { "id": 0, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 6, 7, 8, 9 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,325
professional_basketball
bird:train.json:2841
From 1962 to 1975, how many coaches received the award?
SELECT COUNT(DISTINCT coachID) FROM awards_coaches WHERE year BETWEEN 1962 AND 1975
[ "From", "1962", "to", "1975", ",", "how", "many", "coaches", "received", "the", "award", "?" ]
[ { "id": 0, "type": "table", "value": "awards_coaches" }, { "id": 4, "type": "column", "value": "coachid" }, { "id": 1, "type": "column", "value": "year" }, { "id": 2, "type": "value", "value": "1962" }, { "id": 3, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "...
[ "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
10,326
simpson_episodes
bird:train.json:4180
What is the birth name of the person who voiced 'Helen Lovejoy?'
SELECT DISTINCT T1.birth_name FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.role = 'Helen Lovejoy';
[ "What", "is", "the", "birth", "name", "of", "the", "person", "who", "voiced", "'", "Helen", "Lovejoy", "?", "'" ]
[ { "id": 4, "type": "value", "value": "Helen Lovejoy" }, { "id": 0, "type": "column", "value": "birth_name" }, { "id": 1, "type": "table", "value": "person" }, { "id": 2, "type": "table", "value": "credit" }, { "id": 6, "type": "column", "va...
[ { "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": [ 11, 12 ] }, { "entity_id": 5, "to...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O" ]
10,327
wine_1
spider:train_spider.json:6566
Give the color of the grape whose wine products have the highest average price?
SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1
[ "Give", "the", "color", "of", "the", "grape", "whose", "wine", "products", "have", "the", "highest", "average", "price", "?" ]
[ { "id": 2, "type": "table", "value": "grapes" }, { "id": 0, "type": "column", "value": "grape" }, { "id": 1, "type": "column", "value": "color" }, { "id": 4, "type": "column", "value": "price" }, { "id": 3, "type": "table", "value": "wine" ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,328
music_1
spider:train_spider.json:3553
Find the names of the artists who are from UK and have produced English songs.
SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT artist_name FROM song WHERE languages = "english"
[ "Find", "the", "names", "of", "the", "artists", "who", "are", "from", "UK", "and", "have", "produced", "English", "songs", "." ]
[ { "id": 2, "type": "column", "value": "artist_name" }, { "id": 5, "type": "column", "value": "languages" }, { "id": 3, "type": "column", "value": "country" }, { "id": 6, "type": "column", "value": "english" }, { "id": 0, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
10,329
region_building
bird:test.json:316
Count the number of buildings.
SELECT count(*) FROM building
[ "Count", "the", "number", "of", "buildings", "." ]
[ { "id": 0, "type": "table", "value": "building" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O" ]
10,330
professional_basketball
bird:train.json:2887
List the first name, last name, height and weight of the players who has all free throw attempted successfully made.
SELECT DISTINCT T1.firstName, T1.lastName, T1.height, T1.weight FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.ft_attempted > 0 AND ft_attempted = ft_made
[ "List", "the", "first", "name", ",", "last", "name", ",", "height", "and", "weight", "of", "the", "players", "who", "has", "all", "free", "throw", "attempted", "successfully", "made", "." ]
[ { "id": 5, "type": "table", "value": "player_allstar" }, { "id": 7, "type": "column", "value": "ft_attempted" }, { "id": 0, "type": "column", "value": "firstname" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 6, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
10,331
swimming
spider:train_spider.json:5615
Find the names of all swimmers, sorted by their 100 meter scores in ascending order.
SELECT name FROM swimmer ORDER BY meter_100
[ "Find", "the", "names", "of", "all", "swimmers", ",", "sorted", "by", "their", "100", "meter", "scores", "in", "ascending", "order", "." ]
[ { "id": 2, "type": "column", "value": "meter_100" }, { "id": 0, "type": "table", "value": "swimmer" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
10,332
cookbook
bird:train.json:8876
How many calories does the turkey tenderloin bundles recipe have?
SELECT T2.calories FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Turkey Tenderloin Bundles'
[ "How", "many", "calories", "does", "the", "turkey", "tenderloin", "bundles", "recipe", "have", "?" ]
[ { "id": 4, "type": "value", "value": "Turkey Tenderloin Bundles" }, { "id": 2, "type": "table", "value": "nutrition" }, { "id": 5, "type": "column", "value": "recipe_id" }, { "id": 0, "type": "column", "value": "calories" }, { "id": 1, "type": ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5, 6, 7 ] }, { "en...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O", "O" ]
10,333
student_loan
bird:train.json:4539
How many disabled students have payment due?
SELECT COUNT(T1.name) FROM no_payment_due AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.bool = 'pos'
[ "How", "many", "disabled", "students", "have", "payment", "due", "?" ]
[ { "id": 0, "type": "table", "value": "no_payment_due" }, { "id": 1, "type": "table", "value": "disabled" }, { "id": 2, "type": "column", "value": "bool" }, { "id": 4, "type": "column", "value": "name" }, { "id": 3, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "O", "O", "B-TABLE", "I-TABLE", "O" ]
10,334
gymnast
spider:train_spider.json:1744
What are the names of people in ascending alphabetical order?
SELECT Name FROM People ORDER BY Name ASC
[ "What", "are", "the", "names", "of", "people", "in", "ascending", "alphabetical", "order", "?" ]
[ { "id": 0, "type": "table", "value": "people" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
10,335
performance_attendance
spider:train_spider.json:1309
What are the dates and locations of performances?
SELECT Date , LOCATION FROM performance
[ "What", "are", "the", "dates", "and", "locations", "of", "performances", "?" ]
[ { "id": 0, "type": "table", "value": "performance" }, { "id": 2, "type": "column", "value": "location" }, { "id": 1, "type": "column", "value": "date" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
10,336
retails
bird:train.json:6683
Among all the customers in Germany, how many of them have an account balance of over 1000?
SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'GERMANY' AND T1.c_acctbal > 1000
[ "Among", "all", "the", "customers", "in", "Germany", ",", "how", "many", "of", "them", "have", "an", "account", "balance", "of", "over", "1000", "?" ]
[ { "id": 3, "type": "column", "value": "c_nationkey" }, { "id": 4, "type": "column", "value": "n_nationkey" }, { "id": 2, "type": "column", "value": "c_custkey" }, { "id": 7, "type": "column", "value": "c_acctbal" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O" ]
10,337
retails
bird:train.json:6671
When was the latest date the items of order no.1 were shipped?
SELECT MAX(l_shipdate) FROM lineitem WHERE l_orderkey = 1
[ "When", "was", "the", "latest", "date", "the", "items", "of", "order", "no.1", "were", "shipped", "?" ]
[ { "id": 1, "type": "column", "value": "l_orderkey" }, { "id": 3, "type": "column", "value": "l_shipdate" }, { "id": 0, "type": "table", "value": "lineitem" }, { "id": 2, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O" ]
10,338
retail_world
bird:train.json:6453
What are the names of Robert King's territories?
SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.LastName = 'King' AND T1.FirstName = 'Robert'
[ "What", "are", "the", "names", "of", "Robert", "King", "'s", "territories", "?" ]
[ { "id": 0, "type": "column", "value": "territorydescription" }, { "id": 3, "type": "table", "value": "employeeterritories" }, { "id": 1, "type": "table", "value": "territories" }, { "id": 4, "type": "column", "value": "territoryid" }, { "id": 9, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "token_idxs": [ 3 ...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "O", "B-COLUMN", "O" ]
10,340
synthea
bird:train.json:1366
Why did Elly Koss need to take Acetaminophen?
SELECT T2.REASONDESCRIPTION FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description LIKE 'Acetaminophen%'
[ "Why", "did", "Elly", "Koss", "need", "to", "take", "Acetaminophen", "?" ]
[ { "id": 0, "type": "column", "value": "reasondescription" }, { "id": 9, "type": "value", "value": "Acetaminophen%" }, { "id": 2, "type": "table", "value": "medications" }, { "id": 8, "type": "column", "value": "description" }, { "id": 1, "type"...
[ { "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", "B-VALUE", "O", "O", "O", "B-VALUE", "O" ]
10,341
climbing
spider:train_spider.json:1146
Show the range that has the most number of mountains.
SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1
[ "Show", "the", "range", "that", "has", "the", "most", "number", "of", "mountains", "." ]
[ { "id": 0, "type": "table", "value": "mountain" }, { "id": 1, "type": "column", "value": "range" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,342
customers_and_invoices
spider:train_spider.json:1619
Show the product ids and the number of unique orders containing each product.
SELECT product_id , count(DISTINCT order_id) FROM Order_items GROUP BY product_id
[ "Show", "the", "product", "ids", "and", "the", "number", "of", "unique", "orders", "containing", "each", "product", "." ]
[ { "id": 0, "type": "table", "value": "order_items" }, { "id": 1, "type": "column", "value": "product_id" }, { "id": 2, "type": "column", "value": "order_id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
10,343
regional_sales
bird:train.json:2639
Please calculate the total number of orders by each city in 2019.
SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderDate LIKE '%/%/19' GROUP BY T2.`City Name` HAVING COUNT(T1.OrderNumber)
[ "Please", "calculate", "the", "total", "number", "of", "orders", "by", "each", "city", "in", "2019", "." ]
[ { "id": 2, "type": "table", "value": "Store Locations" }, { "id": 1, "type": "table", "value": "Sales Orders" }, { "id": 5, "type": "column", "value": "ordernumber" }, { "id": 0, "type": "column", "value": "City Name" }, { "id": 3, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 9, 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
10,344
talkingdata
bird:train.json:1191
What is the category of the label that represented the behavior category of app id 5902120154267990000?
SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T2.app_id = 5902120154267990000
[ "What", "is", "the", "category", "of", "the", "label", "that", "represented", "the", "behavior", "category", "of", "app", "i", "d", "5902120154267990000", "?" ]
[ { "id": 4, "type": "value", "value": "5902120154267990000" }, { "id": 1, "type": "table", "value": "label_categories" }, { "id": 2, "type": "table", "value": "app_labels" }, { "id": 0, "type": "column", "value": "category" }, { "id": 5, "type":...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13, 14, 15 ] }, { "entity_id": 4, "token_idxs": [ 16 ...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
10,345
shipping
bird:train.json:5602
Provide the weight of the shipment to U-haul Center Of N Syracuse on 2016/9/21.
SELECT T1.weight FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.cust_name = 'U-haul Center Of N Syracuse' AND T1.ship_date = '2016-09-21'
[ "Provide", "the", "weight", "of", "the", "shipment", "to", "U", "-", "haul", "Center", "Of", "N", "Syracuse", "on", "2016/9/21", "." ]
[ { "id": 5, "type": "value", "value": "U-haul Center Of N Syracuse" }, { "id": 7, "type": "value", "value": "2016-09-21" }, { "id": 4, "type": "column", "value": "cust_name" }, { "id": 6, "type": "column", "value": "ship_date" }, { "id": 1, "typ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-VALUE", "O" ]
10,346
district_spokesman
bird:test.json:1186
Return the ids and names of the districts whose population is larger than 4000 or area bigger than 3000.
SELECT district_id , name FROM district WHERE area_km > 3000 OR population > 4000
[ "Return", "the", "ids", "and", "names", "of", "the", "districts", "whose", "population", "is", "larger", "than", "4000", "or", "area", "bigger", "than", "3000", "." ]
[ { "id": 1, "type": "column", "value": "district_id" }, { "id": 5, "type": "column", "value": "population" }, { "id": 0, "type": "table", "value": "district" }, { "id": 3, "type": "column", "value": "area_km" }, { "id": 2, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [ 18 ] }, { "entit...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
10,347
sakila_1
spider:train_spider.json:2959
Return the sum of all payment amounts.
SELECT sum(amount) FROM payment
[ "Return", "the", "sum", "of", "all", "payment", "amounts", "." ]
[ { "id": 0, "type": "table", "value": "payment" }, { "id": 1, "type": "column", "value": "amount" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
10,348
language_corpus
bird:train.json:5730
Indicate the title of all the pages in which the word comunitat appears.
SELECT T3.title FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'comunitat'
[ "Indicate", "the", "title", "of", "all", "the", "pages", "in", "which", "the", "word", "comunitat", "appears", "." ]
[ { "id": 5, "type": "table", "value": "pages_words" }, { "id": 3, "type": "value", "value": "comunitat" }, { "id": 0, "type": "column", "value": "title" }, { "id": 1, "type": "table", "value": "pages" }, { "id": 4, "type": "table", "value": ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "O" ]
10,349
works_cycles
bird:train.json:7204
Among the employees who wish to receive e-mail promotion from AdventureWorks, how many percent of them are female?
SELECT CAST(SUM(CASE WHEN T1.Gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 1
[ "Among", "the", "employees", "who", "wish", "to", "receive", "e", "-", "mail", "promotion", "from", "AdventureWorks", ",", "how", "many", "percent", "of", "them", "are", "female", "?" ]
[ { "id": 4, "type": "column", "value": "businessentityid" }, { "id": 2, "type": "column", "value": "emailpromotion" }, { "id": 0, "type": "table", "value": "employee" }, { "id": 1, "type": "table", "value": "person" }, { "id": 7, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 7, 8, 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "O", "O", "O", "O" ]
10,350
beer_factory
bird:train.json:5296
Among the root beers sold in bottles, how many are sold at the location 38.559615, -121.42243?
SELECT COUNT(T4.BrandID) FROM `transaction` AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID INNER JOIN location AS T3 ON T1.LocationID = T3.LocationID INNER JOIN rootbeer AS T4 ON T1.RootBeerID = T4.RootBeerID WHERE T2.Latitude = 38.559615 AND T2.Longitude = -121.42243 AND T4.ContainerType = 'Bottle...
[ "Among", "the", "root", "beers", "sold", "in", "bottles", ",", "how", "many", "are", "sold", "at", "the", "location", "38.559615", ",", "-121.42243", "?" ]
[ { "id": 8, "type": "column", "value": "containertype" }, { "id": 10, "type": "table", "value": "transaction" }, { "id": 11, "type": "table", "value": "geolocation" }, { "id": 3, "type": "column", "value": "rootbeerid" }, { "id": 7, "type": "val...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "O", "B-VALUE", "O" ]
10,351
donor
bird:train.json:3197
Please list the vendor providing resources for the projects of a school with the highest poverty level.
SELECT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.poverty_level = 'highest poverty'
[ "Please", "list", "the", "vendor", "providing", "resources", "for", "the", "projects", "of", "a", "school", "with", "the", "highest", "poverty", "level", "." ]
[ { "id": 4, "type": "value", "value": "highest poverty" }, { "id": 3, "type": "column", "value": "poverty_level" }, { "id": 0, "type": "column", "value": "vendor_name" }, { "id": 1, "type": "table", "value": "resources" }, { "id": 5, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 15, 16 ] }, { "entity_id": 4, "token_idxs": [ 14 ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O" ]
10,352
movie_2
bird:test.json:1850
What are the different movie ratings?
SELECT DISTINCT rating FROM movies
[ "What", "are", "the", "different", "movie", "ratings", "?" ]
[ { "id": 0, "type": "table", "value": "movies" }, { "id": 1, "type": "column", "value": "rating" } ]
[ { "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" ]
10,353
gas_company
spider:train_spider.json:2017
Show all locations and the number of gas stations in each location ordered by the count.
SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)
[ "Show", "all", "locations", "and", "the", "number", "of", "gas", "stations", "in", "each", "location", "ordered", "by", "the", "count", "." ]
[ { "id": 0, "type": "table", "value": "gas_station" }, { "id": 1, "type": "column", "value": "location" } ]
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
10,354
professional_basketball
bird:train.json:2938
For the player who was drafted in the 1st round, 6th position in 1976, which team did he play in that year?
SELECT T2.tmID FROM draft AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.draftYear = T2.year WHERE T1.draftRound = 1 AND T1.draftSelection = 6 AND T1.draftYear = 1976
[ "For", "the", "player", "who", "was", "drafted", "in", "the", "1st", "round", ",", "6th", "position", "in", "1976", ",", "which", "team", "did", "he", "play", "in", "that", "year", "?" ]
[ { "id": 5, "type": "column", "value": "draftselection" }, { "id": 3, "type": "column", "value": "draftround" }, { "id": 7, "type": "column", "value": "draftyear" }, { "id": 1, "type": "table", "value": "draft" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 17, 18 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,355
scientist_1
spider:train_spider.json:6482
What are the names of projects that have taken longer than the average number of hours for all projects?
SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)
[ "What", "are", "the", "names", "of", "projects", "that", "have", "taken", "longer", "than", "the", "average", "number", "of", "hours", "for", "all", "projects", "?" ]
[ { "id": 0, "type": "table", "value": "projects" }, { "id": 2, "type": "column", "value": "hours" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
10,356
dorm_1
spider:train_spider.json:5722
Find the average and oldest age for students with different sex.
SELECT avg(age) , max(age) , sex FROM student GROUP BY sex
[ "Find", "the", "average", "and", "oldest", "age", "for", "students", "with", "different", "sex", "." ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "sex" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
10,357
address_1
bird:test.json:807
Show ids for all female (sex is F) students living in state PA.
SELECT StuID FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.state = "PA" AND T2.sex = 'F'
[ "Show", "ids", "for", "all", "female", "(", "sex", "is", "F", ")", "students", "living", "in", "state", "PA", "." ]
[ { "id": 3, "type": "column", "value": "city_code" }, { "id": 2, "type": "table", "value": "student" }, { "id": 0, "type": "column", "value": "stuid" }, { "id": 4, "type": "column", "value": "state" }, { "id": 1, "type": "table", "value": "c...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
10,358
cookbook
bird:train.json:8890
What are the names of the recipes that will cause stomach pain?
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20
[ "What", "are", "the", "names", "of", "the", "recipes", "that", "will", "cause", "stomach", "pain", "?" ]
[ { "id": 2, "type": "table", "value": "nutrition" }, { "id": 5, "type": "column", "value": "recipe_id" }, { "id": 1, "type": "table", "value": "recipe" }, { "id": 0, "type": "column", "value": "title" }, { "id": 3, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
10,359
superhero
bird:dev.json:743
What is the percentage of superheroes who act in their own self-interest or make decisions based on their own moral code? Indicate how many of the said superheroes were published by Marvel Comics.
SELECT (CAST(COUNT(*) AS REAL) * 100 / (SELECT COUNT(*) FROM superhero)), CAST(SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) AS REAL) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN alignment AS T3 ON T3.id = T1.alignment_id WHERE T3.alignment = 'Bad'
[ "What", "is", "the", "percentage", "of", "superheroes", "who", "act", "in", "their", "own", "self", "-", "interest", "or", "make", "decisions", "based", "on", "their", "own", "moral", "code", "?", "Indicate", "how", "many", "of", "the", "said", "superheroe...
[ { "id": 11, "type": "column", "value": "publisher_name" }, { "id": 12, "type": "value", "value": "Marvel Comics" }, { "id": 6, "type": "column", "value": "alignment_id" }, { "id": 8, "type": "column", "value": "publisher_id" }, { "id": 0, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 32 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O" ]
10,360
books
bird:train.json:5979
Who wrote "The Prophet"?
SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.title = 'The Prophet'
[ "Who", "wrote", "\"", "The", "Prophet", "\"", "?" ]
[ { "id": 0, "type": "column", "value": "author_name" }, { "id": 3, "type": "value", "value": "The Prophet" }, { "id": 5, "type": "table", "value": "book_author" }, { "id": 6, "type": "column", "value": "author_id" }, { "id": 7, "type": "column",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3, 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O" ]
10,361
phone_1
spider:train_spider.json:1033
Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.
SELECT Company_name , count(*) FROM phone GROUP BY Company_name ORDER BY count(*) ASC LIMIT 1;
[ "Find", "the", "name", "of", "the", "company", "that", "has", "the", "least", "number", "of", "phone", "models", ".", "List", "the", "company", "name", "and", "the", "number", "of", "phone", "model", "produced", "by", "that", "company", "." ]
[ { "id": 1, "type": "column", "value": "company_name" }, { "id": 0, "type": "table", "value": "phone" } ]
[ { "entity_id": 0, "token_idxs": [ 23 ] }, { "entity_id": 1, "token_idxs": [ 17, 18 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "t...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
10,362
student_loan
bird:train.json:4534
State name of female students who filed for bankruptcy.
SELECT T1.name FROM person AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T1.name = T3.name WHERE T3.name IS NULL
[ "State", "name", "of", "female", "students", "who", "filed", "for", "bankruptcy", "." ]
[ { "id": 3, "type": "table", "value": "filed_for_bankrupcy" }, { "id": 2, "type": "table", "value": "person" }, { "id": 0, "type": "column", "value": "name" }, { "id": 1, "type": "table", "value": "male" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
10,363
swimming
spider:train_spider.json:5622
Find the names of stadiums which have never had any event.
SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)
[ "Find", "the", "names", "of", "stadiums", "which", "have", "never", "had", "any", "event", "." ]
[ { "id": 4, "type": "column", "value": "stadium_id" }, { "id": 0, "type": "table", "value": "stadium" }, { "id": 3, "type": "table", "value": "event" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "i...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 0 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,364
codebase_community
bird:dev.json:637
State all the tags used by Mark Meckes in his posts that doesn't have comments.
SELECT T3.Tags FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T3.Id = T2.PostId WHERE T1.DisplayName = 'Mark Meckes' AND T3.CommentCount = 0
[ "State", "all", "the", "tags", "used", "by", "Mark", "Meckes", "in", "his", "posts", "that", "does", "n't", "have", "comments", "." ]
[ { "id": 8, "type": "column", "value": "commentcount" }, { "id": 3, "type": "table", "value": "posthistory" }, { "id": 6, "type": "column", "value": "displayname" }, { "id": 7, "type": "value", "value": "Mark Meckes" }, { "id": 5, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,365
store_1
spider:train_spider.json:576
What is the email and phone number of Astrid Gruber the customer?
SELECT email , phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber";
[ "What", "is", "the", "email", "and", "phone", "number", "of", "Astrid", "Gruber", "the", "customer", "?" ]
[ { "id": 3, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 5, "type": "column", "value": "last_name" }, { "id": 4, "type": "column", "value": "Astrid" }, { "id": 6, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "O" ]
10,366
hockey
bird:train.json:7669
How many players born in Toronto have won the All-Rookie award?
SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.birthCity = 'Toronto'
[ "How", "many", "players", "born", "in", "Toronto", "have", "won", "the", "All", "-", "Rookie", "award", "?" ]
[ { "id": 1, "type": "table", "value": "awardsplayers" }, { "id": 4, "type": "value", "value": "All-Rookie" }, { "id": 5, "type": "column", "value": "birthcity" }, { "id": 2, "type": "column", "value": "playerid" }, { "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": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 9, 10, 11 ] }, { ...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "O" ]
10,367
image_and_language
bird:train.json:7607
Name the most common predicate class of image ID 4434.
SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 4434 ORDER BY T2.PRED_CLASS DESC LIMIT 1
[ "Name", "the", "most", "common", "predicate", "class", "of", "image", "ID", "4434", "." ]
[ { "id": 5, "type": "column", "value": "pred_class_id" }, { "id": 2, "type": "table", "value": "pred_classes" }, { "id": 0, "type": "column", "value": "pred_class" }, { "id": 1, "type": "table", "value": "img_rel" }, { "id": 3, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 4, 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "en...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
10,368
club_1
spider:train_spider.json:4254
How many students are there?
SELECT count(*) FROM student
[ "How", "many", "students", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "student" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O" ]
10,369
retails
bird:train.json:6869
Please list the names of all the suppliers for the part "hot spring dodger dim light".
SELECT T2.s_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_name = 'hot spring dodger dim light'
[ "Please", "list", "the", "names", "of", "all", "the", "suppliers", "for", "the", "part", "\"", "hot", "spring", "dodger", "dim", "light", "\"", "." ]
[ { "id": 3, "type": "value", "value": "hot spring dodger dim light" }, { "id": 6, "type": "column", "value": "ps_partkey" }, { "id": 8, "type": "column", "value": "ps_suppkey" }, { "id": 7, "type": "column", "value": "p_partkey" }, { "id": 9, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 12, 13, 14, 15, 16 ] }, { "entity_id": 4, "token_id...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
10,371
manufactory_1
spider:train_spider.json:5330
Compute the average price of all the products.
SELECT avg(price) FROM products
[ "Compute", "the", "average", "price", "of", "all", "the", "products", "." ]
[ { "id": 0, "type": "table", "value": "products" }, { "id": 1, "type": "column", "value": "price" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
10,372
scientist_1
spider:train_spider.json:6486
What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?
SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'
[ "What", "is", "the", "name", "of", "the", "project", "that", "has", "a", "scientist", "assigned", "to", "it", "whose", "name", "contains", "'", "Smith", "'", "?" ]
[ { "id": 1, "type": "table", "value": "scientists" }, { "id": 3, "type": "table", "value": "assignedto" }, { "id": 5, "type": "column", "value": "scientist" }, { "id": 4, "type": "table", "value": "projects" }, { "id": 2, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 18 ] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "O", "O" ]