question_id
int64
0
16.1k
db_id
stringclasses
259 values
dber_id
stringlengths
15
29
question
stringlengths
16
325
SQL
stringlengths
18
1.25k
tokens
listlengths
4
62
entities
listlengths
0
21
entity_to_token
listlengths
20
20
dber_tags
listlengths
4
62
10,910
flight_4
spider:train_spider.json:6846
How many airlines operate out of each country in descending order?
SELECT country , count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC
[ "How", "many", "airlines", "operate", "out", "of", "each", "country", "in", "descending", "order", "?" ]
[ { "id": 0, "type": "table", "value": "airlines" }, { "id": 1, "type": "column", "value": "country" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
10,911
formula_1
bird:dev.json:920
Please list all the years that Silverstone Circuit was used in a Formula_1 race.
SELECT DISTINCT T2.year FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Silverstone Circuit'
[ "Please", "list", "all", "the", "years", "that", "Silverstone", "Circuit", "was", "used", "in", "a", "Formula_1", "race", "." ]
[ { "id": 4, "type": "value", "value": "Silverstone Circuit" }, { "id": 5, "type": "column", "value": "circuitid" }, { "id": 1, "type": "table", "value": "circuits" }, { "id": 2, "type": "table", "value": "races" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,912
music_platform_2
bird:train.json:7940
How many reviews does 'LifeAfter/The Message' have which were rated below 3?
SELECT COUNT(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'LifeAfter/The Message' AND T2.rating <= 3
[ "How", "many", "reviews", "does", "'", "LifeAfter", "/", "The", "Message", "'", "have", "which", "were", "rated", "below", "3", "?" ]
[ { "id": 5, "type": "value", "value": "LifeAfter/The Message" }, { "id": 3, "type": "column", "value": "podcast_id" }, { "id": 0, "type": "table", "value": "podcasts" }, { "id": 1, "type": "table", "value": "reviews" }, { "id": 2, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 5, ...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,913
codebase_comments
bird:train.json:609
What is the solution path for the method "IQ.Data.DbQueryProvider.CanBeEvaluatedLocally"?
SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'IQ.Data.DbQueryProvider.CanBeEvaluatedLocally'
[ "What", "is", "the", "solution", "path", "for", "the", "method", "\"", "IQ.Data", ".", "DbQueryProvider", ".", "CanBeEvaluatedLocally", "\"", "?" ]
[ { "id": 4, "type": "value", "value": "IQ.Data.DbQueryProvider.CanBeEvaluatedLocally" }, { "id": 6, "type": "column", "value": "solutionid" }, { "id": 1, "type": "table", "value": "solution" }, { "id": 2, "type": "table", "value": "method" }, { "id"...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9, 10, 11, ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
10,914
disney
bird:train.json:4651
How many restricted horror movies were released between 1/1/1990 to 12/31/2015?
SELECT COUNT(movie_title) FROM movies_total_gross WHERE MPAA_rating = 'R' AND genre = 'Horror' AND CAST(SUBSTR(release_date, INSTR(release_date, ', ') + 1) AS int) BETWEEN 1990 AND 2015
[ "How", "many", "restricted", "horror", "movies", "were", "released", "between", "1/1/1990", "to", "12/31/2015", "?" ]
[ { "id": 0, "type": "table", "value": "movies_total_gross" }, { "id": 8, "type": "column", "value": "release_date" }, { "id": 1, "type": "column", "value": "movie_title" }, { "id": 2, "type": "column", "value": "mpaa_rating" }, { "id": 5, "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": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-VALUE", "B-COLUMN", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "O", "O", "O" ]
10,915
cre_Students_Information_Systems
bird:test.json:481
List the details for all the pairs of teachers and students who are in the same class.
SELECT T1.teacher_details , T3.student_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id JOIN Students AS T3 ON T2.student_id = T3.student_id
[ "List", "the", "details", "for", "all", "the", "pairs", "of", "teachers", "and", "students", "who", "are", "in", "the", "same", "class", "." ]
[ { "id": 0, "type": "column", "value": "teacher_details" }, { "id": 1, "type": "column", "value": "student_details" }, { "id": 5, "type": "column", "value": "student_id" }, { "id": 6, "type": "column", "value": "teacher_id" }, { "id": 2, "type":...
[ { "entity_id": 0, "token_idxs": [ 1, 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { ...
[ "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,916
club_leader
bird:test.json:657
List the names of members that are not club leaders.
SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM club_leader)
[ "List", "the", "names", "of", "members", "that", "are", "not", "club", "leaders", "." ]
[ { "id": 3, "type": "table", "value": "club_leader" }, { "id": 2, "type": "column", "value": "member_id" }, { "id": 0, "type": "table", "value": "member" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
10,917
cookbook
bird:train.json:8872
How many recipes include the ingredient "graham cracker crumbs"?
SELECT COUNT(*) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T1.name = 'graham cracker crumbs'
[ "How", "many", "recipes", "include", "the", "ingredient", "\"", "graham", "cracker", "crumbs", "\"", "?" ]
[ { "id": 3, "type": "value", "value": "graham cracker crumbs" }, { "id": 4, "type": "column", "value": "ingredient_id" }, { "id": 0, "type": "table", "value": "ingredient" }, { "id": 1, "type": "table", "value": "quantity" }, { "id": 2, "type": ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8, 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
10,918
aan_1
bird:test.json:1018
Which venues and years did Mckeown , Kathleen have papers ?
select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = "mckeown , kathleen"
[ "Which", "venues", "and", "years", "did", "Mckeown", ",", "Kathleen", "have", "papers", "?" ]
[ { "id": 4, "type": "column", "value": "mckeown , kathleen" }, { "id": 6, "type": "table", "value": "author_list" }, { "id": 7, "type": "column", "value": "author_id" }, { "id": 8, "type": "column", "value": "paper_id" }, { "id": 2, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5, 6, 7 ] }, { "en...
[ "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-TABLE", "O" ]
10,919
advertising_agencies
bird:test.json:2085
Show ids, status codes, and details for all invoices for clients.
SELECT invoice_id , invoice_status , invoice_details FROM Invoices
[ "Show", "ids", ",", "status", "codes", ",", "and", "details", "for", "all", "invoices", "for", "clients", "." ]
[ { "id": 3, "type": "column", "value": "invoice_details" }, { "id": 2, "type": "column", "value": "invoice_status" }, { "id": 1, "type": "column", "value": "invoice_id" }, { "id": 0, "type": "table", "value": "invoices" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
10,920
books
bird:train.json:5919
What is the name of the publisher of the book with the most pages?
SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id ORDER BY T1.num_pages DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "publisher", "of", "the", "book", "with", "the", "most", "pages", "?" ]
[ { "id": 0, "type": "column", "value": "publisher_name" }, { "id": 4, "type": "column", "value": "publisher_id" }, { "id": 2, "type": "table", "value": "publisher" }, { "id": 3, "type": "column", "value": "num_pages" }, { "id": 1, "type": "table...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
10,921
real_estate_rentals
bird:test.json:1432
What are the users making only one search? List both category and user id.
SELECT T1.user_category_code , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count(*) = 1;
[ "What", "are", "the", "users", "making", "only", "one", "search", "?", "List", "both", "category", "and", "user", "i", "d." ]
[ { "id": 1, "type": "column", "value": "user_category_code" }, { "id": 3, "type": "table", "value": "user_searches" }, { "id": 0, "type": "column", "value": "user_id" }, { "id": 2, "type": "table", "value": "users" }, { "id": 4, "type": "value",...
[ { "entity_id": 0, "token_idxs": [ 13, 14, 15 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": []...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN" ]
10,922
loan_1
spider:train_spider.json:3060
Find the total amount of loans offered by each bank branch.
SELECT sum(amount) , T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname
[ "Find", "the", "total", "amount", "of", "loans", "offered", "by", "each", "bank", "branch", "." ]
[ { "id": 4, "type": "column", "value": "branch_id" }, { "id": 3, "type": "column", "value": "amount" }, { "id": 0, "type": "column", "value": "bname" }, { "id": 1, "type": "table", "value": "bank" }, { "id": 2, "type": "table", "value": "loa...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
10,923
superstore
bird:train.json:2364
Which order of Logitech G600 MMO Gaming Mouse has the highest total cost?
SELECT T1.`Order ID` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Logitech G600 MMO Gaming Mouse' GROUP BY T1.`Order ID` ORDER BY SUM((T1.Sales / (1 - T1.Discount)) * T1.Quantity - T1.Profit) DESC LIMIT 1
[ "Which", "order", "of", "Logitech", "G600", "MMO", "Gaming", "Mouse", "has", "the", "highest", "total", "cost", "?" ]
[ { "id": 4, "type": "value", "value": "Logitech G600 MMO Gaming Mouse" }, { "id": 1, "type": "table", "value": "central_superstore" }, { "id": 3, "type": "column", "value": "Product Name" }, { "id": 5, "type": "column", "value": "Product ID" }, { "i...
[ { "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": [ 3, 4, 5, 6, 7 ] }, { ...
[ "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O" ]
10,924
allergy_1
spider:train_spider.json:443
Show all allergy types.
SELECT DISTINCT allergytype FROM Allergy_type
[ "Show", "all", "allergy", "types", "." ]
[ { "id": 0, "type": "table", "value": "allergy_type" }, { "id": 1, "type": "column", "value": "allergytype" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,925
hockey
bird:train.json:7766
How many coaches of the Montreal Canadiens have gotten in the Hall of Fame?
SELECT COUNT(DISTINCT hofID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Montreal Canadiens'
[ "How", "many", "coaches", "of", "the", "Montreal", "Canadiens", "have", "gotten", "in", "the", "Hall", "of", "Fame", "?" ]
[ { "id": 2, "type": "value", "value": "Montreal Canadiens" }, { "id": 4, "type": "table", "value": "coaches" }, { "id": 6, "type": "column", "value": "coachid" }, { "id": 0, "type": "table", "value": "master" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,928
movie_3
bird:train.json:9103
What is the description of the film ACADEMY DINOSAUR?
SELECT description FROM film WHERE title = 'ACADEMY DINOSAUR'
[ "What", "is", "the", "description", "of", "the", "film", "ACADEMY", "DINOSAUR", "?" ]
[ { "id": 3, "type": "value", "value": "ACADEMY DINOSAUR" }, { "id": 1, "type": "column", "value": "description" }, { "id": 2, "type": "column", "value": "title" }, { "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": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "O" ]
10,929
thrombosis_prediction
bird:dev.json:1207
List all patients with their sex and date of birthday, whose AST glutamic oxaloacetic transaminase (GOT) index is within normal range for loboratory examination in 1994.
SELECT DISTINCT T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 AND STRFTIME('%Y', T2.Date) = '1994'
[ "List", "all", "patients", "with", "their", "sex", "and", "date", "of", "birthday", ",", "whose", "AST", "glutamic", "oxaloacetic", "transaminase", "(", "GOT", ")", "index", "is", "within", "normal", "range", "for", "loboratory", "examination", "in", "1994", ...
[ { "id": 3, "type": "table", "value": "laboratory" }, { "id": 1, "type": "column", "value": "birthday" }, { "id": 2, "type": "table", "value": "patient" }, { "id": 7, "type": "value", "value": "1994" }, { "id": 9, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 25 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
10,930
pilot_1
bird:test.json:1142
Return the names and ages of pilors who have flown Piper Cub and are older than 35, or have flown the F-14 Fighter and are younger than 30.
SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'Piper Cub' AND age > 35 UNION SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'F-14 Fighter' AND age < 30
[ "Return", "the", "names", "and", "ages", "of", "pilors", "who", "have", "flown", "Piper", "Cub", "and", "are", "older", "than", "35", ",", "or", "have", "flown", "the", "F-14", "Fighter", "and", "are", "younger", "than", "30", "." ]
[ { "id": 6, "type": "value", "value": "F-14 Fighter" }, { "id": 0, "type": "table", "value": "pilotskills" }, { "id": 1, "type": "column", "value": "pilot_name" }, { "id": 3, "type": "column", "value": "plane_name" }, { "id": 4, "type": "value",...
[ { "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": [ 10, 11 ] }, { "entity_id...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "B-VALUE", "O" ]
10,931
public_review_platform
bird:train.json:3789
How many types of music does Yelp business No."1141" have?
SELECT COUNT(T1.attribute_name) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value LIKE 'TRUE' AND T2.business_id = 1141
[ "How", "many", "types", "of", "music", "does", "Yelp", "business", "No", ".", "\"1141", "\"", "have", "?" ]
[ { "id": 1, "type": "table", "value": "business_attributes" }, { "id": 4, "type": "column", "value": "attribute_value" }, { "id": 2, "type": "column", "value": "attribute_name" }, { "id": 3, "type": "column", "value": "attribute_id" }, { "id": 6, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O" ]
10,932
city_record
spider:train_spider.json:6269
Find the city that hosted some events in the most recent year. What is the id of this city?
SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1
[ "Find", "the", "city", "that", "hosted", "some", "events", "in", "the", "most", "recent", "year", ".", "What", "is", "the", "i", "d", "of", "this", "city", "?" ]
[ { "id": 0, "type": "table", "value": "hosting_city" }, { "id": 1, "type": "column", "value": "host_city" }, { "id": 2, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 18 ] }, { "entity_id": 1, "token_idxs": [ 19, 20 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O" ]
10,933
phone_1
spider:train_spider.json:1044
Find the accreditation level that more than 3 phones use.
SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING count(*) > 3
[ "Find", "the", "accreditation", "level", "that", "more", "than", "3", "phones", "use", "." ]
[ { "id": 1, "type": "column", "value": "accreditation_level" }, { "id": 0, "type": "table", "value": "phone" }, { "id": 2, "type": "value", "value": "3" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O" ]
10,934
shipping
bird:train.json:5581
How many shipments were ordered by a customer in Florida?
SELECT COUNT(T1.cust_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.state = 'FL'
[ "How", "many", "shipments", "were", "ordered", "by", "a", "customer", "in", "Florida", "?" ]
[ { "id": 0, "type": "table", "value": "customer" }, { "id": 1, "type": "table", "value": "shipment" }, { "id": 4, "type": "column", "value": "cust_id" }, { "id": 2, "type": "column", "value": "state" }, { "id": 3, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
10,935
club_1
spider:train_spider.json:4307
Which clubs have one or more members from the city with code "HOU"? Give me the names of the clubs.
SELECT DISTINCT t1.clubname 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 t3.city_code = "HOU"
[ "Which", "clubs", "have", "one", "or", "more", "members", "from", "the", "city", "with", "code", "\"", "HOU", "\"", "?", "Give", "me", "the", "names", "of", "the", "clubs", "." ]
[ { "id": 5, "type": "table", "value": "member_of_club" }, { "id": 2, "type": "column", "value": "city_code" }, { "id": 0, "type": "column", "value": "clubname" }, { "id": 1, "type": "table", "value": "student" }, { "id": 7, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 1 ] ...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,936
flight_1
spider:train_spider.json:405
Show all destinations and the number of flights to each destination.
SELECT destination , count(*) FROM Flight GROUP BY destination
[ "Show", "all", "destinations", "and", "the", "number", "of", "flights", "to", "each", "destination", "." ]
[ { "id": 1, "type": "column", "value": "destination" }, { "id": 0, "type": "table", "value": "flight" } ]
[ { "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" ]
10,938
olympics
bird:train.json:5060
Calculate the percentage of bronze medals won by men's basketball players.
SELECT CAST(COUNT(CASE WHEN T4.medal_name = 'Bronze' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id INNER JOIN event AS T3 ON T1.event_id = T3.id INNER JOIN medal AS T4 ON T1.medal_id = T4.id WHERE T3.event_name LIKE '...
[ "Calculate", "the", "percentage", "of", "bronze", "medals", "won", "by", "men", "'s", "basketball", "players", "." ]
[ { "id": 2, "type": "value", "value": "Basketball Men%s Basketball" }, { "id": 8, "type": "table", "value": "competitor_event" }, { "id": 9, "type": "table", "value": "games_competitor" }, { "id": 11, "type": "column", "value": "competitor_id" }, { ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 7, 8, 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
10,939
financial
bird:dev.json:187
How many clients who choose statement of weekly issuance are Owner?
SELECT COUNT(T2.account_id) FROM account AS T1 INNER JOIN disp AS T2 ON T2.account_id = T1.account_id WHERE T1.frequency = 'POPLATEK TYDNE' AND T2.type = 'OWNER'
[ "How", "many", "clients", "who", "choose", "statement", "of", "weekly", "issuance", "are", "Owner", "?" ]
[ { "id": 4, "type": "value", "value": "POPLATEK TYDNE" }, { "id": 2, "type": "column", "value": "account_id" }, { "id": 3, "type": "column", "value": "frequency" }, { "id": 0, "type": "table", "value": "account" }, { "id": 6, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,940
simpson_episodes
bird:train.json:4218
Write down the award ID, award name and winner for character named "Homer simpson 20".
SELECT T1.award_id, T1.award, T1.person FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.character = 'Homer Simpson' AND T1.result = 'Winner';
[ "Write", "down", "the", "award", "ID", ",", "award", "name", "and", "winner", "for", "character", "named", "\"", "Homer", "simpson", "20", "\"", "." ]
[ { "id": 4, "type": "table", "value": "character_award" }, { "id": 6, "type": "value", "value": "Homer Simpson" }, { "id": 5, "type": "column", "value": "character" }, { "id": 0, "type": "column", "value": "award_id" }, { "id": 2, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O" ]
10,941
university
bird:train.json:8044
How many students at the university earned a score of 90 in 2011?
SELECT COUNT(*) FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.score = 90 AND T1.year = 2011
[ "How", "many", "students", "at", "the", "university", "earned", "a", "score", "of", "90", "in", "2011", "?" ]
[ { "id": 1, "type": "table", "value": "university_ranking_year" }, { "id": 0, "type": "table", "value": "university_year" }, { "id": 2, "type": "column", "value": "university_id" }, { "id": 3, "type": "column", "value": "score" }, { "id": 5, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
10,943
codebase_comments
bird:train.json:662
How many solutions are there whose respositories received the number of stars more than one third of the number of forks?
SELECT COUNT(DISTINCT T1.Id) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars > CAST(T1.Forks AS REAL) / 3
[ "How", "many", "solutions", "are", "there", "whose", "respositories", "received", "the", "number", "of", "stars", "more", "than", "one", "third", "of", "the", "number", "of", "forks", "?" ]
[ { "id": 1, "type": "table", "value": "solution" }, { "id": 4, "type": "column", "value": "repoid" }, { "id": 2, "type": "column", "value": "stars" }, { "id": 6, "type": "column", "value": "forks" }, { "id": 0, "type": "table", "value": "rep...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,944
mondial_geo
bird:train.json:8386
Among all the rivers finally flows to the sea of 540m in depth, which one has the longest length?
SELECT T2.Name FROM sea AS T1 INNER JOIN river AS T2 ON T2.Sea = T1.Name WHERE T1.Depth = 540 ORDER BY T2.Length DESC LIMIT 1
[ "Among", "all", "the", "rivers", "finally", "flows", "to", "the", "sea", "of", "540", "m", "in", "depth", ",", "which", "one", "has", "the", "longest", "length", "?" ]
[ { "id": 5, "type": "column", "value": "length" }, { "id": 2, "type": "table", "value": "river" }, { "id": 3, "type": "column", "value": "depth" }, { "id": 0, "type": "column", "value": "name" }, { "id": 1, "type": "table", "value": "sea" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,945
baseball_1
spider:train_spider.json:3667
How many times did Boston Red Stockings lose in 2009 postseason?
SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;
[ "How", "many", "times", "did", "Boston", "Red", "Stockings", "lose", "in", "2009", "postseason", "?" ]
[ { "id": 5, "type": "value", "value": "Boston Red Stockings" }, { "id": 2, "type": "column", "value": "team_id_loser" }, { "id": 0, "type": "table", "value": "postseason" }, { "id": 3, "type": "column", "value": "team_id_br" }, { "id": 1, "type"...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 4, ...
[ "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "B-VALUE", "B-TABLE", "O" ]
10,946
dorm_1
spider:train_spider.json:5673
How many girl students who are younger than 25?
SELECT count(*) FROM student WHERE sex = 'F' AND age < 25
[ "How", "many", "girl", "students", "who", "are", "younger", "than", "25", "?" ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "sex" }, { "id": 3, "type": "column", "value": "age" }, { "id": 4, "type": "value", "value": "25" }, { "id": 2, "type": "value", "value": "F" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
10,947
college_2
spider:train_spider.json:1473
What are the names of all instructors with names that include "dar"?
SELECT name FROM instructor WHERE name LIKE '%dar%'
[ "What", "are", "the", "names", "of", "all", "instructors", "with", "names", "that", "include", "\"", "dar", "\"", "?" ]
[ { "id": 0, "type": "table", "value": "instructor" }, { "id": 2, "type": "value", "value": "%dar%" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "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", "B-VALUE", "O", "O" ]
10,948
college_2
spider:train_spider.json:1489
What are the names of instructors who earn more than at least one instructor from the Biology department?
SELECT name FROM instructor WHERE salary > (SELECT min(salary) FROM instructor WHERE dept_name = 'Biology')
[ "What", "are", "the", "names", "of", "instructors", "who", "earn", "more", "than", "at", "least", "one", "instructor", "from", "the", "Biology", "department", "?" ]
[ { "id": 0, "type": "table", "value": "instructor" }, { "id": 3, "type": "column", "value": "dept_name" }, { "id": 4, "type": "value", "value": "Biology" }, { "id": 2, "type": "column", "value": "salary" }, { "id": 1, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "enti...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
10,949
book_2
spider:train_spider.json:218
What are the dates of publications in descending order of price?
SELECT Publication_Date FROM publication ORDER BY Price DESC
[ "What", "are", "the", "dates", "of", "publications", "in", "descending", "order", "of", "price", "?" ]
[ { "id": 1, "type": "column", "value": "publication_date" }, { "id": 0, "type": "table", "value": "publication" }, { "id": 2, "type": "column", "value": "price" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,950
movie_3
bird:train.json:9311
What are the addresses of the inactive customers?
SELECT T2.address FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.active = 0
[ "What", "are", "the", "addresses", "of", "the", "inactive", "customers", "?" ]
[ { "id": 5, "type": "column", "value": "address_id" }, { "id": 1, "type": "table", "value": "customer" }, { "id": 0, "type": "column", "value": "address" }, { "id": 2, "type": "table", "value": "address" }, { "id": 3, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
10,951
european_football_1
bird:train.json:2776
Give the full name of the divison that had the most 0-0 games.
SELECT T2.name FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.FTAG = 0 AND T1.FTHG = 0 GROUP BY T2.division ORDER BY COUNT(T1.FTAG) DESC LIMIT 1
[ "Give", "the", "full", "name", "of", "the", "divison", "that", "had", "the", "most", "0", "-", "0", "games", "." ]
[ { "id": 3, "type": "table", "value": "divisions" }, { "id": 0, "type": "column", "value": "division" }, { "id": 2, "type": "table", "value": "matchs" }, { "id": 1, "type": "column", "value": "name" }, { "id": 5, "type": "column", "value": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O" ]
10,952
student_loan
bird:train.json:4535
Mention the status of payment of student 299.
SELECT bool FROM no_payment_due WHERE name = 'student299'
[ "Mention", "the", "status", "of", "payment", "of", "student", "299", "." ]
[ { "id": 0, "type": "table", "value": "no_payment_due" }, { "id": 3, "type": "value", "value": "student299" }, { "id": 1, "type": "column", "value": "bool" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6, 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O" ]
10,953
storm_record
spider:train_spider.json:2705
Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.
SELECT sum(number_deaths) , sum(damage_millions_USD) FROM storm WHERE max_speed > (SELECT avg(max_speed) FROM storm)
[ "Return", "the", "total", "number", "of", "deaths", "and", "total", "damange", "in", "millions", "for", "storms", "that", "had", "a", "max", "speed", "greater", "than", "the", "average", "." ]
[ { "id": 3, "type": "column", "value": "damage_millions_usd" }, { "id": 2, "type": "column", "value": "number_deaths" }, { "id": 1, "type": "column", "value": "max_speed" }, { "id": 0, "type": "table", "value": "storm" } ]
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 16, 17 ] }, { "entity_id": 2, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10 ] }, { "entity_i...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O" ]
10,954
swimming
spider:train_spider.json:5630
Find all details for each swimmer.
SELECT * FROM swimmer
[ "Find", "all", "details", "for", "each", "swimmer", "." ]
[ { "id": 0, "type": "table", "value": "swimmer" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,955
country_language
bird:test.json:1365
What are the names of the countries, ordered descending by overall score?
SELECT name FROM countries ORDER BY overall_score DESC
[ "What", "are", "the", "names", "of", "the", "countries", ",", "ordered", "descending", "by", "overall", "score", "?" ]
[ { "id": 2, "type": "column", "value": "overall_score" }, { "id": 0, "type": "table", "value": "countries" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,956
advertising_agencies
bird:test.json:2098
What are the invoice status, invoice details, and corresponding client ids and details and agency id and details?
SELECT T1.invoice_status , T1.invoice_details , T2.client_id , T2.client_details , T3.agency_id , T3.agency_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id = T2.client_id JOIN Agencies AS T3 ON T2.agency_id = T3.agency_id
[ "What", "are", "the", "invoice", "status", ",", "invoice", "details", ",", "and", "corresponding", "client", "ids", "and", "details", "and", "agency", "i", "d", "and", "details", "?" ]
[ { "id": 1, "type": "column", "value": "invoice_details" }, { "id": 0, "type": "column", "value": "invoice_status" }, { "id": 3, "type": "column", "value": "client_details" }, { "id": 5, "type": "column", "value": "agency_details" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 13, 14 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O" ]
10,957
works_cycles
bird:train.json:7189
How many of the non-sales employees are married?
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'EM' AND T1.MaritalStatus = 'M'
[ "How", "many", "of", "the", "non", "-", "sales", "employees", "are", "married", "?" ]
[ { "id": 2, "type": "column", "value": "businessentityid" }, { "id": 5, "type": "column", "value": "maritalstatus" }, { "id": 3, "type": "column", "value": "persontype" }, { "id": 0, "type": "table", "value": "employee" }, { "id": 1, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
10,959
region_building
bird:test.json:340
For each building, return the address of the building and the name of the region it belongs to.
SELECT T1.Address , T2.Capital FROM building AS T1 JOIN region AS T2 ON T1.Region_ID = T2.Region_ID
[ "For", "each", "building", ",", "return", "the", "address", "of", "the", "building", "and", "the", "name", "of", "the", "region", "it", "belongs", "to", "." ]
[ { "id": 4, "type": "column", "value": "region_id" }, { "id": 2, "type": "table", "value": "building" }, { "id": 0, "type": "column", "value": "address" }, { "id": 1, "type": "column", "value": "capital" }, { "id": 3, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
10,961
menu
bird:train.json:5573
For how many times had the dish "Chicken gumbo" appeared on a menu page?
SELECT SUM(CASE WHEN T1.name = 'Chicken gumbo' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id
[ "For", "how", "many", "times", "had", "the", "dish", "\"", "Chicken", "gumbo", "\"", "appeared", "on", "a", "menu", "page", "?" ]
[ { "id": 7, "type": "value", "value": "Chicken gumbo" }, { "id": 1, "type": "table", "value": "menuitem" }, { "id": 3, "type": "column", "value": "dish_id" }, { "id": 0, "type": "table", "value": "dish" }, { "id": 6, "type": "column", "value...
[ { "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", "B-VALUE", "I-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O" ]
10,962
food_inspection_2
bird:train.json:6135
Show the phone number of the sanitarian who was responsible for inspection no.634597.
SELECT T2.phone FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T1.inspection_id = 634597 AND T2.title = 'Sanitarian'
[ "Show", "the", "phone", "number", "of", "the", "sanitarian", "who", "was", "responsible", "for", "inspection", "no.634597", "." ]
[ { "id": 4, "type": "column", "value": "inspection_id" }, { "id": 3, "type": "column", "value": "employee_id" }, { "id": 1, "type": "table", "value": "inspection" }, { "id": 7, "type": "value", "value": "Sanitarian" }, { "id": 2, "type": "table"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "O" ]
10,963
movie_1
spider:train_spider.json:2499
What are the titles and average ratings for all movies that have the lowest average rating?
SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) LIMIT 1
[ "What", "are", "the", "titles", "and", "average", "ratings", "for", "all", "movies", "that", "have", "the", "lowest", "average", "rating", "?" ]
[ { "id": 2, "type": "table", "value": "rating" }, { "id": 1, "type": "column", "value": "title" }, { "id": 3, "type": "table", "value": "movie" }, { "id": 4, "type": "column", "value": "stars" }, { "id": 0, "type": "column", "value": "mid" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,964
student_loan
bird:train.json:4427
Give the number of students who have payment due.
SELECT COUNT(name) FROM no_payment_due WHERE bool = 'pos'
[ "Give", "the", "number", "of", "students", "who", "have", "payment", "due", "." ]
[ { "id": 0, "type": "table", "value": "no_payment_due" }, { "id": 1, "type": "column", "value": "bool" }, { "id": 3, "type": "column", "value": "name" }, { "id": 2, "type": "value", "value": "pos" } ]
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
10,965
european_football_2
bird:dev.json:1125
Among the players with finishing rate of 1, pick the eldest player and state the player's name.
SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.finishing = 1 ORDER BY t1.birthday ASC LIMIT 1
[ "Among", "the", "players", "with", "finishing", "rate", "of", "1", ",", "pick", "the", "eldest", "player", "and", "state", "the", "player", "'s", "name", "." ]
[ { "id": 2, "type": "table", "value": "player_attributes" }, { "id": 6, "type": "column", "value": "player_api_id" }, { "id": 0, "type": "column", "value": "player_name" }, { "id": 3, "type": "column", "value": "finishing" }, { "id": 5, "type": ...
[ { "entity_id": 0, "token_idxs": [ 16, 17, 18 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
10,966
beer_factory
bird:train.json:5247
What is the number of the credit card that Frank-Paul Santangelo used to purchase root beers on 2014/7/7?
SELECT DISTINCT T2.CreditCardNumber FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND T2.TransactionDate = '2014-07-07'
[ "What", "is", "the", "number", "of", "the", "credit", "card", "that", "Frank", "-", "Paul", "Santangelo", "used", "to", "purchase", "root", "beers", "on", "2014/7/7", "?" ]
[ { "id": 0, "type": "column", "value": "creditcardnumber" }, { "id": 8, "type": "column", "value": "transactiondate" }, { "id": 2, "type": "table", "value": "transaction" }, { "id": 3, "type": "column", "value": "customerid" }, { "id": 5, "type"...
[ { "entity_id": 0, "token_idxs": [ 6, 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,967
workshop_paper
spider:train_spider.json:5840
Show the date and venue of each workshop in ascending alphabetical order of the venue.
SELECT Date , Venue FROM workshop ORDER BY Venue
[ "Show", "the", "date", "and", "venue", "of", "each", "workshop", "in", "ascending", "alphabetical", "order", "of", "the", "venue", "." ]
[ { "id": 0, "type": "table", "value": "workshop" }, { "id": 2, "type": "column", "value": "venue" }, { "id": 1, "type": "column", "value": "date" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,968
public_review_platform
bird:train.json:3981
Under the category name of "Coffee & Tea", mention any 5 business ID , their state and city.
SELECT T2.business_id, T3.state, T3.city FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name = 'Coffee & Tea' LIMIT 5
[ "Under", "the", "category", "name", "of", "\"", "Coffee", "&", "Tea", "\"", ",", "mention", "any", "5", "business", "ID", ",", "their", "state", "and", "city", "." ]
[ { "id": 7, "type": "table", "value": "business_categories" }, { "id": 4, "type": "column", "value": "category_name" }, { "id": 5, "type": "value", "value": "Coffee & Tea" }, { "id": 0, "type": "column", "value": "business_id" }, { "id": 8, "typ...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [ 20 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 3 ] },...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
10,969
card_games
bird:dev.json:515
When was the oldest mythic card released and what are its legal play formats?
SELECT T1.originalReleaseDate, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.rarity = 'mythic' AND T1.originalReleaseDate IS NOT NULL AND T2.status = 'Legal' ORDER BY T1.originalReleaseDate LIMIT 1
[ "When", "was", "the", "oldest", "mythic", "card", "released", "and", "what", "are", "its", "legal", "play", "formats", "?" ]
[ { "id": 0, "type": "column", "value": "originalreleasedate" }, { "id": 3, "type": "table", "value": "legalities" }, { "id": 1, "type": "column", "value": "format" }, { "id": 5, "type": "column", "value": "rarity" }, { "id": 6, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "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", "B-VALUE", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "B-COLUMN", "O" ]
10,970
world
bird:train.json:7825
How many cities are there in the country with the largest surface area?
SELECT T2.ID FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.SurfaceArea = ( SELECT MAX(SurfaceArea) FROM Country )
[ "How", "many", "cities", "are", "there", "in", "the", "country", "with", "the", "largest", "surface", "area", "?" ]
[ { "id": 3, "type": "column", "value": "surfacearea" }, { "id": 5, "type": "column", "value": "countrycode" }, { "id": 1, "type": "table", "value": "country" }, { "id": 2, "type": "table", "value": "city" }, { "id": 4, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,971
college_1
spider:train_spider.json:3218
How many students are in each department?
SELECT count(*) , dept_code FROM student GROUP BY dept_code
[ "How", "many", "students", "are", "in", "each", "department", "?" ]
[ { "id": 1, "type": "column", "value": "dept_code" }, { "id": 0, "type": "table", "value": "student" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
10,973
regional_sales
bird:train.json:2669
Count the number of orders made from the store in city with population of 3000000 to 4000000.
SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.Population BETWEEN 3000000 AND 4000000
[ "Count", "the", "number", "of", "orders", "made", "from", "the", "store", "in", "city", "with", "population", "of", "3000000", "to", "4000000", "." ]
[ { "id": 1, "type": "table", "value": "Store Locations" }, { "id": 0, "type": "table", "value": "Sales Orders" }, { "id": 5, "type": "column", "value": "ordernumber" }, { "id": 2, "type": "column", "value": "population" }, { "id": 7, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 16 ...
[ "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
10,974
public_review_platform
bird:train.json:3977
Under the attribute name of "music_playlist", describe the attribute ID, business ID, city and inactive status.
SELECT T1.attribute_id, T2.business_id, T3.city FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name = 'music_playlist' AND T3.active = 'false'
[ "Under", "the", "attribute", "name", "of", "\"", "music_playlist", "\"", ",", "describe", "the", "attribute", "ID", ",", "business", "ID", ",", "city", "and", "inactive", "status", "." ]
[ { "id": 5, "type": "table", "value": "business_attributes" }, { "id": 6, "type": "column", "value": "attribute_name" }, { "id": 7, "type": "value", "value": "music_playlist" }, { "id": 0, "type": "column", "value": "attribute_id" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [ 11, 12 ] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 2 ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
10,976
retail_complains
bird:train.json:279
Find and list the names of districts which has below-average stars for Eagle Capital.
SELECT T2.division FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle Capital' AND T1.Stars > ( SELECT AVG(Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id )
[ "Find", "and", "list", "the", "names", "of", "districts", "which", "has", "below", "-", "average", "stars", "for", "Eagle", "Capital", "." ]
[ { "id": 5, "type": "value", "value": "Eagle Capital" }, { "id": 3, "type": "column", "value": "district_id" }, { "id": 0, "type": "column", "value": "division" }, { "id": 2, "type": "table", "value": "district" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 14, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
10,977
formula_1
spider:train_spider.json:2196
What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841?
SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration < (SELECT max(duration) FROM pitstops WHERE raceid = 841)
[ "What", "is", "the", "i", "d", "and", "stop", "number", "for", "each", "driver", "that", "has", "a", "shorter", "pit", "stop", "than", "the", "driver", "in", "the", "race", "with", "i", "d", "841", "?" ]
[ { "id": 0, "type": "table", "value": "pitstops" }, { "id": 1, "type": "column", "value": "driverid" }, { "id": 3, "type": "column", "value": "duration" }, { "id": 4, "type": "column", "value": "raceid" }, { "id": 2, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 22 ] }, { "ent...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
10,978
world_development_indicators
bird:train.json:2172
List the long name of countries with indicator name in 1980.
SELECT DISTINCT T1.LongName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Year = 1980 AND T2.IndicatorName IS NOT NULL
[ "List", "the", "long", "name", "of", "countries", "with", "indicator", "name", "in", "1980", "." ]
[ { "id": 6, "type": "column", "value": "indicatorname" }, { "id": 3, "type": "column", "value": "countrycode" }, { "id": 2, "type": "table", "value": "indicators" }, { "id": 0, "type": "column", "value": "longname" }, { "id": 1, "type": "table",...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
10,979
student_club
bird:dev.json:1424
Among the members, how many of them have an extra large t-shirt size?
SELECT COUNT(member_id) FROM member WHERE position = 'Member' AND t_shirt_size = 'X-Large'
[ "Among", "the", "members", ",", "how", "many", "of", "them", "have", "an", "extra", "large", "t", "-", "shirt", "size", "?" ]
[ { "id": 4, "type": "column", "value": "t_shirt_size" }, { "id": 1, "type": "column", "value": "member_id" }, { "id": 2, "type": "column", "value": "position" }, { "id": 5, "type": "value", "value": "X-Large" }, { "id": 0, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 12, 13, 14, 15 ] }, { "en...
[ "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
10,981
chicago_crime
bird:train.json:8718
Between Deering and Near West districts, which district reported the most number of crime incidents that happened in a library?
SELECT T1.district_name FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.district_name IN ('Deering', 'Near West') AND T2.location_description = 'LIBRARY' GROUP BY T1.district_name ORDER BY COUNT(T2.district_no) DESC LIMIT 1
[ "Between", "Deering", "and", "Near", "West", "districts", ",", "which", "district", "reported", "the", "most", "number", "of", "crime", "incidents", "that", "happened", "in", "a", "library", "?" ]
[ { "id": 6, "type": "column", "value": "location_description" }, { "id": 0, "type": "column", "value": "district_name" }, { "id": 3, "type": "column", "value": "district_no" }, { "id": 5, "type": "value", "value": "Near West" }, { "id": 1, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { "entity_id": 5, ...
[ "O", "B-VALUE", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,982
works_cycles
bird:train.json:7452
List all the products with lower than average cost.
SELECT DISTINCT T2.ProductID FROM ProductCostHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.StandardCost < ( SELECT SUM(StandardCost) / COUNT(ProductID) FROM Product )
[ "List", "all", "the", "products", "with", "lower", "than", "average", "cost", "." ]
[ { "id": 1, "type": "table", "value": "productcosthistory" }, { "id": 3, "type": "column", "value": "standardcost" }, { "id": 0, "type": "column", "value": "productid" }, { "id": 2, "type": "table", "value": "product" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "O", "O", "B-TABLE", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
10,983
address
bird:train.json:5197
What is the difference in the number of bad alias between Aguada city and Aguadilla city?
SELECT COUNT(CASE WHEN T2.city = 'Aguada' THEN T1.bad_alias ELSE NULL END) - COUNT(CASE WHEN T2.city = 'Aguadilla' THEN T1.bad_alias ELSE NULL END) AS DIFFERENCE FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code
[ "What", "is", "the", "difference", "in", "the", "number", "of", "bad", "alias", "between", "Aguada", "city", "and", "Aguadilla", "city", "?" ]
[ { "id": 3, "type": "column", "value": "bad_alias" }, { "id": 6, "type": "value", "value": "Aguadilla" }, { "id": 1, "type": "table", "value": "zip_data" }, { "id": 2, "type": "column", "value": "zip_code" }, { "id": 5, "type": "value", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
10,984
school_finance
spider:train_spider.json:1894
List each donator name and the amount of endowment in descending order of the amount of endowment.
SELECT donator_name , sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC
[ "List", "each", "donator", "name", "and", "the", "amount", "of", "endowment", "in", "descending", "order", "of", "the", "amount", "of", "endowment", "." ]
[ { "id": 1, "type": "column", "value": "donator_name" }, { "id": 0, "type": "table", "value": "endowment" }, { "id": 2, "type": "column", "value": "amount" } ]
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
10,985
card_games
bird:dev.json:458
How many artists have designed a card with a black border color and is available in both "arena" and "mtgo" printing type?
SELECT COUNT(CASE WHEN availability LIKE '%arena,mtgo%' AND borderColor = 'black' THEN 1 ELSE NULL END) FROM cards
[ "How", "many", "artists", "have", "designed", "a", "card", "with", "a", "black", "border", "color", "and", "is", "available", "in", "both", "\"", "arena", "\"", "and", "\"", "mtgo", "\"", "printing", "type", "?" ]
[ { "id": 2, "type": "column", "value": "availability" }, { "id": 3, "type": "value", "value": "%arena,mtgo%" }, { "id": 4, "type": "column", "value": "bordercolor" }, { "id": 0, "type": "table", "value": "cards" }, { "id": 5, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 18, 19, 20, 21, 22 ] }, { "entity_id": 4, "token_id...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O" ]
10,986
conference
bird:test.json:1064
What year had the fewest conferences?
SELECT YEAR FROM conference GROUP BY YEAR ORDER BY count(*) LIMIT 1
[ "What", "year", "had", "the", "fewest", "conferences", "?" ]
[ { "id": 0, "type": "table", "value": "conference" }, { "id": 1, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
10,988
cre_Docs_and_Epenses
spider:train_spider.json:6407
How many documents are with document type code BK for each product id?
SELECT count(*) , project_id FROM Documents WHERE document_type_code = "BK" GROUP BY project_id
[ "How", "many", "documents", "are", "with", "document", "type", "code", "BK", "for", "each", "product", "i", "d", "?" ]
[ { "id": 2, "type": "column", "value": "document_type_code" }, { "id": 1, "type": "column", "value": "project_id" }, { "id": 0, "type": "table", "value": "documents" }, { "id": 3, "type": "column", "value": "BK" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 11, 12, 13 ] }, { "entity_id": 2, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, ...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
10,989
customers_card_transactions
spider:train_spider.json:709
How many credit cards does customer Blanche Huels have?
SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Blanche" AND T2.customer_last_name = "Huels" AND T1.card_type_code = "Credit"
[ "How", "many", "credit", "cards", "does", "customer", "Blanche", "Huels", "have", "?" ]
[ { "id": 3, "type": "column", "value": "customer_first_name" }, { "id": 5, "type": "column", "value": "customer_last_name" }, { "id": 0, "type": "table", "value": "customers_cards" }, { "id": 7, "type": "column", "value": "card_type_code" }, { "id":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O" ]
10,990
car_road_race
bird:test.json:1326
How many different engines are used by drivers with age older than 30 or younger than 20?
SELECT count(DISTINCT Engine) FROM driver WHERE Age > 30 OR Age < 20
[ "How", "many", "different", "engines", "are", "used", "by", "drivers", "with", "age", "older", "than", "30", "or", "younger", "than", "20", "?" ]
[ { "id": 0, "type": "table", "value": "driver" }, { "id": 1, "type": "column", "value": "engine" }, { "id": 2, "type": "column", "value": "age" }, { "id": 3, "type": "value", "value": "30" }, { "id": 4, "type": "value", "value": "20" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "B-VALUE", "O" ]
10,991
wedding
spider:train_spider.json:1646
Show the church names for the weddings of all people older than 30.
SELECT T4.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id JOIN church AS T4 ON T4.church_id = T1.church_id WHERE T2.age > 30 OR T3.age > 30
[ "Show", "the", "church", "names", "for", "the", "weddings", "of", "all", "people", "older", "than", "30", "." ]
[ { "id": 3, "type": "column", "value": "church_id" }, { "id": 7, "type": "column", "value": "female_id" }, { "id": 8, "type": "column", "value": "people_id" }, { "id": 6, "type": "table", "value": "wedding" }, { "id": 9, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "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, "...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
10,992
bike_racing
bird:test.json:1486
How many bikes does each cyclist own? Order by cyclist id.
SELECT cyclist_id , count(*) FROM cyclists_own_bikes GROUP BY cyclist_id ORDER BY cyclist_id
[ "How", "many", "bikes", "does", "each", "cyclist", "own", "?", "Order", "by", "cyclist", "i", "d." ]
[ { "id": 0, "type": "table", "value": "cyclists_own_bikes" }, { "id": 1, "type": "column", "value": "cyclist_id" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [ 10, 11, 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "ent...
[ "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN" ]
10,993
citeseer
bird:train.json:4155
Under what classification do the papers that cited word1163 belong?
SELECT DISTINCT T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T2.word_cited_id = 'word1163'
[ "Under", "what", "classification", "do", "the", "papers", "that", "cited", "word1163", "belong", "?" ]
[ { "id": 3, "type": "column", "value": "word_cited_id" }, { "id": 0, "type": "column", "value": "class_label" }, { "id": 4, "type": "value", "value": "word1163" }, { "id": 5, "type": "column", "value": "paper_id" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O" ]
10,994
boat_1
bird:test.json:911
Find the names of sailors whose rating is larger than the rating of all sailors who booked a red boat.
SELECT name FROM Sailors WHERE rating > (SELECT max(T1.rating) FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid = T2.sid JOIN Boats AS T3 ON T3.bid = T2.bid WHERE T3.color = 'red')
[ "Find", "the", "names", "of", "sailors", "whose", "rating", "is", "larger", "than", "the", "rating", "of", "all", "sailors", "who", "booked", "a", "red", "boat", "." ]
[ { "id": 6, "type": "table", "value": "reserves" }, { "id": 0, "type": "table", "value": "sailors" }, { "id": 2, "type": "column", "value": "rating" }, { "id": 3, "type": "table", "value": "boats" }, { "id": 4, "type": "column", "value": "co...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 19 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
10,995
legislator
bird:train.json:4883
Among all the current legislators born after the year 1960, how many of them are not google entities?
SELECT COUNT(*) FROM current WHERE strftime('%Y', birthday_bio) > '1960' AND google_entity_id_id IS NULL
[ "Among", "all", "the", "current", "legislators", "born", "after", "the", "year", "1960", ",", "how", "many", "of", "them", "are", "not", "google", "entities", "?" ]
[ { "id": 2, "type": "column", "value": "google_entity_id_id" }, { "id": 4, "type": "column", "value": "birthday_bio" }, { "id": 0, "type": "table", "value": "current" }, { "id": 1, "type": "value", "value": "1960" }, { "id": 3, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 17, 18 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,996
language_corpus
bird:train.json:5807
For the word "grec", what is the percentage of the appearances in the "Art" Wikipedia page have among all the appearances?
SELECT CAST(SUM(CASE WHEN T3.title = 'Art' THEN T2.occurrences ELSE 0 END) AS REAL) * 100 / SUM(T2.occurrences) FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'grec'
[ "For", "the", "word", "\"", "grec", "\"", ",", "what", "is", "the", "percentage", "of", "the", "appearances", "in", "the", "\"", "Art", "\"", "Wikipedia", "page", "have", "among", "all", "the", "appearances", "?" ]
[ { "id": 4, "type": "table", "value": "pages_words" }, { "id": 7, "type": "column", "value": "occurrences" }, { "id": 0, "type": "table", "value": "pages" }, { "id": 3, "type": "table", "value": "words" }, { "id": 10, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 20 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
10,997
public_review_platform
bird:train.json:3809
How many businesses in Glendale city that are still running is opened from 8AM to 6PM?
SELECT COUNT(T1.category_name) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Hours AS T4 ON T3.business_id = T4.business_id WHERE T3.city LIKE 'Glendale' AND T4.opening_time LIKE '8AM' AND T4...
[ "How", "many", "businesses", "in", "Glendale", "city", "that", "are", "still", "running", "is", "opened", "from", "8AM", "to", "6PM", "?" ]
[ { "id": 11, "type": "table", "value": "business_categories" }, { "id": 0, "type": "table", "value": "business_hours" }, { "id": 1, "type": "column", "value": "category_name" }, { "id": 6, "type": "column", "value": "opening_time" }, { "id": 8, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
10,998
voter_2
spider:train_spider.json:5449
How many distinct president votes are recorded?
SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD
[ "How", "many", "distinct", "president", "votes", "are", "recorded", "?" ]
[ { "id": 1, "type": "column", "value": "president_vote" }, { "id": 0, "type": "table", "value": "voting_record" } ]
[ { "entity_id": 0, "token_idxs": [ 4, 5, 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, ...
[ "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
10,999
codebase_community
bird:dev.json:651
Provide the related post title of "How to tell if something happened in a data set which monitors a value over time".
SELECT T3.Title FROM postLinks AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id INNER JOIN posts AS T3 ON T1.RelatedPostId = T3.Id WHERE T2.Title = 'How to tell if something happened in a data set which monitors a value over time'
[ "Provide", "the", "related", "post", "title", "of", "\"", "How", "to", "tell", "if", "something", "happened", "in", "a", "data", "set", "which", "monitors", "a", "value", "over", "time", "\"", "." ]
[ { "id": 2, "type": "value", "value": "How to tell if something happened in a data set which monitors a value over time" }, { "id": 4, "type": "column", "value": "relatedpostid" }, { "id": 3, "type": "table", "value": "postlinks" }, { "id": 6, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, ...
[ "O", "O", "B-COLUMN", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
11,000
chicago_crime
bird:train.json:8713
Who is the crime against criminal sexual abuse?
SELECT crime_against FROM FBI_Code WHERE title = 'Criminal Sexual Abuse'
[ "Who", "is", "the", "crime", "against", "criminal", "sexual", "abuse", "?" ]
[ { "id": 3, "type": "value", "value": "Criminal Sexual Abuse" }, { "id": 1, "type": "column", "value": "crime_against" }, { "id": 0, "type": "table", "value": "fbi_code" }, { "id": 2, "type": "column", "value": "title" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
11,001
insurance_and_eClaims
spider:train_spider.json:1526
Find the number of distinct stages in claim processing.
SELECT count(*) FROM claims_processing_stages
[ "Find", "the", "number", "of", "distinct", "stages", "in", "claim", "processing", "." ]
[ { "id": 0, "type": "table", "value": "claims_processing_stages" } ]
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
11,002
club_1
spider:train_spider.json:4302
How many members of club "Bootup Baltimore" are younger than 18?
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 = "Bootup Baltimore" AND t3.age < 18
[ "How", "many", "members", "of", "club", "\"", "Bootup", "Baltimore", "\"", "are", "younger", "than", "18", "?" ]
[ { "id": 5, "type": "column", "value": "Bootup Baltimore" }, { "id": 2, "type": "table", "value": "member_of_club" }, { "id": 4, "type": "column", "value": "clubname" }, { "id": 0, "type": "table", "value": "student" }, { "id": 8, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 2, 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "I-TABLE", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
11,003
disney
bird:train.json:4683
Provide the movie titles and the estimated inflation rate of the highest total grossed movie.
SELECT movie_title, CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) / CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL) FROM movies_total_gross ORDER BY CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
[ "Provide", "the", "movie", "titles", "and", "the", "estimated", "inflation", "rate", "of", "the", "highest", "total", "grossed", "movie", "." ]
[ { "id": 5, "type": "column", "value": "inflation_adjusted_gross" }, { "id": 0, "type": "table", "value": "movies_total_gross" }, { "id": 1, "type": "column", "value": "movie_title" }, { "id": 3, "type": "column", "value": "total_gross" }, { "id": 2...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12, 13 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O" ]
11,005
menu
bird:train.json:5543
Which dish has the longest history?
SELECT name FROM Dish ORDER BY last_appeared - Dish.first_appeared DESC LIMIT 1
[ "Which", "dish", "has", "the", "longest", "history", "?" ]
[ { "id": 3, "type": "column", "value": "first_appeared" }, { "id": 2, "type": "column", "value": "last_appeared" }, { "id": 0, "type": "table", "value": "dish" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "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": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "B-TABLE", "O", "O", "O", "O", "O" ]
11,006
customers_and_addresses
spider:train_spider.json:6104
Return the channel code and contact number of the customer contact channel whose active duration was the longest.
SELECT channel_code , contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)
[ "Return", "the", "channel", "code", "and", "contact", "number", "of", "the", "customer", "contact", "channel", "whose", "active", "duration", "was", "the", "longest", "." ]
[ { "id": 0, "type": "table", "value": "customer_contact_channels" }, { "id": 4, "type": "column", "value": "active_from_date" }, { "id": 2, "type": "column", "value": "contact_number" }, { "id": 3, "type": "column", "value": "active_to_date" }, { "i...
[ { "entity_id": 0, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 13, 14 ] }, { "entity_i...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
11,007
insurance_fnol
spider:train_spider.json:902
Return the sum and average of all settlement amounts.
SELECT sum(settlement_amount) , avg(settlement_amount) FROM settlements
[ "Return", "the", "sum", "and", "average", "of", "all", "settlement", "amounts", "." ]
[ { "id": 1, "type": "column", "value": "settlement_amount" }, { "id": 0, "type": "table", "value": "settlements" } ]
[ { "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" ]
11,008
shipping
bird:train.json:5593
How many shipments were delivered by the oldest truck model?
SELECT COUNT(*) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id GROUP BY T1.model_year ORDER BY T1.model_year ASC LIMIT 1
[ "How", "many", "shipments", "were", "delivered", "by", "the", "oldest", "truck", "model", "?" ]
[ { "id": 0, "type": "column", "value": "model_year" }, { "id": 2, "type": "table", "value": "shipment" }, { "id": 3, "type": "column", "value": "truck_id" }, { "id": 1, "type": "table", "value": "truck" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
11,009
formula_1
bird:dev.json:973
List out top 10 Spanish drivers who were born before 1982 and have the latest lap time.
SELECT T2.driverId FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.nationality = 'Spanish' AND STRFTIME('%Y', T2.dob) < '1982' ORDER BY T1.time DESC LIMIT 10
[ "List", "out", "top", "10", "Spanish", "drivers", "who", "were", "born", "before", "1982", "and", "have", "the", "latest", "lap", "time", "." ]
[ { "id": 4, "type": "column", "value": "nationality" }, { "id": 0, "type": "column", "value": "driverid" }, { "id": 1, "type": "table", "value": "pitstops" }, { "id": 2, "type": "table", "value": "drivers" }, { "id": 5, "type": "value", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
11,010
theme_gallery
spider:train_spider.json:1661
What is the name of the artist who joined latest?
SELECT name FROM artist ORDER BY year_join DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "artist", "who", "joined", "latest", "?" ]
[ { "id": 2, "type": "column", "value": "year_join" }, { "id": 0, "type": "table", "value": "artist" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
11,011
shipping
bird:train.json:5672
Give the annual revenue of the customer of ship ID 1047.
SELECT T2.annual_revenue FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T1.ship_id = '1047'
[ "Give", "the", "annual", "revenue", "of", "the", "customer", "of", "ship", "ID", "1047", "." ]
[ { "id": 0, "type": "column", "value": "annual_revenue" }, { "id": 1, "type": "table", "value": "shipment" }, { "id": 2, "type": "table", "value": "customer" }, { "id": 3, "type": "column", "value": "ship_id" }, { "id": 5, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 10 ] ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
11,012
inn_1
spider:train_spider.json:2632
Find the name and id of the top 3 expensive rooms.
SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;
[ "Find", "the", "name", "and", "i", "d", "of", "the", "top", "3", "expensive", "rooms", "." ]
[ { "id": 3, "type": "column", "value": "baseprice" }, { "id": 2, "type": "column", "value": "roomname" }, { "id": 1, "type": "column", "value": "roomid" }, { "id": 0, "type": "table", "value": "rooms" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
11,013
products_gen_characteristics
spider:train_spider.json:5588
Find the product names that are colored 'white' but do not have unit of measurement "Handful".
SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = "white" AND t2.unit_of_measure != "Handful"
[ "Find", "the", "product", "names", "that", "are", "colored", "'", "white", "'", "but", "do", "not", "have", "unit", "of", "measurement", "\"", "Handful", "\"", "." ]
[ { "id": 3, "type": "table", "value": "ref_product_categories" }, { "id": 9, "type": "column", "value": "product_category_code" }, { "id": 5, "type": "column", "value": "color_description" }, { "id": 7, "type": "column", "value": "unit_of_measure" }, { ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O" ]
11,014
retails
bird:train.json:6897
In 1997, how many orders were shipped via mail?
SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1997' AND l_shipmode = 'MAIL'
[ "In", "1997", ",", "how", "many", "orders", "were", "shipped", "via", "mail", "?" ]
[ { "id": 1, "type": "column", "value": "l_orderkey" }, { "id": 3, "type": "column", "value": "l_shipmode" }, { "id": 6, "type": "column", "value": "l_shipdate" }, { "id": 0, "type": "table", "value": "lineitem" }, { "id": 2, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, "...
[ "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
11,015
student_loan
bird:train.json:4563
How many of the unemployed students are disabled?
SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name
[ "How", "many", "of", "the", "unemployed", "students", "are", "disabled", "?" ]
[ { "id": 0, "type": "table", "value": "unemployed" }, { "id": 1, "type": "table", "value": "disabled" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O" ]
11,016
mondial_geo
bird:train.json:8376
What's the name of the second biggest desert?
SELECT Name FROM desert ORDER BY Area DESC LIMIT 1, 1
[ "What", "'s", "the", "name", "of", "the", "second", "biggest", "desert", "?" ]
[ { "id": 0, "type": "table", "value": "desert" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "area" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
11,017
tracking_grants_for_research
spider:train_spider.json:4385
What are the details for the projects which were launched by the organization with the most projects?
SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )
[ "What", "are", "the", "details", "for", "the", "projects", "which", "were", "launched", "by", "the", "organization", "with", "the", "most", "projects", "?" ]
[ { "id": 1, "type": "column", "value": "project_details" }, { "id": 2, "type": "column", "value": "organisation_id" }, { "id": 0, "type": "table", "value": "projects" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
11,018
region_building
bird:test.json:348
What are the names of regions in which there are no buildings?
SELECT Name FROM region WHERE Region_ID NOT IN (SELECT Region_ID FROM building)
[ "What", "are", "the", "names", "of", "regions", "in", "which", "there", "are", "no", "buildings", "?" ]
[ { "id": 2, "type": "column", "value": "region_id" }, { "id": 3, "type": "table", "value": "building" }, { "id": 0, "type": "table", "value": "region" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
11,019
law_episode
bird:train.json:1269
How many times is the number of keywords in "Refuge: Part 1" episode than "Shield" episode?
SELECT CAST(SUM(CASE WHEN T1.title = 'Refuge: Part 1' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.title = 'Shield' THEN 1 ELSE 0 END) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id
[ "How", "many", "times", "is", "the", "number", "of", "keywords", "in", "\"", "Refuge", ":", "Part", "1", "\"", "episode", "than", "\"", "Shield", "\"", "episode", "?" ]
[ { "id": 7, "type": "value", "value": "Refuge: Part 1" }, { "id": 2, "type": "column", "value": "episode_id" }, { "id": 0, "type": "table", "value": "episode" }, { "id": 1, "type": "table", "value": "keyword" }, { "id": 6, "type": "value", "...
[ { "entity_id": 0, "token_idxs": [ 20 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O" ]
11,020
gymnast
spider:train_spider.json:1746
What are the names of gymnasts?
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID
[ "What", "are", "the", "names", "of", "gymnasts", "?" ]
[ { "id": 3, "type": "column", "value": "gymnast_id" }, { "id": 4, "type": "column", "value": "people_id" }, { "id": 1, "type": "table", "value": "gymnast" }, { "id": 2, "type": "table", "value": "people" }, { "id": 0, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]