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
4,451
ship_1
spider:train_spider.json:6238
Find the captain rank that has some captains in both Cutter and Armed schooner classes.
SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'
[ "Find", "the", "captain", "rank", "that", "has", "some", "captains", "in", "both", "Cutter", "and", "Armed", "schooner", "classes", "." ]
[ { "id": 4, "type": "value", "value": "Armed schooner" }, { "id": 0, "type": "table", "value": "captain" }, { "id": 3, "type": "value", "value": "Cutter" }, { "id": 2, "type": "column", "value": "class" }, { "id": 1, "type": "column", "value": "rank" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 12, 13 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O" ]
12,382
soccer_3
bird:test.json:21
What are the names of players from the club managed by Sam Allardyce?
SELECT T2.Name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.Manager = "Sam Allardyce"
[ "What", "are", "the", "names", "of", "players", "from", "the", "club", "managed", "by", "Sam", "Allardyce", "?" ]
[ { "id": 4, "type": "column", "value": "Sam Allardyce" }, { "id": 3, "type": "column", "value": "manager" }, { "id": 5, "type": "column", "value": "club_id" }, { "id": 2, "type": "table", "value": "player" }, { "id": 0, "type": "column", "value": "name" }, { "id": 1, "type": "table", "value": "club" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 11, 12 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O" ]
8,179
codebase_community
bird:dev.json:688
Identify the number of posts that have been viewed over 35000 times but have received no comments from other users.
SELECT COUNT(Id) FROM posts WHERE ViewCount > 35000 AND CommentCount = 0
[ "Identify", "the", "number", "of", "posts", "that", "have", "been", "viewed", "over", "35000", "times", "but", "have", "received", "no", "comments", "from", "other", "users", "." ]
[ { "id": 4, "type": "column", "value": "commentcount" }, { "id": 2, "type": "column", "value": "viewcount" }, { "id": 0, "type": "table", "value": "posts" }, { "id": 3, "type": "value", "value": "35000" }, { "id": 1, "type": "column", "value": "id" }, { "id": 5, "type": "value", "value": "0" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
7,973
software_company
bird:train.json:8524
How many of the first 60,000 customers from the place with the highest average income per month have sent a true response to the incentive mailing sent by the marketing department?
SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID INNER JOIN Demog AS T3 ON T1.GEOID = T3.GEOID WHERE T2.RESPONSE = 'true' ORDER BY T3.INCOME_K DESC LIMIT 1
[ "How", "many", "of", "the", "first", "60,000", "customers", "from", "the", "place", "with", "the", "highest", "average", "income", "per", "month", "have", "sent", "a", "true", "response", "to", "the", "incentive", "mailing", "sent", "by", "the", "marketing", "department", "?" ]
[ { "id": 6, "type": "table", "value": "mailings1_2" }, { "id": 5, "type": "table", "value": "customers" }, { "id": 1, "type": "column", "value": "response" }, { "id": 3, "type": "column", "value": "income_k" }, { "id": 0, "type": "table", "value": "demog" }, { "id": 7, "type": "column", "value": "geoid" }, { "id": 8, "type": "column", "value": "refid" }, { "id": 2, "type": "value", "value": "true" }, { "id": 4, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1, 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 6, 7 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,246
apartment_rentals
spider:train_spider.json:1194
How many apartment bookings are there in total?
SELECT count(*) FROM Apartment_Bookings
[ "How", "many", "apartment", "bookings", "are", "there", "in", "total", "?" ]
[ { "id": 0, "type": "table", "value": "apartment_bookings" } ]
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O" ]
6,482
medicine_enzyme_interaction
spider:train_spider.json:975
find the number of medicines offered by each trade.
SELECT trade_name , count(*) FROM medicine GROUP BY trade_name
[ "find", "the", "number", "of", "medicines", "offered", "by", "each", "trade", "." ]
[ { "id": 1, "type": "column", "value": "trade_name" }, { "id": 0, "type": "table", "value": "medicine" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
3,467
music_4
spider:train_spider.json:6160
Give the songs included in volumes that have more than 1 week on top.
SELECT Song FROM volume WHERE Weeks_on_Top > 1
[ "Give", "the", "songs", "included", "in", "volumes", "that", "have", "more", "than", "1", "week", "on", "top", "." ]
[ { "id": 2, "type": "column", "value": "weeks_on_top" }, { "id": 0, "type": "table", "value": "volume" }, { "id": 1, "type": "column", "value": "song" }, { "id": 3, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 11, 12, 13 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
3,150
assets_maintenance
spider:train_spider.json:3133
List all every engineer's first name, last name, details and coresponding skill description.
SELECT T1.first_name , T1.last_name , T1.other_details , T3.skill_description FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id
[ "List", "all", "every", "engineer", "'s", "first", "name", ",", "last", "name", ",", "details", "and", "coresponding", "skill", "description", "." ]
[ { "id": 5, "type": "table", "value": "maintenance_engineers" }, { "id": 3, "type": "column", "value": "skill_description" }, { "id": 6, "type": "table", "value": "engineer_skills" }, { "id": 2, "type": "column", "value": "other_details" }, { "id": 8, "type": "column", "value": "engineer_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 7, "type": "column", "value": "skill_id" }, { "id": 4, "type": "table", "value": "skills" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [ 8, 9 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, "token_idxs": [ 3 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
10,794
simpson_episodes
bird:train.json:4306
How many people were not born in Connecticut, USA?
SELECT COUNT(name) FROM Person WHERE birth_region != 'Connecticut' AND birth_country != 'USA';
[ "How", "many", "people", "were", "not", "born", "in", "Connecticut", ",", "USA", "?" ]
[ { "id": 4, "type": "column", "value": "birth_country" }, { "id": 2, "type": "column", "value": "birth_region" }, { "id": 3, "type": "value", "value": "Connecticut" }, { "id": 0, "type": "table", "value": "person" }, { "id": 1, "type": "column", "value": "name" }, { "id": 5, "type": "value", "value": "USA" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 9 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
5,539
baseball_1
spider:train_spider.json:3656
Find the average height of the players who belong to the college called 'Yale University'.
SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';
[ "Find", "the", "average", "height", "of", "the", "players", "who", "belong", "to", "the", "college", "called", "'", "Yale", "University", "'", "." ]
[ { "id": 2, "type": "value", "value": "Yale University" }, { "id": 5, "type": "table", "value": "player_college" }, { "id": 6, "type": "column", "value": "college_id" }, { "id": 1, "type": "column", "value": "name_full" }, { "id": 7, "type": "column", "value": "player_id" }, { "id": 0, "type": "table", "value": "college" }, { "id": 3, "type": "column", "value": "height" }, { "id": 4, "type": "table", "value": "player" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14, 15 ] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O", "O" ]
3,673
works_cycles
bird:train.json:7326
List the person who owns a distinguish credt card.
SELECT T3.FirstName, T3.LastName FROM CreditCard AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.CreditCardID = T2.CreditCardID INNER JOIN Person AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T1.CardType = 'Distinguish'
[ "List", "the", "person", "who", "owns", "a", "distinguish", "credt", "card", "." ]
[ { "id": 6, "type": "table", "value": "personcreditcard" }, { "id": 7, "type": "column", "value": "businessentityid" }, { "id": 8, "type": "column", "value": "creditcardid" }, { "id": 4, "type": "value", "value": "Distinguish" }, { "id": 5, "type": "table", "value": "creditcard" }, { "id": 0, "type": "column", "value": "firstname" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 3, "type": "column", "value": "cardtype" }, { "id": 2, "type": "table", "value": "person" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 0 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": [ 7 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-TABLE", "B-COLUMN", "O" ]
14,387
pilot_1
bird:test.json:1171
List in alphabetic order the names of pilots whose age is greater than some pilots having plane Piper Cub.
SELECT pilot_name FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub') ORDER BY pilot_name
[ "List", "in", "alphabetic", "order", "the", "names", "of", "pilots", "whose", "age", "is", "greater", "than", "some", "pilots", "having", "plane", "Piper", "Cub", "." ]
[ { "id": 0, "type": "table", "value": "pilotskills" }, { "id": 1, "type": "column", "value": "pilot_name" }, { "id": 3, "type": "column", "value": "plane_name" }, { "id": 4, "type": "value", "value": "Piper Cub" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 5, 7 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 17, 18 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "O" ]
2,780
california_schools
bird:dev.json:49
Which different county has the most number of closed schools? Please provide the name of each school as well as the closure date.
SELECT DISTINCT County, School, ClosedDate FROM schools WHERE County = ( SELECT County FROM schools WHERE StatusType = 'Closed' GROUP BY County ORDER BY COUNT(School) DESC LIMIT 1 ) AND StatusType = 'Closed' AND school IS NOT NULL
[ "Which", "different", "county", "has", "the", "most", "number", "of", "closed", "schools", "?", "Please", "provide", "the", "name", "of", "each", "school", "as", "well", "as", "the", "closure", "date", "." ]
[ { "id": 3, "type": "column", "value": "closeddate" }, { "id": 4, "type": "column", "value": "statustype" }, { "id": 0, "type": "table", "value": "schools" }, { "id": 1, "type": "column", "value": "county" }, { "id": 2, "type": "column", "value": "school" }, { "id": 5, "type": "value", "value": "Closed" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 22, 23 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 8 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
15,909
university
bird:train.json:8004
Between 2011 to 2016, in which countries can you find the universities where at least 50% of its students are international students?
SELECT DISTINCT T3.country_name FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.pct_international_students > 50 AND T2.year BETWEEN 2011 AND 2016
[ "Between", "2011", "to", "2016", ",", "in", "which", "countries", "can", "you", "find", "the", "universities", "where", "at", "least", "50", "%", "of", "its", "students", "are", "international", "students", "?" ]
[ { "id": 6, "type": "column", "value": "pct_international_students" }, { "id": 3, "type": "table", "value": "university_year" }, { "id": 11, "type": "column", "value": "university_id" }, { "id": 0, "type": "column", "value": "country_name" }, { "id": 2, "type": "table", "value": "university" }, { "id": 5, "type": "column", "value": "country_id" }, { "id": 1, "type": "table", "value": "country" }, { "id": 8, "type": "column", "value": "year" }, { "id": 9, "type": "value", "value": "2011" }, { "id": 10, "type": "value", "value": "2016" }, { "id": 4, "type": "column", "value": "id" }, { "id": 7, "type": "value", "value": "50" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
15,146
video_game
bird:test.json:1943
How many players have rank of the year smaller than 3?
SELECT count(*) FROM player WHERE Rank_of_the_year <= 3
[ "How", "many", "players", "have", "rank", "of", "the", "year", "smaller", "than", "3", "?" ]
[ { "id": 1, "type": "column", "value": "rank_of_the_year" }, { "id": 0, "type": "table", "value": "player" }, { "id": 2, "type": "value", "value": "3" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4, 5, 6, 7 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O" ]
1,193
cre_Doc_Tracking_DB
spider:train_spider.json:4181
How many locations are listed in the database?
SELECT count(*) FROM Ref_locations
[ "How", "many", "locations", "are", "listed", "in", "the", "database", "?" ]
[ { "id": 0, "type": "table", "value": "ref_locations" } ]
[ { "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": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
2,143
movie_3
bird:train.json:9392
What films did Burt Dukakis got star in?
SELECT T3.title FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T2.first_name = 'BURT' AND T2.last_name = 'DUKAKIS'
[ "What", "films", "did", "Burt", "Dukakis", "got", "star", "in", "?" ]
[ { "id": 2, "type": "table", "value": "film_actor" }, { "id": 5, "type": "column", "value": "first_name" }, { "id": 7, "type": "column", "value": "last_name" }, { "id": 9, "type": "column", "value": "actor_id" }, { "id": 4, "type": "column", "value": "film_id" }, { "id": 8, "type": "value", "value": "DUKAKIS" }, { "id": 0, "type": "column", "value": "title" }, { "id": 3, "type": "table", "value": "actor" }, { "id": 1, "type": "table", "value": "film" }, { "id": 6, "type": "value", "value": "BURT" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 3 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [ 4 ] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "B-TABLE", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O" ]
8,900
university
bird:train.json:8032
Provide the ID of the university with the highest percentage of female students in 2012.
SELECT university_id FROM university_year WHERE year = 2012 ORDER BY pct_female_students DESC LIMIT 1
[ "Provide", "the", "ID", "of", "the", "university", "with", "the", "highest", "percentage", "of", "female", "students", "in", "2012", "." ]
[ { "id": 4, "type": "column", "value": "pct_female_students" }, { "id": 0, "type": "table", "value": "university_year" }, { "id": 1, "type": "column", "value": "university_id" }, { "id": 2, "type": "column", "value": "year" }, { "id": 3, "type": "value", "value": "2012" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 9, 11, 12 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
7,612
movie_1
spider:train_spider.json:2469
What are the names of all movies that were created after the most recent Steven Spielberg film?
SELECT title FROM Movie WHERE YEAR > (SELECT max(YEAR) FROM Movie WHERE director = "Steven Spielberg")
[ "What", "are", "the", "names", "of", "all", "movies", "that", "were", "created", "after", "the", "most", "recent", "Steven", "Spielberg", "film", "?" ]
[ { "id": 4, "type": "column", "value": "Steven Spielberg" }, { "id": 3, "type": "column", "value": "director" }, { "id": 0, "type": "table", "value": "movie" }, { "id": 1, "type": "column", "value": "title" }, { "id": 2, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 14, 15 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
3,492
talkingdata
bird:train.json:1111
Provide the total number of the male users that use OPPO as their phone brand.
SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'OPPO' AND T1.gender = 'M'
[ "Provide", "the", "total", "number", "of", "the", "male", "users", "that", "use", "OPPO", "as", "their", "phone", "brand", "." ]
[ { "id": 1, "type": "table", "value": "phone_brand_device_model2" }, { "id": 3, "type": "column", "value": "phone_brand" }, { "id": 0, "type": "table", "value": "gender_age" }, { "id": 2, "type": "column", "value": "device_id" }, { "id": 5, "type": "column", "value": "gender" }, { "id": 4, "type": "value", "value": "OPPO" }, { "id": 6, "type": "value", "value": "M" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, "token_idxs": [ 12 ] }, { "entity_id": 6, "token_idxs": [ 14 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
15,161
donor
bird:train.json:3228
State the number of public magnet schools in New York Manhattan.
SELECT COUNT(schoolid) FROM projects WHERE school_county = 'New York (Manhattan)' AND school_magnet = 't'
[ "State", "the", "number", "of", "public", "magnet", "schools", "in", "New", "York", "Manhattan", "." ]
[ { "id": 3, "type": "value", "value": "New York (Manhattan)" }, { "id": 2, "type": "column", "value": "school_county" }, { "id": 4, "type": "column", "value": "school_magnet" }, { "id": 0, "type": "table", "value": "projects" }, { "id": 1, "type": "column", "value": "schoolid" }, { "id": 5, "type": "value", "value": "t" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
2,144
book_1
bird:test.json:577
What is the title of the book written by Plato has price lower than the average sale price of all books?
SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = "Plato" AND T1.saleprice < (SELECT avg(saleprice) FROM Book)
[ "What", "is", "the", "title", "of", "the", "book", "written", "by", "Plato", "has", "price", "lower", "than", "the", "average", "sale", "price", "of", "all", "books", "?" ]
[ { "id": 3, "type": "table", "value": "author_book" }, { "id": 8, "type": "column", "value": "saleprice" }, { "id": 5, "type": "column", "value": "idauthor" }, { "id": 1, "type": "table", "value": "author" }, { "id": 4, "type": "column", "value": "author" }, { "id": 0, "type": "column", "value": "title" }, { "id": 7, "type": "column", "value": "Plato" }, { "id": 2, "type": "table", "value": "book" }, { "id": 6, "type": "column", "value": "name" }, { "id": 9, "type": "column", "value": "isbn" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
5,155
toxicology
bird:dev.json:252
What are the atoms that can bond with the atom that has the element lead?
SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'pb'
[ "What", "are", "the", "atoms", "that", "can", "bond", "with", "the", "atom", "that", "has", "the", "element", "lead", "?" ]
[ { "id": 3, "type": "table", "value": "connected" }, { "id": 1, "type": "column", "value": "atom_id2" }, { "id": 0, "type": "column", "value": "atom_id" }, { "id": 4, "type": "column", "value": "element" }, { "id": 2, "type": "table", "value": "atom" }, { "id": 5, "type": "value", "value": "pb" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O" ]
11,490
shooting
bird:train.json:2462
What is the percentage of the cases involved more than 3 officers from year 2010 to 2015?
SELECT CAST(SUM(IIF(officer_count > 3, 1, 0)) AS REAL) * 100 / COUNT(case_number) FROM incidents WHERE STRFTIME('%Y', date) BETWEEN '2010' AND '2015'
[ "What", "is", "the", "percentage", "of", "the", "cases", "involved", "more", "than", "3", "officers", "from", "year", "2010", "to", "2015", "?" ]
[ { "id": 9, "type": "column", "value": "officer_count" }, { "id": 6, "type": "column", "value": "case_number" }, { "id": 0, "type": "table", "value": "incidents" }, { "id": 1, "type": "value", "value": "2010" }, { "id": 2, "type": "value", "value": "2015" }, { "id": 4, "type": "column", "value": "date" }, { "id": 5, "type": "value", "value": "100" }, { "id": 3, "type": "value", "value": "%Y" }, { "id": 7, "type": "value", "value": "1" }, { "id": 8, "type": "value", "value": "0" }, { "id": 10, "type": "value", "value": "3" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 6 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [ 11 ] }, { "entity_id": 10, "token_idxs": [ 10 ] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "O", "B-VALUE", "O" ]
12,612
voter_2
spider:train_spider.json:5484
Find the first and last name of all the students of age 18 who have vice president votes.
SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18
[ "Find", "the", "first", "and", "last", "name", "of", "all", "the", "students", "of", "age", "18", "who", "have", "vice", "president", "votes", "." ]
[ { "id": 7, "type": "column", "value": "vice_president_vote" }, { "id": 3, "type": "table", "value": "voting_record" }, { "id": 2, "type": "table", "value": "student" }, { "id": 0, "type": "column", "value": "fname" }, { "id": 1, "type": "column", "value": "lname" }, { "id": 6, "type": "column", "value": "stuid" }, { "id": 4, "type": "column", "value": "age" }, { "id": 5, "type": "value", "value": "18" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, "token_idxs": [ 12 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [ 15, 16 ] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O" ]
11,274
game_1
spider:train_spider.json:5975
Show all video games and their types in the order of their names.
SELECT gname , gtype FROM Video_games ORDER BY gname
[ "Show", "all", "video", "games", "and", "their", "types", "in", "the", "order", "of", "their", "names", "." ]
[ { "id": 0, "type": "table", "value": "video_games" }, { "id": 1, "type": "column", "value": "gname" }, { "id": 2, "type": "column", "value": "gtype" } ]
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,173
address
bird:train.json:5159
Provide the average elevation of the cities with alias Amherst.
SELECT AVG(T2.elevation) FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'Amherst'
[ "Provide", "the", "average", "elevation", "of", "the", "cities", "with", "alias", "Amherst", "." ]
[ { "id": 4, "type": "column", "value": "elevation" }, { "id": 1, "type": "table", "value": "zip_data" }, { "id": 5, "type": "column", "value": "zip_code" }, { "id": 3, "type": "value", "value": "Amherst" }, { "id": 0, "type": "table", "value": "alias" }, { "id": 2, "type": "column", "value": "alias" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "O" ]
711
document_management
spider:train_spider.json:4517
What are all the section titles of the document named "David CV"?
SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = "David CV"
[ "What", "are", "all", "the", "section", "titles", "of", "the", "document", "named", "\"", "David", "CV", "\"", "?" ]
[ { "id": 2, "type": "table", "value": "document_sections" }, { "id": 0, "type": "column", "value": "section_title" }, { "id": 3, "type": "column", "value": "document_name" }, { "id": 5, "type": "column", "value": "document_code" }, { "id": 1, "type": "table", "value": "documents" }, { "id": 4, "type": "column", "value": "David CV" } ]
[ { "entity_id": 0, "token_idxs": [ 4, 5 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 11, 12 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
15,819
airline
bird:train.json:5895
What is the air carrier's description of the cancelled flights?
SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.CANCELLED = 1 GROUP BY T1.Description
[ "What", "is", "the", "air", "carrier", "'s", "description", "of", "the", "cancelled", "flights", "?" ]
[ { "id": 6, "type": "column", "value": "op_carrier_airline_id" }, { "id": 1, "type": "table", "value": "Air Carriers" }, { "id": 0, "type": "column", "value": "description" }, { "id": 3, "type": "column", "value": "cancelled" }, { "id": 2, "type": "table", "value": "airlines" }, { "id": 5, "type": "column", "value": "code" }, { "id": 4, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O" ]
15,840
flight_company
spider:train_spider.json:6378
How many airports haven't the pilot 'Thompson' driven an aircraft?
SELECT count(*) FROM airport WHERE id NOT IN ( SELECT airport_id FROM flight WHERE pilot = 'Thompson' );
[ "How", "many", "airports", "have", "n't", "the", "pilot", "'", "Thompson", "'", "driven", "an", "aircraft", "?" ]
[ { "id": 3, "type": "column", "value": "airport_id" }, { "id": 5, "type": "value", "value": "Thompson" }, { "id": 0, "type": "table", "value": "airport" }, { "id": 2, "type": "table", "value": "flight" }, { "id": 4, "type": "column", "value": "pilot" }, { "id": 1, "type": "column", "value": "id" } ]
[ { "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": [ 6 ] }, { "entity_id": 5, "token_idxs": [ 8 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O" ]
4,012
customers_and_orders
bird:test.json:272
What are the ids and names of all customers?
SELECT customer_id , customer_name FROM Customers
[ "What", "are", "the", "ids", "and", "names", "of", "all", "customers", "?" ]
[ { "id": 2, "type": "column", "value": "customer_name" }, { "id": 1, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
14,608
cre_Students_Information_Systems
bird:test.json:465
Which students have gone through any event? List the students' biographical data and event date.
SELECT T1.bio_data , T2.event_date FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id
[ "Which", "students", "have", "gone", "through", "any", "event", "?", "List", "the", "students", "'", "biographical", "data", "and", "event", "date", "." ]
[ { "id": 3, "type": "table", "value": "student_events" }, { "id": 1, "type": "column", "value": "event_date" }, { "id": 4, "type": "column", "value": "student_id" }, { "id": 0, "type": "column", "value": "bio_data" }, { "id": 2, "type": "table", "value": "students" } ]
[ { "entity_id": 0, "token_idxs": [ 12, 13 ] }, { "entity_id": 1, "token_idxs": [ 15, 16 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O" ]
11,489
california_schools
bird:dev.json:32
What is the eligible free or reduced price meal rate for the top 5 schools in grades 1-12 with the highest free or reduced price meal count of the schools with the ownership code 66?
SELECT CAST(T1.`FRPM Count (K-12)` AS REAL) / T1.`Enrollment (K-12)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.SOC = 66 ORDER BY T1.`FRPM Count (K-12)` DESC LIMIT 5
[ "What", "is", "the", "eligible", "free", "or", "reduced", "price", "meal", "rate", "for", "the", "top", "5", "schools", "in", "grades", "1", "-", "12", "with", "the", "highest", "free", "or", "reduced", "price", "meal", "count", "of", "the", "schools", "with", "the", "ownership", "code", "66", "?" ]
[ { "id": 4, "type": "column", "value": "FRPM Count (K-12)" }, { "id": 5, "type": "column", "value": "Enrollment (K-12)" }, { "id": 1, "type": "table", "value": "schools" }, { "id": 6, "type": "column", "value": "cdscode" }, { "id": 0, "type": "table", "value": "frpm" }, { "id": 2, "type": "column", "value": "soc" }, { "id": 3, "type": "value", "value": "66" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 36 ] }, { "entity_id": 4, "token_idxs": [ 27, 28 ] }, { "entity_id": 5, "token_idxs": [ 17, 18, 19 ] }, { "entity_id": 6, "token_idxs": [ 35 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
2,579
soccer_2
spider:train_spider.json:5037
What is the count of states with college students playing in the mid position but not as goalies?
SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')
[ "What", "is", "the", "count", "of", "states", "with", "college", "students", "playing", "in", "the", "mid", "position", "but", "not", "as", "goalies", "?" ]
[ { "id": 1, "type": "table", "value": "college" }, { "id": 2, "type": "table", "value": "tryout" }, { "id": 5, "type": "value", "value": "goalie" }, { "id": 0, "type": "column", "value": "state" }, { "id": 6, "type": "column", "value": "cname" }, { "id": 3, "type": "column", "value": "ppos" }, { "id": 4, "type": "value", "value": "mid" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
8,308
apartment_rentals
spider:train_spider.json:1229
Which apartments have bookings with status code "Confirmed"? Return their apartment numbers.
SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed"
[ "Which", "apartments", "have", "bookings", "with", "status", "code", "\"", "Confirmed", "\"", "?", "Return", "their", "apartment", "numbers", "." ]
[ { "id": 3, "type": "column", "value": "booking_status_code" }, { "id": 1, "type": "table", "value": "apartment_bookings" }, { "id": 0, "type": "column", "value": "apt_number" }, { "id": 2, "type": "table", "value": "apartments" }, { "id": 4, "type": "column", "value": "Confirmed" }, { "id": 5, "type": "column", "value": "apt_id" } ]
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "token_idxs": [ 13 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "B-TABLE", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
15,440
music_4
spider:train_spider.json:6192
What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top?
SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2
[ "What", "are", "the", "famous", "titles", "of", "artists", "who", "have", "not", "only", "had", "volumes", "that", "spent", "more", "than", "2", "weeks", "on", "top", "but", "also", "volumes", "that", "spent", "less", "than", "2", "weeks", "on", "top", "?" ]
[ { "id": 0, "type": "column", "value": "famous_title" }, { "id": 3, "type": "column", "value": "weeks_on_top" }, { "id": 5, "type": "column", "value": "artist_id" }, { "id": 1, "type": "table", "value": "artist" }, { "id": 2, "type": "table", "value": "volume" }, { "id": 4, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 13 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
13,659
financial
bird:dev.json:159
List all the withdrawals in cash transactions that the client with the id 3356 makes.
SELECT T4.trans_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id = T3.account_id INNER JOIN trans AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 3356 AND T4.operation = 'VYBER'
[ "List", "all", "the", "withdrawals", "in", "cash", "transactions", "that", "the", "client", "with", "the", "i", "d", "3356", "makes", "." ]
[ { "id": 3, "type": "column", "value": "account_id" }, { "id": 4, "type": "column", "value": "client_id" }, { "id": 6, "type": "column", "value": "operation" }, { "id": 0, "type": "column", "value": "trans_id" }, { "id": 2, "type": "table", "value": "account" }, { "id": 8, "type": "table", "value": "client" }, { "id": 1, "type": "table", "value": "trans" }, { "id": 7, "type": "value", "value": "VYBER" }, { "id": 5, "type": "value", "value": "3356" }, { "id": 9, "type": "table", "value": "disp" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12, 13 ] }, { "entity_id": 5, "token_idxs": [ 14 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [ 9 ] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O" ]
5,442
formula_1
spider:train_spider.json:2162
What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?
SELECT DISTINCT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000
[ "What", "are", "the", "forenames", "and", "surnames", "of", "all", "unique", "drivers", "who", "had", "a", "lap", "time", "of", "less", "than", "93000", "milliseconds", "?" ]
[ { "id": 4, "type": "column", "value": "milliseconds" }, { "id": 0, "type": "column", "value": "forename" }, { "id": 3, "type": "table", "value": "laptimes" }, { "id": 6, "type": "column", "value": "driverid" }, { "id": 1, "type": "column", "value": "surname" }, { "id": 2, "type": "table", "value": "drivers" }, { "id": 5, "type": "value", "value": "93000" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 13, 14 ] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "entity_id": 5, "token_idxs": [ 18 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
158
coinmarketcap
bird:train.json:6270
Which crytocurrency was traded in the highest value on 2016/1/8?
SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2016-01-08' AND T2.volume_24h = ( SELECT MAX(volume_24h) FROM historical WHERE date = '2016-01-08' )
[ "Which", "crytocurrency", "was", "traded", "in", "the", "highest", "value", "on", "2016/1/8", "?" ]
[ { "id": 2, "type": "table", "value": "historical" }, { "id": 6, "type": "value", "value": "2016-01-08" }, { "id": 7, "type": "column", "value": "volume_24h" }, { "id": 4, "type": "column", "value": "coin_id" }, { "id": 1, "type": "table", "value": "coins" }, { "id": 0, "type": "column", "value": "name" }, { "id": 5, "type": "column", "value": "date" }, { "id": 3, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 9 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
520
wine_1
spider:train_spider.json:6562
What are the names of wines, sorted by price ascending?
SELECT DISTINCT Name FROM WINE ORDER BY price
[ "What", "are", "the", "names", "of", "wines", ",", "sorted", "by", "price", "ascending", "?" ]
[ { "id": 2, "type": "column", "value": "price" }, { "id": 0, "type": "table", "value": "wine" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O" ]
6,211
formula_1
bird:dev.json:913
In which country can I find the circuit with the highest altitude?
SELECT country FROM circuits ORDER BY alt DESC LIMIT 1
[ "In", "which", "country", "can", "I", "find", "the", "circuit", "with", "the", "highest", "altitude", "?" ]
[ { "id": 0, "type": "table", "value": "circuits" }, { "id": 1, "type": "column", "value": "country" }, { "id": 2, "type": "column", "value": "alt" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
14,036
works_cycles
bird:train.json:7099
What type of transaction was made with the only yellow product, size 62 and with a minimum inventory stock of 500 units?
SELECT DISTINCT T2.TransactionType FROM Product AS T1 INNER JOIN TransactionHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Size = 62 AND T1.Color = 'Yellow' AND T1.SafetyStockLevel = 500
[ "What", "type", "of", "transaction", "was", "made", "with", "the", "only", "yellow", "product", ",", "size", "62", "and", "with", "a", "minimum", "inventory", "stock", "of", "500", "units", "?" ]
[ { "id": 2, "type": "table", "value": "transactionhistory" }, { "id": 8, "type": "column", "value": "safetystocklevel" }, { "id": 0, "type": "column", "value": "transactiontype" }, { "id": 3, "type": "column", "value": "productid" }, { "id": 1, "type": "table", "value": "product" }, { "id": 7, "type": "value", "value": "Yellow" }, { "id": 6, "type": "column", "value": "color" }, { "id": 4, "type": "column", "value": "size" }, { "id": 9, "type": "value", "value": "500" }, { "id": 5, "type": "value", "value": "62" } ]
[ { "entity_id": 0, "token_idxs": [ 1, 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs": [ 13 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [ 9 ] }, { "entity_id": 8, "token_idxs": [ 19 ] }, { "entity_id": 9, "token_idxs": [ 21 ] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
11,526
manufactory_1
spider:train_spider.json:5295
What are the names of products produced by both Creative Labs and Sony?
SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony'
[ "What", "are", "the", "names", "of", "products", "produced", "by", "both", "Creative", "Labs", "and", "Sony", "?" ]
[ { "id": 2, "type": "table", "value": "manufacturers" }, { "id": 3, "type": "value", "value": "Creative Labs" }, { "id": 5, "type": "column", "value": "manufacturer" }, { "id": 1, "type": "table", "value": "products" }, { "id": 0, "type": "column", "value": "name" }, { "id": 4, "type": "value", "value": "Sony" }, { "id": 6, "type": "column", "value": "code" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "O" ]
1,232
beer_factory
bird:train.json:5272
Which brand of root beer did Jayne Collins give the lowest rating?
SELECT T3.BrandName FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeerbrand AS T3 ON T2.BrandID = T3.BrandID WHERE T1.First = 'Jayne' AND T1.Last = 'Collins' AND T2.StarRating = 1
[ "Which", "brand", "of", "root", "beer", "did", "Jayne", "Collins", "give", "the", "lowest", "rating", "?" ]
[ { "id": 3, "type": "table", "value": "rootbeerreview" }, { "id": 1, "type": "table", "value": "rootbeerbrand" }, { "id": 9, "type": "column", "value": "starrating" }, { "id": 11, "type": "column", "value": "customerid" }, { "id": 0, "type": "column", "value": "brandname" }, { "id": 2, "type": "table", "value": "customers" }, { "id": 4, "type": "column", "value": "brandid" }, { "id": 8, "type": "value", "value": "Collins" }, { "id": 5, "type": "column", "value": "first" }, { "id": 6, "type": "value", "value": "Jayne" }, { "id": 7, "type": "column", "value": "last" }, { "id": 10, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 6 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [ 7 ] }, { "entity_id": 9, "token_idxs": [ 11 ] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "B-COLUMN", "O" ]
3,456
codebase_comments
bird:train.json:605
List the summary of the method "Castle.MonoRail.Framework.Test.StubViewComponentContext.RenderSection".
SELECT DISTINCT Summary FROM Method WHERE Name = 'Castle.MonoRail.Framework.Test.StubViewComponentContext.RenderSection'
[ "List", "the", "summary", "of", "the", "method", "\"", "Castle", ".", "MonoRail", ".", "Framework", ".", "Test", ".", "StubViewComponentContext", ".", "RenderSection", "\"", "." ]
[ { "id": 3, "type": "value", "value": "Castle.MonoRail.Framework.Test.StubViewComponentContext.RenderSection" }, { "id": 1, "type": "column", "value": "summary" }, { "id": 0, "type": "table", "value": "method" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
9,064
music_1
spider:train_spider.json:3587
What is the language that was used most often in songs with resolution above 500?
SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "language", "that", "was", "used", "most", "often", "in", "songs", "with", "resolution", "above", "500", "?" ]
[ { "id": 2, "type": "column", "value": "artist_name" }, { "id": 3, "type": "column", "value": "resolution" }, { "id": 1, "type": "column", "value": "languages" }, { "id": 0, "type": "table", "value": "song" }, { "id": 4, "type": "value", "value": "500" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [ 5 ] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
4,506
computer_student
bird:train.json:979
Find the ID of advisor of student ID 80 and state the level of courses taught by him/her.
SELECT T1.p_id_dummy, T2.courseLevel FROM advisedBy AS T1 INNER JOIN course AS T2 ON T1.p_id = T2.course_id INNER JOIN taughtBy AS T3 ON T2.course_id = T3.course_id WHERE T1.p_id = 80
[ "Find", "the", "ID", "of", "advisor", "of", "student", "ID", "80", "and", "state", "the", "level", "of", "courses", "taught", "by", "him", "/", "her", "." ]
[ { "id": 1, "type": "column", "value": "courselevel" }, { "id": 0, "type": "column", "value": "p_id_dummy" }, { "id": 5, "type": "table", "value": "advisedby" }, { "id": 7, "type": "column", "value": "course_id" }, { "id": 2, "type": "table", "value": "taughtby" }, { "id": 6, "type": "table", "value": "course" }, { "id": 3, "type": "column", "value": "p_id" }, { "id": 4, "type": "value", "value": "80" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 15, 16 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "token_idxs": [ 4 ] }, { "entity_id": 6, "token_idxs": [ 14 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-TABLE", "I-TABLE", "O", "O", "O", "O" ]
13,948
voter_2
spider:train_spider.json:5444
Find the number of students in total.
SELECT count(*) FROM STUDENT
[ "Find", "the", "number", "of", "students", "in", "total", "." ]
[ { "id": 0, "type": "table", "value": "student" } ]
[ { "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": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "O", "O" ]
3,582
sales_in_weather
bird:train.json:8213
How many units are being sold for item 1 when the average temperature is 83?
SELECT SUM(units) FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 1 AND T1.tavg = 83
[ "How", "many", "units", "are", "being", "sold", "for", "item", "1", "when", "the", "average", "temperature", "is", "83", "?" ]
[ { "id": 3, "type": "table", "value": "sales_in_weather" }, { "id": 4, "type": "column", "value": "store_nbr" }, { "id": 0, "type": "table", "value": "relation" }, { "id": 5, "type": "column", "value": "item_nbr" }, { "id": 2, "type": "table", "value": "weather" }, { "id": 1, "type": "column", "value": "units" }, { "id": 7, "type": "column", "value": "tavg" }, { "id": 9, "type": "column", "value": "date" }, { "id": 8, "type": "value", "value": "83" }, { "id": 6, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 7 ] }, { "entity_id": 6, "token_idxs": [ 8 ] }, { "entity_id": 7, "token_idxs": [ 11 ] }, { "entity_id": 8, "token_idxs": [ 14 ] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
11,830
movie_platform
bird:train.json:142
Provide list titles created by user who are eligible for trial when he created the list.
SELECT DISTINCT T2.list_title FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_eligible_for_trial = 1
[ "Provide", "list", "titles", "created", "by", "user", "who", "are", "eligible", "for", "trial", "when", "he", "created", "the", "list", "." ]
[ { "id": 3, "type": "column", "value": "user_eligible_for_trial" }, { "id": 1, "type": "table", "value": "lists_users" }, { "id": 0, "type": "column", "value": "list_title" }, { "id": 5, "type": "column", "value": "list_id" }, { "id": 2, "type": "table", "value": "lists" }, { "id": 4, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
8,785
synthea
bird:train.json:1425
Who had to take Clopidogrel 75 MG Oral Tablet for over 10 years?
SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Clopidogrel 75 MG Oral Tablet' AND strftime('%Y', T2.STOP) - strftime('%Y', T2.START) > 10
[ "Who", "had", "to", "take", "Clopidogrel", "75", "MG", "Oral", "Tablet", "for", "over", "10", "years", "?" ]
[ { "id": 6, "type": "value", "value": "Clopidogrel 75 MG Oral Tablet" }, { "id": 3, "type": "table", "value": "medications" }, { "id": 5, "type": "column", "value": "description" }, { "id": 2, "type": "table", "value": "patients" }, { "id": 4, "type": "column", "value": "patient" }, { "id": 0, "type": "column", "value": "first" }, { "id": 10, "type": "column", "value": "start" }, { "id": 1, "type": "column", "value": "last" }, { "id": 9, "type": "column", "value": "stop" }, { "id": 7, "type": "value", "value": "10" }, { "id": 8, "type": "value", "value": "%Y" } ]
[ { "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": 6, "token_idxs": [ 4, 5, 6, 7 ] }, { "entity_id": 7, "token_idxs": [ 11 ] }, { "entity_id": 8, "token_idxs": [ 12 ] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "B-VALUE", "O" ]
4,673
books
bird:train.json:6050
Who is the author of the book The Mystery in the Rocky Mountains?
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.title = 'The Mystery in the Rocky Mountains'
[ "Who", "is", "the", "author", "of", "the", "book", "The", "Mystery", "in", "the", "Rocky", "Mountains", "?" ]
[ { "id": 3, "type": "value", "value": "The Mystery in the Rocky Mountains" }, { "id": 0, "type": "column", "value": "author_name" }, { "id": 5, "type": "table", "value": "book_author" }, { "id": 6, "type": "column", "value": "author_id" }, { "id": 7, "type": "column", "value": "book_id" }, { "id": 1, "type": "table", "value": "author" }, { "id": 2, "type": "column", "value": "title" }, { "id": 4, "type": "table", "value": "book" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8, 9, 10, 11, 12 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
1,049
retail_world
bird:train.json:6612
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.ShipVia = 3
[ "How", "many", "orders", "were", "shipped", "via", "Federal", "Shipping", "?" ]
[ { "id": 6, "type": "value", "value": "Federal Shipping" }, { "id": 5, "type": "column", "value": "companyname" }, { "id": 4, "type": "column", "value": "shipperid" }, { "id": 1, "type": "table", "value": "shippers" }, { "id": 2, "type": "column", "value": "orderid" }, { "id": 3, "type": "column", "value": "shipvia" }, { "id": 0, "type": "table", "value": "orders" }, { "id": 7, "type": "value", "value": "3" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 6, 7 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "B-VALUE", "I-VALUE", "O" ]
9,440
behavior_monitoring
spider:train_spider.json:3105
Find the ids and first names of the 3 teachers that have the most number of assessment notes?
SELECT T1.teacher_id , T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 3
[ "Find", "the", "ids", "and", "first", "names", "of", "the", "3", "teachers", "that", "have", "the", "most", "number", "of", "assessment", "notes", "?" ]
[ { "id": 2, "type": "table", "value": "assessment_notes" }, { "id": 0, "type": "column", "value": "teacher_id" }, { "id": 1, "type": "column", "value": "first_name" }, { "id": 3, "type": "table", "value": "teachers" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 16, 17 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
14,103
customers_and_addresses
spider:train_spider.json:6111
What is the payment method of the customer that has purchased the least quantity of items?
SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) LIMIT 1
[ "What", "is", "the", "payment", "method", "of", "the", "customer", "that", "has", "purchased", "the", "least", "quantity", "of", "items", "?" ]
[ { "id": 4, "type": "table", "value": "customer_orders" }, { "id": 1, "type": "column", "value": "payment_method" }, { "id": 6, "type": "column", "value": "order_quantity" }, { "id": 0, "type": "column", "value": "customer_name" }, { "id": 2, "type": "table", "value": "order_items" }, { "id": 7, "type": "column", "value": "customer_id" }, { "id": 3, "type": "table", "value": "customers" }, { "id": 5, "type": "column", "value": "order_id" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-TABLE", "O", "O" ]
14,161
student_loan
bird:train.json:4406
What is the total number of students in the school?
SELECT COUNT(name) FROM person
[ "What", "is", "the", "total", "number", "of", "students", "in", "the", "school", "?" ]
[ { "id": 0, "type": "table", "value": "person" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "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": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
7,962
student_club
bird:dev.json:1466
Write the full name of the club member with the position of 'Secretary' and list which college the club member belongs to.
SELECT T1.first_name, T1.last_name, college FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.position = 'Secretary'
[ "Write", "the", "full", "name", "of", "the", "club", "member", "with", "the", "position", "of", "'", "Secretary", "'", "and", "list", "which", "college", "the", "club", "member", "belongs", "to", "." ]
[ { "id": 8, "type": "column", "value": "link_to_major" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 6, "type": "value", "value": "Secretary" }, { "id": 5, "type": "column", "value": "position" }, { "id": 7, "type": "column", "value": "major_id" }, { "id": 2, "type": "column", "value": "college" }, { "id": 3, "type": "table", "value": "member" }, { "id": 4, "type": "table", "value": "major" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 18 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 10 ] }, { "entity_id": 6, "token_idxs": [ 13 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
3,269
chicago_crime
bird:train.json:8685
Give the case number and coordinates of the places where child abduction is reported.
SELECT T1.case_number, T1.latitude, T1.longitude FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T2.iucr_no = T1.iucr_no WHERE T2.secondary_description = 'CHILD ABDUCTION'
[ "Give", "the", "case", "number", "and", "coordinates", "of", "the", "places", "where", "child", "abduction", "is", "reported", "." ]
[ { "id": 5, "type": "column", "value": "secondary_description" }, { "id": 6, "type": "value", "value": "CHILD ABDUCTION" }, { "id": 0, "type": "column", "value": "case_number" }, { "id": 2, "type": "column", "value": "longitude" }, { "id": 1, "type": "column", "value": "latitude" }, { "id": 7, "type": "column", "value": "iucr_no" }, { "id": 3, "type": "table", "value": "crime" }, { "id": 4, "type": "table", "value": "iucr" } ]
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 10, 11 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O" ]
8,099
chicago_crime
bird:train.json:8733
What is the percentage of severe cases that are related to sexual assault?
SELECT CAST(SUM(CASE WHEN primary_description = 'CRIM SEXUAL ASSAULT' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM IUCR WHERE index_code = 'I'
[ "What", "is", "the", "percentage", "of", "severe", "cases", "that", "are", "related", "to", "sexual", "assault", "?" ]
[ { "id": 6, "type": "column", "value": "primary_description" }, { "id": 7, "type": "value", "value": "CRIM SEXUAL ASSAULT" }, { "id": 1, "type": "column", "value": "index_code" }, { "id": 0, "type": "table", "value": "iucr" }, { "id": 3, "type": "value", "value": "100" }, { "id": 2, "type": "value", "value": "I" }, { "id": 4, "type": "value", "value": "0" }, { "id": 5, "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": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [ 11, 12 ] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O" ]
6,126
student_loan
bird:train.json:4515
What is the average absent month for a unemployed male students?
SELECT AVG(T2.month) AS avg FROM unemployed AS T1 INNER JOIN longest_absense_from_school AS T2 ON T2.name = T1.name INNER JOIN male AS T3 ON T3.name = T2.name
[ "What", "is", "the", "average", "absent", "month", "for", "a", "unemployed", "male", "students", "?" ]
[ { "id": 3, "type": "table", "value": "longest_absense_from_school" }, { "id": 2, "type": "table", "value": "unemployed" }, { "id": 1, "type": "column", "value": "month" }, { "id": 0, "type": "table", "value": "male" }, { "id": 4, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "O", "O" ]
4,011
shakespeare
bird:train.json:3008
In "A Lover's Complaint", what is the description of Act 1, Scene 1?
SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'A Lover''s Complaint'
[ "In", "\"", "A", "Lover", "'s", "Complaint", "\"", ",", "what", "is", "the", "description", "of", "Act", "1", ",", "Scene", "1", "?" ]
[ { "id": 9, "type": "value", "value": "A Lover's Complaint" }, { "id": 0, "type": "column", "value": "description" }, { "id": 2, "type": "table", "value": "chapters" }, { "id": 4, "type": "column", "value": "work_id" }, { "id": 1, "type": "table", "value": "works" }, { "id": 7, "type": "column", "value": "scene" }, { "id": 8, "type": "column", "value": "title" }, { "id": 5, "type": "column", "value": "act" }, { "id": 3, "type": "column", "value": "id" }, { "id": 6, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 13 ] }, { "entity_id": 6, "token_idxs": [ 14, 17 ] }, { "entity_id": 7, "token_idxs": [ 16 ] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [ 2, 3, 4, 5 ] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "O", "B-COLUMN", "B-VALUE", "O" ]
2,925
retail_world
bird:train.json:6443
Which region does Hoffman Estates belong to?
SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Hoffman Estates'
[ "Which", "region", "does", "Hoffman", "Estates", "belong", "to", "?" ]
[ { "id": 3, "type": "column", "value": "territorydescription" }, { "id": 0, "type": "column", "value": "regiondescription" }, { "id": 4, "type": "value", "value": "Hoffman Estates" }, { "id": 1, "type": "table", "value": "territories" }, { "id": 5, "type": "column", "value": "regionid" }, { "id": 2, "type": "table", "value": "region" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3, 4 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "O" ]
10,318
legislator
bird:train.json:4758
How many legislators have an Instagram account?
SELECT COUNT(*) FROM `social-media` WHERE instagram IS NOT NULL AND instagram <> ''
[ "How", "many", "legislators", "have", "an", "Instagram", "account", "?" ]
[ { "id": 0, "type": "table", "value": "social-media" }, { "id": 1, "type": "column", "value": "instagram" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
5,180
synthea
bird:train.json:1377
State the prevalence rate of condition no. 368581000119106.
SELECT DISTINCT T1."PREVALENCE RATE" FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON lower(T1.ITEM) = lower(T2.DESCRIPTION) WHERE T2.code = '368581000119106'
[ "State", "the", "prevalence", "rate", "of", "condition", "no", ".", "368581000119106", "." ]
[ { "id": 0, "type": "column", "value": "PREVALENCE RATE" }, { "id": 1, "type": "table", "value": "all_prevalences" }, { "id": 4, "type": "value", "value": "368581000119106" }, { "id": 6, "type": "column", "value": "description" }, { "id": 2, "type": "table", "value": "conditions" }, { "id": 3, "type": "column", "value": "code" }, { "id": 5, "type": "column", "value": "item" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4, 5 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-COLUMN", "O", "O" ]
13,116
apartment_rentals
spider:train_spider.json:1218
Return the date of birth for all the guests with gender code "Male".
SELECT date_of_birth FROM Guests WHERE gender_code = "Male"
[ "Return", "the", "date", "of", "birth", "for", "all", "the", "guests", "with", "gender", "code", "\"", "Male", "\"", "." ]
[ { "id": 1, "type": "column", "value": "date_of_birth" }, { "id": 2, "type": "column", "value": "gender_code" }, { "id": 0, "type": "table", "value": "guests" }, { "id": 3, "type": "column", "value": "Male" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O" ]
2,184
toxicology
bird:dev.json:196
In the non-carcinogenic molecules, how many contain chlorine atoms?
SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.element = 'cl' AND T1.label = '-'
[ "In", "the", "non", "-", "carcinogenic", "molecules", ",", "how", "many", "contain", "chlorine", "atoms", "?" ]
[ { "id": 2, "type": "column", "value": "molecule_id" }, { "id": 0, "type": "table", "value": "molecule" }, { "id": 3, "type": "column", "value": "element" }, { "id": 5, "type": "column", "value": "label" }, { "id": 1, "type": "table", "value": "atom" }, { "id": 4, "type": "value", "value": "cl" }, { "id": 6, "type": "value", "value": "-" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 3 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
15,622
wine_1
spider:train_spider.json:6544
Give the names and scores of wines made from white grapes.
SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White"
[ "Give", "the", "names", "and", "scores", "of", "wines", "made", "from", "white", "grapes", "." ]
[ { "id": 2, "type": "table", "value": "grapes" }, { "id": 1, "type": "column", "value": "score" }, { "id": 4, "type": "column", "value": "color" }, { "id": 5, "type": "column", "value": "White" }, { "id": 6, "type": "column", "value": "grape" }, { "id": 0, "type": "column", "value": "name" }, { "id": 3, "type": "table", "value": "wine" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 9 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
12,818
beer_factory
bird:train.json:5310
What brand of beer has been the worst rated most times?
SELECT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T2.BrandID = T1.BrandID WHERE T2.StarRating = 1 GROUP BY T1.BrandName ORDER BY COUNT(T1.BrandName) DESC LIMIT 1
[ "What", "brand", "of", "beer", "has", "been", "the", "worst", "rated", "most", "times", "?" ]
[ { "id": 2, "type": "table", "value": "rootbeerreview" }, { "id": 1, "type": "table", "value": "rootbeerbrand" }, { "id": 3, "type": "column", "value": "starrating" }, { "id": 0, "type": "column", "value": "brandname" }, { "id": 5, "type": "column", "value": "brandid" }, { "id": 4, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 1 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
441
csu_1
spider:train_spider.json:2384
How many undergraduates are there in "San Jose State University" in year 2004?
SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = "San Jose State University"
[ "How", "many", "undergraduates", "are", "there", "in", "\"", "San", "Jose", "State", "University", "\"", "in", "year", "2004", "?" ]
[ { "id": 7, "type": "column", "value": "San Jose State University" }, { "id": 0, "type": "table", "value": "discipline_enrollments" }, { "id": 2, "type": "column", "value": "undergraduate" }, { "id": 1, "type": "table", "value": "campuses" }, { "id": 3, "type": "column", "value": "campus" }, { "id": 5, "type": "column", "value": "year" }, { "id": 6, "type": "value", "value": "2004" }, { "id": 4, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 13 ] }, { "entity_id": 6, "token_idxs": [ 14 ] }, { "entity_id": 7, "token_idxs": [ 9, 10 ] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "I-COLUMN", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O" ]
6,049
chicago_crime
bird:train.json:8650
List down the neighborhood areas of Douglas.
SELECT T2.neighborhood_name FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T2.community_area_no = T1.community_area_no WHERE T1.community_area_name = 'Douglas'
[ "List", "down", "the", "neighborhood", "areas", "of", "Douglas", "." ]
[ { "id": 3, "type": "column", "value": "community_area_name" }, { "id": 0, "type": "column", "value": "neighborhood_name" }, { "id": 5, "type": "column", "value": "community_area_no" }, { "id": 1, "type": "table", "value": "community_area" }, { "id": 2, "type": "table", "value": "neighborhood" }, { "id": 4, "type": "value", "value": "Douglas" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "B-TABLE", "O", "B-VALUE", "O" ]
15,513
works_cycles
bird:train.json:7114
Please list the top three employees with the most unused sick leave along with their position titles.
SELECT JobTitle FROM Employee ORDER BY SickLeaveHours DESC LIMIT 3
[ "Please", "list", "the", "top", "three", "employees", "with", "the", "most", "unused", "sick", "leave", "along", "with", "their", "position", "titles", "." ]
[ { "id": 2, "type": "column", "value": "sickleavehours" }, { "id": 0, "type": "table", "value": "employee" }, { "id": 1, "type": "column", "value": "jobtitle" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
12,302
movie_platform
bird:train.json:165
What is the name of the movie that was rated recently by user 57756708?
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 57756708 ORDER BY T1.rating_timestamp_utc DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "movie", "that", "was", "rated", "recently", "by", "user", "57756708", "?" ]
[ { "id": 5, "type": "column", "value": "rating_timestamp_utc" }, { "id": 0, "type": "column", "value": "movie_title" }, { "id": 4, "type": "value", "value": "57756708" }, { "id": 6, "type": "column", "value": "movie_id" }, { "id": 1, "type": "table", "value": "ratings" }, { "id": 3, "type": "column", "value": "user_id" }, { "id": 2, "type": "table", "value": "movies" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 8 ] }, { "entity_id": 7, "token_idxs": [ 11, 12 ] }, { "entity_id": 8, "token_idxs": [ 14 ] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
8,935
video_games
bird:train.json:3367
List the region name where games reached 300000 sales and above.
SELECT DISTINCT T1.region_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T2.num_sales * 100000 > 300000
[ "List", "the", "region", "name", "where", "games", "reached", "300000", "sales", "and", "above", "." ]
[ { "id": 2, "type": "table", "value": "region_sales" }, { "id": 0, "type": "column", "value": "region_name" }, { "id": 5, "type": "column", "value": "region_id" }, { "id": 6, "type": "column", "value": "num_sales" }, { "id": 1, "type": "table", "value": "region" }, { "id": 3, "type": "value", "value": "300000" }, { "id": 7, "type": "value", "value": "100000" }, { "id": 4, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 8 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O" ]
8,883
beer_factory
bird:train.json:5303
What is the difference in the average number of sales per day of root beer brands that contain honey and that don’t contain honey.
SELECT (CAST(SUM(CASE WHEN T1.Honey = 'TRUE' THEN 1 ELSE 0 END) AS REAL) / COUNT(DISTINCT T3.TransactionDate)) - (CAST(SUM(CASE WHEN T1.Honey <> 'TRUE' THEN 1 ELSE 0 END) AS REAL) / COUNT(DISTINCT T3.TransactionDate)) FROM rootbeerbrand AS T1 INNER JOIN rootbeer AS T2 ON T1.BrandID = T2.BrandID INNER JOIN `transaction` AS T3 ON T2.RootBeerID = T3.RootBeerID
[ "What", "is", "the", "difference", "in", "the", "average", "number", "of", "sales", "per", "day", "of", "root", "beer", "brands", "that", "contain", "honey", "and", "that", "do", "n’t", "contain", "honey", "." ]
[ { "id": 5, "type": "column", "value": "transactiondate" }, { "id": 1, "type": "table", "value": "rootbeerbrand" }, { "id": 0, "type": "table", "value": "transaction" }, { "id": 3, "type": "column", "value": "rootbeerid" }, { "id": 2, "type": "table", "value": "rootbeer" }, { "id": 4, "type": "column", "value": "brandid" }, { "id": 8, "type": "column", "value": "honey" }, { "id": 9, "type": "value", "value": "TRUE" }, { "id": 6, "type": "value", "value": "0" }, { "id": 7, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
8,689
authors
bird:train.json:3587
Please list the names of the authors of the paper "Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers".
SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers'
[ "Please", "list", "the", "names", "of", "the", "authors", "of", "the", "paper", "\"", "Hypermethylation", "of", "the", "<", "I", ">", "TPEF", "/", "HPP1</I", ">", "Gene", "in", "Primary", "and", "Metastatic", "Colorectal", "Cancers", "\"", "." ]
[ { "id": 4, "type": "value", "value": "Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers" }, { "id": 2, "type": "table", "value": "paperauthor" }, { "id": 6, "type": "column", "value": "paperid" }, { "id": 1, "type": "table", "value": "paper" }, { "id": 3, "type": "column", "value": "title" }, { "id": 0, "type": "column", "value": "name" }, { "id": 5, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "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", "O", "O" ]
3,733
csu_1
spider:train_spider.json:2383
How many faculty members are at the university that gave the least number of degrees in 2001?
SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees LIMIT 1
[ "How", "many", "faculty", "members", "are", "at", "the", "university", "that", "gave", "the", "least", "number", "of", "degrees", "in", "2001", "?" ]
[ { "id": 5, "type": "table", "value": "campuses" }, { "id": 0, "type": "column", "value": "faculty" }, { "id": 1, "type": "table", "value": "degrees" }, { "id": 4, "type": "column", "value": "degrees" }, { "id": 6, "type": "table", "value": "faculty" }, { "id": 8, "type": "column", "value": "campus" }, { "id": 2, "type": "column", "value": "year" }, { "id": 3, "type": "value", "value": "2001" }, { "id": 7, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 2 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
15,895
retail_world
bird:train.json:6546
Describe the supplier companies, cities and products which total production amount is more than 120.
SELECT T2.CompanyName, T2.City, T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitsInStock + UnitsOnOrder > 120
[ "Describe", "the", "supplier", "companies", ",", "cities", "and", "products", "which", "total", "production", "amount", "is", "more", "than", "120", "." ]
[ { "id": 7, "type": "column", "value": "unitsinstock" }, { "id": 8, "type": "column", "value": "unitsonorder" }, { "id": 0, "type": "column", "value": "companyname" }, { "id": 2, "type": "column", "value": "productname" }, { "id": 6, "type": "column", "value": "supplierid" }, { "id": 4, "type": "table", "value": "suppliers" }, { "id": 3, "type": "table", "value": "products" }, { "id": 1, "type": "column", "value": "city" }, { "id": 5, "type": "value", "value": "120" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "token_idxs": [ 15 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
1,489
bike_share_1
bird:train.json:9056
What was the mean humidity of a trip with id 4275?
SELECT T2.mean_humidity FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.id = 4275
[ "What", "was", "the", "mean", "humidity", "of", "a", "trip", "with", "i", "d", "4275", "?" ]
[ { "id": 0, "type": "column", "value": "mean_humidity" }, { "id": 5, "type": "column", "value": "zip_code" }, { "id": 2, "type": "table", "value": "weather" }, { "id": 1, "type": "table", "value": "trip" }, { "id": 4, "type": "value", "value": "4275" }, { "id": 3, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
5,107
activity_1
spider:train_spider.json:6748
How many male and female assistant professors do we have?
SELECT sex , count(*) FROM Faculty WHERE rank = "AsstProf" GROUP BY sex
[ "How", "many", "male", "and", "female", "assistant", "professors", "do", "we", "have", "?" ]
[ { "id": 3, "type": "column", "value": "AsstProf" }, { "id": 0, "type": "table", "value": "faculty" }, { "id": 2, "type": "column", "value": "rank" }, { "id": 1, "type": "column", "value": "sex" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O" ]
15,331
sales_in_weather
bird:train.json:8152
How many more units of item no.16 were sold on the day with the highest max temperature in 2012 in store no.5 than in store no.10?
SELECT ( SELECT SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.item_nbr = 16 AND T1.`date` LIKE '%2012%' AND T1.store_nbr = 5 GROUP BY tmax ORDER BY T3.tmax DESC LIMIT 1 ) - ( SELECT SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.item_nbr = 16 AND T1.`date` LIKE '%2012%' AND T1.store_nbr = 6 GROUP BY tmax ORDER BY T3.tmax DESC LIMIT 1 )
[ "How", "many", "more", "units", "of", "item", "no.16", "were", "sold", "on", "the", "day", "with", "the", "highest", "max", "temperature", "in", "2012", "in", "store", "no.5", "than", "in", "store", "no.10", "?" ]
[ { "id": 3, "type": "table", "value": "sales_in_weather" }, { "id": 5, "type": "column", "value": "station_nbr" }, { "id": 10, "type": "column", "value": "store_nbr" }, { "id": 4, "type": "table", "value": "relation" }, { "id": 6, "type": "column", "value": "item_nbr" }, { "id": 1, "type": "table", "value": "weather" }, { "id": 9, "type": "value", "value": "%2012%" }, { "id": 2, "type": "column", "value": "units" }, { "id": 0, "type": "column", "value": "tmax" }, { "id": 8, "type": "column", "value": "date" }, { "id": 7, "type": "value", "value": "16" }, { "id": 11, "type": "value", "value": "5" }, { "id": 12, "type": "value", "value": "6" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
11,851
movie_3
bird:train.json:9104
How many films have a rental duration of over 6 days?
SELECT COUNT(film_id) FROM film WHERE rental_duration > 6
[ "How", "many", "films", "have", "a", "rental", "duration", "of", "over", "6", "days", "?" ]
[ { "id": 1, "type": "column", "value": "rental_duration" }, { "id": 3, "type": "column", "value": "film_id" }, { "id": 0, "type": "table", "value": "film" }, { "id": 2, "type": "value", "value": "6" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
4,349
bike_1
spider:train_spider.json:173
What are the name, latitude, and city of the station with the lowest latitude?
SELECT name , lat , city FROM station ORDER BY lat LIMIT 1
[ "What", "are", "the", "name", ",", "latitude", ",", "and", "city", "of", "the", "station", "with", "the", "lowest", "latitude", "?" ]
[ { "id": 0, "type": "table", "value": "station" }, { "id": 1, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "city" }, { "id": 2, "type": "column", "value": "lat" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
14,084
student_loan
bird:train.json:4517
Calculate the average duration of absense of disabled male students.
SELECT AVG(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T2.name = T1.name INNER JOIN male AS T3 ON T3.name = T2.name
[ "Calculate", "the", "average", "duration", "of", "absense", "of", "disabled", "male", "students", "." ]
[ { "id": 2, "type": "table", "value": "longest_absense_from_school" }, { "id": 3, "type": "table", "value": "disabled" }, { "id": 1, "type": "column", "value": "month" }, { "id": 0, "type": "table", "value": "male" }, { "id": 4, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "B-TABLE", "O", "O" ]
14,586
e_government
spider:train_spider.json:6339
Count the number of different payment method codes used by parties.
SELECT count(DISTINCT payment_method_code) FROM parties
[ "Count", "the", "number", "of", "different", "payment", "method", "codes", "used", "by", "parties", "." ]
[ { "id": 1, "type": "column", "value": "payment_method_code" }, { "id": 0, "type": "table", "value": "parties" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 6, 7, 8, 9 ] }, { "entity_id": 6, "token_idxs": [ 11 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
14,396
beer_factory
bird:train.json:5238
How many transactions had Frank-Paul Santangelo made in July, 2014?
SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND STRFTIME('%Y-%m', T2.TransactionDate) = '2014-07'
[ "How", "many", "transactions", "had", "Frank", "-", "Paul", "Santangelo", "made", "in", "July", ",", "2014", "?" ]
[ { "id": 9, "type": "column", "value": "transactiondate" }, { "id": 1, "type": "table", "value": "transaction" }, { "id": 2, "type": "column", "value": "customerid" }, { "id": 4, "type": "value", "value": "Frank-Paul" }, { "id": 6, "type": "value", "value": "Santangelo" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 7, "type": "value", "value": "2014-07" }, { "id": 3, "type": "column", "value": "first" }, { "id": 8, "type": "value", "value": "%Y-%m" }, { "id": 5, "type": "column", "value": "last" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [ 7 ] }, { "entity_id": 7, "token_idxs": [ 10, 11, 12 ] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-VALUE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
15,802
video_games
bird:train.json:3444
List by name all the games released in the year 2010.
SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id WHERE T3.release_year = '2010'
[ "List", "by", "name", "all", "the", "games", "released", "in", "the", "year", "2010", "." ]
[ { "id": 7, "type": "column", "value": "game_publisher_id" }, { "id": 5, "type": "table", "value": "game_publisher" }, { "id": 1, "type": "table", "value": "game_platform" }, { "id": 2, "type": "column", "value": "release_year" }, { "id": 0, "type": "column", "value": "game_name" }, { "id": 8, "type": "column", "value": "game_id" }, { "id": 3, "type": "value", "value": "2010" }, { "id": 4, "type": "table", "value": "game" }, { "id": 6, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
6,932
advertising_agencies
bird:test.json:2069
Show agency ids and details with at least 2 clients.
SELECT T1.agency_id , T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id = T2.agency_id GROUP BY T1.agency_id HAVING count(*) >= 2
[ "Show", "agency", "ids", "and", "details", "with", "at", "least", "2", "clients", "." ]
[ { "id": 1, "type": "column", "value": "agency_details" }, { "id": 0, "type": "column", "value": "agency_id" }, { "id": 2, "type": "table", "value": "agencies" }, { "id": 3, "type": "table", "value": "clients" }, { "id": 4, "type": "value", "value": "2" } ]
[ { "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": [ 5 ] }, { "entity_id": 5, "token_idxs": [ 8 ] }, { "entity_id": 6, "token_idxs": [ 10 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O" ]
9,333
car_retails
bird:train.json:1545
Which different vendor has the most amount of orders? Calculate the total estimated earnings.
SELECT DISTINCT T1.productVendor, T1.MSRP - T1.buyPrice FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode GROUP BY T1.productVendor, T1.MSRP, T1.buyPrice ORDER BY COUNT(T2.quantityOrdered) DESC LIMIT 1
[ "Which", "different", "vendor", "has", "the", "most", "amount", "of", "orders", "?", "Calculate", "the", "total", "estimated", "earnings", "." ]
[ { "id": 6, "type": "column", "value": "quantityordered" }, { "id": 0, "type": "column", "value": "productvendor" }, { "id": 4, "type": "table", "value": "orderdetails" }, { "id": 5, "type": "column", "value": "productcode" }, { "id": 2, "type": "column", "value": "buyprice" }, { "id": 3, "type": "table", "value": "products" }, { "id": 1, "type": "column", "value": "msrp" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": [ 7, 8 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [ 14 ] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
8,890
computer_student
bird:train.json:997
Please list the IDs of the professors that teaches more than 3 courses.
SELECT T1.p_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 GROUP BY T1.p_id HAVING COUNT(DISTINCT T1.course_id) > 3
[ "Please", "list", "the", "IDs", "of", "the", "professors", "that", "teaches", "more", "than", "3", "courses", "." ]
[ { "id": 3, "type": "column", "value": "professor" }, { "id": 6, "type": "column", "value": "course_id" }, { "id": 1, "type": "table", "value": "taughtby" }, { "id": 2, "type": "table", "value": "person" }, { "id": 0, "type": "column", "value": "p_id" }, { "id": 4, "type": "value", "value": "1" }, { "id": 5, "type": "value", "value": "3" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 11 ] }, { "entity_id": 6, "token_idxs": [ 12 ] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
10,726
music_2
spider:train_spider.json:5202
What are all the instruments used?
SELECT DISTINCT instrument FROM Instruments
[ "What", "are", "all", "the", "instruments", "used", "?" ]
[ { "id": 0, "type": "table", "value": "instruments" }, { "id": 1, "type": "column", "value": "instrument" } ]
[ { "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": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "B-TABLE", "O", "O" ]
4,114
retails
bird:train.json:6820
List all the dates of the urgent orders.
SELECT o_orderdate FROM orders WHERE o_orderpriority = '1-URGENT'
[ "List", "all", "the", "dates", "of", "the", "urgent", "orders", "." ]
[ { "id": 2, "type": "column", "value": "o_orderpriority" }, { "id": 1, "type": "column", "value": "o_orderdate" }, { "id": 3, "type": "value", "value": "1-URGENT" }, { "id": 0, "type": "table", "value": "orders" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-TABLE", "O" ]
12,977
e_commerce
bird:test.json:75
What are the invoice statuses for all orderes that have not been shipped out yet?
SELECT invoice_status_code FROM Invoices WHERE invoice_number NOT IN ( SELECT invoice_number FROM Shipments )
[ "What", "are", "the", "invoice", "statuses", "for", "all", "orderes", "that", "have", "not", "been", "shipped", "out", "yet", "?" ]
[ { "id": 1, "type": "column", "value": "invoice_status_code" }, { "id": 2, "type": "column", "value": "invoice_number" }, { "id": 3, "type": "table", "value": "shipments" }, { "id": 0, "type": "table", "value": "invoices" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
722
chicago_crime
bird:train.json:8654
Provide the occurrence date and location of the deceptive practice due to the unlawful use of recorded sound.
SELECT T2.date, T2.latitude, T2.longitude FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no WHERE T1.primary_description = 'DECEPTIVE PRACTICE' AND T1.secondary_description = 'UNLAWFUL USE OF RECORDED SOUND'
[ "Provide", "the", "occurrence", "date", "and", "location", "of", "the", "deceptive", "practice", "due", "to", "the", "unlawful", "use", "of", "recorded", "sound", "." ]
[ { "id": 9, "type": "value", "value": "UNLAWFUL USE OF RECORDED SOUND" }, { "id": 8, "type": "column", "value": "secondary_description" }, { "id": 6, "type": "column", "value": "primary_description" }, { "id": 7, "type": "value", "value": "DECEPTIVE PRACTICE" }, { "id": 2, "type": "column", "value": "longitude" }, { "id": 1, "type": "column", "value": "latitude" }, { "id": 5, "type": "column", "value": "iucr_no" }, { "id": 4, "type": "table", "value": "crime" }, { "id": 0, "type": "column", "value": "date" }, { "id": 3, "type": "table", "value": "iucr" } ]
[ { "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": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [ 8, 9 ] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [ 13, 14, 15, 16, 17 ] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
15,250
baseball_1
spider:train_spider.json:3632
Compute the average salary of the players in the team called 'Boston Red Stockings'.
SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'
[ "Compute", "the", "average", "salary", "of", "the", "players", "in", "the", "team", "called", "'", "Boston", "Red", "Stockings", "'", "." ]
[ { "id": 3, "type": "value", "value": "Boston Red Stockings" }, { "id": 6, "type": "column", "value": "team_id_br" }, { "id": 5, "type": "column", "value": "team_id" }, { "id": 0, "type": "table", "value": "salary" }, { "id": 4, "type": "column", "value": "salary" }, { "id": 1, "type": "table", "value": "team" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12, 13, 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
3,566
school_bus
spider:train_spider.json:6352
Show all different home cities.
SELECT DISTINCT home_city FROM driver
[ "Show", "all", "different", "home", "cities", "." ]
[ { "id": 1, "type": "column", "value": "home_city" }, { "id": 0, "type": "table", "value": "driver" } ]
[ { "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": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "O" ]
9,157
california_schools
bird:dev.json:8
What is the number of SAT test takers of the schools with the highest FRPM count for K-12 students?
SELECT NumTstTakr FROM satscores WHERE cds = ( SELECT CDSCode FROM frpm ORDER BY `FRPM Count (K-12)` DESC LIMIT 1 )
[ "What", "is", "the", "number", "of", "SAT", "test", "takers", "of", "the", "schools", "with", "the", "highest", "FRPM", "count", "for", "K-12", "students", "?" ]
[ { "id": 5, "type": "column", "value": "FRPM Count (K-12)" }, { "id": 1, "type": "column", "value": "numtsttakr" }, { "id": 0, "type": "table", "value": "satscores" }, { "id": 4, "type": "column", "value": "cdscode" }, { "id": 3, "type": "table", "value": "frpm" }, { "id": 2, "type": "column", "value": "cds" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "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": [ 14, 15, 16, 17 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O" ]
11,087
movie_platform
bird:train.json:143
Among the lists with at least one follower, how many were created by user who was subscriber when created the list?
SELECT COUNT(T1.list_id) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_followers >= 1 AND T1.user_subscriber = 1
[ "Among", "the", "lists", "with", "at", "least", "one", "follower", ",", "how", "many", "were", "created", "by", "user", "who", "was", "subscriber", "when", "created", "the", "list", "?" ]
[ { "id": 5, "type": "column", "value": "user_subscriber" }, { "id": 3, "type": "column", "value": "list_followers" }, { "id": 0, "type": "table", "value": "lists_users" }, { "id": 2, "type": "column", "value": "list_id" }, { "id": 1, "type": "table", "value": "lists" }, { "id": 4, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 21 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": [ 17 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
14,496
sakila_1
spider:train_spider.json:2948
Which film has the highest rental rate? And what is the rate?
SELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
[ "Which", "film", "has", "the", "highest", "rental", "rate", "?", "And", "what", "is", "the", "rate", "?" ]
[ { "id": 2, "type": "column", "value": "rental_rate" }, { "id": 1, "type": "column", "value": "title" }, { "id": 0, "type": "table", "value": "film" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
9,489
flight_1
spider:train_spider.json:372
What is the average and largest salary of all employees?
SELECT avg(salary) , max(salary) FROM Employee
[ "What", "is", "the", "average", "and", "largest", "salary", "of", "all", "employees", "?" ]
[ { "id": 0, "type": "table", "value": "employee" }, { "id": 1, "type": "column", "value": "salary" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [] }, { "entity_id": 8, "token_idxs": [] }, { "entity_id": 9, "token_idxs": [] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
4,462
public_review_platform
bird:train.json:3837
How long does business number 12 in Scottsdale stay open on day number 3?
SELECT T2.closing_time - T2.opening_time AS "hour" FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.business_id = 12 AND T1.city LIKE 'Scottsdale' AND T2.day_id = 3
[ "How", "long", "does", "business", "number", "12", "in", "Scottsdale", "stay", "open", "on", "day", "number", "3", "?" ]
[ { "id": 1, "type": "table", "value": "business_hours" }, { "id": 2, "type": "column", "value": "closing_time" }, { "id": 3, "type": "column", "value": "opening_time" }, { "id": 4, "type": "column", "value": "business_id" }, { "id": 7, "type": "value", "value": "Scottsdale" }, { "id": 0, "type": "table", "value": "business" }, { "id": 8, "type": "column", "value": "day_id" }, { "id": 6, "type": "column", "value": "city" }, { "id": 5, "type": "value", "value": "12" }, { "id": 9, "type": "value", "value": "3" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "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": [ 5 ] }, { "entity_id": 6, "token_idxs": [] }, { "entity_id": 7, "token_idxs": [ 7 ] }, { "entity_id": 8, "token_idxs": [ 11 ] }, { "entity_id": 9, "token_idxs": [ 13 ] }, { "entity_id": 10, "token_idxs": [] }, { "entity_id": 11, "token_idxs": [] }, { "entity_id": 12, "token_idxs": [] }, { "entity_id": 13, "token_idxs": [] }, { "entity_id": 14, "token_idxs": [] }, { "entity_id": 15, "token_idxs": [] }, { "entity_id": 16, "token_idxs": [] }, { "entity_id": 17, "token_idxs": [] }, { "entity_id": 18, "token_idxs": [] }, { "entity_id": 19, "token_idxs": [] } ]
[ "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-VALUE", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-VALUE", "O" ]