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
5,264
app_store
bird:train.json:2529
Which of the app is the best selling app and what is the sentiments polarity of it?
SELECT T1.App, T2.Sentiment_Polarity FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App ORDER BY T1.Price * CAST(REPLACE(REPLACE(Installs, ',', ''), '+', '') AS INTEGER) DESC LIMIT 1
[ "Which", "of", "the", "app", "is", "the", "best", "selling", "app", "and", "what", "is", "the", "sentiments", "polarity", "of", "it", "?" ]
[ { "id": 1, "type": "column", "value": "sentiment_polarity" }, { "id": 3, "type": "table", "value": "user_reviews" }, { "id": 2, "type": "table", "value": "playstore" }, { "id": 6, "type": "column", "value": "installs" }, { "id": 4, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 13, 14 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O" ]
5,265
film_rank
spider:train_spider.json:4151
What are the titles and studios of films that have been produced by a studio whose name contains "Universal"?
SELECT title , Studio FROM film WHERE Studio LIKE "%Universal%"
[ "What", "are", "the", "titles", "and", "studios", "of", "films", "that", "have", "been", "produced", "by", "a", "studio", "whose", "name", "contains", "\"", "Universal", "\"", "?" ]
[ { "id": 3, "type": "column", "value": "%Universal%" }, { "id": 2, "type": "column", "value": "studio" }, { "id": 1, "type": "column", "value": "title" }, { "id": 0, "type": "table", "value": "film" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 19 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
5,266
university
bird:train.json:8104
Show the name of the university with the lowest number of students in 2015.
SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2015 ORDER BY T1.num_students ASC LIMIT 1
[ "Show", "the", "name", "of", "the", "university", "with", "the", "lowest", "number", "of", "students", "in", "2015", "." ]
[ { "id": 0, "type": "column", "value": "university_name" }, { "id": 1, "type": "table", "value": "university_year" }, { "id": 6, "type": "column", "value": "university_id" }, { "id": 5, "type": "column", "value": "num_students" }, { "id": 2, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
5,267
ice_hockey_draft
bird:train.json:6922
Among the players that weigh more than 90 kg, what is the name of the player that has the most attendance in the player's first 7 years of NHL career?
SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.sum_7yr_GP = ( SELECT MAX(T1.sum_7yr_GP) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 )
[ "Among", "the", "players", "that", "weigh", "more", "than", "90", "kg", ",", "what", "is", "the", "name", "of", "the", "player", "that", "has", "the", "most", "attendance", "in", "the", "player", "'s", "first", "7", "years", "of", "NHL", "career", "?" ...
[ { "id": 5, "type": "column", "value": "weight_in_kg" }, { "id": 2, "type": "table", "value": "weight_info" }, { "id": 0, "type": "column", "value": "playername" }, { "id": 1, "type": "table", "value": "playerinfo" }, { "id": 7, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 24 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,268
cookbook
bird:train.json:8907
How many ingredients are needed to prepare Idaho Potato Supreme?
SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Idaho Potato Supreme'
[ "How", "many", "ingredients", "are", "needed", "to", "prepare", "Idaho", "Potato", "Supreme", "?" ]
[ { "id": 3, "type": "value", "value": "Idaho Potato Supreme" }, { "id": 4, "type": "column", "value": "recipe_id" }, { "id": 1, "type": "table", "value": "quantity" }, { "id": 0, "type": "table", "value": "recipe" }, { "id": 2, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "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", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
5,269
codebase_comments
bird:train.json:660
What is the percentage of solutions for the method that needs to be compiled in the English methods?
SELECT CAST(SUM(CASE WHEN T1.WasCompiled = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Lang) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'en'
[ "What", "is", "the", "percentage", "of", "solutions", "for", "the", "method", "that", "needs", "to", "be", "compiled", "in", "the", "English", "methods", "?" ]
[ { "id": 9, "type": "column", "value": "wascompiled" }, { "id": 5, "type": "column", "value": "solutionid" }, { "id": 0, "type": "table", "value": "solution" }, { "id": 1, "type": "table", "value": "method" }, { "id": 2, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
5,270
store_1
spider:train_spider.json:635
List the name of all tracks in the playlists of Movies.
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";
[ "List", "the", "name", "of", "all", "tracks", "in", "the", "playlists", "of", "Movies", "." ]
[ { "id": 4, "type": "table", "value": "playlist_tracks" }, { "id": 6, "type": "column", "value": "playlist_id" }, { "id": 1, "type": "table", "value": "playlists" }, { "id": 7, "type": "column", "value": "track_id" }, { "id": 2, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-COLUMN", "O" ]
5,271
chicago_crime
bird:train.json:8744
What is the percentage of crime cases that have been classified as "drug abuse" by the FBI and happened on the street?
SELECT CAST(SUM(CASE WHEN T2.title = 'Drug Abuse' AND T1.location_description = 'STREET' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.fbi_code_no) FROM Crime AS T1 INNER JOIN FBI_Code AS T2 ON T1.fbi_code_no = T2.fbi_code_no
[ "What", "is", "the", "percentage", "of", "crime", "cases", "that", "have", "been", "classified", "as", "\"", "drug", "abuse", "\"", "by", "the", "FBI", "and", "happened", "on", "the", "street", "?" ]
[ { "id": 8, "type": "column", "value": "location_description" }, { "id": 2, "type": "column", "value": "fbi_code_no" }, { "id": 7, "type": "value", "value": "Drug Abuse" }, { "id": 1, "type": "table", "value": "fbi_code" }, { "id": 9, "type": "v...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
5,272
talkingdata
bird:train.json:1118
Among the female users that uses OPPO as their phone brand, what is the percentage of them of the user that uses R815T model to install the app?
SELECT SUM(IIF(T1.phone_brand = 'OPPO', 1, 0)) / SUM(IIF(T1.device_id = 'R815T', 1, 0)) AS num FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T2.gender = 'F'
[ "Among", "the", "female", "users", "that", "uses", "OPPO", "as", "their", "phone", "brand", ",", "what", "is", "the", "percentage", "of", "them", "of", "the", "user", "that", "uses", "R815", "T", "model", "to", "install", "the", "app", "?" ]
[ { "id": 0, "type": "table", "value": "phone_brand_device_model2" }, { "id": 7, "type": "column", "value": "phone_brand" }, { "id": 1, "type": "table", "value": "gender_age" }, { "id": 4, "type": "column", "value": "device_id" }, { "id": 2, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O" ]
5,273
law_episode
bird:train.json:1287
In which organization did Constantine Makris win the most awards?
SELECT T2.organization FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T1.name = 'Constantine Makris' AND T2.result = 'Winner' GROUP BY T2.organization ORDER BY COUNT(T2.award_id) DESC LIMIT 1
[ "In", "which", "organization", "did", "Constantine", "Makris", "win", "the", "most", "awards", "?" ]
[ { "id": 5, "type": "value", "value": "Constantine Makris" }, { "id": 0, "type": "column", "value": "organization" }, { "id": 3, "type": "column", "value": "person_id" }, { "id": 8, "type": "column", "value": "award_id" }, { "id": 1, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "B-VALUE", "O", "O", "B-TABLE", "O" ]
5,274
food_inspection_2
bird:train.json:6204
Calculate the average salary for employees who did inspection on License Re-Inspection.
SELECT AVG(T2.salary) FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T1.inspection_type = 'License Re-Inspection'
[ "Calculate", "the", "average", "salary", "for", "employees", "who", "did", "inspection", "on", "License", "Re", "-", "Inspection", "." ]
[ { "id": 3, "type": "value", "value": "License Re-Inspection" }, { "id": 2, "type": "column", "value": "inspection_type" }, { "id": 5, "type": "column", "value": "employee_id" }, { "id": 0, "type": "table", "value": "inspection" }, { "id": 1, "t...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10, 11, 12 ] }, { "entity_id": 4, "token_idxs": [ 3 ]...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O" ]
5,275
customer_deliveries
spider:train_spider.json:2850
Find the names and phone numbers of customers living in California state.
SELECT t1.customer_name , t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'
[ "Find", "the", "names", "and", "phone", "numbers", "of", "customers", "living", "in", "California", "state", "." ]
[ { "id": 3, "type": "column", "value": "state_province_county" }, { "id": 6, "type": "table", "value": "customer_addresses" }, { "id": 1, "type": "column", "value": "customer_phone" }, { "id": 0, "type": "column", "value": "customer_name" }, { "id":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, "token_idxs": [ 7 ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O" ]
5,276
works_cycles
bird:train.json:7358
Where are the shelves where the down tube product was stored?
SELECT T2.Shelf FROM Product AS T1 INNER JOIN ProductInventory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Down Tube'
[ "Where", "are", "the", "shelves", "where", "the", "down", "tube", "product", "was", "stored", "?" ]
[ { "id": 2, "type": "table", "value": "productinventory" }, { "id": 4, "type": "value", "value": "Down Tube" }, { "id": 5, "type": "column", "value": "productid" }, { "id": 1, "type": "table", "value": "product" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6, 7 ] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "B-TABLE", "O", "O", "O" ]
5,277
movielens
bird:train.json:2316
What is the disparate number of the comedy films that got the 1 rating?
SELECT COUNT(DISTINCT T1.movieid) FROM movies2directors AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T2.rating = 1 AND T1.genre = 'comedy'
[ "What", "is", "the", "disparate", "number", "of", "the", "comedy", "films", "that", "got", "the", "1", "rating", "?" ]
[ { "id": 0, "type": "table", "value": "movies2directors" }, { "id": 2, "type": "column", "value": "movieid" }, { "id": 1, "type": "table", "value": "u2base" }, { "id": 3, "type": "column", "value": "rating" }, { "id": 6, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
5,278
synthea
bird:train.json:1417
Provide at least 5 social security numbers of patients with a prevalent disease with a prevalence percentage lower than 30% of the average prevalence percentage of conditions.
SELECT DISTINCT T2.ssn FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN all_prevalences AS T3 ON lower(T1.DESCRIPTION) = lower(T3.ITEM) WHERE CAST(T3."PREVALENCE PERCENTAGE" AS REAL) * 100 / ( SELECT AVG('PREVALENCE PERCENTAGE') FROM all_prevalences ) < 30 LIMIT 5
[ "Provide", "at", "least", "5", "social", "security", "numbers", "of", "patients", "with", "a", "prevalent", "disease", "with", "a", "prevalence", "percentage", "lower", "than", "30", "%", "of", "the", "average", "prevalence", "percentage", "of", "conditions", ...
[ { "id": 9, "type": "column", "value": "PREVALENCE PERCENTAGE" }, { "id": 10, "type": "value", "value": "PREVALENCE PERCENTAGE" }, { "id": 1, "type": "table", "value": "all_prevalences" }, { "id": 6, "type": "column", "value": "description" }, { "id...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14, 15 ] }, { "entity_id": 2, "token_idxs": [ 19 ] }, { "entity_id": 3, "token_idxs": [ 27 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-TABLE", "O" ]
5,280
movie_platform
bird:train.json:7
What is the percentage of the ratings were rated by user who was a subcriber?
SELECT CAST(SUM(CASE WHEN user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings
[ "What", "is", "the", "percentage", "of", "the", "ratings", "were", "rated", "by", "user", "who", "was", "a", "subcriber", "?" ]
[ { "id": 4, "type": "column", "value": "user_subscriber" }, { "id": 0, "type": "table", "value": "ratings" }, { "id": 1, "type": "value", "value": "100" }, { "id": 2, "type": "value", "value": "0" }, { "id": 3, "type": "value", "value": "1" ...
[ { "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": [ 14 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,281
student_assessment
spider:train_spider.json:88
What are the ids of the students who registered for course 301?
SELECT student_id FROM student_course_attendance WHERE course_id = 301
[ "What", "are", "the", "ids", "of", "the", "students", "who", "registered", "for", "course", "301", "?" ]
[ { "id": 0, "type": "table", "value": "student_course_attendance" }, { "id": 1, "type": "column", "value": "student_id" }, { "id": 2, "type": "column", "value": "course_id" }, { "id": 3, "type": "value", "value": "301" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
5,282
computer_student
bird:train.json:994
Among the courses that are basic or medium undergraduate courses, how many of them are taught by a faculty member?
SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1 AND T1.courseLevel = 'Level_300'
[ "Among", "the", "courses", "that", "are", "basic", "or", "medium", "undergraduate", "courses", ",", "how", "many", "of", "them", "are", "taught", "by", "a", "faculty", "member", "?" ]
[ { "id": 6, "type": "column", "value": "courselevel" }, { "id": 4, "type": "column", "value": "professor" }, { "id": 7, "type": "value", "value": "Level_300" }, { "id": 8, "type": "column", "value": "course_id" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 16, 17 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O" ]
5,283
warehouse_1
bird:test.json:1700
What are the different contents in boxes?
SELECT DISTINCT CONTENTS FROM boxes
[ "What", "are", "the", "different", "contents", "in", "boxes", "?" ]
[ { "id": 1, "type": "column", "value": "contents" }, { "id": 0, "type": "table", "value": "boxes" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
5,284
simpson_episodes
bird:train.json:4292
Who did "The Tiny Canadian" play as in the show?
SELECT T2.role FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.nickname = 'The Tiny Canadian';
[ "Who", "did", "\"", "The", "Tiny", "Canadian", "\"", "play", "as", "in", "the", "show", "?" ]
[ { "id": 4, "type": "value", "value": "The Tiny Canadian" }, { "id": 3, "type": "column", "value": "nickname" }, { "id": 1, "type": "table", "value": "person" }, { "id": 2, "type": "table", "value": "credit" }, { "id": 6, "type": "column", "...
[ { "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": [ 3, 4, 5 ] }, { "entity_id": 5, "token_id...
[ "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O" ]
5,285
european_football_2
bird:dev.json:1110
Tell the build Up play passing class for "FC Lorient" on 2010/2/22.
SELECT t2.buildUpPlayPassingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'FC Lorient' AND t2.`date` LIKE '2010-02-22%'
[ "Tell", "the", "build", "Up", "play", "passing", "class", "for", "\"", "FC", "Lorient", "\"", "on", "2010/2/22", "." ]
[ { "id": 0, "type": "column", "value": "buildupplaypassingclass" }, { "id": 2, "type": "table", "value": "team_attributes" }, { "id": 4, "type": "column", "value": "team_long_name" }, { "id": 3, "type": "column", "value": "team_api_id" }, { "id": 7,...
[ { "entity_id": 0, "token_idxs": [ 2, 3, 4, 5, 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "O" ]
5,286
decoration_competition
spider:train_spider.json:4485
List the names of members in ascending alphabetical order.
SELECT Name FROM member ORDER BY Name ASC
[ "List", "the", "names", "of", "members", "in", "ascending", "alphabetical", "order", "." ]
[ { "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": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
5,287
superstore
bird:train.json:2409
What is the total quantity that Cindy Stewart order "Lexmark X 9575 Professional All-in-One Color Printer" in the south superstore?
SELECT SUM(T1.Quantity) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Cindy Stewart' AND T3.`Product Name` = 'Lexmark X 9575 Professional All-in-One Color Printer'
[ "What", "is", "the", "total", "quantity", "that", "Cindy", "Stewart", "order", "\"", "Lexmark", "X", "9575", "Professional", "All", "-", "in", "-", "One", "Color", "Printer", "\"", "in", "the", "south", "superstore", "?" ]
[ { "id": 8, "type": "value", "value": "Lexmark X 9575 Professional All-in-One Color Printer" }, { "id": 2, "type": "table", "value": "south_superstore" }, { "id": 5, "type": "column", "value": "Customer Name" }, { "id": 6, "type": "value", "value": "Cindy S...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 24, 25 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
5,288
retail_complains
bird:train.json:296
In which region have the most 1-star reviews been done?
SELECT T3.Region FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.Stars = 1 GROUP BY T3.Region ORDER BY COUNT(T3.Region) DESC LIMIT 1
[ "In", "which", "region", "have", "the", "most", "1", "-", "star", "reviews", "been", "done", "?" ]
[ { "id": 6, "type": "column", "value": "state_abbrev" }, { "id": 8, "type": "column", "value": "district_id" }, { "id": 7, "type": "column", "value": "statecode" }, { "id": 5, "type": "table", "value": "district" }, { "id": 4, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "B-TABLE", "O", "O", "O" ]
5,289
soccer_2016
bird:train.json:1864
Among the players who were born in 1977, provide names and birthdates of the players from England.
SELECT T2.Player_Name, T2.DOB FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_Id WHERE T2.DOB LIKE '1977%' AND T1.Country_Name = 'England'
[ "Among", "the", "players", "who", "were", "born", "in", "1977", ",", "provide", "names", "and", "birthdates", "of", "the", "players", "from", "England", "." ]
[ { "id": 4, "type": "column", "value": "country_name" }, { "id": 0, "type": "column", "value": "player_name" }, { "id": 5, "type": "column", "value": "country_id" }, { "id": 2, "type": "table", "value": "country" }, { "id": 7, "type": "value", ...
[ { "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": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
5,290
e_learning
spider:train_spider.json:3804
Find the addresses of the course authors who teach the course with name "operating system" or "data structure".
SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "operating system" OR T2.course_name = "data structure"
[ "Find", "the", "addresses", "of", "the", "course", "authors", "who", "teach", "the", "course", "with", "name", "\"", "operating", "system", "\"", "or", "\"", "data", "structure", "\"", "." ]
[ { "id": 1, "type": "table", "value": "course_authors_and_tutors" }, { "id": 5, "type": "column", "value": "operating system" }, { "id": 0, "type": "column", "value": "address_line_1" }, { "id": 6, "type": "column", "value": "data structure" }, { "i...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 10, 11, 12 ] ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
5,291
european_football_2
bird:dev.json:1136
How many players had the highest potential score for crossing that preferred to use their left foots while attacking?
SELECT COUNT(t1.id) FROM Player_Attributes AS t1 WHERE t1.preferred_foot = 'left' AND t1.crossing = ( SELECT MAX(crossing) FROM Player_Attributes)
[ "How", "many", "players", "had", "the", "highest", "potential", "score", "for", "crossing", "that", "preferred", "to", "use", "their", "left", "foots", "while", "attacking", "?" ]
[ { "id": 0, "type": "table", "value": "player_attributes" }, { "id": 2, "type": "column", "value": "preferred_foot" }, { "id": 4, "type": "column", "value": "crossing" }, { "id": 3, "type": "value", "value": "left" }, { "id": 1, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entit...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "O" ]
5,292
flight_1
spider:train_spider.json:358
What are the aircrafts with top 3 shortest lengthes? List their names.
SELECT name FROM Aircraft ORDER BY distance LIMIT 3
[ "What", "are", "the", "aircrafts", "with", "top", "3", "shortest", "lengthes", "?", "List", "their", "names", "." ]
[ { "id": 0, "type": "table", "value": "aircraft" }, { "id": 2, "type": "column", "value": "distance" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,293
icfp_1
spider:train_spider.json:2883
List the titles of the papers whose authors are from the institution "Indiana University".
SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Indiana University"
[ "List", "the", "titles", "of", "the", "papers", "whose", "authors", "are", "from", "the", "institution", "\"", "Indiana", "University", "\"", "." ]
[ { "id": 3, "type": "column", "value": "Indiana University" }, { "id": 5, "type": "table", "value": "authorship" }, { "id": 7, "type": "column", "value": "paperid" }, { "id": 4, "type": "table", "value": "papers" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13, 14 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id...
[ "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
5,294
formula_1
bird:dev.json:942
What is the average fastest lap time in seconds for Lewis Hamilton in all the Formula_1 races?
SELECT AVG(CAST(SUBSTR(T2.fastestLapTime, 1, INSTR(T2.fastestLapTime, ':') - 1) AS INTEGER) * 60 + CAST(SUBSTR(T2.fastestLapTime, INSTR(T2.fastestLapTime, ':') + 1) AS REAL)) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.surname = 'Hamilton' AND T1.forename = 'Lewis'
[ "What", "is", "the", "average", "fastest", "lap", "time", "in", "seconds", "for", "Lewis", "Hamilton", "in", "all", "the", "Formula_1", "races", "?" ]
[ { "id": 8, "type": "column", "value": "fastestlaptime" }, { "id": 2, "type": "column", "value": "driverid" }, { "id": 4, "type": "value", "value": "Hamilton" }, { "id": 5, "type": "column", "value": "forename" }, { "id": 0, "type": "table", ...
[ { "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": [ 11 ] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "O", "O" ]
5,295
talkingdata
bird:train.json:1145
What is the brand of the device used by the most users in the M23-26 user group?
SELECT T.phone_brand FROM ( SELECT T2.phone_brand, COUNT(T1.device_id) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.`group` = 'M23-26' GROUP BY T2.phone_brand ) AS T ORDER BY T.num DESC LIMIT 1
[ "What", "is", "the", "brand", "of", "the", "device", "used", "by", "the", "most", "users", "in", "the", "M23", "-", "26", "user", "group", "?" ]
[ { "id": 3, "type": "table", "value": "phone_brand_device_model2" }, { "id": 0, "type": "column", "value": "phone_brand" }, { "id": 2, "type": "table", "value": "gender_age" }, { "id": 6, "type": "column", "value": "device_id" }, { "id": 5, "typ...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 18 ] }, { "entity_id": 5, "tok...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "B-COLUMN", "O" ]
5,296
language_corpus
bird:train.json:5789
How many pages does the Catalan language have in Wikipedia?
SELECT pages FROM langs WHERE lang = 'ca'
[ "How", "many", "pages", "does", "the", "Catalan", "language", "have", "in", "Wikipedia", "?" ]
[ { "id": 0, "type": "table", "value": "langs" }, { "id": 1, "type": "column", "value": "pages" }, { "id": 2, "type": "column", "value": "lang" }, { "id": 3, "type": "value", "value": "ca" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
5,297
aan_1
bird:test.json:1047
Find the number of authors who did not publish any paper that is cited more than 50 times.
SELECT count(*) FROM Author WHERE Author_id NOT IN ( SELECT T2.author_id FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id GROUP BY T1.cited_paper_id HAVING count(DISTINCT T1.paper_id) > 50)
[ "Find", "the", "number", "of", "authors", "who", "did", "not", "publish", "any", "paper", "that", "is", "cited", "more", "than", "50", "times", "." ]
[ { "id": 2, "type": "column", "value": "cited_paper_id" }, { "id": 4, "type": "table", "value": "author_list" }, { "id": 1, "type": "column", "value": "author_id" }, { "id": 3, "type": "table", "value": "citation" }, { "id": 6, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 16 ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
5,298
cre_Students_Information_Systems
bird:test.json:499
Which teachers have taught the student with the earliest transcript issuance? List the teacher details.
SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id JOIN Transcripts AS T3 ON T2.student_id = T3.student_id ORDER BY T3.date_of_transcript ASC LIMIT 1
[ "Which", "teachers", "have", "taught", "the", "student", "with", "the", "earliest", "transcript", "issuance", "?", "List", "the", "teacher", "details", "." ]
[ { "id": 2, "type": "column", "value": "date_of_transcript" }, { "id": 0, "type": "column", "value": "teacher_details" }, { "id": 1, "type": "table", "value": "transcripts" }, { "id": 5, "type": "column", "value": "student_id" }, { "id": 6, "typ...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
5,299
music_4
spider:train_spider.json:6178
What are the famous titles and ages of each artist, listed in descending order by age?
SELECT Famous_Title , Age FROM artist ORDER BY Age DESC
[ "What", "are", "the", "famous", "titles", "and", "ages", "of", "each", "artist", ",", "listed", "in", "descending", "order", "by", "age", "?" ]
[ { "id": 1, "type": "column", "value": "famous_title" }, { "id": 0, "type": "table", "value": "artist" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,300
loan_1
spider:train_spider.json:3058
For each state, find the total account balance of customers whose credit score is above 100.
SELECT sum(acc_bal) , state FROM customer WHERE credit_score > 100 GROUP BY state
[ "For", "each", "state", ",", "find", "the", "total", "account", "balance", "of", "customers", "whose", "credit", "score", "is", "above", "100", "." ]
[ { "id": 2, "type": "column", "value": "credit_score" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 4, "type": "column", "value": "acc_bal" }, { "id": 1, "type": "column", "value": "state" }, { "id": 3, "type": "value", "valu...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 12, 13 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, {...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O" ]
5,301
allergy_1
spider:train_spider.json:452
How many animal type allergies exist?
SELECT count(*) FROM Allergy_type WHERE allergytype = "animal"
[ "How", "many", "animal", "type", "allergies", "exist", "?" ]
[ { "id": 0, "type": "table", "value": "allergy_type" }, { "id": 1, "type": "column", "value": "allergytype" }, { "id": 2, "type": "column", "value": "animal" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "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", "B-COLUMN", "O", "O" ]
5,302
thrombosis_prediction
bird:dev.json:1176
What was the anti-nucleus antibody concentration level for the patient id 3605340 on 1996/12/2?
SELECT ANA FROM Examination WHERE ID = 3605340 AND `Examination Date` = '1996-12-02'
[ "What", "was", "the", "anti", "-", "nucleus", "antibody", "concentration", "level", "for", "the", "patient", "i", "d", "3605340", "on", "1996/12/2", "?" ]
[ { "id": 4, "type": "column", "value": "Examination Date" }, { "id": 0, "type": "table", "value": "examination" }, { "id": 5, "type": "value", "value": "1996-12-02" }, { "id": 3, "type": "value", "value": "3605340" }, { "id": 1, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12, 13 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "B-VALUE", "O" ]
5,303
authors
bird:train.json:3612
List all the title of the paper that Jianli Hua published.
SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Jianli Hua'
[ "List", "all", "the", "title", "of", "the", "paper", "that", "Jianli", "Hua", "published", "." ]
[ { "id": 2, "type": "table", "value": "paperauthor" }, { "id": 4, "type": "value", "value": "Jianli Hua" }, { "id": 6, "type": "column", "value": "paperid" }, { "id": 0, "type": "column", "value": "title" }, { "id": 1, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8, 9 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "B-VALUE", "I-VALUE", "O", "O" ]
5,304
college_3
spider:train_spider.json:4703
Find the names of courses that have either 3 credits or 1 credit but 4 hours.
SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4
[ "Find", "the", "names", "of", "courses", "that", "have", "either", "3", "credits", "or", "1", "credit", "but", "4", "hours", "." ]
[ { "id": 2, "type": "column", "value": "credits" }, { "id": 0, "type": "table", "value": "course" }, { "id": 1, "type": "column", "value": "cname" }, { "id": 5, "type": "column", "value": "hours" }, { "id": 3, "type": "value", "value": "3" ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
5,305
sports_competition
spider:train_spider.json:3337
How many clubs are there?
SELECT count(*) FROM club
[ "How", "many", "clubs", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "club" } ]
[ { "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" ]
5,306
sports_competition
spider:train_spider.json:3376
What is the total number of points for all players?
SELECT sum(Points) FROM player
[ "What", "is", "the", "total", "number", "of", "points", "for", "all", "players", "?" ]
[ { "id": 0, "type": "table", "value": "player" }, { "id": 1, "type": "column", "value": "points" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
5,307
products_for_hire
spider:train_spider.json:1963
What are the id and the amount of refund of the booking that incurred the most times of payments?
SELECT T1.booking_id , T1.amount_of_refund FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id = T2.booking_id GROUP BY T1.booking_id ORDER BY count(*) DESC LIMIT 1
[ "What", "are", "the", "i", "d", "and", "the", "amount", "of", "refund", "of", "the", "booking", "that", "incurred", "the", "most", "times", "of", "payments", "?" ]
[ { "id": 1, "type": "column", "value": "amount_of_refund" }, { "id": 0, "type": "column", "value": "booking_id" }, { "id": 2, "type": "table", "value": "bookings" }, { "id": 3, "type": "table", "value": "payments" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7, 8, 9 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 19 ] }, { "entity_id": 4, "token_idxs": [] }, { "...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
5,308
book_press
bird:test.json:1976
Find the press whose yearly profit is more than 15 billion or whose monthly profit is more than 1 billion. Return the press names.
SELECT name FROM press WHERE Year_Profits_billion > 15 OR Month_Profits_billion > 1
[ "Find", "the", "press", "whose", "yearly", "profit", "is", "more", "than", "15", "billion", "or", "whose", "monthly", "profit", "is", "more", "than", "1", "billion", ".", "Return", "the", "press", "names", "." ]
[ { "id": 4, "type": "column", "value": "month_profits_billion" }, { "id": 2, "type": "column", "value": "year_profits_billion" }, { "id": 0, "type": "table", "value": "press" }, { "id": 1, "type": "column", "value": "name" }, { "id": 3, "type": ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 24 ] }, { "entity_id": 2, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,309
csu_1
spider:train_spider.json:2346
Which year has the most degrees conferred?
SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1
[ "Which", "year", "has", "the", "most", "degrees", "conferred", "?" ]
[ { "id": 0, "type": "table", "value": "degrees" }, { "id": 2, "type": "column", "value": "degrees" }, { "id": 1, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O" ]
5,311
mondial_geo
bird:train.json:8381
What is the capital of the country that has the Licancabur Mountain?
SELECT T4.Capital FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN country AS T4 ON T4.Province = T3.Name WHERE T1.Name = 'Licancabur'
[ "What", "is", "the", "capital", "of", "the", "country", "that", "has", "the", "Licancabur", "Mountain", "?" ]
[ { "id": 7, "type": "table", "value": "geo_mountain" }, { "id": 3, "type": "value", "value": "Licancabur" }, { "id": 4, "type": "table", "value": "province" }, { "id": 5, "type": "column", "value": "province" }, { "id": 6, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
5,312
financial
bird:dev.json:130
How many of the account holders in South Bohemia still do not own credit cards?
SELECT COUNT(T3.account_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.client_id = T3.client_id WHERE T1.A3 = 'south Bohemia' AND T3.type != 'OWNER'
[ "How", "many", "of", "the", "account", "holders", "in", "South", "Bohemia", "still", "do", "not", "own", "credit", "cards", "?" ]
[ { "id": 6, "type": "value", "value": "south Bohemia" }, { "id": 9, "type": "column", "value": "district_id" }, { "id": 1, "type": "column", "value": "account_id" }, { "id": 4, "type": "column", "value": "client_id" }, { "id": 2, "type": "table"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "O", "O", "O" ]
5,314
debit_card_specializing
bird:dev.json:1529
What is the amount spent by customer "38508" at the gas stations? How much had the customer spent in January 2012?
SELECT SUM(T1.Price) , SUM(IIF(T3.Date = '201201', T1.Price, 0)) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN yearmonth AS T3 ON T1.CustomerID = T3.CustomerID WHERE T1.CustomerID = '38508'
[ "What", "is", "the", "amount", "spent", "by", "customer", "\"", "38508", "\"", "at", "the", "gas", "stations", "?", "How", "much", "had", "the", "customer", "spent", "in", "January", "2012", "?" ]
[ { "id": 4, "type": "table", "value": "transactions_1k" }, { "id": 7, "type": "column", "value": "gasstationid" }, { "id": 5, "type": "table", "value": "gasstations" }, { "id": 1, "type": "column", "value": "customerid" }, { "id": 0, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
5,315
book_2
spider:train_spider.json:231
What is the number of distinct publication dates?
SELECT COUNT (DISTINCT Publication_Date) FROM publication
[ "What", "is", "the", "number", "of", "distinct", "publication", "dates", "?" ]
[ { "id": 1, "type": "column", "value": "publication_date" }, { "id": 0, "type": "table", "value": "publication" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "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", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
5,316
simpson_episodes
bird:train.json:4190
What is the title of episode that won the Best International TV Series Award in 2017?
SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2017' AND T1.award = 'Best International TV Series' AND T1.result = 'Winner';
[ "What", "is", "the", "title", "of", "episode", "that", "won", "the", "Best", "International", "TV", "Series", "Award", "in", "2017", "?" ]
[ { "id": 6, "type": "value", "value": "Best International TV Series" }, { "id": 3, "type": "column", "value": "episode_id" }, { "id": 2, "type": "table", "value": "episode" }, { "id": 7, "type": "column", "value": "result" }, { "id": 8, "type": ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "O", "B-VALUE", "O" ]
5,317
customers_and_orders
bird:test.json:253
What is the name of the most expensive product with type Clothes?
SELECT product_name FROM Products WHERE product_type_code = "Clothes" ORDER BY product_price DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "most", "expensive", "product", "with", "type", "Clothes", "?" ]
[ { "id": 2, "type": "column", "value": "product_type_code" }, { "id": 4, "type": "column", "value": "product_price" }, { "id": 1, "type": "column", "value": "product_name" }, { "id": 0, "type": "table", "value": "products" }, { "id": 3, "type": ...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O" ]
5,318
body_builder
spider:train_spider.json:1162
What are the names of body builders in descending order of total scores?
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC
[ "What", "are", "the", "names", "of", "body", "builders", "in", "descending", "order", "of", "total", "scores", "?" ]
[ { "id": 1, "type": "table", "value": "body_builder" }, { "id": 4, "type": "column", "value": "people_id" }, { "id": 2, "type": "table", "value": "people" }, { "id": 3, "type": "column", "value": "total" }, { "id": 0, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
5,319
e_learning
spider:train_spider.json:3828
What are the enrollment dates of all the tests that have result "Pass"?
SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass"
[ "What", "are", "the", "enrollment", "dates", "of", "all", "the", "tests", "that", "have", "result", "\"", "Pass", "\"", "?" ]
[ { "id": 1, "type": "table", "value": "student_course_enrolment" }, { "id": 2, "type": "table", "value": "student_tests_taken" }, { "id": 0, "type": "column", "value": "date_of_enrolment" }, { "id": 5, "type": "column", "value": "registration_id" }, { ...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
5,320
superhero
bird:dev.json:835
Among all superheroes in Marvel Comics, identify the percentage of 'good' superheroes.
SELECT CAST(COUNT(CASE WHEN T3.alignment = 'Good' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN alignment AS T3 ON T1.alignment_id = T3.id WHERE T2.publisher_name = 'Marvel Comics'
[ "Among", "all", "superheroes", "in", "Marvel", "Comics", ",", "identify", "the", "percentage", "of", "'", "good", "'", "superheroes", "." ]
[ { "id": 1, "type": "column", "value": "publisher_name" }, { "id": 2, "type": "value", "value": "Marvel Comics" }, { "id": 5, "type": "column", "value": "alignment_id" }, { "id": 8, "type": "column", "value": "publisher_id" }, { "id": 0, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4, 5 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O" ]
5,321
allergy_1
spider:train_spider.json:514
Which allergy is the most common?
SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1
[ "Which", "allergy", "is", "the", "most", "common", "?" ]
[ { "id": 0, "type": "table", "value": "has_allergy" }, { "id": 1, "type": "column", "value": "allergy" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
5,322
cre_Docs_and_Epenses
spider:train_spider.json:6429
What is the document type name and the document type description and creation date for all the documents?
SELECT T1.document_type_name , T1.document_type_description , T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code
[ "What", "is", "the", "document", "type", "name", "and", "the", "document", "type", "description", "and", "creation", "date", "for", "all", "the", "documents", "?" ]
[ { "id": 1, "type": "column", "value": "document_type_description" }, { "id": 0, "type": "column", "value": "document_type_name" }, { "id": 3, "type": "table", "value": "ref_document_types" }, { "id": 5, "type": "column", "value": "document_type_code" }, ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
5,323
codebase_comments
bird:train.json:658
Please provide the path of solution of method whose full comment is Feeds data into the parser.
SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.FullComment = 'Feeds data into the parser'
[ "Please", "provide", "the", "path", "of", "solution", "of", "method", "whose", "full", "comment", "is", "Feeds", "data", "into", "the", "parser", "." ]
[ { "id": 4, "type": "value", "value": "Feeds data into the parser" }, { "id": 3, "type": "column", "value": "fullcomment" }, { "id": 6, "type": "column", "value": "solutionid" }, { "id": 1, "type": "table", "value": "solution" }, { "id": 2, "typ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 12, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
5,324
regional_sales
bird:train.json:2723
In the West, how many stores are there in the city whose land area is below 20,000,000?
SELECT SUM(CASE WHEN T1.Region = 'West' AND T2.`Land Area` < 20000000 THEN 1 ELSE 0 END) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode
[ "In", "the", "West", ",", "how", "many", "stores", "are", "there", "in", "the", "city", "whose", "land", "area", "is", "below", "20,000,000", "?" ]
[ { "id": 1, "type": "table", "value": "Store Locations" }, { "id": 2, "type": "column", "value": "statecode" }, { "id": 7, "type": "column", "value": "Land Area" }, { "id": 8, "type": "value", "value": "20000000" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6, 7, 8, 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-VALUE", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "I-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O" ]
5,325
soccer_2016
bird:train.json:1793
What is the bowling skill of SC Ganguly?
SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id WHERE T2.Player_Name = 'SC Ganguly'
[ "What", "is", "the", "bowling", "skill", "of", "SC", "Ganguly", "?" ]
[ { "id": 0, "type": "column", "value": "bowling_skill" }, { "id": 1, "type": "table", "value": "bowling_style" }, { "id": 3, "type": "column", "value": "player_name" }, { "id": 4, "type": "value", "value": "SC Ganguly" }, { "id": 5, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6, 7 ] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
5,326
formula_1
bird:dev.json:983
Which of the Italian constructor got the highest point to date? Give its introduction website?
SELECT T1.url FROM constructors AS T1 INNER JOIN constructorStandings AS T2 on T1.constructorId = T2.constructorId WHERE T1.nationality = 'Italian' ORDER BY T2.points DESC LIMIT 1
[ "Which", "of", "the", "Italian", "constructor", "got", "the", "highest", "point", "to", "date", "?", "Give", "its", "introduction", "website", "?" ]
[ { "id": 2, "type": "table", "value": "constructorstandings" }, { "id": 6, "type": "column", "value": "constructorid" }, { "id": 1, "type": "table", "value": "constructors" }, { "id": 3, "type": "column", "value": "nationality" }, { "id": 4, "ty...
[ { "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": [ 3 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,327
sales
bird:train.json:5430
Give the product ID and name of the product with the highest prices among the quantity ranges from 400 to 500.
SELECT T1.ProductID, T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity BETWEEN 400 AND 500 ORDER BY T1.Price DESC LIMIT 1
[ "Give", "the", "product", "ID", "and", "name", "of", "the", "product", "with", "the", "highest", "prices", "among", "the", "quantity", "ranges", "from", "400", "to", "500", "." ]
[ { "id": 0, "type": "column", "value": "productid" }, { "id": 2, "type": "table", "value": "products" }, { "id": 4, "type": "column", "value": "quantity" }, { "id": 3, "type": "table", "value": "sales" }, { "id": 7, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
5,328
epinions_1
spider:train_spider.json:1701
Find the titles of items that received any rating below 5.
SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5
[ "Find", "the", "titles", "of", "items", "that", "received", "any", "rating", "below", "5", "." ]
[ { "id": 2, "type": "table", "value": "review" }, { "id": 3, "type": "column", "value": "rating" }, { "id": 0, "type": "column", "value": "title" }, { "id": 1, "type": "table", "value": "item" }, { "id": 5, "type": "column", "value": "i_id" ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
5,329
movies_4
bird:train.json:493
What is the genre of the movie title with the lowest revenue generated?
SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id ORDER BY T1.revenue LIMIT 1
[ "What", "is", "the", "genre", "of", "the", "movie", "title", "with", "the", "lowest", "revenue", "generated", "?" ]
[ { "id": 4, "type": "table", "value": "movie_genres" }, { "id": 0, "type": "column", "value": "genre_name" }, { "id": 5, "type": "column", "value": "genre_id" }, { "id": 6, "type": "column", "value": "movie_id" }, { "id": 2, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
5,330
simpson_episodes
bird:train.json:4253
Please indicate the keywords of the title "Double, Double, Boy in Trouble".
SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Double, Double, Boy in Trouble';
[ "Please", "indicate", "the", "keywords", "of", "the", "title", "\"", "Double", ",", "Double", ",", "Boy", "in", "Trouble", "\"", "." ]
[ { "id": 4, "type": "value", "value": "Double, Double, Boy in Trouble" }, { "id": 5, "type": "column", "value": "episode_id" }, { "id": 0, "type": "column", "value": "keyword" }, { "id": 1, "type": "table", "value": "episode" }, { "id": 2, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 8, 9, 10, 11, 12, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
5,331
insurance_policies
spider:train_spider.json:3883
Compute the total amount of payment processed.
SELECT sum(Amount_Payment) FROM Payments
[ "Compute", "the", "total", "amount", "of", "payment", "processed", "." ]
[ { "id": 1, "type": "column", "value": "amount_payment" }, { "id": 0, "type": "table", "value": "payments" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O", "O" ]
5,332
synthea
bird:train.json:1463
In 2009, who among the married patients had undergone a care plan for more than 60 days?
SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.marital = 'M' AND strftime('%J', T2.STOP) - strftime('%J', T2.START) > 60
[ "In", "2009", ",", "who", "among", "the", "married", "patients", "had", "undergone", "a", "care", "plan", "for", "more", "than", "60", "days", "?" ]
[ { "id": 3, "type": "table", "value": "careplans" }, { "id": 2, "type": "table", "value": "patients" }, { "id": 4, "type": "column", "value": "patient" }, { "id": 5, "type": "column", "value": "marital" }, { "id": 0, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-VALUE", "O", "O" ]
5,333
formula_1
bird:dev.json:1000
Which racetrack hosted the most recent race? Indicate the full location.
SELECT T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId ORDER BY T2.date DESC LIMIT 1
[ "Which", "racetrack", "hosted", "the", "most", "recent", "race", "?", "Indicate", "the", "full", "location", "." ]
[ { "id": 4, "type": "column", "value": "circuitid" }, { "id": 0, "type": "column", "value": "location" }, { "id": 1, "type": "table", "value": "circuits" }, { "id": 2, "type": "table", "value": "races" }, { "id": 3, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O" ]
5,334
address_1
bird:test.json:803
Show all states where more than 5 students live.
SELECT T1.state FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.state HAVING count(*) > 5
[ "Show", "all", "states", "where", "more", "than", "5", "students", "live", "." ]
[ { "id": 4, "type": "column", "value": "city_code" }, { "id": 2, "type": "table", "value": "student" }, { "id": 0, "type": "column", "value": "state" }, { "id": 1, "type": "table", "value": "city" }, { "id": 3, "type": "value", "value": "5" ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O" ]
5,335
public_review_platform
bird:train.json:4008
Find the 5-star business in Ahwatukee, AZ and identify it's business category.
SELECT T1.business_id, T3.category_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T1.city = 'Ahwatukee' AND T1.stars = 5
[ "Find", "the", "5", "-", "star", "business", "in", "Ahwatukee", ",", "AZ", "and", "identify", "it", "'s", "business", "category", "." ]
[ { "id": 4, "type": "table", "value": "business_categories" }, { "id": 1, "type": "column", "value": "category_name" }, { "id": 0, "type": "column", "value": "business_id" }, { "id": 5, "type": "column", "value": "category_id" }, { "id": 2, "typ...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-VALUE", "O", "B-COLUMN", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-TABLE", "O" ]
5,336
movielens
bird:train.json:2287
Please list the country of the movie that stars an actress who acts the worse.
SELECT T3.country FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T1.a_gender = 'F' AND T1.a_quality = 0
[ "Please", "list", "the", "country", "of", "the", "movie", "that", "stars", "an", "actress", "who", "acts", "the", "worse", "." ]
[ { "id": 3, "type": "table", "value": "movies2actors" }, { "id": 7, "type": "column", "value": "a_quality" }, { "id": 5, "type": "column", "value": "a_gender" }, { "id": 0, "type": "column", "value": "country" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "B-TABLE", "B-TABLE", "I-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
5,337
conference
bird:test.json:1073
Show the institution name and the number of staff for each institution founded after 1800.
SELECT T1.institution_name , count(*) FROM institution AS T1 JOIN staff AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1800 GROUP BY T2.institution_id
[ "Show", "the", "institution", "name", "and", "the", "number", "of", "staff", "for", "each", "institution", "founded", "after", "1800", "." ]
[ { "id": 1, "type": "column", "value": "institution_name" }, { "id": 0, "type": "column", "value": "institution_id" }, { "id": 2, "type": "table", "value": "institution" }, { "id": 4, "type": "column", "value": "founded" }, { "id": 3, "type": "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
5,338
codebase_community
bird:dev.json:607
How many positive comments are there on the list?
SELECT COUNT(id) FROM comments WHERE score > 60
[ "How", "many", "positive", "comments", "are", "there", "on", "the", "list", "?" ]
[ { "id": 0, "type": "table", "value": "comments" }, { "id": 1, "type": "column", "value": "score" }, { "id": 2, "type": "value", "value": "60" }, { "id": 3, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
5,339
movie_3
bird:train.json:9157
Give the name of the manager staff for store No.1.
SELECT T1.first_name, T1.last_name FROM staff AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id WHERE T2.store_id = 1
[ "Give", "the", "name", "of", "the", "manager", "staff", "for", "store", "No.1", "." ]
[ { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 4, "type": "column", "value": "store_id" }, { "id": 2, "type": "table", "value": "staff" }, { "id": 3, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O" ]
5,340
movies_4
bird:train.json:444
Who played Captain Jack Sparrow in all of the Pirates of the Caribbean movies?
SELECT DISTINCT T3.person_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T2.character_name = 'Captain Jack Sparrow' AND T1.title LIKE 'Pirates of the Caribbean%'
[ "Who", "played", "Captain", "Jack", "Sparrow", "in", "all", "of", "the", "Pirates", "of", "the", "Caribbean", "movies", "?" ]
[ { "id": 8, "type": "value", "value": "Pirates of the Caribbean%" }, { "id": 6, "type": "value", "value": "Captain Jack Sparrow" }, { "id": 5, "type": "column", "value": "character_name" }, { "id": 0, "type": "column", "value": "person_name" }, { "i...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O" ]
5,341
chicago_crime
bird:train.json:8630
What is the precise location or coordinate where most of the robberies in Rogers Park occurred?
SELECT T2.latitude, T2.longitude FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN FBI_Code AS T3 ON T2.fbi_code_no = T3.fbi_code_no WHERE T1.community_area_name = 'Rogers Park' AND T3.title = 'Robbery' AND T3.fbi_code_no = 3
[ "What", "is", "the", "precise", "location", "or", "coordinate", "where", "most", "of", "the", "robberies", "in", "Rogers", "Park", "occurred", "?" ]
[ { "id": 6, "type": "column", "value": "community_area_name" }, { "id": 11, "type": "column", "value": "community_area_no" }, { "id": 3, "type": "table", "value": "community_area" }, { "id": 5, "type": "column", "value": "fbi_code_no" }, { "id": 7, ...
[ { "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", "O", "B-VALUE", "O", "B-VALUE", "I-VALUE", "O", "O" ]
5,342
codebase_comments
bird:train.json:672
How many methods in repository 150 did not have a comment and a summary?
SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 150 AND T2.FullComment IS NULL AND T2.Summary IS NULL
[ "How", "many", "methods", "in", "repository", "150", "did", "not", "have", "a", "comment", "and", "a", "summary", "?" ]
[ { "id": 6, "type": "column", "value": "fullcomment" }, { "id": 2, "type": "column", "value": "solutionid" }, { "id": 0, "type": "table", "value": "solution" }, { "id": 7, "type": "column", "value": "summary" }, { "id": 1, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O" ]
5,343
election
spider:train_spider.json:2755
Find the distinct years when the governor was named "Eliot Spitzer".
SELECT DISTINCT YEAR FROM party WHERE Governor = "Eliot Spitzer"
[ "Find", "the", "distinct", "years", "when", "the", "governor", "was", "named", "\"", "Eliot", "Spitzer", "\"", "." ]
[ { "id": 3, "type": "column", "value": "Eliot Spitzer" }, { "id": 2, "type": "column", "value": "governor" }, { "id": 0, "type": "table", "value": "party" }, { "id": 1, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
5,345
manufacturer
spider:train_spider.json:3399
what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.
SELECT max(num_of_shops) , avg(Num_of_Factories) FROM manufacturer WHERE open_year < 1990
[ "what", "is", "the", "average", "number", "of", "factories", "and", "maximum", "number", "of", "shops", "for", "manufacturers", "that", "opened", "before", "1990", "." ]
[ { "id": 4, "type": "column", "value": "num_of_factories" }, { "id": 0, "type": "table", "value": "manufacturer" }, { "id": 3, "type": "column", "value": "num_of_shops" }, { "id": 1, "type": "column", "value": "open_year" }, { "id": 2, "type": "...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 4, "token_idxs": [...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
5,346
language_corpus
bird:train.json:5740
What number of words are there on revision page 27457362?
SELECT words FROM pages WHERE revision = 27457362
[ "What", "number", "of", "words", "are", "there", "on", "revision", "page", "27457362", "?" ]
[ { "id": 2, "type": "column", "value": "revision" }, { "id": 3, "type": "value", "value": "27457362" }, { "id": 0, "type": "table", "value": "pages" }, { "id": 1, "type": "column", "value": "words" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-TABLE", "B-VALUE", "O" ]
5,347
synthea
bird:train.json:1494
Identify the allergy period for Isadora Moen and what triggered it.
SELECT T2.START, T2.STOP, T2.DESCRIPTION FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Isadora' AND T1.last = 'Moen'
[ "Identify", "the", "allergy", "period", "for", "Isadora", "Moen", "and", "what", "triggered", "it", "." ]
[ { "id": 2, "type": "column", "value": "description" }, { "id": 4, "type": "table", "value": "allergies" }, { "id": 3, "type": "table", "value": "patients" }, { "id": 5, "type": "column", "value": "patient" }, { "id": 7, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "O" ]
5,348
store_1
spider:train_spider.json:544
What are the first and last names of the 5 customers who purchased something most recently?
SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;
[ "What", "are", "the", "first", "and", "last", "names", "of", "the", "5", "customers", "who", "purchased", "something", "most", "recently", "?" ]
[ { "id": 4, "type": "column", "value": "invoice_date" }, { "id": 5, "type": "column", "value": "customer_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 2, "type": "table"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
5,349
beer_factory
bird:train.json:5261
For the root beer brand with the most 5 star ratings, what is the name of the brewery?
SELECT T1.BreweryName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5 GROUP BY T1.BrandID ORDER BY COUNT(T2.StarRating) DESC LIMIT 1
[ "For", "the", "root", "beer", "brand", "with", "the", "most", "5", "star", "ratings", ",", "what", "is", "the", "name", "of", "the", "brewery", "?" ]
[ { "id": 3, "type": "table", "value": "rootbeerreview" }, { "id": 2, "type": "table", "value": "rootbeerbrand" }, { "id": 1, "type": "column", "value": "breweryname" }, { "id": 4, "type": "column", "value": "starrating" }, { "id": 0, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [ 2, 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9, 10 ] ...
[ "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
5,350
car_road_race
bird:test.json:1339
What are the names of races in which drivers 26 or older took part?
SELECT T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE T1.Age >= 26
[ "What", "are", "the", "names", "of", "races", "in", "which", "drivers", "26", "or", "older", "took", "part", "?" ]
[ { "id": 0, "type": "column", "value": "race_name" }, { "id": 5, "type": "column", "value": "driver_id" }, { "id": 1, "type": "table", "value": "driver" }, { "id": 2, "type": "table", "value": "race" }, { "id": 3, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, {...
[ "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "B-VALUE", "O", "O", "O", "O", "O" ]
5,351
college_completion
bird:train.json:3751
Between the Ivy League Schools, which school's state have the lowest sate appropriations to higher education in fiscal year 2011 per resident?
SELECT T1.state FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state WHERE T1.chronname IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' ) GROUP ...
[ "Between", "the", "Ivy", "League", "Schools", ",", "which", "school", "'s", "state", "have", "the", "lowest", "sate", "appropriations", "to", "higher", "education", "in", "fiscal", "year", "2011", "per", "resident", "?" ]
[ { "id": 10, "type": "value", "value": "University of Pennsylvania" }, { "id": 2, "type": "table", "value": "state_sector_details" }, { "id": 9, "type": "value", "value": "Princeton University" }, { "id": 1, "type": "table", "value": "institution_details" ...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,352
musical
spider:train_spider.json:255
What are the names of actors ordered descending by the year in which their musical was awarded?
SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC
[ "What", "are", "the", "names", "of", "actors", "ordered", "descending", "by", "the", "year", "in", "which", "their", "musical", "was", "awarded", "?" ]
[ { "id": 4, "type": "column", "value": "musical_id" }, { "id": 2, "type": "table", "value": "musical" }, { "id": 1, "type": "table", "value": "actor" }, { "id": 0, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "y...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
5,353
movie
bird:train.json:756
Who played the No.1 character in the credit list of the movie which was released on "2015/10/26"?
SELECT T3.Name FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.`Release Date` = '2015-10-26' AND T2.creditOrder = '1'
[ "Who", "played", "the", "No.1", "character", "in", "the", "credit", "list", "of", "the", "movie", "which", "was", "released", "on", "\"", "2015/10/26", "\"", "?" ]
[ { "id": 5, "type": "column", "value": "Release Date" }, { "id": 7, "type": "column", "value": "creditorder" }, { "id": 3, "type": "table", "value": "characters" }, { "id": 6, "type": "value", "value": "2015-10-26" }, { "id": 4, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
5,354
cre_Docs_and_Epenses
spider:train_spider.json:6454
What are the different budget type codes, and how many documents are there for each?
SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code
[ "What", "are", "the", "different", "budget", "type", "codes", ",", "and", "how", "many", "documents", "are", "there", "for", "each", "?" ]
[ { "id": 0, "type": "table", "value": "documents_with_expenses" }, { "id": 1, "type": "column", "value": "budget_type_code" } ]
[ { "entity_id": 0, "token_idxs": [ 11, 12, 13 ] }, { "entity_id": 1, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, {...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O", "O", "O" ]
5,356
bike_1
spider:train_spider.json:185
What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.
SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5
[ "What", "are", "the", "dates", "that", "had", "the", "top", "5", "cloud", "cover", "rates", "?", "Also", "tell", "me", "the", "cloud", "cover", "rate", "." ]
[ { "id": 2, "type": "column", "value": "cloud_cover" }, { "id": 0, "type": "table", "value": "weather" }, { "id": 1, "type": "column", "value": "date" } ]
[ { "entity_id": 0, "token_idxs": [ 15, 16 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 17, 18 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "I-COLUMN", "O", "O" ]
5,357
conference
bird:test.json:1090
For each conference id, what are their names, year, and number of participants?
SELECT T1.conference_name , T1.year , count(*) FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id
[ "For", "each", "conference", "i", "d", ",", "what", "are", "their", "names", ",", "year", ",", "and", "number", "of", "participants", "?" ]
[ { "id": 4, "type": "table", "value": "conference_participation" }, { "id": 1, "type": "column", "value": "conference_name" }, { "id": 0, "type": "column", "value": "conference_id" }, { "id": 3, "type": "table", "value": "conference" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 15, 16 ] ...
[ "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
5,358
apartment_rentals
spider:train_spider.json:1247
What apartment type codes and apartment numbers do the buildings managed by "Kyle" have?
SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle"
[ "What", "apartment", "type", "codes", "and", "apartment", "numbers", "do", "the", "buildings", "managed", "by", "\"", "Kyle", "\"", "have", "?" ]
[ { "id": 2, "type": "table", "value": "apartment_buildings" }, { "id": 4, "type": "column", "value": "building_manager" }, { "id": 0, "type": "column", "value": "apt_type_code" }, { "id": 6, "type": "column", "value": "building_id" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [ 10 ...
[ "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O" ]
5,359
twitter_1
spider:train_spider.json:286
Find the name and email for the users who have more than one follower.
SELECT T1.name , T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > 1
[ "Find", "the", "name", "and", "email", "for", "the", "users", "who", "have", "more", "than", "one", "follower", "." ]
[ { "id": 3, "type": "table", "value": "user_profiles" }, { "id": 4, "type": "table", "value": "follows" }, { "id": 2, "type": "column", "value": "email" }, { "id": 1, "type": "column", "value": "name" }, { "id": 6, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
5,360
synthea
bird:train.json:1374
How many care plans has Mrs. Norman Berge taken?
SELECT COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Norman' AND T1.last = 'Berge'
[ "How", "many", "care", "plans", "has", "Mrs.", "Norman", "Berge", "taken", "?" ]
[ { "id": 1, "type": "table", "value": "careplans" }, { "id": 0, "type": "table", "value": "patients" }, { "id": 2, "type": "column", "value": "patient" }, { "id": 3, "type": "column", "value": "prefix" }, { "id": 6, "type": "value", "value":...
[ { "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": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "B-VALUE", "O", "O" ]
5,361
activity_1
spider:train_spider.json:6775
How many activities does Mark Giuliano participate in?
SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = "Mark" AND T1.lname = "Giuliano"
[ "How", "many", "activities", "does", "Mark", "Giuliano", "participate", "in", "?" ]
[ { "id": 1, "type": "table", "value": "faculty_participates_in" }, { "id": 6, "type": "column", "value": "Giuliano" }, { "id": 0, "type": "table", "value": "faculty" }, { "id": 2, "type": "column", "value": "facid" }, { "id": 3, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "B-TABLE", "I-TABLE", "O" ]
5,362
customers_and_addresses
spider:train_spider.json:6140
What are the names of customers who never made an order.
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id
[ "What", "are", "the", "names", "of", "customers", "who", "never", "made", "an", "order", "." ]
[ { "id": 2, "type": "table", "value": "customer_orders" }, { "id": 1, "type": "column", "value": "customer_name" }, { "id": 3, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
5,364
movies_4
bird:train.json:537
List the movies released in 1945.
SELECT title FROM movie WHERE CAST(STRFTIME('%Y', release_date) AS INT) = 1945
[ "List", "the", "movies", "released", "in", "1945", "." ]
[ { "id": 4, "type": "column", "value": "release_date" }, { "id": 0, "type": "table", "value": "movie" }, { "id": 1, "type": "column", "value": "title" }, { "id": 2, "type": "value", "value": "1945" }, { "id": 3, "type": "value", "value": "%Y...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
5,365
cookbook
bird:train.json:8904
Provide the title and total time of the recipe which has the highest possibility of gaining weight.
SELECT T1.title, T1.prep_min + T1.cook_min + T1.stnd_min FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id ORDER BY T2.total_fat DESC LIMIT 1
[ "Provide", "the", "title", "and", "total", "time", "of", "the", "recipe", "which", "has", "the", "highest", "possibility", "of", "gaining", "weight", "." ]
[ { "id": 2, "type": "table", "value": "nutrition" }, { "id": 3, "type": "column", "value": "total_fat" }, { "id": 5, "type": "column", "value": "recipe_id" }, { "id": 4, "type": "column", "value": "stnd_min" }, { "id": 6, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
5,366
icfp_1
spider:train_spider.json:2862
How many papers are published in total?
SELECT count(*) FROM papers
[ "How", "many", "papers", "are", "published", "in", "total", "?" ]
[ { "id": 0, "type": "table", "value": "papers" } ]
[ { "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" ]
5,367
food_inspection_2
bird:train.json:6144
How many employees are under Gregory Cardenas?
SELECT COUNT(T1.employee_id) FROM employee AS T1 WHERE T1.supervisor = ( SELECT employee_id FROM employee WHERE first_name = 'Gregory' AND last_name = 'Cardenas' )
[ "How", "many", "employees", "are", "under", "Gregory", "Cardenas", "?" ]
[ { "id": 2, "type": "column", "value": "employee_id" }, { "id": 1, "type": "column", "value": "supervisor" }, { "id": 3, "type": "column", "value": "first_name" }, { "id": 5, "type": "column", "value": "last_name" }, { "id": 0, "type": "table", ...
[ { "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": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-VALUE", "O" ]
5,368
codebase_comments
bird:train.json:646
Please provide the number of stars that the repository of the solution 20 have.
SELECT T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 20
[ "Please", "provide", "the", "number", "of", "stars", "that", "the", "repository", "of", "the", "solution", "20", "have", "." ]
[ { "id": 2, "type": "table", "value": "solution" }, { "id": 5, "type": "column", "value": "repoid" }, { "id": 0, "type": "column", "value": "stars" }, { "id": 1, "type": "table", "value": "repo" }, { "id": 3, "type": "column", "value": "id" ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, ...
[ "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "O", "O" ]
5,369
school_player
spider:train_spider.json:4895
What are the denominations used by both schools founded before 1890 and schools founded after 1900?
SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900
[ "What", "are", "the", "denominations", "used", "by", "both", "schools", "founded", "before", "1890", "and", "schools", "founded", " ", "after", "1900", "?" ]
[ { "id": 1, "type": "column", "value": "denomination" }, { "id": 2, "type": "column", "value": "founded" }, { "id": 0, "type": "table", "value": "school" }, { "id": 3, "type": "value", "value": "1890" }, { "id": 4, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 16 ] },...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O" ]