question_id
int64
0
16.1k
db_id
stringclasses
259 values
dber_id
stringlengths
15
29
question
stringlengths
16
325
SQL
stringlengths
18
1.25k
tokens
listlengths
4
62
entities
listlengths
0
21
entity_to_token
listlengths
20
20
dber_tags
listlengths
4
62
10,161
e_commerce
bird:test.json:90
How many kinds of products have not been sold?
SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )
[ "How", "many", "kinds", "of", "products", "have", "not", "been", "sold", "?" ]
[ { "id": 2, "type": "table", "value": "order_items" }, { "id": 1, "type": "column", "value": "product_id" }, { "id": 0, "type": "table", "value": "products" } ]
[ { "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", "O", "O", "O", "O" ]
10,162
olympics
bird:train.json:5033
What is the sport name of "Cross Country Skiing Men's 10/15 kilometres Pursuit" event?
SELECT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T2.event_name LIKE 'Cross Country Skiing Men%s 10/15 kilometres Pursuit'
[ "What", "is", "the", "sport", "name", "of", "\"", "Cross", "Country", "Skiing", "Men", "'s", "10/15", "kilometres", "Pursuit", "\"", "event", "?" ]
[ { "id": 4, "type": "value", "value": "Cross Country Skiing Men%s 10/15 kilometres Pursuit" }, { "id": 0, "type": "column", "value": "sport_name" }, { "id": 3, "type": "column", "value": "event_name" }, { "id": 6, "type": "column", "value": "sport_id" }, ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7, 8, 9, 1...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-TABLE", "O" ]
10,163
ice_hockey_draft
bird:train.json:6915
What is the height of David Bornhammar in inches?
SELECT T2.height_in_inch FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'David Bornhammar'
[ "What", "is", "the", "height", "of", "David", "Bornhammar", "in", "inches", "?" ]
[ { "id": 4, "type": "value", "value": "David Bornhammar" }, { "id": 0, "type": "column", "value": "height_in_inch" }, { "id": 2, "type": "table", "value": "height_info" }, { "id": 1, "type": "table", "value": "playerinfo" }, { "id": 3, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5, 6 ] }, { "entity_id": 5, "token_idxs": [ ...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "O" ]
10,164
app_store
bird:train.json:2572
List all free sports Apps and their translated review.
SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Type = 'Free' AND T1.Category = 'SPORTS'
[ "List", "all", "free", "sports", "Apps", "and", "their", "translated", "review", "." ]
[ { "id": 1, "type": "column", "value": "translated_review" }, { "id": 3, "type": "table", "value": "user_reviews" }, { "id": 2, "type": "table", "value": "playstore" }, { "id": 6, "type": "column", "value": "category" }, { "id": 7, "type": "valu...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-VALUE", "B-VALUE", "B-COLUMN", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
10,165
dorm_1
spider:train_spider.json:5724
Find the number of students in each major.
SELECT count(*) , major FROM student GROUP BY major
[ "Find", "the", "number", "of", "students", "in", "each", "major", "." ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "major" } ]
[ { "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" ]
10,166
customers_and_addresses
spider:train_spider.json:6132
What are the name and ID of the product bought the most.
SELECT t2.product_details , t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY sum(t1.order_quantity) LIMIT 1
[ "What", "are", "the", "name", "and", "ID", "of", "the", "product", "bought", "the", "most", "." ]
[ { "id": 1, "type": "column", "value": "product_details" }, { "id": 4, "type": "column", "value": "order_quantity" }, { "id": 2, "type": "table", "value": "order_items" }, { "id": 0, "type": "column", "value": "product_id" }, { "id": 3, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
10,167
codebase_comments
bird:train.json:622
For the method has the summary of "Refetches the Entity from the persistent storage. Refetch is used to re-load an Entity which is marked "Out-of-sync", due to a save action. Refetching an empty Entity has no effect.", what is its solution path?
SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Summary = 'Refetches the Entity FROM the persistent storage. Refetch is used to re-load an Entity which is marked "Out-of-sync", due to a save action. Refetching an empty Entity has no effect.'
[ "For", "the", "method", "has", "the", "summary", "of", "\"", "Refetches", "the", "Entity", "from", "the", "persistent", "storage", ".", "Refetch", "is", "used", "to", "re", "-", "load", "an", "Entity", "which", "is", "marked", "\"", "Out", "-", "of", "...
[ { "id": 4, "type": "value", "value": "Refetches the Entity FROM the persistent storage. Refetch is used to re-load an Entity which is marked \"Out-of-sync\", due to a save action. Refetching an empty Entity has no effect." }, { "id": 6, "type": "column", "value": "solutionid" }, { ...
[ { "entity_id": 0, "token_idxs": [ 56 ] }, { "entity_id": 1, "token_idxs": [ 55 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 8, 9, ...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", ...
10,169
food_inspection_2
bird:train.json:6222
What is the restaurant's name at "41.9532864854" latitude and "-87.7673790701422" longitude?
SELECT dba_name FROM establishment WHERE latitude = 41.9532864854 AND longitude = -87.7673790701422 AND facility_type = 'Restaurant'
[ "What", "is", "the", "restaurant", "'s", "name", "at", "\"", "41.9532864854", "\"", "latitude", "and", "\"", "-87.7673790701422", "\"", "longitude", "?" ]
[ { "id": 5, "type": "value", "value": "-87.7673790701422" }, { "id": 0, "type": "table", "value": "establishment" }, { "id": 3, "type": "value", "value": "41.9532864854" }, { "id": 6, "type": "column", "value": "facility_type" }, { "id": 7, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entit...
[ "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-COLUMN", "O" ]
10,170
social_media
bird:train.json:787
Users in which country has posted more numbers of positive tweets, Argentina or Australia?
SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.Country IN ('Argentina', 'Australia') AND T1.Sentiment > 0 GROUP BY T2.Country ORDER BY COUNT(T1.TweetID) DESC LIMIT 1
[ "Users", "in", "which", "country", "has", "posted", "more", "numbers", "of", "positive", "tweets", ",", "Argentina", "or", "Australia", "?" ]
[ { "id": 3, "type": "column", "value": "locationid" }, { "id": 4, "type": "value", "value": "Argentina" }, { "id": 5, "type": "value", "value": "Australia" }, { "id": 6, "type": "column", "value": "sentiment" }, { "id": 2, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
10,171
video_games
bird:train.json:3332
How many platforms are available for the game Pro Evolution Soccer 2016?
SELECT COUNT(T2.id) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T4.game_name = 'Pro Evolution Soccer 2016'
[ "How", "many", "platforms", "are", "available", "for", "the", "game", "Pro", "Evolution", "Soccer", "2016", "?" ]
[ { "id": 2, "type": "value", "value": "Pro Evolution Soccer 2016" }, { "id": 8, "type": "column", "value": "game_publisher_id" }, { "id": 4, "type": "table", "value": "game_publisher" }, { "id": 6, "type": "table", "value": "game_platform" }, { "id"...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8, 9, 10, 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "enti...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
10,172
tracking_grants_for_research
spider:train_spider.json:4359
What are the details of the project with no outcomes?
SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )
[ "What", "are", "the", "details", "of", "the", "project", "with", "no", "outcomes", "?" ]
[ { "id": 3, "type": "table", "value": "project_outcomes" }, { "id": 1, "type": "column", "value": "project_details" }, { "id": 2, "type": "column", "value": "project_id" }, { "id": 0, "type": "table", "value": "projects" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 1, 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8, 9 ] }, { "entity_id": 4, "token_idxs": [...
[ "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
10,173
university_rank
bird:test.json:1784
What is the name of the university with the most majors ranked number 1?
SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "university", "with", "the", "most", "majors", "ranked", "number", "1", "?" ]
[ { "id": 0, "type": "column", "value": "university_name" }, { "id": 1, "type": "table", "value": "major_ranking" }, { "id": 5, "type": "column", "value": "university_id" }, { "id": 2, "type": "table", "value": "university" }, { "id": 3, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "enti...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
10,174
books
bird:train.json:6008
List all the authors who wrote fewer pages than the average.
SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.num_pages < ( SELECT AVG(num_pages) FROM book )
[ "List", "all", "the", "authors", "who", "wrote", "fewer", "pages", "than", "the", "average", "." ]
[ { "id": 0, "type": "column", "value": "author_name" }, { "id": 4, "type": "table", "value": "book_author" }, { "id": 2, "type": "column", "value": "num_pages" }, { "id": 5, "type": "column", "value": "author_id" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
10,175
address_1
bird:test.json:795
Find the number of students living in each city.
SELECT T1.city_name , count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.city_code
[ "Find", "the", "number", "of", "students", "living", "in", "each", "city", "." ]
[ { "id": 0, "type": "column", "value": "city_code" }, { "id": 1, "type": "column", "value": "city_name" }, { "id": 3, "type": "table", "value": "student" }, { "id": 2, "type": "table", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O" ]
10,176
mondial_geo
bird:train.json:8334
Please state the longest river that flows to the Mediterranean Sea.
SELECT Name FROM river WHERE Sea = 'Mediterranean Sea' ORDER BY Length DESC LIMIT 1
[ "Please", "state", "the", "longest", "river", "that", "flows", "to", "the", "Mediterranean", "Sea", "." ]
[ { "id": 3, "type": "value", "value": "Mediterranean Sea" }, { "id": 4, "type": "column", "value": "length" }, { "id": 0, "type": "table", "value": "river" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
10,178
allergy_1
spider:train_spider.json:510
How many students who are female are allergic to milk or eggs?
SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = "F" AND T1.allergy = "Milk" OR T1.allergy = "Eggs"
[ "How", "many", "students", "who", "are", "female", "are", "allergic", "to", "milk", "or", "eggs", "?" ]
[ { "id": 0, "type": "table", "value": "has_allergy" }, { "id": 1, "type": "table", "value": "student" }, { "id": 3, "type": "column", "value": "allergy" }, { "id": 2, "type": "column", "value": "stuid" }, { "id": 4, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
10,179
document_management
spider:train_spider.json:4527
What is the name of the document with the most number of sections?
SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "document", "with", "the", "most", "number", "of", "sections", "?" ]
[ { "id": 3, "type": "table", "value": "document_sections" }, { "id": 0, "type": "column", "value": "document_code" }, { "id": 1, "type": "column", "value": "document_name" }, { "id": 2, "type": "table", "value": "documents" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
10,180
cre_Theme_park
spider:train_spider.json:5954
Which tourist attractions are visited at least twice? Give me their names and ids.
SELECT T1.Name , T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) >= 2
[ "Which", "tourist", "attractions", "are", "visited", "at", "least", "twice", "?", "Give", "me", "their", "names", "and", "ids", "." ]
[ { "id": 0, "type": "column", "value": "tourist_attraction_id" }, { "id": 2, "type": "table", "value": "tourist_attractions" }, { "id": 3, "type": "table", "value": "visits" }, { "id": 1, "type": "column", "value": "name" }, { "id": 4, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 1, 2 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "B-TABLE", "I-TABLE", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
10,181
movie_1
spider:train_spider.json:2486
For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title.
SELECT T1.title , T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title ORDER BY T1.director , T1.title
[ "For", "all", "directors", "who", "directed", "more", "than", "one", "movie", ",", "return", "the", "titles", "of", "all", "movies", "directed", "by", "them", ",", "along", "with", "the", "director", "name", ".", "Sort", "by", "director", "name", ",", "t...
[ { "id": 1, "type": "column", "value": "director" }, { "id": 0, "type": "column", "value": "title" }, { "id": 2, "type": "table", "value": "movie" } ]
[ { "entity_id": 0, "token_idxs": [ 33 ] }, { "entity_id": 1, "token_idxs": [ 23 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,182
wine_1
spider:train_spider.json:6594
What are the appelations for wines produced after 2008 but not in the Central Coast area?
SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = "Central Coast"
[ "What", "are", "the", "appelations", "for", "wines", "produced", "after", "2008", "but", "not", "in", "the", "Central", "Coast", "area", "?" ]
[ { "id": 6, "type": "column", "value": "Central Coast" }, { "id": 1, "type": "table", "value": "appellations" }, { "id": 2, "type": "column", "value": "appelation" }, { "id": 0, "type": "table", "value": "wine" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O" ]
10,183
manufacturer
spider:train_spider.json:3404
Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.
SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component < 6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_...
[ "Find", "the", "name", "of", "the", "company", "that", "produces", "both", "furnitures", "with", "less", "than", "6", "components", "and", "furnitures", "with", "more", "than", "10", "components", "." ]
[ { "id": 6, "type": "table", "value": "furniture_manufacte" }, { "id": 2, "type": "column", "value": "num_of_component" }, { "id": 7, "type": "column", "value": "manufacturer_id" }, { "id": 1, "type": "table", "value": "manufacturer" }, { "id": 8, ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 20 ] }, { "enti...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "O" ]
10,184
insurance_and_eClaims
spider:train_spider.json:1516
What are the total amount and average amount paid in claim headers?
SELECT sum(amount_piad) , avg(amount_piad) FROM claim_headers
[ "What", "are", "the", "total", "amount", "and", "average", "amount", "paid", "in", "claim", "headers", "?" ]
[ { "id": 0, "type": "table", "value": "claim_headers" }, { "id": 1, "type": "column", "value": "amount_piad" } ]
[ { "entity_id": 0, "token_idxs": [ 10, 11 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "I-TABLE", "O" ]
10,185
movies_4
bird:train.json:515
Calculate the revenues made by Fantasy Films and Live Entertainment.
SELECT SUM(T3.revenue) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name IN ('Fantasy Films', 'Live Entertainment')
[ "Calculate", "the", "revenues", "made", "by", "Fantasy", "Films", "and", "Live", "Entertainment", "." ]
[ { "id": 3, "type": "value", "value": "Live Entertainment" }, { "id": 5, "type": "table", "value": "production_company" }, { "id": 2, "type": "value", "value": "Fantasy Films" }, { "id": 6, "type": "table", "value": "movie_company" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "en...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "O" ]
10,186
movies_4
bird:train.json:478
Write all the keywords belonging to the movie 'Sky Captain and the World of Tomorrow.'
SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T1.title = 'Sky Captain and the World of Tomorrow'
[ "Write", "all", "the", "keywords", "belonging", "to", "the", "movie", "'", "Sky", "Captain", "and", "the", "World", "of", "Tomorrow", ".", "'" ]
[ { "id": 3, "type": "value", "value": "Sky Captain and the World of Tomorrow" }, { "id": 5, "type": "table", "value": "movie_keywords" }, { "id": 0, "type": "column", "value": "keyword_name" }, { "id": 6, "type": "column", "value": "keyword_id" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 0 ] }, { "entity_id": 3, "token_idxs": [ 9, 10, 11, 12, 13, 14, 15 ] }, { "entity_id"...
[ "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
10,187
party_host
spider:train_spider.json:2678
Show the themes of parties and the names of the party hosts.
SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID
[ "Show", "the", "themes", "of", "parties", "and", "the", "names", "of", "the", "party", "hosts", "." ]
[ { "id": 0, "type": "column", "value": "party_theme" }, { "id": 3, "type": "table", "value": "party_host" }, { "id": 5, "type": "column", "value": "party_id" }, { "id": 6, "type": "column", "value": "host_id" }, { "id": 2, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "O" ]
10,188
student_loan
bird:train.json:4476
How many disabled students are female?
SELECT COUNT(name) FROM disabled WHERE name NOT IN ( SELECT name FROM male )
[ "How", "many", "disabled", "students", "are", "female", "?" ]
[ { "id": 0, "type": "table", "value": "disabled" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "table", "value": "male" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O" ]
10,189
codebase_community
bird:dev.json:543
For the post that got the most number of answers owned by csgillespie, how many answers did it get?
SELECT MAX(T1.AnswerCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
[ "For", "the", "post", "that", "got", "the", "most", "number", "of", "answers", "owned", "by", "csgillespie", ",", "how", "many", "answers", "did", "it", "get", "?" ]
[ { "id": 2, "type": "column", "value": "displayname" }, { "id": 3, "type": "value", "value": "csgillespie" }, { "id": 4, "type": "column", "value": "answercount" }, { "id": 5, "type": "column", "value": "owneruserid" }, { "id": 0, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O" ]
10,190
student_club
bird:dev.json:1411
State what kind of expenses that Sacha Harrison incurred?
SELECT T2.expense_description FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Sacha' AND T1.last_name = 'Harrison'
[ "State", "what", "kind", "of", "expenses", "that", "Sacha", "Harrison", "incurred", "?" ]
[ { "id": 0, "type": "column", "value": "expense_description" }, { "id": 4, "type": "column", "value": "link_to_member" }, { "id": 5, "type": "column", "value": "first_name" }, { "id": 3, "type": "column", "value": "member_id" }, { "id": 7, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "B-VALUE", "O", "O" ]
10,191
customers_and_orders
bird:test.json:276
How many customers use each payment method?
SELECT payment_method_code , count(*) FROM Customers GROUP BY payment_method_code
[ "How", "many", "customers", "use", "each", "payment", "method", "?" ]
[ { "id": 1, "type": "column", "value": "payment_method_code" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "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, "toke...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,192
planet_1
bird:test.json:1927
Find the name of employees whose salary is above the average salary or more than 5000.
SELECT Name FROM Employee WHERE Salary > 5000 OR Salary > (SELECT avg(salary) FROM employee)
[ "Find", "the", "name", "of", "employees", "whose", "salary", "is", "above", "the", "average", "salary", "or", "more", "than", "5000", "." ]
[ { "id": 0, "type": "table", "value": "employee" }, { "id": 2, "type": "column", "value": "salary" }, { "id": 1, "type": "column", "value": "name" }, { "id": 3, "type": "value", "value": "5000" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
10,193
retails
bird:train.json:6899
Among the items shipped in 1994 via truck, how many items were returned?
SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1994' AND l_returnflag = 'R' AND l_shipmode = 'TRUCK'
[ "Among", "the", "items", "shipped", "in", "1994", "via", "truck", ",", "how", "many", "items", "were", "returned", "?" ]
[ { "id": 3, "type": "column", "value": "l_returnflag" }, { "id": 1, "type": "column", "value": "l_orderkey" }, { "id": 5, "type": "column", "value": "l_shipmode" }, { "id": 8, "type": "column", "value": "l_shipdate" }, { "id": 0, "type": "table"...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O" ]
10,194
cre_Drama_Workshop_Groups
spider:train_spider.json:5146
What are the order dates of orders with price higher than 1000?
SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000
[ "What", "are", "the", "order", "dates", "of", "orders", "with", "price", "higher", "than", "1000", "?" ]
[ { "id": 4, "type": "table", "value": "customer_orders" }, { "id": 2, "type": "column", "value": "product_price" }, { "id": 5, "type": "table", "value": "order_items" }, { "id": 0, "type": "column", "value": "order_date" }, { "id": 6, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,196
network_2
spider:train_spider.json:4447
What are the names of the people who are older 40 but no friends under age 30?
SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)
[ "What", "are", "the", "names", "of", "the", "people", "who", "are", "older", "40", "but", "no", "friends", "under", "age", "30", "?" ]
[ { "id": 2, "type": "table", "value": "personfriend" }, { "id": 1, "type": "table", "value": "person" }, { "id": 3, "type": "column", "value": "friend" }, { "id": 0, "type": "column", "value": "name" }, { "id": 4, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "enti...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "O" ]
10,197
regional_sales
bird:train.json:2598
Describe the customer names and lasting delivery periods for the product of "Bedroom Furniture" by wholesale channel in 2019.
SELECT T1.`Customer Names`, T2.DeliveryDate FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T2.`Sales Channel` = 'Wholesale' AND T3.`Product Name` = 'Bedroom Furniture' AND T2.OrderDate LIKE '%/%/19'
[ "Describe", "the", "customer", "names", "and", "lasting", "delivery", "periods", "for", "the", "product", "of", "\"", "Bedroom", "Furniture", "\"", "by", "wholesale", "channel", "in", "2019", "." ]
[ { "id": 10, "type": "value", "value": "Bedroom Furniture" }, { "id": 0, "type": "column", "value": "Customer Names" }, { "id": 7, "type": "column", "value": "Sales Channel" }, { "id": 1, "type": "column", "value": "deliverydate" }, { "id": 4, "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O" ]
10,198
synthea
bird:train.json:1514
What is the percentage of female patients who started the care plan in 2010?
SELECT CAST(SUM(CASE WHEN T2.gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.PATIENT) AS percentage FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE strftime('%Y', T1.START) = '2010'
[ "What", "is", "the", "percentage", "of", "female", "patients", "who", "started", "the", "care", "plan", "in", "2010", "?" ]
[ { "id": 0, "type": "table", "value": "careplans" }, { "id": 1, "type": "table", "value": "patients" }, { "id": 3, "type": "column", "value": "patient" }, { "id": 9, "type": "column", "value": "gender" }, { "id": 5, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 10, 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "B-VALUE", "O" ]
10,199
food_inspection_2
bird:train.json:6191
Provide the first name of employee who did inspection ID 48225?
SELECT T1.first_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 48225
[ "Provide", "the", "first", "name", "of", "employee", "who", "did", "inspection", "ID", "48225", "?" ]
[ { "id": 3, "type": "column", "value": "inspection_id" }, { "id": 5, "type": "column", "value": "employee_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 2, "type": "table", "value": "inspection" }, { "id": 1, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 10 ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
10,200
roller_coaster
spider:train_spider.json:6207
Show the statuses of roller coasters longer than 3300 or higher than 100.
SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100
[ "Show", "the", "statuses", "of", "roller", "coasters", "longer", "than", "3300", "or", "higher", "than", "100", "." ]
[ { "id": 0, "type": "table", "value": "roller_coaster" }, { "id": 1, "type": "column", "value": "status" }, { "id": 2, "type": "column", "value": "length" }, { "id": 4, "type": "column", "value": "height" }, { "id": 3, "type": "value", "valu...
[ { "entity_id": 0, "token_idxs": [ 4, 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
10,201
college_1
spider:train_spider.json:3213
Which school has the smallest amount of professors?
SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1
[ "Which", "school", "has", "the", "smallest", "amount", "of", "professors", "?" ]
[ { "id": 0, "type": "column", "value": "school_code" }, { "id": 1, "type": "table", "value": "department" }, { "id": 2, "type": "table", "value": "professor" }, { "id": 3, "type": "column", "value": "dept_code" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "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", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,202
works_cycles
bird:train.json:7237
List all the names of products with the special offer "15".
SELECT T2.Name FROM SpecialOfferProduct AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.SpecialOfferID = 15
[ "List", "all", "the", "names", "of", "products", "with", "the", "special", "offer", "\"", "15", "\"", "." ]
[ { "id": 1, "type": "table", "value": "specialofferproduct" }, { "id": 3, "type": "column", "value": "specialofferid" }, { "id": 5, "type": "column", "value": "productid" }, { "id": 2, "type": "table", "value": "product" }, { "id": 0, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O" ]
10,203
language_corpus
bird:train.json:5753
What percentage of Catalan-language Wikipedia pages have more than 10,000 words?
SELECT CAST(COUNT(CASE WHEN T2.words > 10000 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.page) FROM langs AS T1 INNER JOIN pages AS T2 ON T1.lid = T2.lid WHERE T1.lang = 'ca'
[ "What", "percentage", "of", "Catalan", "-", "language", "Wikipedia", "pages", "have", "more", "than", "10,000", "words", "?" ]
[ { "id": 0, "type": "table", "value": "langs" }, { "id": 1, "type": "table", "value": "pages" }, { "id": 8, "type": "column", "value": "words" }, { "id": 9, "type": "value", "value": "10000" }, { "id": 2, "type": "column", "value": "lang" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 11 ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
10,204
music_tracker
bird:train.json:2068
Provide the title, release year and the tag associated with the live album that has the highest number of downloads?
SELECT T1.groupName, T1.groupYear, T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'live album' ORDER BY T1.totalSnatched DESC LIMIT 1
[ "Provide", "the", "title", ",", "release", "year", "and", "the", "tag", "associated", "with", "the", "live", "album", "that", "has", "the", "highest", "number", "of", "downloads", "?" ]
[ { "id": 7, "type": "column", "value": "totalsnatched" }, { "id": 5, "type": "column", "value": "releasetype" }, { "id": 6, "type": "value", "value": "live album" }, { "id": 0, "type": "column", "value": "groupname" }, { "id": 1, "type": "column...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "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-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,205
sing_contest
bird:test.json:743
List the names and languages of the songs .
select name , language from songs
[ "List", "the", "names", "and", "languages", "of", "the", "songs", "." ]
[ { "id": 2, "type": "column", "value": "language" }, { "id": 0, "type": "table", "value": "songs" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
10,206
mondial_geo
bird:train.json:8236
List all countries with negative growth in population. State the country, population and growth.
SELECT T1.Name, T1.Population, T2.Population_Growth FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country WHERE T2.Population_Growth < 0
[ "List", "all", "countries", "with", "negative", "growth", "in", "population", ".", "State", "the", "country", ",", "population", "and", "growth", "." ]
[ { "id": 2, "type": "column", "value": "population_growth" }, { "id": 1, "type": "column", "value": "population" }, { "id": 4, "type": "table", "value": "population" }, { "id": 3, "type": "table", "value": "country" }, { "id": 7, "type": "column...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13, 14, 15 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
10,207
software_company
bird:train.json:8536
Give the level of education and occupation of customers ages from 20 to 35 with an income K of 2000 and below.
SELECT T1.EDUCATIONNUM, T1.OCCUPATION FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T2.INCOME_K < 2000 AND T1.age >= 20 AND T1.age <= 35
[ "Give", "the", "level", "of", "education", "and", "occupation", "of", "customers", "ages", "from", "20", "to", "35", "with", "an", "income", "K", "of", "2000", "and", "below", "." ]
[ { "id": 0, "type": "column", "value": "educationnum" }, { "id": 1, "type": "column", "value": "occupation" }, { "id": 2, "type": "table", "value": "customers" }, { "id": 5, "type": "column", "value": "income_k" }, { "id": 3, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O", "O" ]
10,208
menu
bird:train.json:5521
List down the name of dishes that were positioned on the left upper corner.
SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.xpos < 0.25 AND T2.ypos < 0.25
[ "List", "down", "the", "name", "of", "dishes", "that", "were", "positioned", "on", "the", "left", "upper", "corner", "." ]
[ { "id": 2, "type": "table", "value": "menuitem" }, { "id": 4, "type": "column", "value": "dish_id" }, { "id": 0, "type": "column", "value": "name" }, { "id": 1, "type": "table", "value": "dish" }, { "id": 5, "type": "column", "value": "xpos...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,210
world
bird:train.json:7915
In countries with constitutional monarchy, what is the percentage of cities located in the district of England?
SELECT CAST(SUM(CASE WHEN T1.District = 'England' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GovernmentForm = 'Constitutional Monarchy'
[ "In", "countries", "with", "constitutional", "monarchy", ",", "what", "is", "the", "percentage", "of", "cities", "located", "in", "the", "district", "of", "England", "?" ]
[ { "id": 3, "type": "value", "value": "Constitutional Monarchy" }, { "id": 2, "type": "column", "value": "governmentform" }, { "id": 4, "type": "column", "value": "countrycode" }, { "id": 9, "type": "column", "value": "district" }, { "id": 1, "t...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3, 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
10,211
soccer_2016
bird:train.json:1871
Which team did CK Kapugedera belong to? How many matches did he play?
SELECT T3.Team_Name, COUNT(T2.Match_Id) FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T2.Player_Id = T1.Player_Id INNER JOIN Team AS T3 ON T3.Team_Id = T2.Team_Id WHERE T1.Player_Name = 'CK Kapugedera'
[ "Which", "team", "did", "CK", "Kapugedera", "belong", "to", "?", "How", "many", "matches", "did", "he", "play", "?" ]
[ { "id": 3, "type": "value", "value": "CK Kapugedera" }, { "id": 6, "type": "table", "value": "player_match" }, { "id": 2, "type": "column", "value": "player_name" }, { "id": 0, "type": "column", "value": "team_name" }, { "id": 8, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3, 4 ] }, { "entity_id": 4, "token_idxs": [ 10, 11 ] }, { "...
[ "O", "B-TABLE", "B-COLUMN", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O" ]
10,212
products_gen_characteristics
spider:train_spider.json:5574
Find the number of the products that have their color described as "red" and have a characteristic named "slow".
SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "slow"
[ "Find", "the", "number", "of", "the", "products", "that", "have", "their", "color", "described", "as", "\"", "red", "\"", "and", "have", "a", "characteristic", "named", "\"", "slow", "\"", "." ]
[ { "id": 8, "type": "table", "value": "product_characteristics" }, { "id": 5, "type": "column", "value": "characteristic_name" }, { "id": 3, "type": "column", "value": "color_description" }, { "id": 9, "type": "column", "value": "characteristic_id" }, {...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "enti...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
10,213
mental_health_survey
bird:train.json:4576
How many female users were surveyed in the mental health survey for 2017 in the state of Nebraska?
SELECT COUNT(*) FROM ( SELECT T2.UserID FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID INNER JOIN Survey AS T3 ON T2.SurveyID = T3.SurveyID WHERE T3.Description = 'mental health survey for 2017' AND T1.questionid = 2 AND T2.AnswerText = 'Female' UNION SELECT T2.UserID FROM Question AS T1 I...
[ "How", "many", "female", "users", "were", "surveyed", "in", "the", "mental", "health", "survey", "for", "2017", "in", "the", "state", "of", "Nebraska", "?" ]
[ { "id": 6, "type": "value", "value": "mental health survey for 2017" }, { "id": 5, "type": "column", "value": "description" }, { "id": 7, "type": "column", "value": "questionid" }, { "id": 9, "type": "column", "value": "answertext" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity...
[ "O", "O", "B-VALUE", "B-COLUMN", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "B-TABLE", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "B-VALUE", "O" ]
10,214
vehicle_rent
bird:test.json:408
Which type of powertrain is most common?
SELECT type_of_powertrain FROM vehicles GROUP BY type_of_powertrain ORDER BY count(*) DESC LIMIT 1
[ "Which", "type", "of", "powertrain", "is", "most", "common", "?" ]
[ { "id": 1, "type": "column", "value": "type_of_powertrain" }, { "id": 0, "type": "table", "value": "vehicles" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1, 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_id...
[ "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
10,215
works_cycles
bird:train.json:7209
Among the employees born before 1980 , how many of them are single?
SELECT COUNT(BusinessEntityID) FROM Employee WHERE MaritalStatus = 's' AND BirthDate < '1980-1-1'
[ "Among", "the", "employees", "born", "before", "1980", ",", "how", "many", "of", "them", "are", "single", "?" ]
[ { "id": 1, "type": "column", "value": "businessentityid" }, { "id": 2, "type": "column", "value": "maritalstatus" }, { "id": 4, "type": "column", "value": "birthdate" }, { "id": 0, "type": "table", "value": "employee" }, { "id": 5, "type": "val...
[ { "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": [ 5 ...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,216
card_games
bird:dev.json:428
What is the name of set number 5 and its translation?
SELECT T1.name, T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.id = 5 GROUP BY T1.name, T2.translation
[ "What", "is", "the", "name", "of", "set", "number", "5", "and", "its", "translation", "?" ]
[ { "id": 3, "type": "table", "value": "set_translations" }, { "id": 1, "type": "column", "value": "translation" }, { "id": 7, "type": "column", "value": "setcode" }, { "id": 0, "type": "column", "value": "name" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "B-COLUMN", "O" ]
10,217
bike_1
spider:train_spider.json:118
What is the average latitude and longitude in San Jose?
SELECT avg(lat) , avg(long) FROM station WHERE city = "San Jose"
[ "What", "is", "the", "average", "latitude", "and", "longitude", "in", "San", "Jose", "?" ]
[ { "id": 2, "type": "column", "value": "San Jose" }, { "id": 0, "type": "table", "value": "station" }, { "id": 1, "type": "column", "value": "city" }, { "id": 4, "type": "column", "value": "long" }, { "id": 3, "type": "column", "value": "lat...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O" ]
10,218
products_gen_characteristics
spider:train_spider.json:5577
How many products have their color described as 'white' or have a characteristic with the name 'hot'?
SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "white" OR t3.characteristic_name = "hot"
[ "How", "many", "products", "have", "their", "color", "described", "as", "'", "white", "'", "or", "have", "a", "characteristic", "with", "the", "name", "'", "hot", "'", "?" ]
[ { "id": 8, "type": "table", "value": "product_characteristics" }, { "id": 5, "type": "column", "value": "characteristic_name" }, { "id": 3, "type": "column", "value": "color_description" }, { "id": 9, "type": "column", "value": "characteristic_id" }, {...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
10,219
works_cycles
bird:train.json:7349
How many vendors does Adventure Works still work with but are not preferable?
SELECT COUNT(BusinessEntityID) FROM Vendor WHERE PreferredVendorStatus = 0 AND ActiveFlag = 1
[ "How", "many", "vendors", "does", "Adventure", "Works", "still", "work", "with", "but", "are", "not", "preferable", "?" ]
[ { "id": 2, "type": "column", "value": "preferredvendorstatus" }, { "id": 1, "type": "column", "value": "businessentityid" }, { "id": 4, "type": "column", "value": "activeflag" }, { "id": 0, "type": "table", "value": "vendor" }, { "id": 3, "type...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,220
disney
bird:train.json:4623
Who is the director of the movie Pinocchio?
SELECT director FROM director WHERE name = 'Pinocchio'
[ "Who", "is", "the", "director", "of", "the", "movie", "Pinocchio", "?" ]
[ { "id": 3, "type": "value", "value": "Pinocchio" }, { "id": 0, "type": "table", "value": "director" }, { "id": 1, "type": "column", "value": "director" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
10,221
college_3
spider:train_spider.json:4680
What are the full names of the 3 instructors who teach the most courses?
SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3
[ "What", "are", "the", "full", "names", "of", "the", "3", "instructors", "who", "teach", "the", "most", "courses", "?" ]
[ { "id": 0, "type": "column", "value": "instructor" }, { "id": 4, "type": "table", "value": "faculty" }, { "id": 3, "type": "table", "value": "course" }, { "id": 1, "type": "column", "value": "fname" }, { "id": 2, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
10,222
legislator
bird:train.json:4818
State the opensecrets_id of the legislator whose YouTube name is Bluetkemeyer.
SELECT T1.opensecrets_id FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.youtube = 'BLuetkemeyer'
[ "State", "the", "opensecrets_id", "of", "the", "legislator", "whose", "YouTube", "name", "is", "Bluetkemeyer", "." ]
[ { "id": 0, "type": "column", "value": "opensecrets_id" }, { "id": 2, "type": "table", "value": "social-media" }, { "id": 4, "type": "value", "value": "BLuetkemeyer" }, { "id": 6, "type": "column", "value": "bioguide_id" }, { "id": 5, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
10,223
college_1
spider:train_spider.json:3268
What are the first names of all students who got a grade C in a class?
SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'
[ "What", "are", "the", "first", "names", "of", "all", "students", "who", "got", "a", "grade", "C", "in", "a", "class", "?" ]
[ { "id": 3, "type": "column", "value": "enroll_grade" }, { "id": 0, "type": "column", "value": "stu_fname" }, { "id": 1, "type": "table", "value": "student" }, { "id": 5, "type": "column", "value": "stu_num" }, { "id": 2, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O" ]
10,224
cre_Doc_Tracking_DB
spider:train_spider.json:4200
What is the id for the employee called Ebba?
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba"
[ "What", "is", "the", "i", "d", "for", "the", "employee", "called", "Ebba", "?" ]
[ { "id": 2, "type": "column", "value": "employee_name" }, { "id": 1, "type": "column", "value": "employee_id" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 3, "type": "column", "value": "Ebba" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O" ]
10,225
book_publishing_company
bird:train.json:220
What's Pedro S Afonso's job title?
SELECT T2.job_desc FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.fname = 'Pedro' AND T1.minit = 'S' AND T1.lname = 'Afonso'
[ "What", "'s", "Pedro", "S", "Afonso", "'s", "job", "title", "?" ]
[ { "id": 0, "type": "column", "value": "job_desc" }, { "id": 1, "type": "table", "value": "employee" }, { "id": 3, "type": "column", "value": "job_id" }, { "id": 9, "type": "value", "value": "Afonso" }, { "id": 4, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2 ...
[ "O", "O", "B-VALUE", "B-VALUE", "B-VALUE", "O", "B-TABLE", "O", "O" ]
10,226
card_games
bird:dev.json:525
Find the uuid of cards in which the old school format is restricted or banned.
SELECT uuid FROM legalities WHERE format = 'oldschool' AND (status = 'Banned' OR status = 'Restricted')
[ "Find", "the", "uuid", "of", "cards", "in", "which", "the", "old", "school", "format", "is", "restricted", "or", "banned", "." ]
[ { "id": 0, "type": "table", "value": "legalities" }, { "id": 6, "type": "value", "value": "Restricted" }, { "id": 3, "type": "value", "value": "oldschool" }, { "id": 2, "type": "column", "value": "format" }, { "id": 4, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
10,227
network_2
spider:train_spider.json:4473
What are the names of all people who are friends with Alice for the shortest amount of time?
SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT min(YEAR) FROM PersonFriend WHERE friend = 'Alice')
[ "What", "are", "the", "names", "of", "all", "people", "who", "are", "friends", "with", "Alice", "for", "the", "shortest", "amount", "of", "time", "?" ]
[ { "id": 0, "type": "table", "value": "personfriend" }, { "id": 2, "type": "column", "value": "friend" }, { "id": 3, "type": "value", "value": "Alice" }, { "id": 1, "type": "column", "value": "name" }, { "id": 4, "type": "column", "value": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O" ]
10,228
theme_gallery
spider:train_spider.json:1670
Return the name and country corresponding to the artist who has had the most exhibitions.
SELECT T2.name , T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY count(*) DESC LIMIT 1
[ "Return", "the", "name", "and", "country", "corresponding", "to", "the", "artist", "who", "has", "had", "the", "most", "exhibitions", "." ]
[ { "id": 3, "type": "table", "value": "exhibition" }, { "id": 0, "type": "column", "value": "artist_id" }, { "id": 2, "type": "column", "value": "country" }, { "id": 4, "type": "table", "value": "artist" }, { "id": 1, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,229
vehicle_rent
bird:test.json:423
Show the name and total hours of renting for each vehicle.
SELECT T2.name , sum(T1.total_hours) FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id
[ "Show", "the", "name", "and", "total", "hours", "of", "renting", "for", "each", "vehicle", "." ]
[ { "id": 2, "type": "table", "value": "renting_history" }, { "id": 4, "type": "column", "value": "total_hours" }, { "id": 5, "type": "column", "value": "vehicles_id" }, { "id": 3, "type": "table", "value": "vehicles" }, { "id": 1, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 4, 5 ] ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "B-TABLE", "O" ]
10,230
small_bank_1
spider:train_spider.json:1816
Find the name, checking balance and saving balance of all accounts in the bank.
SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid
[ "Find", "the", "name", ",", "checking", "balance", "and", "saving", "balance", "of", "all", "accounts", "in", "the", "bank", "." ]
[ { "id": 3, "type": "table", "value": "accounts" }, { "id": 4, "type": "table", "value": "checking" }, { "id": 0, "type": "column", "value": "balance" }, { "id": 2, "type": "table", "value": "savings" }, { "id": 5, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
10,231
flight_1
spider:train_spider.json:427
Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Airbus A340-300"
[ "Show", "names", "for", "all", "employees", "who", "have", "certificates", "on", "both", "Boeing", "737", "-", "800", "and", "Airbus", "A340", "-", "300", "." ]
[ { "id": 3, "type": "column", "value": "Airbus A340-300" }, { "id": 2, "type": "column", "value": "Boeing 737-800" }, { "id": 5, "type": "table", "value": "certificate" }, { "id": 1, "type": "table", "value": "aircraft" }, { "id": 4, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10, 11, 12, 13 ] }, { "entity_id": 3, "token_idxs": [ 15, 16, 17, 18 ] }, { "entity_i...
[ "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "B-COLUMN", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
10,232
hospital_1
spider:train_spider.json:3936
What are the unique block codes that have available rooms?
SELECT DISTINCT blockcode FROM room WHERE unavailable = 0
[ "What", "are", "the", "unique", "block", "codes", "that", "have", "available", "rooms", "?" ]
[ { "id": 2, "type": "column", "value": "unavailable" }, { "id": 1, "type": "column", "value": "blockcode" }, { "id": 0, "type": "table", "value": "room" }, { "id": 3, "type": "value", "value": "0" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
10,233
government_shift
bird:test.json:357
How many services are there?
SELECT count(*) FROM services
[ "How", "many", "services", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "services" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O" ]
10,234
shooting
bird:train.json:2476
Of all male officers, what percentage are black officers?
SELECT CAST(SUM(race = 'B') AS REAL) * 100 / COUNT(case_number) FROM officers WHERE gender = 'M'
[ "Of", "all", "male", "officers", ",", "what", "percentage", "are", "black", "officers", "?" ]
[ { "id": 4, "type": "column", "value": "case_number" }, { "id": 0, "type": "table", "value": "officers" }, { "id": 1, "type": "column", "value": "gender" }, { "id": 5, "type": "column", "value": "race" }, { "id": 3, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O" ]
10,235
simpson_episodes
bird:train.json:4248
Please indicate the birthplace of the crew which name is Dan Castellaneta.
SELECT birth_place FROM Person WHERE name = 'Dan Castellaneta';
[ "Please", "indicate", "the", "birthplace", "of", "the", "crew", "which", "name", "is", "Dan", "Castellaneta", "." ]
[ { "id": 3, "type": "value", "value": "Dan Castellaneta" }, { "id": 1, "type": "column", "value": "birth_place" }, { "id": 0, "type": "table", "value": "person" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
10,236
food_inspection_2
bird:train.json:6115
Please list the location coordinates of all the facilities that had an inspection on 2010/5/11.
SELECT DISTINCT T2.latitude, T2.longitude FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no WHERE T1.inspection_date = '2010-05-11'
[ "Please", "list", "the", "location", "coordinates", "of", "all", "the", "facilities", "that", "had", "an", "inspection", "on", "2010/5/11", "." ]
[ { "id": 4, "type": "column", "value": "inspection_date" }, { "id": 3, "type": "table", "value": "establishment" }, { "id": 2, "type": "table", "value": "inspection" }, { "id": 5, "type": "value", "value": "2010-05-11" }, { "id": 6, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 14 ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
10,237
car_road_race
bird:test.json:1319
Return the winning drivers of races who did not have the pole position of Junior Strous.
SELECT Winning_driver FROM race WHERE Pole_Position != 'Junior Strous'
[ "Return", "the", "winning", "drivers", "of", "races", "who", "did", "not", "have", "the", "pole", "position", "of", "Junior", "Strous", "." ]
[ { "id": 1, "type": "column", "value": "winning_driver" }, { "id": 2, "type": "column", "value": "pole_position" }, { "id": 3, "type": "value", "value": "Junior Strous" }, { "id": 0, "type": "table", "value": "race" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [ 14, 15 ] }, { "entity_id": 4, "token_...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
10,238
debit_card_specializing
bird:dev.json:1513
Which country's gas station had the first paid cusomer in 2012/8/25?
SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-25' ORDER BY T1.Time DESC LIMIT 1
[ "Which", "country", "'s", "gas", "station", "had", "the", "first", "paid", "cusomer", "in", "2012/8/25", "?" ]
[ { "id": 1, "type": "table", "value": "transactions_1k" }, { "id": 6, "type": "column", "value": "gasstationid" }, { "id": 2, "type": "table", "value": "gasstations" }, { "id": 4, "type": "value", "value": "2012-08-25" }, { "id": 0, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id"...
[ "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
10,239
cre_Students_Information_Systems
bird:test.json:495
Which student has the loan with the minimum value? List the student's biographical information.
SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id ORDER BY T2.amount_of_loan ASC LIMIT 1
[ "Which", "student", "has", "the", "loan", "with", "the", "minimum", "value", "?", "List", "the", "student", "'s", "biographical", "information", "." ]
[ { "id": 3, "type": "column", "value": "amount_of_loan" }, { "id": 2, "type": "table", "value": "student_loans" }, { "id": 4, "type": "column", "value": "student_id" }, { "id": 0, "type": "column", "value": "bio_data" }, { "id": 1, "type": "tabl...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 12, 13 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { "entity_id...
[ "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O" ]
10,240
aan_1
bird:test.json:1021
Which author had the most papers in the year 2009?
SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T1.year = 2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1
[ "Which", "author", "had", "the", "most", "papers", "in", "the", "year", "2009", "?" ]
[ { "id": 6, "type": "table", "value": "author_list" }, { "id": 0, "type": "column", "value": "author_id" }, { "id": 7, "type": "column", "value": "paper_id" }, { "id": 2, "type": "table", "value": "author" }, { "id": 5, "type": "table", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, "...
[ "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "O" ]
10,241
retail_world
bird:train.json:6487
From 1/3/97 to 8/10/97, how many orders were shipped via Federal Shipping?
SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' AND T1.ShippedDate BETWEEN '1997-03-01 00:00:00' AND '1997-10-08 23:59:59'
[ "From", "1/3/97", "to", "8/10/97", ",", "how", "many", "orders", "were", "shipped", "via", "Federal", "Shipping", "?" ]
[ { "id": 8, "type": "value", "value": "1997-03-01 00:00:00" }, { "id": 9, "type": "value", "value": "1997-10-08 23:59:59" }, { "id": 6, "type": "value", "value": "Federal Shipping" }, { "id": 5, "type": "column", "value": "companyname" }, { "id": 7,...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "I-VALUE", "O" ]
10,242
entertainment_awards
spider:train_spider.json:4613
Please show different types of artworks with the corresponding number of artworks of each type.
SELECT TYPE , COUNT(*) FROM artwork GROUP BY TYPE
[ "Please", "show", "different", "types", "of", "artworks", "with", "the", "corresponding", "number", "of", "artworks", "of", "each", "type", "." ]
[ { "id": 0, "type": "table", "value": "artwork" }, { "id": 1, "type": "column", "value": "type" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "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", "O", "B-COLUMN", "O" ]
10,243
codebase_community
bird:dev.json:671
What is the display name of the user who acquired the first Autobiographer badge?
SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.`Name` = 'Autobiographer' ORDER BY T2.Date LIMIT 1
[ "What", "is", "the", "display", "name", "of", "the", "user", "who", "acquired", "the", "first", "Autobiographer", "badge", "?" ]
[ { "id": 4, "type": "value", "value": "Autobiographer" }, { "id": 0, "type": "column", "value": "displayname" }, { "id": 2, "type": "table", "value": "badges" }, { "id": 7, "type": "column", "value": "userid" }, { "id": 1, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, ...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
10,245
cre_Drama_Workshop_Groups
spider:train_spider.json:5116
Show all payment method codes and the number of orders for each code.
SELECT payment_method_code , count(*) FROM INVOICES GROUP BY payment_method_code
[ "Show", "all", "payment", "method", "codes", "and", "the", "number", "of", "orders", "for", "each", "code", "." ]
[ { "id": 1, "type": "column", "value": "payment_method_code" }, { "id": 0, "type": "table", "value": "invoices" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_id...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,246
college_2
spider:train_spider.json:1471
What are the names of Art instructors who have taught a course, and the corresponding course id?
SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'
[ "What", "are", "the", "names", "of", "Art", "instructors", "who", "have", "taught", "a", "course", ",", "and", "the", "corresponding", "course", "i", "d", "?" ]
[ { "id": 2, "type": "table", "value": "instructor" }, { "id": 1, "type": "column", "value": "course_id" }, { "id": 4, "type": "column", "value": "dept_name" }, { "id": 3, "type": "table", "value": "teaches" }, { "id": 0, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O" ]
10,247
shipping
bird:train.json:5650
Who is the driver that transported the lightest weight of shipment? Provide the full name of the driver.
SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.weight ASC LIMIT 1
[ "Who", "is", "the", "driver", "that", "transported", "the", "lightest", "weight", "of", "shipment", "?", "Provide", "the", "full", "name", "of", "the", "driver", "." ]
[ { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 5, "type": "column", "value": "driver_id" }, { "id": 2, "type": "table", "value": "shipment" }, { "id": 3, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "enti...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
10,249
art_1
bird:test.json:1297
When did the artist who made the fewest sculptures die?
SELECT T1.deathYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) LIMIT 1
[ "When", "did", "the", "artist", "who", "made", "the", "fewest", "sculptures", "die", "?" ]
[ { "id": 0, "type": "column", "value": "sculptorid" }, { "id": 3, "type": "table", "value": "sculptures" }, { "id": 1, "type": "column", "value": "deathyear" }, { "id": 4, "type": "column", "value": "artistid" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O" ]
10,250
music_4
spider:train_spider.json:6162
What are the the songs in volumes, listed in ascending order?
SELECT Song FROM volume ORDER BY Song
[ "What", "are", "the", "the", "songs", "in", "volumes", ",", "listed", "in", "ascending", "order", "?" ]
[ { "id": 0, "type": "table", "value": "volume" }, { "id": 1, "type": "column", "value": "song" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
10,251
university
bird:train.json:8052
How many universities got less than 50 scores under ranking criteria ID 6 in 2011?
SELECT COUNT(*) FROM university_ranking_year WHERE ranking_criteria_id = 6 AND year = 2011 AND score < 50
[ "How", "many", "universities", "got", "less", "than", "50", "scores", "under", "ranking", "criteria", "ID", "6", "in", "2011", "?" ]
[ { "id": 0, "type": "table", "value": "university_ranking_year" }, { "id": 1, "type": "column", "value": "ranking_criteria_id" }, { "id": 5, "type": "column", "value": "score" }, { "id": 3, "type": "column", "value": "year" }, { "id": 4, "type":...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 14 ]...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O", "B-VALUE", "O" ]
10,252
car_road_race
bird:test.json:1352
Find the teams that won more than once.
SELECT Winning_team FROM race GROUP BY Winning_team HAVING count(*) > 1
[ "Find", "the", "teams", "that", "won", "more", "than", "once", "." ]
[ { "id": 1, "type": "column", "value": "winning_team" }, { "id": 0, "type": "table", "value": "race" }, { "id": 2, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,253
network_2
spider:train_spider.json:4464
Who has friends that are younger than the average age?
SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT avg(age) FROM person)
[ "Who", "has", "friends", "that", "are", "younger", "than", "the", "average", "age", "?" ]
[ { "id": 2, "type": "table", "value": "personfriend" }, { "id": 1, "type": "table", "value": "person" }, { "id": 4, "type": "column", "value": "friend" }, { "id": 0, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,254
warehouse_1
bird:test.json:1711
Find the type of contents that are not in the warehouses located at New York.
SELECT CONTENTS FROM boxes EXCEPT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'New York'
[ "Find", "the", "type", "of", "contents", "that", "are", "not", "in", "the", "warehouses", "located", "at", "New", "York", "." ]
[ { "id": 2, "type": "table", "value": "warehouses" }, { "id": 5, "type": "column", "value": "warehouse" }, { "id": 1, "type": "column", "value": "contents" }, { "id": 3, "type": "column", "value": "location" }, { "id": 4, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 13, 14 ] }, { "entity_i...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
10,255
professional_basketball
bird:train.json:2881
How many players whose teams were ranked 6 in 1937?
SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T3.tmID = T2.tmID WHERE T3.year = 1937 AND T3.rank = 6
[ "How", "many", "players", "whose", "teams", "were", "ranked", "6", "in", "1937", "?" ]
[ { "id": 3, "type": "table", "value": "players_teams" }, { "id": 1, "type": "column", "value": "playerid" }, { "id": 2, "type": "table", "value": "players" }, { "id": 0, "type": "table", "value": "teams" }, { "id": 4, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "B-TABLE", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "O" ]
10,256
restaurant
bird:train.json:1677
How many restaurants can we find at number 871 on its street?
SELECT COUNT(id_restaurant) FROM location WHERE street_num = 871
[ "How", "many", "restaurants", "can", "we", "find", "at", "number", "871", "on", "its", "street", "?" ]
[ { "id": 3, "type": "column", "value": "id_restaurant" }, { "id": 1, "type": "column", "value": "street_num" }, { "id": 0, "type": "table", "value": "location" }, { "id": 2, "type": "value", "value": "871" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O" ]
10,257
cre_Doc_Workflow
bird:test.json:2054
Show all staff ids and the number of document processes for each staff.
SELECT staff_id , count(*) FROM Staff_in_processes GROUP BY staff_id
[ "Show", "all", "staff", "ids", "and", "the", "number", "of", "document", "processes", "for", "each", "staff", "." ]
[ { "id": 0, "type": "table", "value": "staff_in_processes" }, { "id": 1, "type": "column", "value": "staff_id" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
10,258
books
bird:train.json:6060
How many pages does 'Seaward' have?
SELECT num_pages FROM book WHERE title = 'Seaward'
[ "How", "many", "pages", "does", "'", "Seaward", "'", "have", "?" ]
[ { "id": 1, "type": "column", "value": "num_pages" }, { "id": 3, "type": "value", "value": "Seaward" }, { "id": 2, "type": "column", "value": "title" }, { "id": 0, "type": "table", "value": "book" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O" ]
10,259
cs_semester
bird:train.json:901
Which of the two courses, "Advanced Operating System" or "Intro to BlockChain', did most of the students receive an A in?
SELECT T2.name FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.name IN ('Advanced Operating System', 'Intro to BlockChain') GROUP BY T2.name ORDER BY COUNT(T1.student_id) DESC LIMIT 1
[ "Which", "of", "the", "two", "courses", ",", "\"", "Advanced", "Operating", "System", "\"", "or", "\"", "Intro", "to", "BlockChain", "'", ",", "did", "most", "of", "the", "students", "receive", "an", "A", "in", "?" ]
[ { "id": 6, "type": "value", "value": "Advanced Operating System" }, { "id": 7, "type": "value", "value": "Intro to BlockChain" }, { "id": 1, "type": "table", "value": "registration" }, { "id": 8, "type": "column", "value": "student_id" }, { "id": 3...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 25 ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
10,260
driving_school
spider:train_spider.json:6658
List the first name and last name of all customers.
SELECT first_name , last_name FROM Customers;
[ "List", "the", "first", "name", "and", "last", "name", "of", "all", "customers", "." ]
[ { "id": 1, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 2, "type": "column", "value": "last_name" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O" ]
10,261
works_cycles
bird:train.json:7164
How many types of tax did the sales happen in Quebec have?
SELECT COUNT(DISTINCT T1.Name) FROM SalesTaxRate AS T1 INNER JOIN StateProvince AS T2 ON T1.StateProvinceID = T2.StateProvinceID WHERE T2.Name = 'Quebec'
[ "How", "many", "types", "of", "tax", "did", "the", "sales", "happen", "in", "Quebec", "have", "?" ]
[ { "id": 4, "type": "column", "value": "stateprovinceid" }, { "id": 1, "type": "table", "value": "stateprovince" }, { "id": 0, "type": "table", "value": "salestaxrate" }, { "id": 3, "type": "value", "value": "Quebec" }, { "id": 2, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O" ]
10,262
movielens
bird:train.json:2296
How many of the movies rated 5 are rated by a user between the ages of 25 and 35?
SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 5 AND T2.age BETWEEN 25 AND 35
[ "How", "many", "of", "the", "movies", "rated", "5", "are", "rated", "by", "a", "user", "between", "the", "ages", "of", "25", "and", "35", "?" ]
[ { "id": 2, "type": "column", "value": "movieid" }, { "id": 0, "type": "table", "value": "u2base" }, { "id": 3, "type": "column", "value": "userid" }, { "id": 4, "type": "column", "value": "rating" }, { "id": 1, "type": "table", "value": "us...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
10,263
store_1
spider:train_spider.json:632
What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";
[ "What", "are", "the", "names", "of", "all", "tracks", "that", "belong", "to", "the", "Rock", "genre", "and", "whose", "media", "type", "is", "MPEG", "?" ]
[ { "id": 7, "type": "column", "value": "MPEG audio file" }, { "id": 5, "type": "column", "value": "media_type_id" }, { "id": 1, "type": "table", "value": "media_types" }, { "id": 8, "type": "column", "value": "genre_id" }, { "id": 2, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 15, 16 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O" ]
10,264
music_1
spider:train_spider.json:3607
Find the name and country of origin for all artists who have release at least one song of resolution above 900.
SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING count(*) >= 1
[ "Find", "the", "name", "and", "country", "of", "origin", "for", "all", "artists", "who", "have", "release", "at", "least", "one", "song", "of", "resolution", "above", "900", "." ]
[ { "id": 0, "type": "column", "value": "artist_name" }, { "id": 4, "type": "column", "value": "resolution" }, { "id": 1, "type": "column", "value": "country" }, { "id": 2, "type": "table", "value": "artist" }, { "id": 3, "type": "table", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 18 ] }, { "entit...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
10,265
mondial_geo
bird:train.json:8488
In which city has the greatest population, what is its percentage to its country population?
SELECT T3.Name, CAST(T3.Population AS REAL) * 100 / T1.Population FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Country = T2.Country ORDER BY T3.Population DESC LIMIT 1
[ "In", "which", "city", "has", "the", "greatest", "population", ",", "what", "is", "its", "percentage", "to", "its", "country", "population", "?" ]
[ { "id": 2, "type": "column", "value": "population" }, { "id": 4, "type": "table", "value": "province" }, { "id": 3, "type": "table", "value": "country" }, { "id": 5, "type": "column", "value": "country" }, { "id": 0, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
10,266
toxicology
bird:dev.json:285
Name chemical elements that form a bond TR001_10_11.
SELECT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_id = 'TR001_10_11'
[ "Name", "chemical", "elements", "that", "form", "a", "bond", "TR001_10_11", "." ]
[ { "id": 3, "type": "value", "value": "TR001_10_11" }, { "id": 5, "type": "table", "value": "connected" }, { "id": 0, "type": "column", "value": "element" }, { "id": 2, "type": "column", "value": "bond_id" }, { "id": 6, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 3, 4 ] }, { ...
[ "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O", "B-TABLE", "B-VALUE", "O" ]