question_id
int64
0
16.1k
db_id
stringclasses
259 values
dber_id
stringlengths
15
29
question
stringlengths
16
325
SQL
stringlengths
18
1.25k
tokens
listlengths
4
62
entities
listlengths
0
21
entity_to_token
listlengths
20
20
dber_tags
listlengths
4
62
6,006
airline
bird:train.json:5899
Provide the air carrier description of the flight with the highest actual elapsed time.
SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.ACTUAL_ELAPSED_TIME DESC LIMIT 1
[ "Provide", "the", "air", "carrier", "description", "of", "the", "flight", "with", "the", "highest", "actual", "elapsed", "time", "." ]
[ { "id": 5, "type": "column", "value": "op_carrier_airline_id" }, { "id": 3, "type": "column", "value": "actual_elapsed_time" }, { "id": 1, "type": "table", "value": "Air Carriers" }, { "id": 0, "type": "column", "value": "description" }, { "id": 2,...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11, 12, 13 ] }, { "entity_id": 4, "token_idxs": [] },...
[ "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
6,007
social_media
bird:train.json:840
What is the total number of tweets sent by male users on Mondays?
SELECT COUNT(DISTINCT T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Weekday = 'Monday'
[ "What", "is", "the", "total", "number", "of", "tweets", "sent", "by", "male", "users", "on", "Mondays", "?" ]
[ { "id": 0, "type": "table", "value": "twitter" }, { "id": 1, "type": "column", "value": "tweetid" }, { "id": 5, "type": "column", "value": "weekday" }, { "id": 2, "type": "column", "value": "userid" }, { "id": 3, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-COLUMN", "O", "B-VALUE", "O" ]
6,008
public_review_platform
bird:train.json:3888
What is the category of the business with medium review length and highest review stars within business ID from 6 t0 9?
SELECT T4.category_name FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T1.review_length LIKE 'Medium' AND T2.business_id BETWEEN 6 AND 9 ORDER BY ...
[ "What", "is", "the", "category", "of", "the", "business", "with", "medium", "review", "length", "and", "highest", "review", "stars", "within", "business", "ID", "from", "6", "t0", "9", "?" ]
[ { "id": 3, "type": "table", "value": "business_categories" }, { "id": 0, "type": "column", "value": "category_name" }, { "id": 5, "type": "column", "value": "review_length" }, { "id": 2, "type": "column", "value": "review_stars" }, { "id": 4, "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
6,009
card_games
bird:dev.json:406
Lists by ID all Creature-type cards with legal status.
SELECT T1.id FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid INNER JOIN legalities AS T3 ON T1.uuid = T3.uuid WHERE T3.status = 'Legal' AND T1.types = 'Creature'
[ "Lists", "by", "ID", "all", "Creature", "-", "type", "cards", "with", "legal", "status", "." ]
[ { "id": 1, "type": "table", "value": "legalities" }, { "id": 8, "type": "value", "value": "Creature" }, { "id": 3, "type": "table", "value": "rulings" }, { "id": 5, "type": "column", "value": "status" }, { "id": 2, "type": "table", "value":...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-COLUMN", "B-TABLE", "O", "B-VALUE", "B-COLUMN", "O" ]
6,010
behavior_monitoring
spider:train_spider.json:3114
Find the start and end dates of behavior incidents of students with last name "Fahey".
SELECT T1.date_incident_start , date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.last_name = "Fahey"
[ "Find", "the", "start", "and", "end", "dates", "of", "behavior", "incidents", "of", "students", "with", "last", "name", "\"", "Fahey", "\"", "." ]
[ { "id": 0, "type": "column", "value": "date_incident_start" }, { "id": 1, "type": "column", "value": "date_incident_end" }, { "id": 2, "type": "table", "value": "behavior_incident" }, { "id": 6, "type": "column", "value": "student_id" }, { "id": 4,...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 12, 13 ] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O" ]
6,011
hockey
bird:train.json:7641
Who is the coach who had coached the the most seasons in MTL? State his given name, date of birth and all teams he had coaches before.
SELECT T2.nameGiven , T2.birthYear, T2.birthMon, T2.birthDay, T3.name FROM Goalies AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T3.lgID = T1.lgID WHERE T3.tmID = 'MTL' GROUP BY T2.nameGiven, T2.birthYear, T2.birthMon, T2.birthDay, T3.name ORDER BY COUNT(T2.coachID) DESC LIMIT 1
[ "Who", "is", "the", "coach", "who", "had", "coached", "the", "the", "most", "seasons", "in", "MTL", "?", "State", "his", "given", "name", ",", "date", "of", "birth", "and", "all", "teams", "he", "had", "coaches", "before", "." ]
[ { "id": 0, "type": "column", "value": "namegiven" }, { "id": 1, "type": "column", "value": "birthyear" }, { "id": 2, "type": "column", "value": "birthmon" }, { "id": 3, "type": "column", "value": "birthday" }, { "id": 12, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 21 ] }, { "entity_id": 4, "token_idxs": [ 17 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
6,012
hospital_1
spider:train_spider.json:3911
What are the names of all the physicians who took appointments.
SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID
[ "What", "are", "the", "names", "of", "all", "the", "physicians", "who", "took", "appointments", "." ]
[ { "id": 1, "type": "table", "value": "appointment" }, { "id": 4, "type": "column", "value": "employeeid" }, { "id": 2, "type": "table", "value": "physician" }, { "id": 3, "type": "column", "value": "physician" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
6,013
chicago_crime
bird:train.json:8655
Among the criminal sexual assaults in the district of Adnardo Gutierrez, how many cases happened in the residence?
SELECT COUNT(T2.report_no) FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no INNER JOIN FBI_Code AS T3 ON T3.fbi_code_no = T2.fbi_code_no WHERE T3.title = 'Criminal Sexual Assault' AND T1.commander = 'Adnardo Gutierrez' AND T2.location_description = 'RESIDENCE'
[ "Among", "the", "criminal", "sexual", "assaults", "in", "the", "district", "of", "Adnardo", "Gutierrez", ",", "how", "many", "cases", "happened", "in", "the", "residence", "?" ]
[ { "id": 6, "type": "value", "value": "Criminal Sexual Assault" }, { "id": 9, "type": "column", "value": "location_description" }, { "id": 8, "type": "value", "value": "Adnardo Gutierrez" }, { "id": 4, "type": "column", "value": "fbi_code_no" }, { "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
6,014
regional_sales
bird:train.json:2666
List down the customer names and product names of the order made by "Anthony Torres" via distributor channel.
SELECT DISTINCT T1.`Customer Names`, T4.`Product Name` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID INNER JOIN Products AS T4 ON T4.ProductID = T2._ProductID WHERE T3.`Sales Team` = 'Anthony Torres' AND T2.`Sales...
[ "List", "down", "the", "customer", "names", "and", "product", "names", "of", "the", "order", "made", "by", "\"", "Anthony", "Torres", "\"", "via", "distributor", "channel", "." ]
[ { "id": 0, "type": "column", "value": "Customer Names" }, { "id": 7, "type": "value", "value": "Anthony Torres" }, { "id": 8, "type": "column", "value": "Sales Channel" }, { "id": 1, "type": "column", "value": "Product Name" }, { "id": 11, "typ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
6,015
movie_3
bird:train.json:9341
Which film titles have the most expensive rental rate?
SELECT title FROM film WHERE rental_rate = ( SELECT MAX(rental_rate) FROM film )
[ "Which", "film", "titles", "have", "the", "most", "expensive", "rental", "rate", "?" ]
[ { "id": 2, "type": "column", "value": "rental_rate" }, { "id": 1, "type": "column", "value": "title" }, { "id": 0, "type": "table", "value": "film" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,016
public_review_platform
bird:train.json:4092
How much time do businesses in El Mirage City, AZ State operate in average daily?
SELECT SUM(T2.closing_time - T2.opening_time) FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'El Mirage' AND T1.state = 'AZ'
[ "How", "much", "time", "do", "businesses", "in", "El", "Mirage", "City", ",", "AZ", "State", "operate", "in", "average", "daily", "?" ]
[ { "id": 1, "type": "table", "value": "business_hours" }, { "id": 7, "type": "column", "value": "closing_time" }, { "id": 8, "type": "column", "value": "opening_time" }, { "id": 2, "type": "column", "value": "business_id" }, { "id": 4, "type": "...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 6, 7 ] }, { "entity_id":...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O" ]
6,017
movie
bird:train.json:765
What is the genre of PG rated movie starred by the actor with highest net worth?
SELECT T1.Genre 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.`MPAA Rating` = 'PG' ORDER BY CAST(REPLACE(REPLACE(T3.NetWorth, ',', ''), '$', '') AS REAL) DESC LIMIT 1
[ "What", "is", "the", "genre", "of", "PG", "rated", "movie", "starred", "by", "the", "actor", "with", "highest", "net", "worth", "?" ]
[ { "id": 2, "type": "column", "value": "MPAA Rating" }, { "id": 5, "type": "table", "value": "characters" }, { "id": 9, "type": "column", "value": "networth" }, { "id": 6, "type": "column", "value": "actorid" }, { "id": 7, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,018
synthea
bird:train.json:1440
What kind of allergy is most common among white people?
SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.race = 'white' GROUP BY T2.DESCRIPTION ORDER BY COUNT(T2.DESCRIPTION) DESC LIMIT 1
[ "What", "kind", "of", "allergy", "is", "most", "common", "among", "white", "people", "?" ]
[ { "id": 0, "type": "column", "value": "description" }, { "id": 2, "type": "table", "value": "allergies" }, { "id": 1, "type": "table", "value": "patients" }, { "id": 5, "type": "column", "value": "patient" }, { "id": 4, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-VALUE", "O", "O" ]
6,019
medicine_enzyme_interaction
spider:train_spider.json:958
What are the most common types of interactions between enzymes and medicine, and how many types are there?
SELECT interaction_type , count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1
[ "What", "are", "the", "most", "common", "types", "of", "interactions", "between", "enzymes", "and", "medicine", ",", "and", "how", "many", "types", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "medicine_enzyme_interaction" }, { "id": 1, "type": "column", "value": "interaction_type" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
6,020
debate
spider:train_spider.json:1492
How many debates are there?
SELECT count(*) FROM debate
[ "How", "many", "debates", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "debate" } ]
[ { "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" ]
6,021
public_review_platform
bird:train.json:3872
How many elite users have reviewed Yelp_Business no.1?
SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id INNER JOIN Reviews AS T3 ON T1.user_id = T3.user_id WHERE T3.business_id = 1
[ "How", "many", "elite", "users", "have", "reviewed", "Yelp_Business", "no.1", "?" ]
[ { "id": 1, "type": "column", "value": "business_id" }, { "id": 0, "type": "table", "value": "reviews" }, { "id": 3, "type": "column", "value": "user_id" }, { "id": 4, "type": "table", "value": "users" }, { "id": 5, "type": "table", "value":...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "O", "O" ]
6,022
baseball_1
spider:train_spider.json:3683
What were all the salary values of players in 2010 and 2001?
SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001
[ "What", "were", "all", "the", "salary", "values", "of", "players", "in", "2010", "and", "2001", "?" ]
[ { "id": 0, "type": "table", "value": "salary" }, { "id": 1, "type": "column", "value": "salary" }, { "id": 2, "type": "column", "value": "year" }, { "id": 3, "type": "value", "value": "2010" }, { "id": 4, "type": "value", "value": "2001" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
6,023
cre_Students_Information_Systems
bird:test.json:488
What are the ids and details of the students who take 2 courses?
SELECT T1.student_id , T1.student_details FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2
[ "What", "are", "the", "ids", "and", "details", "of", "the", "students", "who", "take", "2", "courses", "?" ]
[ { "id": 1, "type": "column", "value": "student_details" }, { "id": 0, "type": "column", "value": "student_id" }, { "id": 2, "type": "table", "value": "students" }, { "id": 3, "type": "table", "value": "classes" }, { "id": 4, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O" ]
6,024
codebase_community
bird:dev.json:710
In posts with 1 comment, how many of the comments have 0 score?
SELECT COUNT(T1.id) FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.CommentCount = 1 AND T2.Score = 0
[ "In", "posts", "with", "1", "comment", ",", "how", "many", "of", "the", "comments", "have", "0", "score", "?" ]
[ { "id": 4, "type": "column", "value": "commentcount" }, { "id": 0, "type": "table", "value": "comments" }, { "id": 3, "type": "column", "value": "postid" }, { "id": 1, "type": "table", "value": "posts" }, { "id": 6, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, ...
[ "O", "B-TABLE", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "B-COLUMN", "O" ]
6,025
legislator
bird:train.json:4865
How many Catholic legislators do not have an account on ballotpedia.org?
SELECT COUNT(bioguide_id) FROM historical WHERE religion_bio = 'Catholic' AND ballotpedia_id IS NULL
[ "How", "many", "Catholic", "legislators", "do", "not", "have", "an", "account", "on", "ballotpedia.org", "?" ]
[ { "id": 4, "type": "column", "value": "ballotpedia_id" }, { "id": 2, "type": "column", "value": "religion_bio" }, { "id": 1, "type": "column", "value": "bioguide_id" }, { "id": 0, "type": "table", "value": "historical" }, { "id": 3, "type": "va...
[ { "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": [ 10 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,026
baseball_1
spider:train_spider.json:3668
Count the number of times the team "Boston Red Stockings" lost in 2009 postseason.
SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;
[ "Count", "the", "number", "of", "times", "the", "team", "\"", "Boston", "Red", "Stockings", "\"", "lost", "in", "2009", "postseason", "." ]
[ { "id": 5, "type": "value", "value": "Boston Red Stockings" }, { "id": 2, "type": "column", "value": "team_id_loser" }, { "id": 0, "type": "table", "value": "postseason" }, { "id": 3, "type": "column", "value": "team_id_br" }, { "id": 1, "type"...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
6,027
regional_sales
bird:train.json:2620
State the customer name of orders which has shipped date in 7/8/2018.
SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.ShipDate = '7/8/18' THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL
[ "State", "the", "customer", "name", "of", "orders", "which", "has", "shipped", "date", "in", "7/8/2018", "." ]
[ { "id": 5, "type": "column", "value": "Customer Names" }, { "id": 2, "type": "table", "value": "Sales Orders" }, { "id": 3, "type": "column", "value": "_customerid" }, { "id": 4, "type": "column", "value": "customerid" }, { "id": 1, "type": "ta...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
6,028
book_1
bird:test.json:519
List all Book titles, ISBNs, and sale prices.
SELECT title , isbn , SalePrice FROM Book
[ "List", "all", "Book", "titles", ",", "ISBNs", ",", "and", "sale", "prices", "." ]
[ { "id": 3, "type": "column", "value": "saleprice" }, { "id": 1, "type": "column", "value": "title" }, { "id": 0, "type": "table", "value": "book" }, { "id": 2, "type": "column", "value": "isbn" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,029
gymnast
spider:train_spider.json:1774
Show the ages of gymnasts in descending order of total points.
SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC
[ "Show", "the", "ages", "of", "gymnasts", "in", "descending", "order", "of", "total", "points", "." ]
[ { "id": 3, "type": "column", "value": "total_points" }, { "id": 4, "type": "column", "value": "gymnast_id" }, { "id": 5, "type": "column", "value": "people_id" }, { "id": 1, "type": "table", "value": "gymnast" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,030
book_1
bird:test.json:521
How many books do we have?
SELECT count(*) FROM Book
[ "How", "many", "books", "do", "we", "have", "?" ]
[ { "id": 0, "type": "table", "value": "book" } ]
[ { "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" ]
6,031
retails
bird:train.json:6709
What are the top 2 order keys of the item with the highest amount of extended price?
SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice DESC LIMIT 2
[ "What", "are", "the", "top", "2", "order", "keys", "of", "the", "item", "with", "the", "highest", "amount", "of", "extended", "price", "?" ]
[ { "id": 2, "type": "column", "value": "l_extendedprice" }, { "id": 1, "type": "column", "value": "l_orderkey" }, { "id": 0, "type": "table", "value": "lineitem" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 15, 16 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,032
shakespeare
bird:train.json:3026
Calculate average scene per act in Antony and Cleopatra.
SELECT CAST(SUM(T2.Scene) AS REAL) / COUNT(T2.act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Antony and Cleopatra'
[ "Calculate", "average", "scene", "per", "act", "in", "Antony", "and", "Cleopatra", "." ]
[ { "id": 3, "type": "value", "value": "Antony and Cleopatra" }, { "id": 1, "type": "table", "value": "chapters" }, { "id": 5, "type": "column", "value": "work_id" }, { "id": 0, "type": "table", "value": "works" }, { "id": 2, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_id...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
6,033
baseball_1
spider:train_spider.json:3643
What are the manager's first name, last name and id who won the most manager award?
SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;
[ "What", "are", "the", "manager", "'s", "first", "name", ",", "last", "name", "and", "i", "d", "who", "won", "the", "most", "manager", "award", "?" ]
[ { "id": 4, "type": "table", "value": "manager_award" }, { "id": 1, "type": "column", "value": "name_first" }, { "id": 0, "type": "column", "value": "player_id" }, { "id": 2, "type": "column", "value": "name_last" }, { "id": 3, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 17, 18 ] }, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
6,034
public_review_platform
bird:train.json:4102
List by ID the businesses with the reviews with the lowest veracity of Paradise Valley.
SELECT business_id FROM Business WHERE stars > 3 AND city = 'Paradise Valley' AND review_count = 'Low'
[ "List", "by", "ID", "the", "businesses", "with", "the", "reviews", "with", "the", "lowest", "veracity", "of", "Paradise", "Valley", "." ]
[ { "id": 5, "type": "value", "value": "Paradise Valley" }, { "id": 6, "type": "column", "value": "review_count" }, { "id": 1, "type": "column", "value": "business_id" }, { "id": 0, "type": "table", "value": "business" }, { "id": 2, "type": "colu...
[ { "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": [ 11 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
6,035
law_episode
bird:train.json:1298
How many episodes have not won any Law & Order series awards?
SELECT COUNT(award_id) FROM Award WHERE Result = 'Nominee'
[ "How", "many", "episodes", "have", "not", "won", "any", "Law", "&", "Order", "series", "awards", "?" ]
[ { "id": 3, "type": "column", "value": "award_id" }, { "id": 2, "type": "value", "value": "Nominee" }, { "id": 1, "type": "column", "value": "result" }, { "id": 0, "type": "table", "value": "award" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
6,036
address_1
bird:test.json:786
Give the country with the fewest number of cities.
SELECT country FROM City GROUP BY country ORDER BY count(*) ASC LIMIT 1
[ "Give", "the", "country", "with", "the", "fewest", "number", "of", "cities", "." ]
[ { "id": 1, "type": "column", "value": "country" }, { "id": 0, "type": "table", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
6,037
retail_world
bird:train.json:6338
Give the home phone number of the employee who is in charge of "Savannah" territory.
SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Savannah'
[ "Give", "the", "home", "phone", "number", "of", "the", "employee", "who", "is", "in", "charge", "of", "\"", "Savannah", "\"", "territory", "." ]
[ { "id": 2, "type": "column", "value": "territorydescription" }, { "id": 5, "type": "table", "value": "employeeterritories" }, { "id": 1, "type": "table", "value": "territories" }, { "id": 6, "type": "column", "value": "territoryid" }, { "id": 7, ...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id"...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O" ]
6,038
soccer_2016
bird:train.json:2022
What is the outcome type of match ID 392195?
SELECT T2.Outcome_Type FROM Match AS T1 INNER JOIN Outcome AS T2 ON T1.Outcome_type = T2.Outcome_Id WHERE T1.Match_Id = '392195'
[ "What", "is", "the", "outcome", "type", "of", "match", "ID", "392195", "?" ]
[ { "id": 0, "type": "column", "value": "outcome_type" }, { "id": 5, "type": "column", "value": "outcome_id" }, { "id": 3, "type": "column", "value": "match_id" }, { "id": 2, "type": "table", "value": "outcome" }, { "id": 4, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, {...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
6,039
school_player
spider:train_spider.json:4878
For each player, show the team and the location of school they belong to.
SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID
[ "For", "each", "player", ",", "show", "the", "team", "and", "the", "location", "of", "school", "they", "belong", "to", "." ]
[ { "id": 4, "type": "column", "value": "school_id" }, { "id": 1, "type": "column", "value": "location" }, { "id": 2, "type": "table", "value": "player" }, { "id": 3, "type": "table", "value": "school" }, { "id": 0, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O" ]
6,040
works_cycles
bird:train.json:7372
What is the weight in pounds of the style that is produced the most by the company? If there are multiple products sharing the same weight, indicate the name of each one of them and their corresponding weights.
SELECT Weight FROM Product WHERE WeightUnitMeasureCode = 'LB' GROUP BY Weight ORDER BY COUNT(Style) DESC LIMIT 1
[ "What", "is", "the", "weight", "in", "pounds", "of", "the", "style", "that", "is", "produced", "the", "most", "by", "the", "company", "?", "If", "there", "are", "multiple", "products", "sharing", "the", "same", "weight", ",", "indicate", "the", "name", "...
[ { "id": 2, "type": "column", "value": "weightunitmeasurecode" }, { "id": 0, "type": "table", "value": "product" }, { "id": 1, "type": "column", "value": "weight" }, { "id": 4, "type": "column", "value": "style" }, { "id": 3, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 22 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
6,041
movie_3
bird:train.json:9385
How many film categories are there?
SELECT COUNT(DISTINCT category_id) FROM category
[ "How", "many", "film", "categories", "are", "there", "?" ]
[ { "id": 1, "type": "column", "value": "category_id" }, { "id": 0, "type": "table", "value": "category" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O" ]
6,042
regional_sales
bird:train.json:2685
How many stores procured products on October 27, 2018, in the city of Oregon?
SELECT SUM(CASE WHEN T1.ProcuredDate = '10/27/18' AND T2.`City Name` = 'Orlando' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID
[ "How", "many", "stores", "procured", "products", "on", "October", "27", ",", "2018", ",", "in", "the", "city", "of", "Oregon", "?" ]
[ { "id": 1, "type": "table", "value": "Store Locations" }, { "id": 0, "type": "table", "value": "Sales Orders" }, { "id": 6, "type": "column", "value": "procureddate" }, { "id": 8, "type": "column", "value": "City Name" }, { "id": 3, "type": "co...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
6,043
activity_1
spider:train_spider.json:6773
Show the ids of all the faculty members who participate in an activity and advise a student.
SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
[ "Show", "the", "ids", "of", "all", "the", "faculty", "members", "who", "participate", "in", "an", "activity", "and", "advise", "a", "student", "." ]
[ { "id": 0, "type": "table", "value": "faculty_participates_in" }, { "id": 1, "type": "table", "value": "student" }, { "id": 3, "type": "column", "value": "advisor" }, { "id": 2, "type": "column", "value": "facid" } ]
[ { "entity_id": 0, "token_idxs": [ 6, 7, 8, 9, 10 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "I-TABLE", "I-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
6,044
company_office
spider:train_spider.json:4557
List the names of buildings in descending order of building height.
SELECT name FROM buildings ORDER BY Height DESC
[ "List", "the", "names", "of", "buildings", "in", "descending", "order", "of", "building", "height", "." ]
[ { "id": 0, "type": "table", "value": "buildings" }, { "id": 2, "type": "column", "value": "height" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,045
hockey
bird:train.json:7785
For all the referees, who became a hall of famer in the 1970s? What's his hofID?
SELECT name, hofID FROM HOF WHERE category = 'Builder' AND year BETWEEN 1970 AND 1979
[ "For", "all", "the", "referees", ",", "who", "became", "a", "hall", "of", "famer", "in", "the", "1970s", "?", "What", "'s", "his", "hofID", "?" ]
[ { "id": 3, "type": "column", "value": "category" }, { "id": 4, "type": "value", "value": "Builder" }, { "id": 2, "type": "column", "value": "hofid" }, { "id": 1, "type": "column", "value": "name" }, { "id": 5, "type": "column", "value": "ye...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 18 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,046
computer_student
bird:train.json:1025
Between the faculty employee professors, how many teaches high-level or harder undergraduate courses? Indicate each of the professors unique identifying number.
SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id WHERE T1.hasPosition = 'Faculty_eme' AND T1.professor = 1 AND T3.courseLevel = 'Level_400'
[ "Between", "the", "faculty", "employee", "professors", ",", "how", "many", "teaches", "high", "-", "level", "or", "harder", "undergraduate", "courses", "?", "Indicate", "each", "of", "the", "professors", "unique", "identifying", "number", "." ]
[ { "id": 4, "type": "column", "value": "hasposition" }, { "id": 5, "type": "value", "value": "Faculty_eme" }, { "id": 8, "type": "column", "value": "courselevel" }, { "id": 3, "type": "column", "value": "course_id" }, { "id": 6, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2 ...
[ "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
6,047
hospital_1
spider:train_spider.json:3988
Find the name of physicians who are affiliated with Surgery or Psychiatry department.
SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'
[ "Find", "the", "name", "of", "physicians", "who", "are", "affiliated", "with", "Surgery", "or", "Psychiatry", "department", "." ]
[ { "id": 3, "type": "table", "value": "affiliated_with" }, { "id": 5, "type": "column", "value": "departmentid" }, { "id": 1, "type": "table", "value": "department" }, { "id": 4, "type": "column", "value": "department" }, { "id": 7, "type": "val...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id"...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "B-VALUE", "O", "B-VALUE", "B-COLUMN", "O" ]
6,048
movie_3
bird:train.json:9404
List down the actor ID of actors with Dee as their last name.
SELECT actor_id FROM actor WHERE last_name = 'Dee'
[ "List", "down", "the", "actor", "ID", "of", "actors", "with", "Dee", "as", "their", "last", "name", "." ]
[ { "id": 2, "type": "column", "value": "last_name" }, { "id": 1, "type": "column", "value": "actor_id" }, { "id": 0, "type": "table", "value": "actor" }, { "id": 3, "type": "value", "value": "Dee" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,050
tracking_grants_for_research
spider:train_spider.json:4397
What is the most common role for the staff?
SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "most", "common", "role", "for", "the", "staff", "?" ]
[ { "id": 0, "type": "table", "value": "project_staff" }, { "id": 1, "type": "column", "value": "role_code" } ]
[ { "entity_id": 0, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
6,051
theme_gallery
spider:train_spider.json:1657
How many artists are above age 46 and joined after 1990?
SELECT count(*) FROM artist WHERE age > 46 AND year_join > 1990
[ "How", "many", "artists", "are", "above", "age", "46", "and", "joined", "after", "1990", "?" ]
[ { "id": 3, "type": "column", "value": "year_join" }, { "id": 0, "type": "table", "value": "artist" }, { "id": 4, "type": "value", "value": "1990" }, { "id": 1, "type": "column", "value": "age" }, { "id": 2, "type": "value", "value": "46" ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "B-VALUE", "O" ]
6,052
activity_1
spider:train_spider.json:6782
How many faculty members participate in each activity? Return the activity names and the number of faculty members.
SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID
[ "How", "many", "faculty", "members", "participate", "in", "each", "activity", "?", "Return", "the", "activity", "names", "and", "the", "number", "of", "faculty", "members", "." ]
[ { "id": 3, "type": "table", "value": "faculty_participates_in" }, { "id": 1, "type": "column", "value": "activity_name" }, { "id": 2, "type": "table", "value": "activity" }, { "id": 0, "type": "column", "value": "actid" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 2, 3, 4, 5 ] }, { "entity_id": 4, "token_id...
[ "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "I-TABLE", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
6,053
cre_Docs_and_Epenses
spider:train_spider.json:6431
Show the number of projects.
SELECT count(*) FROM Projects
[ "Show", "the", "number", "of", "projects", "." ]
[ { "id": 0, "type": "table", "value": "projects" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O" ]
6,055
toxicology
bird:dev.json:208
Which type of label is the most numerous in atoms with hydrogen?
SELECT T.label FROM ( SELECT T2.label, COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'h' GROUP BY T2.label ORDER BY COUNT(T2.molecule_id) DESC LIMIT 1 ) t
[ "Which", "type", "of", "label", "is", "the", "most", "numerous", "in", "atoms", "with", "hydrogen", "?" ]
[ { "id": 5, "type": "column", "value": "molecule_id" }, { "id": 2, "type": "table", "value": "molecule" }, { "id": 3, "type": "column", "value": "element" }, { "id": 0, "type": "column", "value": "label" }, { "id": 1, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
6,056
video_games
bird:train.json:3499
Calculate the total number of sales in North America.
SELECT SUM(T2.num_sales) * 100000 AS nums FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'North America'
[ "Calculate", "the", "total", "number", "of", "sales", "in", "North", "America", "." ]
[ { "id": 3, "type": "value", "value": "North America" }, { "id": 1, "type": "table", "value": "region_sales" }, { "id": 2, "type": "column", "value": "region_name" }, { "id": 6, "type": "column", "value": "region_id" }, { "id": 7, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
6,057
genes
bird:train.json:2496
For the pairs of genes with one having 8 chromosomes and the other having 6 chromosomes, what is the highest expression correlation score?
SELECT T2.Expression_Corr FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T1.Chromosome = 6 OR T1.Chromosome = 8 ORDER BY T2.Expression_Corr DESC LIMIT 1
[ "For", "the", "pairs", "of", "genes", "with", "one", "having", "8", "chromosomes", "and", "the", "other", "having", "6", "chromosomes", ",", "what", "is", "the", "highest", "expression", "correlation", "score", "?" ]
[ { "id": 0, "type": "column", "value": "expression_corr" }, { "id": 2, "type": "table", "value": "interactions" }, { "id": 5, "type": "column", "value": "chromosome" }, { "id": 4, "type": "column", "value": "geneid1" }, { "id": 3, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 21 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
6,058
party_people
spider:train_spider.json:2049
Show all ministers who do not belong to Progress Party.
SELECT minister FROM party WHERE party_name != 'Progress Party'
[ "Show", "all", "ministers", "who", "do", "not", "belong", "to", "Progress", "Party", "." ]
[ { "id": 3, "type": "value", "value": "Progress Party" }, { "id": 2, "type": "column", "value": "party_name" }, { "id": 1, "type": "column", "value": "minister" }, { "id": 0, "type": "table", "value": "party" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
6,059
college_1
spider:train_spider.json:3195
Find the number of departments in each school.
SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code
[ "Find", "the", "number", "of", "departments", "in", "each", "school", "." ]
[ { "id": 1, "type": "column", "value": "school_code" }, { "id": 0, "type": "table", "value": "department" }, { "id": 2, "type": "column", "value": "dept_name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O" ]
6,060
superstore
bird:train.json:2422
What are the names of the ordered products that have profit deficiency in central superstore?
SELECT DISTINCT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'Central' AND T1.Profit < 0
[ "What", "are", "the", "names", "of", "the", "ordered", "products", "that", "have", "profit", "deficiency", "in", "central", "superstore", "?" ]
[ { "id": 1, "type": "table", "value": "central_superstore" }, { "id": 0, "type": "column", "value": "Product Name" }, { "id": 3, "type": "column", "value": "Product ID" }, { "id": 2, "type": "table", "value": "product" }, { "id": 5, "type": "val...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-TABLE", "O" ]
6,061
icfp_1
spider:train_spider.json:2922
Retrieve all the first and last names of authors in the alphabetical order of last names.
SELECT fname , lname FROM authors ORDER BY lname
[ "Retrieve", "all", "the", "first", "and", "last", "names", "of", "authors", "in", "the", "alphabetical", "order", "of", "last", "names", "." ]
[ { "id": 0, "type": "table", "value": "authors" }, { "id": 1, "type": "column", "value": "fname" }, { "id": 2, "type": "column", "value": "lname" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
6,062
debit_card_specializing
bird:dev.json:1530
Which are the top five best selling products? Please state the full name of them.
SELECT T2.Description FROM transactions_1k AS T1 INNER JOIN products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Amount DESC LIMIT 5
[ "Which", "are", "the", "top", "five", "best", "selling", "products", "?", "Please", "state", "the", "full", "name", "of", "them", "." ]
[ { "id": 1, "type": "table", "value": "transactions_1k" }, { "id": 0, "type": "column", "value": "description" }, { "id": 4, "type": "column", "value": "productid" }, { "id": 2, "type": "table", "value": "products" }, { "id": 3, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
6,063
regional_sales
bird:train.json:2732
Which sales channel was most preferred in commercializing products in January 2020 based on the number of orders placed?
SELECT `Sales Channel` FROM `Sales Orders` WHERE OrderDate LIKE '1/%/20' GROUP BY `Sales Channel` ORDER BY COUNT(`Sales Channel`) DESC LIMIT 1
[ "Which", "sales", "channel", "was", "most", "preferred", "in", "commercializing", "products", "in", "January", "2020", "based", "on", "the", "number", "of", "orders", "placed", "?" ]
[ { "id": 1, "type": "column", "value": "Sales Channel" }, { "id": 0, "type": "table", "value": "Sales Orders" }, { "id": 2, "type": "column", "value": "orderdate" }, { "id": 3, "type": "value", "value": "1/%/20" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1, 2 ] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
6,064
movie_platform
bird:train.json:80
Please list the movies rated by the user who created the movie list "250 Favourite Films".
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists AS T3 ON T3.user_id = T1.user_id WHERE T3.list_title = '250 Favourite Films'
[ "Please", "list", "the", "movies", "rated", "by", "the", "user", "who", "created", "the", "movie", "list", "\"", "250", "Favourite", "Films", "\"", "." ]
[ { "id": 3, "type": "value", "value": "250 Favourite Films" }, { "id": 0, "type": "column", "value": "movie_title" }, { "id": 2, "type": "column", "value": "list_title" }, { "id": 7, "type": "column", "value": "movie_id" }, { "id": 4, "type": "t...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 14, 15, 16 ] }, { "entity_id": 4, "token_idxs": []...
[ "O", "B-TABLE", "B-COLUMN", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
6,066
simpson_episodes
bird:train.json:4242
Among episodes aired in 2009, which episode has received the worst response based on the rating.
SELECT episode_id FROM Episode WHERE air_date LIKE '2009%' ORDER BY rating LIMIT 1;
[ "Among", "episodes", "aired", "in", "2009", ",", "which", "episode", "has", "received", "the", "worst", "response", "based", "on", "the", "rating", "." ]
[ { "id": 1, "type": "column", "value": "episode_id" }, { "id": 2, "type": "column", "value": "air_date" }, { "id": 0, "type": "table", "value": "episode" }, { "id": 4, "type": "column", "value": "rating" }, { "id": 3, "type": "value", "value...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,067
public_review_platform
bird:train.json:3811
How many cities have businesses with active life category? Find the percentage of the city where the review count that is low in total review count.
SELECT SUM(CASE WHEN T2.category_name LIKE 'Active Life' THEN 1 ELSE 0 END) AS "num" , CAST(SUM(CASE WHEN T3.city LIKE 'Phoenix' THEN 1 ELSE 0 END) AS REAL) * 100 / ( SELECT COUNT(T3.review_count) FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON ...
[ "How", "many", "cities", "have", "businesses", "with", "active", "life", "category", "?", "Find", "the", "percentage", "of", "the", "city", "where", "the", "review", "count", "that", "is", "low", "in", "total", "review", "count", "." ]
[ { "id": 1, "type": "table", "value": "business_categories" }, { "id": 8, "type": "column", "value": "category_name" }, { "id": 10, "type": "column", "value": "review_count" }, { "id": 3, "type": "column", "value": "business_id" }, { "id": 6, "t...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,068
wine_1
spider:train_spider.json:6559
List the names of all distinct wines in alphabetical order.
SELECT DISTINCT Name FROM WINE ORDER BY Name
[ "List", "the", "names", "of", "all", "distinct", "wines", "in", "alphabetical", "order", "." ]
[ { "id": 0, "type": "table", "value": "wine" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
6,069
sales_in_weather
bird:train.json:8148
Among the days on which over 100 units of item no.5 were sold in store no.3, on which date was the temperature range the biggest?
SELECT T2.`date` FROM relation AS T1 INNER JOIN sales_in_weather AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T1.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T2.item_nbr = 5 AND T2.units > 100 ORDER BY tmax - tmin DESC LIMIT 1
[ "Among", "the", "days", "on", "which", "over", "100", "units", "of", "item", "no.5", "were", "sold", "in", "store", "no.3", ",", "on", "which", "date", "was", "the", "temperature", "range", "the", "biggest", "?" ]
[ { "id": 3, "type": "table", "value": "sales_in_weather" }, { "id": 4, "type": "column", "value": "station_nbr" }, { "id": 5, "type": "column", "value": "store_nbr" }, { "id": 2, "type": "table", "value": "relation" }, { "id": 7, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 19 ] }, { "entity_id": 1, "token_idxs": [ 20, 21 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "t...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O" ]
6,070
government_shift
bird:test.json:378
Which services are used by the customer "Hardy Kutch" or are rated as "good" in a customer interaction? Give me the service details.
SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id JOIN customer_interactions AS t4 ON t3.service_id = t4.service_id WHERE t1.customer_details = "Hardy Kutch" OR t4.services_and_channel...
[ "Which", "services", "are", "used", "by", "the", "customer", "\"", "Hardy", "Kutch", "\"", "or", "are", "rated", "as", "\"", "good", "\"", "in", "a", "customer", "interaction", "?", "Give", "me", "the", "service", "details", "." ]
[ { "id": 6, "type": "column", "value": "services_and_channels_details" }, { "id": 9, "type": "table", "value": "customers_and_services" }, { "id": 1, "type": "table", "value": "customer_interactions" }, { "id": 4, "type": "column", "value": "customer_detail...
[ { "entity_id": 0, "token_idxs": [ 27 ] }, { "entity_id": 1, "token_idxs": [ 20, 21 ] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 26 ] }, { "entity_id": 4, "token_idxs": [] }, {...
[ "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
6,071
synthea
bird:train.json:1359
According to the observation on 2008/3/11, what was the height of Elly Koss?
SELECT T2.value, T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.date = '2008-03-11' AND T2.description = 'Body Height'
[ "According", "to", "the", "observation", "on", "2008/3/11", ",", "what", "was", "the", "height", "of", "Elly", "Koss", "?" ]
[ { "id": 3, "type": "table", "value": "observations" }, { "id": 11, "type": "column", "value": "description" }, { "id": 12, "type": "value", "value": "Body Height" }, { "id": 10, "type": "value", "value": "2008-03-11" }, { "id": 2, "type": "tabl...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "B-VALUE", "O" ]
6,072
movie_1
spider:train_spider.json:2518
Find the average rating star for each movie that received at least 2 ratings.
SELECT mID , avg(stars) FROM Rating GROUP BY mID HAVING count(*) >= 2
[ "Find", "the", "average", "rating", "star", "for", "each", "movie", "that", "received", "at", "least", "2", "ratings", "." ]
[ { "id": 0, "type": "table", "value": "rating" }, { "id": 3, "type": "column", "value": "stars" }, { "id": 1, "type": "column", "value": "mid" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
6,073
card_games
bird:dev.json:412
What is the foreign name of the card in French of type Creature, normal layout and black border color, by artist Matthew D. Wilson?
SELECT name FROM foreign_data WHERE uuid IN ( SELECT uuid FROM cards WHERE types = 'Creature' AND layout = 'normal' AND borderColor = 'black' AND artist = 'Matthew D. Wilson' ) AND language = 'French'
[ "What", "is", "the", "foreign", "name", "of", "the", "card", "in", "French", "of", "type", "Creature", ",", "normal", "layout", "and", "black", "border", "color", ",", "by", "artist", "Matthew", "D.", "Wilson", "?" ]
[ { "id": 13, "type": "value", "value": "Matthew D. Wilson" }, { "id": 0, "type": "table", "value": "foreign_data" }, { "id": 10, "type": "column", "value": "bordercolor" }, { "id": 3, "type": "column", "value": "language" }, { "id": 7, "type": "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "B-COLUMN", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
6,074
city_record
spider:train_spider.json:6282
Which three cities have the largest regional population?
SELECT city FROM city ORDER BY regional_population DESC LIMIT 3
[ "Which", "three", "cities", "have", "the", "largest", "regional", "population", "?" ]
[ { "id": 2, "type": "column", "value": "regional_population" }, { "id": 0, "type": "table", "value": "city" }, { "id": 1, "type": "column", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
6,075
world_development_indicators
bird:train.json:2162
How many of the countries name start with alphabet A? List down the Alpha2Code of them.
SELECT COUNT(ShortName) FROM Country WHERE ShortName LIKE 'A%' UNION SELECT alpha2code FROM country WHERE shortname LIKE 'A%'
[ "How", "many", "of", "the", "countries", "name", "start", "with", "alphabet", "A", "?", "List", "down", "the", "Alpha2Code", "of", "them", "." ]
[ { "id": 3, "type": "column", "value": "alpha2code" }, { "id": 1, "type": "column", "value": "shortname" }, { "id": 0, "type": "table", "value": "country" }, { "id": 2, "type": "value", "value": "A%" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
6,076
cs_semester
bird:train.json:879
For the professors who advise more than 2 students, which professor has a higher teaching ability? Give the full name.
SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, T2.teachingability FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id GROUP BY T1.prof_id HAVING COUNT(student_id) > 2 ) T ORDER BY T.teachingability DESC LIMIT 1
[ "For", "the", "professors", "who", "advise", "more", "than", "2", "students", ",", "which", "professor", "has", "a", "higher", "teaching", "ability", "?", "Give", "the", "full", "name", "." ]
[ { "id": 2, "type": "column", "value": "teachingability" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 7, "type": "column", "value": "student_id" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 3, "type": "colu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 21 ] }, { "entity_id": 2, "token_idxs": [ 15, 16 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O" ]
6,077
car_retails
bird:train.json:1578
How many Australian customers who have credit line under 220000?
SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Australia'
[ "How", "many", "Australian", "customers", "who", "have", "credit", "line", "under", "220000", "?" ]
[ { "id": 1, "type": "column", "value": "creditlimit" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 4, "type": "value", "value": "Australia" }, { "id": 3, "type": "column", "value": "country" }, { "id": 2, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { ...
[ "O", "O", "B-VALUE", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
6,078
image_and_language
bird:train.json:7573
State the name of the object class that has in most images.
SELECT OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T1.OBJ_CLASS_ID) DESC LIMIT 1
[ "State", "the", "name", "of", "the", "object", "class", "that", "has", "in", "most", "images", "." ]
[ { "id": 3, "type": "column", "value": "obj_class_id" }, { "id": 2, "type": "table", "value": "obj_classes" }, { "id": 0, "type": "column", "value": "obj_class" }, { "id": 1, "type": "table", "value": "img_obj" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O" ]
6,079
synthea
bird:train.json:1509
List out the start date of the care plan of alive patients.
SELECT DISTINCT T1.START FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.deathdate IS NULL
[ "List", "out", "the", "start", "date", "of", "the", "care", "plan", "of", "alive", "patients", "." ]
[ { "id": 1, "type": "table", "value": "careplans" }, { "id": 3, "type": "column", "value": "deathdate" }, { "id": 2, "type": "table", "value": "patients" }, { "id": 4, "type": "column", "value": "patient" }, { "id": 0, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O" ]
6,080
wine_1
spider:train_spider.json:6585
What are the names of wines that are more expensive then all wines made in the year 2006?
SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006)
[ "What", "are", "the", "names", "of", "wines", "that", "are", "more", "expensive", "then", "all", "wines", "made", "in", "the", "year", "2006", "?" ]
[ { "id": 2, "type": "column", "value": "price" }, { "id": 0, "type": "table", "value": "wine" }, { "id": 1, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "year" }, { "id": 4, "type": "value", "value": "2006" } ...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 17 ] }, { "enti...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
6,081
boat_1
bird:test.json:912
What are the names of the sailors whose rating is larger than the rating of all sailors who booked a red boat?
SELECT name FROM Sailors WHERE rating > (SELECT max(T1.rating) FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid = T2.sid JOIN Boats AS T3 ON T3.bid = T2.bid WHERE T3.color = 'red')
[ "What", "are", "the", "names", "of", "the", "sailors", "whose", "rating", "is", "larger", "than", "the", "rating", "of", "all", "sailors", "who", "booked", "a", "red", "boat", "?" ]
[ { "id": 6, "type": "table", "value": "reserves" }, { "id": 0, "type": "table", "value": "sailors" }, { "id": 2, "type": "column", "value": "rating" }, { "id": 3, "type": "table", "value": "boats" }, { "id": 4, "type": "column", "value": "co...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 21 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
6,082
school_player
spider:train_spider.json:4880
Show the locations of schools that have more than 1 player.
SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1
[ "Show", "the", "locations", "of", "schools", "that", "have", "more", "than", "1", "player", "." ]
[ { "id": 0, "type": "column", "value": "school_id" }, { "id": 1, "type": "column", "value": "location" }, { "id": 2, "type": "table", "value": "player" }, { "id": 3, "type": "table", "value": "school" }, { "id": 4, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
6,083
public_review_platform
bird:train.json:4112
How many open businesses in the City of Phoenix have users left a long review?
SELECT COUNT(DISTINCT T2.business_id) FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_length = 'Long' AND T2.active = 'true' AND T2.city = 'Phoenix'
[ "How", "many", "open", "businesses", "in", "the", "City", "of", "Phoenix", "have", "users", "left", "a", "long", "review", "?" ]
[ { "id": 3, "type": "column", "value": "review_length" }, { "id": 2, "type": "column", "value": "business_id" }, { "id": 1, "type": "table", "value": "business" }, { "id": 0, "type": "table", "value": "reviews" }, { "id": 8, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
6,084
loan_1
spider:train_spider.json:3053
What is the name of the customer who has greatest total loan amount?
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "customer", "who", "has", "greatest", "total", "loan", "amount", "?" ]
[ { "id": 0, "type": "column", "value": "cust_name" }, { "id": 1, "type": "table", "value": "customer" }, { "id": 3, "type": "column", "value": "cust_id" }, { "id": 4, "type": "column", "value": "amount" }, { "id": 2, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
6,085
soccer_2016
bird:train.json:1845
How many of the matches are Superover?
SELECT SUM(CASE WHEN T2.Outcome_Type = 'Superover' THEN 1 ELSE 0 END) FROM Match AS T1 INNER JOIN Outcome AS T2 ON T2.Outcome_Id = T1.Outcome_type
[ "How", "many", "of", "the", "matches", "are", "Superover", "?" ]
[ { "id": 3, "type": "column", "value": "outcome_type" }, { "id": 2, "type": "column", "value": "outcome_id" }, { "id": 6, "type": "value", "value": "Superover" }, { "id": 1, "type": "table", "value": "outcome" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
6,086
world
bird:train.json:7838
In which continent does the country with the smallest surface area belongs?
SELECT Continent FROM Country ORDER BY SurfaceArea LIMIT 1
[ "In", "which", "continent", "does", "the", "country", "with", "the", "smallest", "surface", "area", "belongs", "?" ]
[ { "id": 2, "type": "column", "value": "surfacearea" }, { "id": 1, "type": "column", "value": "continent" }, { "id": 0, "type": "table", "value": "country" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
6,087
student_loan
bird:train.json:4568
Among the students who filed for bankruptcy with an absence in school of no more than 6 months, how many students enlisted for the fire department?
SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name INNER JOIN enlist AS T3 ON T3.name = T2.name WHERE T3.organ = 'fire_department'
[ "Among", "the", "students", "who", "filed", "for", "bankruptcy", "with", "an", "absence", "in", "school", "of", "no", "more", "than", "6", "months", ",", "how", "many", "students", "enlisted", "for", "the", "fire", "department", "?" ]
[ { "id": 4, "type": "table", "value": "longest_absense_from_school" }, { "id": 5, "type": "table", "value": "filed_for_bankrupcy" }, { "id": 2, "type": "value", "value": "fire_department" }, { "id": 0, "type": "table", "value": "enlist" }, { "id": 1...
[ { "entity_id": 0, "token_idxs": [ 22 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 25, 26 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "t...
[ "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O" ]
6,088
ice_hockey_draft
bird:train.json:6963
Mention the type of game that Matthias Trattnig played.
SELECT DISTINCT T1.GAMETYPE FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Matthias Trattnig'
[ "Mention", "the", "type", "of", "game", "that", "Matthias", "Trattnig", "played", "." ]
[ { "id": 4, "type": "value", "value": "Matthias Trattnig" }, { "id": 1, "type": "table", "value": "seasonstatus" }, { "id": 2, "type": "table", "value": "playerinfo" }, { "id": 3, "type": "column", "value": "playername" }, { "id": 0, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 6, 7 ] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O" ]
6,089
student_club
bird:dev.json:1448
Find the name and date of events with expenses for pizza that were more than fifty dollars but less than a hundred dollars.
SELECT T1.event_name, T1.event_date FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T3.expense_description = 'Pizza' AND T3.cost > 50 AND T3.cost < 100
[ "Find", "the", "name", "and", "date", "of", "events", "with", "expenses", "for", "pizza", "that", "were", "more", "than", "fifty", "dollars", "but", "less", "than", "a", "hundred", "dollars", "." ]
[ { "id": 7, "type": "column", "value": "expense_description" }, { "id": 6, "type": "column", "value": "link_to_budget" }, { "id": 13, "type": "column", "value": "link_to_event" }, { "id": 0, "type": "column", "value": "event_name" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 17 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
6,090
real_estate_rentals
bird:test.json:1438
How many searches do buyers make in total?
SELECT count(*) FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id WHERE T1.is_buyer = 1;
[ "How", "many", "searches", "do", "buyers", "make", "in", "total", "?" ]
[ { "id": 1, "type": "table", "value": "user_searches" }, { "id": 2, "type": "column", "value": "is_buyer" }, { "id": 4, "type": "column", "value": "user_id" }, { "id": 0, "type": "table", "value": "users" }, { "id": 3, "type": "value", "valu...
[ { "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-TABLE", "O", "B-TABLE", "O", "O", "O", "O" ]
6,091
movie_2
bird:test.json:1837
Find the number of movies in each rating.
SELECT count(*) , rating FROM movies GROUP BY rating
[ "Find", "the", "number", "of", "movies", "in", "each", "rating", "." ]
[ { "id": 0, "type": "table", "value": "movies" }, { "id": 1, "type": "column", "value": "rating" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
6,092
beer_factory
bird:train.json:5279
Among the root beer brands that do not advertise on Facebook and Twitter, which brand has the highest number of purchases?
SELECT T2.BreweryName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T2.FacebookPage IS NULL AND T2.Twitter IS NULL GROUP BY T2.BrandID ORDER BY COUNT(T1.BrandID) DESC LIMIT 1
[ "Among", "the", "root", "beer", "brands", "that", "do", "not", "advertise", "on", "Facebook", "and", "Twitter", ",", "which", "brand", "has", "the", "highest", "number", "of", "purchases", "?" ]
[ { "id": 3, "type": "table", "value": "rootbeerbrand" }, { "id": 4, "type": "column", "value": "facebookpage" }, { "id": 1, "type": "column", "value": "breweryname" }, { "id": 2, "type": "table", "value": "rootbeer" }, { "id": 0, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2, 3 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { ...
[ "O", "O", "B-TABLE", "I-TABLE", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
6,093
coffee_shop
spider:train_spider.json:790
Find the number of members living in each address.
SELECT count(*) , address FROM member GROUP BY address
[ "Find", "the", "number", "of", "members", "living", "in", "each", "address", "." ]
[ { "id": 1, "type": "column", "value": "address" }, { "id": 0, "type": "table", "value": "member" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "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", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
6,094
california_schools
bird:dev.json:6
Among the schools with the SAT test takers of over 500, please list the schools that are magnet schools or offer a magnet program.
SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Magnet = 1 AND T1.NumTstTakr > 500
[ "Among", "the", "schools", "with", "the", "SAT", "test", "takers", "of", "over", "500", ",", "please", "list", "the", "schools", "that", "are", "magnet", "schools", "or", "offer", "a", "magnet", "program", "." ]
[ { "id": 7, "type": "column", "value": "numtsttakr" }, { "id": 1, "type": "table", "value": "satscores" }, { "id": 2, "type": "table", "value": "schools" }, { "id": 4, "type": "column", "value": "cdscode" }, { "id": 0, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
6,095
authors
bird:train.json:3614
How many papers are published in year 2000 under the conference "SSPR"?
SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Year = 2000 AND T2.ShortName = 'SSPR'
[ "How", "many", "papers", "are", "published", "in", "year", "2000", "under", "the", "conference", "\"", "SSPR", "\"", "?" ]
[ { "id": 3, "type": "column", "value": "conferenceid" }, { "id": 1, "type": "table", "value": "conference" }, { "id": 6, "type": "column", "value": "shortname" }, { "id": 0, "type": "table", "value": "paper" }, { "id": 4, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O" ]
6,096
world_development_indicators
bird:train.json:2108
What is the average value of Adjusted net enrolment rate, primary, both sexes (%) indicator in Algeria from 1975 to 1980?
SELECT CAST(SUM(Value) AS REAL) / COUNT(CountryCode) FROM Indicators WHERE CountryName = 'Algeria' AND Year > 1974 AND Year < 1981 AND IndicatorName = 'Adjusted net enrolment rate, primary, both sexes (%)'
[ "What", "is", "the", "average", "value", "of", "Adjusted", "net", "enrolment", "rate", ",", "primary", ",", "both", "sexes", "(", "%", ")", "indicator", "in", "Algeria", "from", "1975", "to", "1980", "?" ]
[ { "id": 7, "type": "value", "value": "Adjusted net enrolment rate, primary, both sexes (%)" }, { "id": 6, "type": "column", "value": "indicatorname" }, { "id": 1, "type": "column", "value": "countryname" }, { "id": 8, "type": "column", "value": "countrycod...
[ { "entity_id": 0, "token_idxs": [ 18 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 20 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 22 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "O" ]
6,097
hockey
bird:train.json:7773
Among the coaches who taught the teams in 1922's Stanley Cup finals, how many of them are from the USA?
SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN TeamsSC AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.year = 1922 AND T3.birthCountry = 'USA'
[ "Among", "the", "coaches", "who", "taught", "the", "teams", "in", "1922", "'s", "Stanley", "Cup", "finals", ",", "how", "many", "of", "them", "are", "from", "the", "USA", "?" ]
[ { "id": 6, "type": "column", "value": "birthcountry" }, { "id": 1, "type": "column", "value": "coachid" }, { "id": 2, "type": "table", "value": "coaches" }, { "id": 3, "type": "table", "value": "teamssc" }, { "id": 0, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
6,098
storm_record
spider:train_spider.json:2709
Count the number of different affected regions.
SELECT count(DISTINCT region_id) FROM affected_region
[ "Count", "the", "number", "of", "different", "affected", "regions", "." ]
[ { "id": 0, "type": "table", "value": "affected_region" }, { "id": 1, "type": "column", "value": "region_id" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
6,099
books
bird:train.json:6032
Which customer addresses are no longer active?
SELECT DISTINCT T1.street_name FROM address AS T1 INNER JOIN customer_address AS T2 ON T1.address_id = T2.address_id INNER JOIN address_status AS T3 ON T3.status_id = T2.status_id WHERE T3.address_status = 'Inactive'
[ "Which", "customer", "addresses", "are", "no", "longer", "active", "?" ]
[ { "id": 5, "type": "table", "value": "customer_address" }, { "id": 1, "type": "table", "value": "address_status" }, { "id": 2, "type": "column", "value": "address_status" }, { "id": 0, "type": "column", "value": "street_name" }, { "id": 7, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
6,100
beer_factory
bird:train.json:5323
How many female mailing list subscribers from Sacramento gave a 4-star rating between 1/3/2016 and 10/26/2016?
SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 4 AND T1.City = 'Sacramento' AND T1.Gender = 'F' AND T1.SubscribedToEmailList = 'TRUE' AND T2.ReviewDate BETWEEN '2013-01-03' AND '2013-10-26'
[ "How", "many", "female", "mailing", "list", "subscribers", "from", "Sacramento", "gave", "a", "4", "-", "star", "rating", "between", "1/3/2016", "and", "10/26/2016", "?" ]
[ { "id": 9, "type": "column", "value": "subscribedtoemaillist" }, { "id": 1, "type": "table", "value": "rootbeerreview" }, { "id": 2, "type": "column", "value": "customerid" }, { "id": 3, "type": "column", "value": "starrating" }, { "id": 6, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12, 13 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, "t...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-VALUE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O" ]
6,101
city_record
spider:train_spider.json:6299
Which cities have regional population above 8000000 or below 5000000?
SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000
[ "Which", "cities", "have", "regional", "population", "above", "8000000", "or", "below", "5000000", "?" ]
[ { "id": 2, "type": "column", "value": "regional_population" }, { "id": 3, "type": "value", "value": "10000000" }, { "id": 4, "type": "value", "value": "5000000" }, { "id": 0, "type": "table", "value": "city" }, { "id": 1, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id":...
[ "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
6,102
farm
spider:train_spider.json:22
What are the themes of farm competitions sorted by year in ascending order?
SELECT Theme FROM farm_competition ORDER BY YEAR ASC
[ "What", "are", "the", "themes", "of", "farm", "competitions", "sorted", "by", "year", "in", "ascending", "order", "?" ]
[ { "id": 0, "type": "table", "value": "farm_competition" }, { "id": 1, "type": "column", "value": "theme" }, { "id": 2, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
6,103
simpson_episodes
bird:train.json:4183
How many persons were born in New York, USA?
SELECT COUNT(name) FROM Person WHERE birth_place = 'New York City' AND birth_country = 'USA';
[ "How", "many", "persons", "were", "born", "in", "New", "York", ",", "USA", "?" ]
[ { "id": 3, "type": "value", "value": "New York City" }, { "id": 4, "type": "column", "value": "birth_country" }, { "id": 2, "type": "column", "value": "birth_place" }, { "id": 0, "type": "table", "value": "person" }, { "id": 1, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6, 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "O" ]
6,104
film_rank
spider:train_spider.json:4133
Who are the different directors of films which had market estimation in 1995?
SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995
[ "Who", "are", "the", "different", "directors", "of", "films", "which", "had", "market", "estimation", "in", "1995", "?" ]
[ { "id": 2, "type": "table", "value": "film_market_estimation" }, { "id": 0, "type": "column", "value": "director" }, { "id": 5, "type": "column", "value": "film_id" }, { "id": 1, "type": "table", "value": "film" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "I-TABLE", "O", "B-VALUE", "O" ]
6,105
headphone_store
bird:test.json:962
Find the neighborhood where no headphones are in stock.
SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id = t2.store_id
[ "Find", "the", "neighborhood", "where", "no", "headphones", "are", "in", "stock", "." ]
[ { "id": 1, "type": "column", "value": "neighborhood" }, { "id": 3, "type": "column", "value": "store_id" }, { "id": 0, "type": "table", "value": "store" }, { "id": 2, "type": "table", "value": "stock" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
6,106
sakila_1
spider:train_spider.json:2992
Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.
SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200
[ "Find", "all", "the", "films", "longer", "than", "100", "minutes", ",", "or", "rated", "PG", ",", "except", "those", "who", "cost", "more", "than", "200", "for", "replacement", ".", "List", "the", "titles", "." ]
[ { "id": 2, "type": "column", "value": "replacement_cost" }, { "id": 4, "type": "column", "value": "length" }, { "id": 6, "type": "column", "value": "rating" }, { "id": 1, "type": "column", "value": "title" }, { "id": 0, "type": "table", "va...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 25 ] }, { "entity_id": 2, "token_idxs": [ 21 ] }, { "entity_id": 3, "token_idxs": [ 19 ] }, { "entity_id": 4, "token_idxs": [ 4, 5 ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
6,107
codebase_comments
bird:train.json:636
What is the repository id of the method with tokenized name "crc parameters get hash code"?
SELECT T1.RepoId FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'crc parameters get hash code'
[ "What", "is", "the", "repository", "i", "d", "of", "the", "method", "with", "tokenized", "name", "\"", "crc", "parameters", "get", "hash", "code", "\"", "?" ]
[ { "id": 4, "type": "value", "value": "crc parameters get hash code" }, { "id": 3, "type": "column", "value": "nametokenized" }, { "id": 6, "type": "column", "value": "solutionid" }, { "id": 1, "type": "table", "value": "solution" }, { "id": 0, ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 13, 14, 15, ...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
6,108
human_resources
bird:train.json:8983
List the full names, gender and positions who's location is in New York city.
SELECT T1.firstname, T1.lastname, T1.gender, T3.positiontitle FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T2.locationcity = 'New York City'
[ "List", "the", "full", "names", ",", "gender", "and", "positions", "who", "'s", "location", "is", "in", "New", "York", "city", "." ]
[ { "id": 3, "type": "column", "value": "positiontitle" }, { "id": 6, "type": "value", "value": "New York City" }, { "id": 5, "type": "column", "value": "locationcity" }, { "id": 9, "type": "column", "value": "positionid" }, { "id": 10, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]