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
6,532
card_games
bird:dev.json:505
Show the Simplified Chinese translation of the name of the set "Mirrodin"?
SELECT translation FROM set_translations WHERE setCode IN ( SELECT code FROM sets WHERE name = 'Mirrodin' ) AND language = 'Chinese Simplified'
[ "Show", "the", "Simplified", "Chinese", "translation", "of", "the", "name", "of", "the", "set", "\"", "Mirrodin", "\"", "?" ]
[ { "id": 4, "type": "value", "value": "Chinese Simplified" }, { "id": 0, "type": "table", "value": "set_translations" }, { "id": 1, "type": "column", "value": "translation" }, { "id": 3, "type": "column", "value": "language" }, { "id": 8, "type"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1, 2 ] }, { "entity_id": 5, "toke...
[ "O", "B-VALUE", "I-VALUE", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O" ]
6,533
shop_membership
spider:train_spider.json:5436
What is the sum of total pounds of purchase in year 2018 for all branches in London?
SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018
[ "What", "is", "the", "sum", "of", "total", "pounds", "of", "purchase", "in", "year", "2018", "for", "all", "branches", "in", "London", "?" ]
[ { "id": 2, "type": "column", "value": "total_pounds" }, { "id": 3, "type": "column", "value": "branch_id" }, { "id": 0, "type": "table", "value": "purchase" }, { "id": 1, "type": "table", "value": "branch" }, { "id": 5, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
6,534
regional_sales
bird:train.json:2651
List all orders where its products were shipped from Daly City.
SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`City Name` = 'Daly City' THEN T1.OrderNumber END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL
[ "List", "all", "orders", "where", "its", "products", "were", "shipped", "from", "Daly", "City", "." ]
[ { "id": 2, "type": "table", "value": "Store Locations" }, { "id": 1, "type": "table", "value": "Sales Orders" }, { "id": 5, "type": "column", "value": "ordernumber" }, { "id": 6, "type": "column", "value": "City Name" }, { "id": 7, "type": "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2, ...
[ "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O" ]
6,535
soccer_2
spider:train_spider.json:4968
What is average enrollment of colleges in the state FL?
SELECT avg(enr) FROM College WHERE state = 'FL'
[ "What", "is", "average", "enrollment", "of", "colleges", "in", "the", "state", "FL", "?" ]
[ { "id": 0, "type": "table", "value": "college" }, { "id": 1, "type": "column", "value": "state" }, { "id": 3, "type": "column", "value": "enr" }, { "id": 2, "type": "value", "value": "FL" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
6,536
movie_2
bird:test.json:1830
What are the movie names in alphabetical order?
SELECT title FROM movies ORDER BY title
[ "What", "are", "the", "movie", "names", "in", "alphabetical", "order", "?" ]
[ { "id": 0, "type": "table", "value": "movies" }, { "id": 1, "type": "column", "value": "title" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
6,538
soccer_2016
bird:train.json:1821
How many matches were played on May 2008?
SELECT SUM(CASE WHEN SUBSTR(Match_Date, 7, 1) = '5' THEN 1 ELSE 0 END) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008'
[ "How", "many", "matches", "were", "played", "on", "May", "2008", "?" ]
[ { "id": 2, "type": "column", "value": "match_date" }, { "id": 0, "type": "table", "value": "Match" }, { "id": 1, "type": "value", "value": "2008" }, { "id": 3, "type": "value", "value": "1" }, { "id": 4, "type": "value", "value": "4" }, ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O" ]
6,539
hr_1
spider:train_spider.json:3417
display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.
SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'
[ "display", "the", "full", "name", "(", "first", "and", "last", ")", ",", "hire", "date", ",", "salary", ",", "and", "department", "number", "for", "those", "employees", "whose", "first", "name", "does", "not", "containing", "the", "letter", "M." ]
[ { "id": 5, "type": "column", "value": "department_id" }, { "id": 1, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "last_name" }, { "id": 3, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 20 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 22, 23 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ 13 ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O" ]
6,540
works_cycles
bird:train.json:7413
In which year will the David Bradley's credit card expire?
SELECT T3.ExpYear FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley'
[ "In", "which", "year", "will", "the", "David", "Bradley", "'s", "credit", "card", "expire", "?" ]
[ { "id": 3, "type": "table", "value": "personcreditcard" }, { "id": 9, "type": "column", "value": "businessentityid" }, { "id": 4, "type": "column", "value": "creditcardid" }, { "id": 1, "type": "table", "value": "creditcard" }, { "id": 5, "type...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 8, 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-VALUE", "O", "B-TABLE", "I-TABLE", "O", "O" ]
6,541
financial
bird:dev.json:94
List out the account numbers of female clients who are oldest and has lowest average salary, calculate the gap between this lowest average salary with the highest average salary?
SELECT T1.account_id , ( SELECT MAX(A11) - MIN(A11) FROM district ) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T1.account_id = T3.account_id INNER JOIN client AS T4 ON T3.client_id = T4.client_id WHERE T2.district_id = ( SELECT district_id FROM client WHERE ...
[ "List", "out", "the", "account", "numbers", "of", "female", "clients", "who", "are", "oldest", "and", "has", "lowest", "average", "salary", ",", "calculate", "the", "gap", "between", "this", "lowest", "average", "salary", "with", "the", "highest", "average", ...
[ { "id": 2, "type": "column", "value": "district_id" }, { "id": 0, "type": "column", "value": "account_id" }, { "id": 10, "type": "column", "value": "birth_date" }, { "id": 5, "type": "column", "value": "client_id" }, { "id": 6, "type": "table",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
6,542
online_exams
bird:test.json:215
Please show the first names of the students that have at least two answer records.
SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*) >= 2
[ "Please", "show", "the", "first", "names", "of", "the", "students", "that", "have", "at", "least", "two", "answer", "records", "." ]
[ { "id": 2, "type": "table", "value": "student_answers" }, { "id": 0, "type": "column", "value": "student_id" }, { "id": 1, "type": "column", "value": "first_name" }, { "id": 3, "type": "table", "value": "students" }, { "id": 4, "type": "value",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
6,544
cs_semester
bird:train.json:957
Among the professors with more than average teaching ability, list the full name and email address of the professors who advise two or more students.
SELECT T2.first_name, T2.last_name, T2.email FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.teachingability > ( SELECT AVG(teachingability) FROM prof ) GROUP BY T2.prof_id HAVING COUNT(T1.student_id) >= 2
[ "Among", "the", "professors", "with", "more", "than", "average", "teaching", "ability", ",", "list", "the", "full", "name", "and", "email", "address", "of", "the", "professors", "who", "advise", "two", "or", "more", "students", "." ]
[ { "id": 6, "type": "column", "value": "teachingability" }, { "id": 1, "type": "column", "value": "first_name" }, { "id": 8, "type": "column", "value": "student_id" }, { "id": 2, "type": "column", "value": "last_name" }, { "id": 0, "type": "colu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,545
world_development_indicators
bird:train.json:2110
List down the series codes in which the topic is about Environment: Emissions and the license type is restricted. Please include their alpha code.
SELECT SeriesCode FROM Series WHERE Topic = 'Environment: Emissions' AND LicenseType = 'Restricted'
[ "List", "down", "the", "series", "codes", "in", "which", "the", "topic", "is", "about", "Environment", ":", "Emissions", "and", "the", "license", "type", "is", "restricted", ".", "Please", "include", "their", "alpha", "code", "." ]
[ { "id": 3, "type": "value", "value": "Environment: Emissions" }, { "id": 4, "type": "column", "value": "licensetype" }, { "id": 1, "type": "column", "value": "seriescode" }, { "id": 5, "type": "value", "value": "Restricted" }, { "id": 0, "type"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 11, 12, 13 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O" ]
6,546
club_1
spider:train_spider.json:4265
How many people have membership in the club "Pen and Paper Gaming"?
SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Pen and Paper Gaming"
[ "How", "many", "people", "have", "membership", "in", "the", "club", "\"", "Pen", "and", "Paper", "Gaming", "\"", "?" ]
[ { "id": 2, "type": "column", "value": "Pen and Paper Gaming" }, { "id": 4, "type": "table", "value": "member_of_club" }, { "id": 1, "type": "column", "value": "clubname" }, { "id": 0, "type": "table", "value": "student" }, { "id": 6, "type": "c...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9, 10, 11, 12 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "ent...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O" ]
6,549
hockey
bird:train.json:7631
List the living players who have two positions. State their given name the position they play.
SELECT firstName, lastName, pos FROM Master WHERE deathYear IS NULL AND pos LIKE '%/%'
[ "List", "the", "living", "players", "who", "have", "two", "positions", ".", "State", "their", "given", "name", "the", "position", "they", "play", "." ]
[ { "id": 1, "type": "column", "value": "firstname" }, { "id": 4, "type": "column", "value": "deathyear" }, { "id": 2, "type": "column", "value": "lastname" }, { "id": 0, "type": "table", "value": "master" }, { "id": 3, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
6,550
warehouse_1
bird:test.json:1714
What are the locations of warehouses that have boxes containing Rocks but not Scissors?
SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks' EXCEPT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Scissors'
[ "What", "are", "the", "locations", "of", "warehouses", "that", "have", "boxes", "containing", "Rocks", "but", "not", "Scissors", "?" ]
[ { "id": 2, "type": "table", "value": "warehouses" }, { "id": 6, "type": "column", "value": "warehouse" }, { "id": 0, "type": "column", "value": "location" }, { "id": 3, "type": "column", "value": "contents" }, { "id": 5, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "B-VALUE", "O" ]
6,551
region_building
bird:test.json:330
Which region has the largest population? Give me the capital of the region.
SELECT Capital FROM region ORDER BY Population DESC LIMIT 1
[ "Which", "region", "has", "the", "largest", "population", "?", "Give", "me", "the", "capital", "of", "the", "region", "." ]
[ { "id": 2, "type": "column", "value": "population" }, { "id": 1, "type": "column", "value": "capital" }, { "id": 0, "type": "table", "value": "region" } ]
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "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", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
6,552
real_estate_rentals
bird:test.json:1403
Return the description of the feature 'rooftop'.
SELECT feature_description FROM Features WHERE feature_name = 'rooftop';
[ "Return", "the", "description", "of", "the", "feature", "'", "rooftop", "'", "." ]
[ { "id": 1, "type": "column", "value": "feature_description" }, { "id": 2, "type": "column", "value": "feature_name" }, { "id": 0, "type": "table", "value": "features" }, { "id": 3, "type": "value", "value": "rooftop" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 0, 1, 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O" ]
6,553
music_platform_2
bird:train.json:7923
List all the podcast title and its itunes url under the 'society-culture' category.
SELECT T2.title, T2.itunes_url FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'society-culture'
[ "List", "all", "the", "podcast", "title", "and", "its", "itunes", "url", "under", "the", "'", "society", "-", "culture", "'", "category", "." ]
[ { "id": 5, "type": "value", "value": "society-culture" }, { "id": 1, "type": "column", "value": "itunes_url" }, { "id": 2, "type": "table", "value": "categories" }, { "id": 6, "type": "column", "value": "podcast_id" }, { "id": 3, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "B-COLUMN", "O" ]
6,554
city_record
spider:train_spider.json:6290
Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city
[ "Give", "me", "a", "list", "of", "cities", "whose", "temperature", "in", "Mar", "is", "lower", "than", "that", "in", "July", "and", "which", "have", "also", "served", "as", "host", "cities", "?" ]
[ { "id": 5, "type": "table", "value": "hosting_city" }, { "id": 2, "type": "table", "value": "temperature" }, { "id": 7, "type": "column", "value": "host_city" }, { "id": 6, "type": "column", "value": "city_id" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entity...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
6,555
hr_1
spider:train_spider.json:3507
display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN.
SELECT employee_id , job_id FROM employees WHERE salary < ( SELECT min(salary) FROM employees WHERE job_id = 'MK_MAN' )
[ "display", "the", "employee", "number", "and", "job", "i", "d", "for", "all", "employees", "whose", "salary", "is", "smaller", "than", "any", "salary", "of", "those", "employees", "whose", "job", "title", "is", "MK_MAN", "." ]
[ { "id": 1, "type": "column", "value": "employee_id" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "job_id" }, { "id": 3, "type": "column", "value": "salary" }, { "id": 4, "type": "value", "valu...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
6,556
food_inspection
bird:train.json:8847
In businesses that violates 103157 on May 27, 2016 , what is the name of the business that has an unscheduled inspection?
SELECT DISTINCT T3.name FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T1.`date` = '2016-05-27' AND T1.violation_type_id = 103157 AND T2.type = 'Routine - Unscheduled'
[ "In", "businesses", "that", "violates", "103157", "on", "May", "27", ",", "2016", ",", "what", "is", "the", "name", "of", "the", "business", "that", "has", "an", "unscheduled", "inspection", "?" ]
[ { "id": 10, "type": "value", "value": "Routine - Unscheduled" }, { "id": 7, "type": "column", "value": "violation_type_id" }, { "id": 3, "type": "table", "value": "inspections" }, { "id": 4, "type": "column", "value": "business_id" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 22 ] }, { "entity_id": 4, "token_idxs": [ 17 ] }, ...
[ "O", "B-TABLE", "O", "B-TABLE", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "B-TABLE", "O" ]
6,557
customers_and_orders
bird:test.json:254
Give the name of the most expensive Clothes product.
SELECT product_name FROM Products WHERE product_type_code = "Clothes" ORDER BY product_price DESC LIMIT 1
[ "Give", "the", "name", "of", "the", "most", "expensive", "Clothes", "product", "." ]
[ { "id": 2, "type": "column", "value": "product_type_code" }, { "id": 4, "type": "column", "value": "product_price" }, { "id": 1, "type": "column", "value": "product_name" }, { "id": 0, "type": "table", "value": "products" }, { "id": 3, "type": ...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
6,558
allergy_1
spider:train_spider.json:456
Which allergy type is most common?
SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1
[ "Which", "allergy", "type", "is", "most", "common", "?" ]
[ { "id": 0, "type": "table", "value": "allergy_type" }, { "id": 1, "type": "column", "value": "allergytype" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1, 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
6,559
restaurant_1
spider:train_spider.json:2830
Advisor 1121 has how many students?
SELECT count(*) FROM Student WHERE Advisor = 1121;
[ "Advisor", "1121", "has", "how", "many", "students", "?" ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "advisor" }, { "id": 2, "type": "value", "value": "1121" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 0 ] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "B-COLUMN", "B-VALUE", "O", "O", "O", "B-TABLE", "O" ]
6,560
formula_1
bird:dev.json:963
How many French drivers who obtain the laptime less than 02:00.00?
SELECT COUNT(T1.driverId) FROM drivers AS T1 INNER JOIN lapTimes AS T2 on T1.driverId = T2.driverId WHERE T1.nationality = 'French' AND (CAST(SUBSTR(T2.time, 1, 2) AS INTEGER) * 60 + CAST(SUBSTR(T2.time, 4, 2) AS INTEGER) + CAST(SUBSTR(T2.time, 7, 2) AS REAL) / 1000) < 120
[ "How", "many", "French", "drivers", "who", "obtain", "the", "laptime", "less", "than", "02:00.00", "?" ]
[ { "id": 3, "type": "column", "value": "nationality" }, { "id": 1, "type": "table", "value": "laptimes" }, { "id": 2, "type": "column", "value": "driverid" }, { "id": 0, "type": "table", "value": "drivers" }, { "id": 4, "type": "value", "val...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
6,561
shakespeare
bird:train.json:2960
Please list all the paragraphs in Act 1, Scene 1 in Twelfth Night.
SELECT T3.PlainText FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night'
[ "Please", "list", "all", "the", "paragraphs", "in", "Act", "1", ",", "Scene", "1", "in", "Twelfth", "Night", "." ]
[ { "id": 10, "type": "value", "value": "Twelfth Night" }, { "id": 1, "type": "table", "value": "paragraphs" }, { "id": 5, "type": "column", "value": "chapter_id" }, { "id": 0, "type": "column", "value": "plaintext" }, { "id": 3, "type": "table",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O" ]
6,562
disney
bird:train.json:4640
Which song is associated with the most popular Disney movie in 1970s?
SELECT T2.song FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE CAST(SUBSTR(T1.release_date, INSTR(T1.release_date, ', ') + 1) AS int) BETWEEN 1970 AND 1979 ORDER BY CAST(REPLACE(SUBSTR(T1.total_gross, 2), ',', '') AS float) DESC LIMIT 1
[ "Which", "song", "is", "associated", "with", "the", "most", "popular", "Disney", "movie", "in", "1970s", "?" ]
[ { "id": 1, "type": "table", "value": "movies_total_gross" }, { "id": 6, "type": "column", "value": "release_date" }, { "id": 5, "type": "column", "value": "movie_title" }, { "id": 9, "type": "column", "value": "total_gross" }, { "id": 2, "type"...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
6,563
superstore
bird:train.json:2399
List the products ordered by Matt Abelman from the Western store in 2013.
SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Matt Abelman' AND STRFTIME('%Y', T1.`Order Date`) = '2013'
[ "List", "the", "products", "ordered", "by", "Matt", "Abelman", "from", "the", "Western", "store", "in", "2013", "." ]
[ { "id": 2, "type": "table", "value": "west_superstore" }, { "id": 5, "type": "column", "value": "Customer Name" }, { "id": 0, "type": "column", "value": "Product Name" }, { "id": 6, "type": "value", "value": "Matt Abelman" }, { "id": 8, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
6,564
works_cycles
bird:train.json:7310
List the name of employees who had left the company? When were they hired?
SELECT T1.FirstName, T1.LastName, T2.HireDate FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN EmployeeDepartmentHistory AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T3.EndDate IS NOT NULL
[ "List", "the", "name", "of", "employees", "who", "had", "left", "the", "company", "?", "When", "were", "they", "hired", "?" ]
[ { "id": 3, "type": "table", "value": "employeedepartmenthistory" }, { "id": 7, "type": "column", "value": "businessentityid" }, { "id": 0, "type": "column", "value": "firstname" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 0, 1, 2 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5,...
[ "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,565
works_cycles
bird:train.json:7251
What is the profit on net of the vendor with the highest standard price? If there are two vendors of the same amount, calculate only for one vendor.
SELECT LastReceiptCost - StandardPrice FROM ProductVendor ORDER BY StandardPrice DESC LIMIT 1
[ "What", "is", "the", "profit", "on", "net", "of", "the", "vendor", "with", "the", "highest", "standard", "price", "?", "If", "there", "are", "two", "vendors", "of", "the", "same", "amount", ",", "calculate", "only", "for", "one", "vendor", "." ]
[ { "id": 2, "type": "column", "value": "lastreceiptcost" }, { "id": 0, "type": "table", "value": "productvendor" }, { "id": 1, "type": "column", "value": "standardprice" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 12, 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
6,566
menu
bird:train.json:5487
What is the average price of the dishes on the menu "Zentral Theater Terrace"?
SELECT SUM(T1.price) / COUNT(T1.price) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id WHERE T3.name = 'Zentral Theater Terrace'
[ "What", "is", "the", "average", "price", "of", "the", "dishes", "on", "the", "menu", "\"", "Zentral", "Theater", "Terrace", "\"", "?" ]
[ { "id": 2, "type": "value", "value": "Zentral Theater Terrace" }, { "id": 8, "type": "column", "value": "menu_page_id" }, { "id": 3, "type": "table", "value": "menuitem" }, { "id": 4, "type": "table", "value": "menupage" }, { "id": 5, "type": "...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12, 13, 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
6,567
boat_1
bird:test.json:845
Find boats reserved by Sailor with id 1.
SELECT DISTINCT bid FROM Reserves WHERE sid = 1
[ "Find", "boats", "reserved", "by", "Sailor", "with", "i", "d", "1", "." ]
[ { "id": 0, "type": "table", "value": "reserves" }, { "id": 1, "type": "column", "value": "bid" }, { "id": 2, "type": "column", "value": "sid" }, { "id": 3, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
6,568
wine_1
spider:train_spider.json:6556
What is the average prices of wines for each each?
SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR
[ "What", "is", "the", "average", "prices", "of", "wines", "for", "each", "each", "?" ]
[ { "id": 2, "type": "column", "value": "price" }, { "id": 0, "type": "table", "value": "wine" }, { "id": 1, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O" ]
6,569
department_store
spider:train_spider.json:4788
What are the distinct names of customers who have purchased at least three different products?
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3
[ "What", "are", "the", "distinct", "names", "of", "customers", "who", "have", "purchased", "at", "least", "three", "different", "products", "?" ]
[ { "id": 5, "type": "table", "value": "customer_orders" }, { "id": 1, "type": "column", "value": "customer_name" }, { "id": 0, "type": "column", "value": "customer_id" }, { "id": 2, "type": "table", "value": "order_items" }, { "id": 7, "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": [ 6 ] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,571
financial
bird:dev.json:169
What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997?
SELECT CAST((SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1997' THEN T1.amount ELSE 0 END) - SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.ac...
[ "What", "was", "the", "growth", "rate", "of", "the", "total", "amount", "of", "loans", "across", "all", "accounts", "for", "a", "male", "client", "between", "1996", "and", "1997", "?" ]
[ { "id": 10, "type": "column", "value": "account_id" }, { "id": 2, "type": "column", "value": "client_id" }, { "id": 9, "type": "table", "value": "account" }, { "id": 0, "type": "table", "value": "client" }, { "id": 3, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-VALUE", "O" ]
6,573
regional_sales
bird:train.json:2625
Which city has the largest population?
SELECT `City Name` FROM `Store Locations` ORDER BY Population DESC LIMIT 1
[ "Which", "city", "has", "the", "largest", "population", "?" ]
[ { "id": 0, "type": "table", "value": "Store Locations" }, { "id": 2, "type": "column", "value": "population" }, { "id": 1, "type": "column", "value": "City Name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1, 2 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O" ]
6,574
film_rank
spider:train_spider.json:4143
What is the name of teh studio that created the most films?
SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "teh", "studio", "that", "created", "the", "most", "films", "?" ]
[ { "id": 1, "type": "column", "value": "studio" }, { "id": 0, "type": "table", "value": "film" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
6,575
toxicology
bird:dev.json:229
What is the type of bond that molecule TR000 has when involved in any bonds?
SELECT DISTINCT T.bond_type FROM bond AS T WHERE T.molecule_id = 'TR000'
[ "What", "is", "the", "type", "of", "bond", "that", "molecule", "TR000", "has", "when", "involved", "in", "any", "bonds", "?" ]
[ { "id": 2, "type": "column", "value": "molecule_id" }, { "id": 1, "type": "column", "value": "bond_type" }, { "id": 3, "type": "value", "value": "TR000" }, { "id": 0, "type": "table", "value": "bond" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "O", "O" ]
6,576
donor
bird:train.json:3148
When was the highest amount of donated? How much was the amount?
SELECT donation_timestamp, donation_total FROM donations WHERE donation_total = ( SELECT donation_total FROM donations ORDER BY donation_total DESC LIMIT 1 )
[ "When", "was", "the", "highest", "amount", "of", "donated", "?", "How", "much", "was", "the", "amount", "?" ]
[ { "id": 1, "type": "column", "value": "donation_timestamp" }, { "id": 2, "type": "column", "value": "donation_total" }, { "id": 0, "type": "table", "value": "donations" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O" ]
6,577
works_cycles
bird:train.json:7024
What is the total profit all transactions with product ID 827?
SELECT SUM((T1.ListPrice - T1.StandardCost) * T2.Quantity) FROM Product AS T1 INNER JOIN TransactionHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 827
[ "What", "is", "the", "total", "profit", "all", "transactions", "with", "product", "ID", "827", "?" ]
[ { "id": 1, "type": "table", "value": "transactionhistory" }, { "id": 6, "type": "column", "value": "standardcost" }, { "id": 2, "type": "column", "value": "productid" }, { "id": 5, "type": "column", "value": "listprice" }, { "id": 4, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
6,578
e_learning
spider:train_spider.json:3838
Find the student ID and personal name of the student with at least two enrollments.
SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2
[ "Find", "the", "student", "ID", "and", "personal", "name", "of", "the", "student", "with", "at", "least", "two", "enrollments", "." ]
[ { "id": 2, "type": "table", "value": "student_course_enrolment" }, { "id": 1, "type": "column", "value": "personal_name" }, { "id": 0, "type": "column", "value": "student_id" }, { "id": 3, "type": "table", "value": "students" }, { "id": 4, "typ...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 12, 13, 14 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
6,579
professional_basketball
bird:train.json:2873
What is the full name of the team that selected Mike Lynn?
SELECT T1.name FROM teams AS T1 INNER JOIN draft AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.draftYear WHERE T2.firstName = 'Mike' AND T2.lastName = 'Lynn'
[ "What", "is", "the", "full", "name", "of", "the", "team", "that", "selected", "Mike", "Lynn", "?" ]
[ { "id": 3, "type": "column", "value": "firstname" }, { "id": 9, "type": "column", "value": "draftyear" }, { "id": 5, "type": "column", "value": "lastname" }, { "id": 1, "type": "table", "value": "teams" }, { "id": 2, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-VALUE", "O" ]
6,580
match_season
spider:train_spider.json:1107
Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.
SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender"
[ "Return", "the", "names", "of", "countries", "that", "have", "players", "that", "play", "the", "Forward", "position", ",", "as", "well", "as", "players", "who", "play", "the", "Defender", "position", "." ]
[ { "id": 0, "type": "column", "value": "country_name" }, { "id": 2, "type": "table", "value": "match_season" }, { "id": 6, "type": "column", "value": "country_id" }, { "id": 3, "type": "column", "value": "position" }, { "id": 5, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 22 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
6,581
mondial_geo
bird:train.json:8297
Please list the capital cities of the countries that have more than 4 mountains.
SELECT T1.Capital FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country GROUP BY T1.Name, T1.Capital HAVING COUNT(T1.Name) > 4
[ "Please", "list", "the", "capital", "cities", "of", "the", "countries", "that", "have", "more", "than", "4", "mountains", "." ]
[ { "id": 3, "type": "table", "value": "geo_mountain" }, { "id": 1, "type": "column", "value": "capital" }, { "id": 2, "type": "table", "value": "country" }, { "id": 6, "type": "column", "value": "country" }, { "id": 0, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
6,582
film_rank
spider:train_spider.json:4114
List the distinct director of all films.
SELECT DISTINCT Director FROM film
[ "List", "the", "distinct", "director", "of", "all", "films", "." ]
[ { "id": 1, "type": "column", "value": "director" }, { "id": 0, "type": "table", "value": "film" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
6,583
book_1
bird:test.json:538
What are the isbns for all books, and what is the total amount ordered for each?
SELECT isbn , sum(amount) FROM Books_Order GROUP BY isbn
[ "What", "are", "the", "isbns", "for", "all", "books", ",", "and", "what", "is", "the", "total", "amount", "ordered", "for", "each", "?" ]
[ { "id": 0, "type": "table", "value": "books_order" }, { "id": 2, "type": "column", "value": "amount" }, { "id": 1, "type": "column", "value": "isbn" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
6,584
planet_1
bird:test.json:1871
List all package sent or received by Leo Wong.
SELECT DISTINCT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber OR T1.Recipient = T2.AccountNumber WHERE T2.Name = "Leo Wong"
[ "List", "all", "package", "sent", "or", "received", "by", "Leo", "Wong", "." ]
[ { "id": 0, "type": "column", "value": "packagenumber" }, { "id": 6, "type": "column", "value": "accountnumber" }, { "id": 7, "type": "column", "value": "recipient" }, { "id": 4, "type": "column", "value": "Leo Wong" }, { "id": 1, "type": "table...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 0 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7, 8 ] }, { "entity_id":...
[ "B-TABLE", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,585
movie_platform
bird:train.json:76
User 58149469's critic on which film got 1 like and 2 comments?
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 58149469 AND T1.critic_likes = 1 AND T1.critic_comments = 2
[ "User", "58149469", "'s", "critic", "on", "which", "film", "got", "1", "like", "and", "2", "comments", "?" ]
[ { "id": 8, "type": "column", "value": "critic_comments" }, { "id": 6, "type": "column", "value": "critic_likes" }, { "id": 0, "type": "column", "value": "movie_title" }, { "id": 3, "type": "column", "value": "movie_id" }, { "id": 5, "type": "va...
[ { "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": [ 0 ] }, { "entity_id": 5, "token_idxs": [ 1 ...
[ "B-COLUMN", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
6,586
gymnast
spider:train_spider.json:1749
Return the names of gymnasts who did not grow up in Santo Domingo.
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown != "Santo Domingo"
[ "Return", "the", "names", "of", "gymnasts", "who", "did", "not", "grow", "up", "in", "Santo", "Domingo", "." ]
[ { "id": 4, "type": "column", "value": "Santo Domingo" }, { "id": 5, "type": "column", "value": "gymnast_id" }, { "id": 6, "type": "column", "value": "people_id" }, { "id": 3, "type": "column", "value": "hometown" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11, 12 ] }, { "entity_id...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,587
insurance_policies
spider:train_spider.json:3891
Give me the payment Id, the date and the amount for all the payments processed with Visa.
SELECT Payment_ID , Date_Payment_Made , Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'
[ "Give", "me", "the", "payment", "I", "d", ",", "the", "date", "and", "the", "amount", "for", "all", "the", "payments", "processed", "with", "Visa", "." ]
[ { "id": 4, "type": "column", "value": "payment_method_code" }, { "id": 2, "type": "column", "value": "date_payment_made" }, { "id": 3, "type": "column", "value": "amount_payment" }, { "id": 1, "type": "column", "value": "payment_id" }, { "id": 0, ...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6, 7...
[ "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
6,588
decoration_competition
spider:train_spider.json:4497
Show the names of members in ascending order of their rank in rounds.
SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC
[ "Show", "the", "names", "of", "members", "in", "ascending", "order", "of", "their", "rank", "in", "rounds", "." ]
[ { "id": 3, "type": "column", "value": "rank_in_round" }, { "id": 4, "type": "column", "value": "member_id" }, { "id": 1, "type": "table", "value": "member" }, { "id": 2, "type": "table", "value": "round" }, { "id": 0, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O" ]
6,589
phone_1
spider:train_spider.json:1043
How many phones belongs to each accreditation type?
SELECT Accreditation_type , count(*) FROM phone GROUP BY Accreditation_type
[ "How", "many", "phones", "belongs", "to", "each", "accreditation", "type", "?" ]
[ { "id": 1, "type": "column", "value": "accreditation_type" }, { "id": 0, "type": "table", "value": "phone" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,590
e_commerce
bird:test.json:65
What are the statuses, dates, and shipment dates for all invoices?
SELECT T1.invoice_status_code , T1.invoice_date , T2.shipment_date FROM Invoices AS T1 JOIN Shipments AS T2 ON T1.invoice_number = T2.invoice_number
[ "What", "are", "the", "statuses", ",", "dates", ",", "and", "shipment", "dates", "for", "all", "invoices", "?" ]
[ { "id": 0, "type": "column", "value": "invoice_status_code" }, { "id": 5, "type": "column", "value": "invoice_number" }, { "id": 2, "type": "column", "value": "shipment_date" }, { "id": 1, "type": "column", "value": "invoice_date" }, { "id": 4, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
6,591
retail_world
bird:train.json:6651
Among the product lists in order ID 10337, write down the product names and suppliers which had the highest in reorder level.
SELECT T2.ProductName, T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID WHERE T3.OrderID = 10337 ORDER BY T2.ReorderLevel DESC LIMIT 1
[ "Among", "the", "product", "lists", "in", "order", "ID", "10337", ",", "write", "down", "the", "product", "names", "and", "suppliers", "which", "had", "the", "highest", "in", "reorder", "level", "." ]
[ { "id": 2, "type": "table", "value": "Order Details" }, { "id": 5, "type": "column", "value": "reorderlevel" }, { "id": 0, "type": "column", "value": "productname" }, { "id": 1, "type": "column", "value": "companyname" }, { "id": 9, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id"...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,593
conference
bird:test.json:1070
How many institutions were founded between 1850 and 1900?
SELECT count(*) FROM institution WHERE founded BETWEEN 1850 AND 1900
[ "How", "many", "institutions", "were", "founded", "between", "1850", "and", "1900", "?" ]
[ { "id": 0, "type": "table", "value": "institution" }, { "id": 1, "type": "column", "value": "founded" }, { "id": 2, "type": "value", "value": "1850" }, { "id": 3, "type": "value", "value": "1900" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
6,594
european_football_2
bird:dev.json:1024
Who are the top 5 players who perform better in crossing actions? Indicate their player id.
SELECT id FROM Player_Attributes ORDER BY crossing DESC LIMIT 5
[ "Who", "are", "the", "top", "5", "players", "who", "perform", "better", "in", "crossing", "actions", "?", "Indicate", "their", "player", "i", "d." ]
[ { "id": 0, "type": "table", "value": "player_attributes" }, { "id": 2, "type": "column", "value": "crossing" }, { "id": 1, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 16, 17 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN" ]
6,595
codebase_community
bird:dev.json:539
Who is the owner of the post "Eliciting priors from experts"?
SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'
[ "Who", "is", "the", "owner", "of", "the", "post", "\"", "Eliciting", "priors", "from", "experts", "\"", "?" ]
[ { "id": 4, "type": "value", "value": "Eliciting priors from experts" }, { "id": 0, "type": "column", "value": "displayname" }, { "id": 5, "type": "column", "value": "owneruserid" }, { "id": 1, "type": "table", "value": "posts" }, { "id": 2, "ty...
[ { "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": [ 8, 9, 10, 11 ] }, { "enti...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
6,597
movie_platform
bird:train.json:93
Which of the film released in 2008 scored the highest?
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 2008 ORDER BY T1.rating_score DESC LIMIT 1
[ "Which", "of", "the", "film", "released", "in", "2008", "scored", "the", "highest", "?" ]
[ { "id": 3, "type": "column", "value": "movie_release_year" }, { "id": 5, "type": "column", "value": "rating_score" }, { "id": 0, "type": "column", "value": "movie_title" }, { "id": 6, "type": "column", "value": "movie_id" }, { "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": [ 6 ] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O" ]
6,598
address
bird:train.json:5166
Provide the city where zip code 19019 is located and the alias of that city.
SELECT T2.city, T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 19019
[ "Provide", "the", "city", "where", "zip", "code", "19019", "is", "located", "and", "the", "alias", "of", "that", "city", "." ]
[ { "id": 3, "type": "table", "value": "zip_data" }, { "id": 4, "type": "column", "value": "zip_code" }, { "id": 1, "type": "column", "value": "alias" }, { "id": 2, "type": "table", "value": "alias" }, { "id": 5, "type": "value", "value": "19...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4, 5 ] }, { "entity_id...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
6,599
book_1
bird:test.json:528
What are the names and addressed of all clients, ordered alphabetically by name?
SELECT name , address FROM Client ORDER BY name
[ "What", "are", "the", "names", "and", "addressed", "of", "all", "clients", ",", "ordered", "alphabetically", "by", "name", "?" ]
[ { "id": 2, "type": "column", "value": "address" }, { "id": 0, "type": "table", "value": "client" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "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", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,600
regional_sales
bird:train.json:2731
What are the names of the top 3 customers who paid the highest amount of price per order after discount?
SELECT `Customer Names` FROM ( SELECT T1.`Customer Names` , REPLACE(T2.`Unit Price`, ',', '') * T2.`Order Quantity` - REPLACE(T2.`Unit Price`, ',', '') * T2.`Discount Applied` AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) ORDER BY T DESC LIMIT 3
[ "What", "are", "the", "names", "of", "the", "top", "3", "customers", "who", "paid", "the", "highest", "amount", "of", "price", "per", "order", "after", "discount", "?" ]
[ { "id": 7, "type": "column", "value": "Discount Applied" }, { "id": 0, "type": "column", "value": "Customer Names" }, { "id": 6, "type": "column", "value": "Order Quantity" }, { "id": 3, "type": "table", "value": "Sales Orders" }, { "id": 4, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 16, 17 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-TABLE", "I-TABLE", "B-COLUMN", "B-COLUMN", "O" ]
6,601
works_cycles
bird:train.json:7171
For person id No.2054, is his/her vendor still active?
SELECT T1.ActiveFlag FROM Vendor AS T1 INNER JOIN BusinessEntityContact AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonID = 2054
[ "For", "person", "i", "d", "No.2054", ",", "is", "his", "/", "her", "vendor", "still", "active", "?" ]
[ { "id": 2, "type": "table", "value": "businessentitycontact" }, { "id": 5, "type": "column", "value": "businessentityid" }, { "id": 0, "type": "column", "value": "activeflag" }, { "id": 3, "type": "column", "value": "personid" }, { "id": 1, "ty...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 1, 2, 3 ] }, { "entity_id": 4, "token_idxs": [ 4 ] ...
[ "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O" ]
6,602
retails
bird:train.json:6791
How many clients from Mozambique required orders with a low priority order?
SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey INNER JOIN orders AS T3 ON T1.c_custkey = T3.o_custkey WHERE T2.n_name = 'MOZAMBIQUE' AND T3.o_orderpriority = '5-LOW'
[ "How", "many", "clients", "from", "Mozambique", "required", "orders", "with", "a", "low", "priority", "order", "?" ]
[ { "id": 7, "type": "column", "value": "o_orderpriority" }, { "id": 9, "type": "column", "value": "c_nationkey" }, { "id": 10, "type": "column", "value": "n_nationkey" }, { "id": 6, "type": "value", "value": "MOZAMBIQUE" }, { "id": 1, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "O", "O" ]
6,603
insurance_and_eClaims
spider:train_spider.json:1521
What is the name of the customer who has made the minimum amount of payment in one claim?
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT min(amount_piad) FROM claim_headers)
[ "What", "is", "the", "name", "of", "the", "customer", "who", "has", "made", "the", "minimum", "amount", "of", "payment", "in", "one", "claim", "?" ]
[ { "id": 0, "type": "column", "value": "customer_details" }, { "id": 3, "type": "table", "value": "claim_headers" }, { "id": 2, "type": "column", "value": "amount_piad" }, { "id": 5, "type": "column", "value": "customer_id" }, { "id": 1, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
6,604
legislator
bird:train.json:4810
How many legislators hold the title "Majority Leader"?
SELECT COUNT(bioguide) FROM `current-terms` WHERE title = 'Majority Leader'
[ "How", "many", "legislators", "hold", "the", "title", "\"", "Majority", "Leader", "\"", "?" ]
[ { "id": 2, "type": "value", "value": "Majority Leader" }, { "id": 0, "type": "table", "value": "current-terms" }, { "id": 3, "type": "column", "value": "bioguide" }, { "id": 1, "type": "column", "value": "title" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O" ]
6,605
planet_1
bird:test.json:1883
Who received least number of packages ? List client name and number of packages received by that client .
select t2.name , count(*) from package as t1 join client as t2 on t1.recipient = t2.accountnumber group by t1.recipient order by count(*) limit 1;
[ "Who", "received", "least", "number", "of", "packages", "?", "List", "client", "name", "and", "number", "of", "packages", "received", "by", "that", "client", "." ]
[ { "id": 4, "type": "column", "value": "accountnumber" }, { "id": 0, "type": "column", "value": "recipient" }, { "id": 2, "type": "table", "value": "package" }, { "id": 3, "type": "table", "value": "client" }, { "id": 1, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10, 11 ] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
6,606
advertising_agencies
bird:test.json:2076
How many clients are there for each sic code?
SELECT sic_code , count(*) FROM Clients GROUP BY sic_code
[ "How", "many", "clients", "are", "there", "for", "each", "sic", "code", "?" ]
[ { "id": 1, "type": "column", "value": "sic_code" }, { "id": 0, "type": "table", "value": "clients" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "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", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,607
movielens
bird:train.json:2338
Which movies have received the greatest ratings from female users whose occupations fall within the category of 3?
SELECT T2.movieid FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T1.u_gender = 'F' AND T1.occupation = 3 AND T2.rating = 5
[ "Which", "movies", "have", "received", "the", "greatest", "ratings", "from", "female", "users", "whose", "occupations", "fall", "within", "the", "category", "of", "3", "?" ]
[ { "id": 6, "type": "column", "value": "occupation" }, { "id": 4, "type": "column", "value": "u_gender" }, { "id": 0, "type": "column", "value": "movieid" }, { "id": 1, "type": "table", "value": "movies" }, { "id": 3, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O" ]
6,608
allergy_1
spider:train_spider.json:468
What cities do students live in?
SELECT DISTINCT city_code FROM Student
[ "What", "cities", "do", "students", "live", "in", "?" ]
[ { "id": 1, "type": "column", "value": "city_code" }, { "id": 0, "type": "table", "value": "student" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O" ]
6,609
food_inspection_2
bird:train.json:6111
Please list the full names of the sanitarians who did at least one inspection in May, 2010.
SELECT DISTINCT T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE strftime('%Y-%m', T2.inspection_date) = '2010-05' AND T1.title = 'Sanitarian'
[ "Please", "list", "the", "full", "names", "of", "the", "sanitarians", "who", "did", "at", "least", "one", "inspection", "in", "May", ",", "2010", "." ]
[ { "id": 9, "type": "column", "value": "inspection_date" }, { "id": 4, "type": "column", "value": "employee_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 3, "type": "table", "value": "inspection" }, { "id": 7, "type": "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11, 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "t...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
6,610
world
bird:train.json:7844
List down the languages of the countries that have population below 8000.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Population < 8000
[ "List", "down", "the", "languages", "of", "the", "countries", "that", "have", "population", "below", "8000", "." ]
[ { "id": 2, "type": "table", "value": "countrylanguage" }, { "id": 6, "type": "column", "value": "countrycode" }, { "id": 3, "type": "column", "value": "population" }, { "id": 0, "type": "column", "value": "language" }, { "id": 1, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
6,611
voter_2
spider:train_spider.json:5492
Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.
SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = "F" AND T2.Election_Cycle = "Spring"
[ "Find", "the", "average", "age", "of", "female", "(", "sex", "is", "F", ")", "students", "who", "have", "secretary", "votes", "in", "the", "spring", "election", "cycle", "." ]
[ { "id": 4, "type": "column", "value": "secretary_vote" }, { "id": 7, "type": "column", "value": "election_cycle" }, { "id": 1, "type": "table", "value": "voting_record" }, { "id": 0, "type": "table", "value": "student" }, { "id": 8, "type": "co...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 14, 15 ] }, { "entity_i...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O" ]
6,612
soccer_2016
bird:train.json:1885
List down all of the venues in Mumbai.
SELECT T2.Venue_Name FROM City AS T1 INNER JOIN Venue AS T2 ON T2.City_Id = T1.City_Id WHERE T1.City_Name = 'Mumbai'
[ "List", "down", "all", "of", "the", "venues", "in", "Mumbai", "." ]
[ { "id": 0, "type": "column", "value": "venue_name" }, { "id": 3, "type": "column", "value": "city_name" }, { "id": 5, "type": "column", "value": "city_id" }, { "id": 4, "type": "value", "value": "Mumbai" }, { "id": 2, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
6,613
store_1
spider:train_spider.json:575
What is Astrid Gruber's email and phone number?
SELECT email , phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber";
[ "What", "is", "Astrid", "Gruber", "'s", "email", "and", "phone", "number", "?" ]
[ { "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": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
6,614
language_corpus
bird:train.json:5773
Please list the titles of the Wikipedia pages on the Catalan language with more than 4000 words.
SELECT title FROM pages WHERE lid = 1 AND words > 4000
[ "Please", "list", "the", "titles", "of", "the", "Wikipedia", "pages", "on", "the", "Catalan", "language", "with", "more", "than", "4000", "words", "." ]
[ { "id": 0, "type": "table", "value": "pages" }, { "id": 1, "type": "column", "value": "title" }, { "id": 4, "type": "column", "value": "words" }, { "id": 5, "type": "value", "value": "4000" }, { "id": 2, "type": "column", "value": "lid" }...
[ { "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": [ 16 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
6,616
sales_in_weather
bird:train.json:8190
What are the items sold by the store during the day whose station recorded the thickest snowfall?
SELECT T1.item_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN ( SELECT station_nbr, `date` FROM weather ORDER BY snowfall DESC LIMIT 1 ) AS T3 ON T2.station_nbr = T3.station_nbr
[ "What", "are", "the", "items", "sold", "by", "the", "store", "during", "the", "day", "whose", "station", "recorded", "the", "thickest", "snowfall", "?" ]
[ { "id": 1, "type": "table", "value": "sales_in_weather" }, { "id": 3, "type": "column", "value": "station_nbr" }, { "id": 4, "type": "column", "value": "store_nbr" }, { "id": 0, "type": "column", "value": "item_nbr" }, { "id": 2, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
6,617
network_2
spider:train_spider.json:4440
Find the name and age of the person who is a friend of both Dan and Alice.
SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice'
[ "Find", "the", "name", "and", "age", "of", "the", "person", "who", "is", "a", "friend", "of", "both", "Dan", "and", "Alice", "." ]
[ { "id": 3, "type": "table", "value": "personfriend" }, { "id": 2, "type": "table", "value": "person" }, { "id": 4, "type": "column", "value": "friend" }, { "id": 6, "type": "value", "value": "Alice" }, { "id": 0, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
6,618
warehouse_1
bird:test.json:1752
How many boxes are stored in each warehouse?
SELECT count(*) , warehouse FROM boxes GROUP BY warehouse
[ "How", "many", "boxes", "are", "stored", "in", "each", "warehouse", "?" ]
[ { "id": 1, "type": "column", "value": "warehouse" }, { "id": 0, "type": "table", "value": "boxes" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,619
movie_platform
bird:train.json:2
What is the name of the longest movie title? When was it released?
SELECT movie_title, movie_release_year FROM movies ORDER BY LENGTH(movie_popularity) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "longest", "movie", "title", "?", "When", "was", "it", "released", "?" ]
[ { "id": 2, "type": "column", "value": "movie_release_year" }, { "id": 3, "type": "column", "value": "movie_popularity" }, { "id": 1, "type": "column", "value": "movie_title" }, { "id": 0, "type": "table", "value": "movies" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "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", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
6,620
flight_1
spider:train_spider.json:403
Show all origins and the number of flights from each origin.
SELECT origin , count(*) FROM Flight GROUP BY origin
[ "Show", "all", "origins", "and", "the", "number", "of", "flights", "from", "each", "origin", "." ]
[ { "id": 0, "type": "table", "value": "flight" }, { "id": 1, "type": "column", "value": "origin" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
6,621
beer_factory
bird:train.json:5255
Provide the name of the location where transaction no.100885 happened.
SELECT T2.LocationName FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.TransactionID = 100885
[ "Provide", "the", "name", "of", "the", "location", "where", "transaction", "no.100885", "happened", "." ]
[ { "id": 3, "type": "column", "value": "transactionid" }, { "id": 0, "type": "column", "value": "locationname" }, { "id": 1, "type": "table", "value": "transaction" }, { "id": 5, "type": "column", "value": "locationid" }, { "id": 2, "type": "tab...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "B-VALUE", "O", "O" ]
6,622
european_football_1
bird:train.json:2759
In which division was the match between Hibernian, the away team, and Hearts, the home team, played? To which country does this division belong?
SELECT DISTINCT T2.division,T2.country FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.HomeTeam = 'Hearts' AND T1.AwayTeam = 'Hibernian'
[ "In", "which", "division", "was", "the", "match", "between", "Hibernian", ",", "the", "away", "team", ",", "and", "Hearts", ",", "the", "home", "team", ",", "played", "?", "To", "which", "country", "does", "this", "division", "belong", "?" ]
[ { "id": 3, "type": "table", "value": "divisions" }, { "id": 8, "type": "value", "value": "Hibernian" }, { "id": 0, "type": "column", "value": "division" }, { "id": 5, "type": "column", "value": "hometeam" }, { "id": 7, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 27 ] }, { "entity_id": 1, "token_idxs": [ 24 ] }, { "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-TABLE", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O" ]
6,623
gas_company
spider:train_spider.json:2032
What is the name of the manager with the most gas stations that opened after 2000?
SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "manager", "with", "the", "most", "gas", "stations", "that", "opened", "after", "2000", "?" ]
[ { "id": 1, "type": "column", "value": "manager_name" }, { "id": 0, "type": "table", "value": "gas_station" }, { "id": 2, "type": "column", "value": "open_year" }, { "id": 3, "type": "value", "value": "2000" } ]
[ { "entity_id": 0, "token_idxs": [ 10, 11 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [] }, {...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
6,625
toxicology
bird:dev.json:201
What is the percentage of carbon in double-bond molecules?
SELECT CAST(COUNT(DISTINCT CASE WHEN T1.element = 'c' THEN T1.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T1.atom_id) FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '='
[ "What", "is", "the", "percentage", "of", "carbon", "in", "double", "-", "bond", "molecules", "?" ]
[ { "id": 4, "type": "column", "value": "molecule_id" }, { "id": 2, "type": "column", "value": "bond_type" }, { "id": 6, "type": "column", "value": "atom_id" }, { "id": 7, "type": "column", "value": "element" }, { "id": 0, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
6,626
movie_3
bird:train.json:9425
How much in total had the customers in Italy spent on film rentals?
SELECT SUM(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy'
[ "How", "much", "in", "total", "had", "the", "customers", "in", "Italy", "spent", "on", "film", "rentals", "?" ]
[ { "id": 5, "type": "column", "value": "customer_id" }, { "id": 7, "type": "column", "value": "address_id" }, { "id": 10, "type": "column", "value": "country_id" }, { "id": 4, "type": "table", "value": "customer" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "O" ]
6,627
world
bird:train.json:7849
List down the districts belong to the country headed by Adolf Ogi.
SELECT T2.District FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = 'Adolf Ogi'
[ "List", "down", "the", "districts", "belong", "to", "the", "country", "headed", "by", "Adolf", "Ogi", "." ]
[ { "id": 3, "type": "column", "value": "headofstate" }, { "id": 6, "type": "column", "value": "countrycode" }, { "id": 4, "type": "value", "value": "Adolf Ogi" }, { "id": 0, "type": "column", "value": "district" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10, 11 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
6,628
donor
bird:train.json:3175
What is the name of the vendor that supplies resources to the project "iMath"?
SELECT DISTINCT T1.vendor_name FROM resources AS T1 INNER JOIN essays AS T3 ON T1.projectid = T3.projectid WHERE T3.title = 'iMath'
[ "What", "is", "the", "name", "of", "the", "vendor", "that", "supplies", "resources", "to", "the", "project", "\"", "iMath", "\"", "?" ]
[ { "id": 0, "type": "column", "value": "vendor_name" }, { "id": 1, "type": "table", "value": "resources" }, { "id": 5, "type": "column", "value": "projectid" }, { "id": 2, "type": "table", "value": "essays" }, { "id": 3, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
6,629
codebase_community
bird:dev.json:613
List out the dates that users who are located in Rochester, NY obtained their badges?
SELECT T2.Date FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'Rochester, NY'
[ "List", "out", "the", "dates", "that", "users", "who", "are", "located", "in", "Rochester", ",", "NY", "obtained", "their", "badges", "?" ]
[ { "id": 4, "type": "value", "value": "Rochester, NY" }, { "id": 3, "type": "column", "value": "location" }, { "id": 2, "type": "table", "value": "badges" }, { "id": 6, "type": "column", "value": "userid" }, { "id": 1, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 10, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "B-TABLE", "O" ]
6,630
shooting
bird:train.json:2465
Did the number of cases with Vehicle as subject weapon increase or decrease from year 2007 to 2008. State the difference.
SELECT SUM(IIF(STRFTIME('%Y', date) = '2007', 1, 0)) - SUM(IIF(STRFTIME('%Y', date) = '2008', 1, 0)) FROM incidents WHERE subject_weapon = 'Vehicle'
[ "Did", "the", "number", "of", "cases", "with", "Vehicle", "as", "subject", "weapon", "increase", "or", "decrease", "from", "year", "2007", "to", "2008", ".", "State", "the", "difference", "." ]
[ { "id": 1, "type": "column", "value": "subject_weapon" }, { "id": 0, "type": "table", "value": "incidents" }, { "id": 2, "type": "value", "value": "Vehicle" }, { "id": 5, "type": "value", "value": "2007" }, { "id": 6, "type": "value", "valu...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 8, 9 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O" ]
6,631
law_episode
bird:train.json:1293
Who is the youngest person to ever play a "clerk" role in the series?
SELECT T2.name FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.role = 'Clerk' AND T2.birthdate IS NOT NULL ORDER BY T2.birthdate LIMIT 1
[ "Who", "is", "the", "youngest", "person", "to", "ever", "play", "a", "\"", "clerk", "\"", "role", "in", "the", "series", "?" ]
[ { "id": 3, "type": "column", "value": "birthdate" }, { "id": 4, "type": "column", "value": "person_id" }, { "id": 1, "type": "table", "value": "credit" }, { "id": 2, "type": "table", "value": "person" }, { "id": 6, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 12 ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "O" ]
6,632
sales
bird:train.json:5393
Write down the name of products whose sale quantity is more than 950.
SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Quantity > 950
[ "Write", "down", "the", "name", "of", "products", "whose", "sale", "quantity", "is", "more", "than", "950", "." ]
[ { "id": 5, "type": "column", "value": "productid" }, { "id": 1, "type": "table", "value": "products" }, { "id": 3, "type": "column", "value": "quantity" }, { "id": 2, "type": "table", "value": "sales" }, { "id": 0, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
6,633
sales
bird:train.json:5404
Calculate the revenue produced through sales of HL Road Frame - Red, 56.
SELECT SUM(T2.Quantity * T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'HL Road Frame - Red, 56'
[ "Calculate", "the", "revenue", "produced", "through", "sales", "of", "HL", "Road", "Frame", "-", "Red", ",", "56", "." ]
[ { "id": 3, "type": "value", "value": "HL Road Frame - Red, 56" }, { "id": 4, "type": "column", "value": "productid" }, { "id": 0, "type": "table", "value": "products" }, { "id": 5, "type": "column", "value": "quantity" }, { "id": 1, "type": "ta...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 7, 8, 10, 11, 12, 13 ] }, { "entity_id": 4, "t...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
6,634
college_2
spider:train_spider.json:1334
How many rooms does the Lamberton building have?
SELECT count(*) FROM classroom WHERE building = 'Lamberton'
[ "How", "many", "rooms", "does", "the", "Lamberton", "building", "have", "?" ]
[ { "id": 0, "type": "table", "value": "classroom" }, { "id": 2, "type": "value", "value": "Lamberton" }, { "id": 1, "type": "column", "value": "building" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O" ]
6,635
college_2
spider:train_spider.json:1412
Find the semester and year which has the least number of student taking any class.
SELECT semester , YEAR FROM takes GROUP BY semester , YEAR ORDER BY count(*) LIMIT 1
[ "Find", "the", "semester", "and", "year", "which", "has", "the", "least", "number", "of", "student", "taking", "any", "class", "." ]
[ { "id": 1, "type": "column", "value": "semester" }, { "id": 0, "type": "table", "value": "takes" }, { "id": 2, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
6,636
chicago_crime
bird:train.json:8641
Provide the responsible person and his/her email address of Chicago Lawn.
SELECT commander, email FROM District WHERE district_name = 'Chicago Lawn'
[ "Provide", "the", "responsible", "person", "and", "his", "/", "her", "email", "address", "of", "Chicago", "Lawn", "." ]
[ { "id": 3, "type": "column", "value": "district_name" }, { "id": 4, "type": "value", "value": "Chicago Lawn" }, { "id": 1, "type": "column", "value": "commander" }, { "id": 0, "type": "table", "value": "district" }, { "id": 2, "type": "column",...
[ { "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": [ 11, 12 ] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O" ]
6,637
world
bird:train.json:7842
Give the head of the state of the country with the lowest percentage use of English as their language.
SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' ORDER BY T2.Percentage LIMIT 1
[ "Give", "the", "head", "of", "the", "state", "of", "the", "country", "with", "the", "lowest", "percentage", "use", "of", "English", "as", "their", "language", "." ]
[ { "id": 2, "type": "table", "value": "countrylanguage" }, { "id": 0, "type": "column", "value": "headofstate" }, { "id": 7, "type": "column", "value": "countrycode" }, { "id": 5, "type": "column", "value": "percentage" }, { "id": 3, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 2, 3, 4, 5 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [ 1...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O" ]
6,638
student_club
bird:dev.json:1455
Which budget allowed the most money for water, chips, and cookies?
SELECT T2.budget_id FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id WHERE T1.expense_description = 'Water, chips, cookies' ORDER BY T1.cost DESC LIMIT 1
[ "Which", "budget", "allowed", "the", "most", "money", "for", "water", ",", "chips", ",", "and", "cookies", "?" ]
[ { "id": 4, "type": "value", "value": "Water, chips, cookies" }, { "id": 3, "type": "column", "value": "expense_description" }, { "id": 6, "type": "column", "value": "link_to_budget" }, { "id": 0, "type": "column", "value": "budget_id" }, { "id": 1,...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7, 8, 9, 10, 11, 12 ]...
[ "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
6,639
product_catalog
spider:train_spider.json:331
Find the names of the products with length smaller than 3 or height greater than 5.
SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5
[ "Find", "the", "names", "of", "the", "products", "with", "length", "smaller", "than", "3", "or", "height", "greater", "than", "5", "." ]
[ { "id": 1, "type": "column", "value": "catalog_entry_name" }, { "id": 0, "type": "table", "value": "catalog_contents" }, { "id": 2, "type": "column", "value": "length" }, { "id": 4, "type": "column", "value": "width" }, { "id": 3, "type": "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O" ]
6,640
authors
bird:train.json:3621
From year 1991 to 2000, calculate the difference betweeen the total number of papers published under the conference "International Conference on Supercomputing " and "Informatik & Schule"?
SELECT SUM(CASE WHEN T2.FullName = 'Informatik & Schule' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.FullName = 'International Conference on Supercomputing' THEN 1 ELSE 0 END) AS DIFF FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Year > 1990 AND T1.Year < 2001
[ "From", "year", "1991", "to", "2000", ",", "calculate", "the", "difference", "betweeen", "the", "total", "number", "of", "papers", "published", "under", "the", "conference", "\"", "International", "Conference", "on", "Supercomputing", "\"", "and", "\"", "Informa...
[ { "id": 11, "type": "value", "value": "International Conference on Supercomputing" }, { "id": 10, "type": "value", "value": "Informatik & Schule" }, { "id": 2, "type": "column", "value": "conferenceid" }, { "id": 1, "type": "table", "value": "conference" ...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 21 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { "entity_id": 5, ...
[ "O", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
6,641
movielens
bird:train.json:2317
What's different average revenue status for director who directed the movie that got the most 1 ratings?
SELECT DISTINCT T1.avg_revenue FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality = 5
[ "What", "'s", "different", "average", "revenue", "status", "for", "director", "who", "directed", "the", "movie", "that", "got", "the", "most", "1", "ratings", "?" ]
[ { "id": 2, "type": "table", "value": "movies2directors" }, { "id": 0, "type": "column", "value": "avg_revenue" }, { "id": 5, "type": "column", "value": "directorid" }, { "id": 1, "type": "table", "value": "directors" }, { "id": 3, "type": "colu...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]