question_id int64 0 16.1k | db_id stringclasses 259
values | dber_id stringlengths 15 29 | question stringlengths 16 325 | SQL stringlengths 18 1.25k | tokens listlengths 4 62 | entities listlengths 0 21 | entity_to_token listlengths 20 20 | dber_tags listlengths 4 62 |
|---|---|---|---|---|---|---|---|---|
6,324 | mondial_geo | bird:train.json:8221 | Find the GPD for Bosnia and Herzegovina and the type of government it belongs to. | SELECT T1.GDP, T2.Government FROM economy AS T1 INNER JOIN politics AS T2 ON T1.Country = T2.Country INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T3.Name = 'Bosnia and Herzegovina' | [
"Find",
"the",
"GPD",
"for",
"Bosnia",
"and",
"Herzegovina",
"and",
"the",
"type",
"of",
"government",
"it",
"belongs",
"to",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Bosnia and Herzegovina"
},
{
"id": 1,
"type": "column",
"value": "government"
},
{
"id": 6,
"type": "table",
"value": "politics"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 5,
"type": "tabl... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4,
5,
6
]
},
{
"e... | [
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
6,325 | real_estate_rentals | bird:test.json:1436 | Find the login names of all senior citizen users ordered by their first names. | SELECT login_name FROM Users WHERE user_category_code = 'Senior Citizen' ORDER BY first_name | [
"Find",
"the",
"login",
"names",
"of",
"all",
"senior",
"citizen",
"users",
"ordered",
"by",
"their",
"first",
"names",
"."
] | [
{
"id": 2,
"type": "column",
"value": "user_category_code"
},
{
"id": 3,
"type": "value",
"value": "Senior Citizen"
},
{
"id": 1,
"type": "column",
"value": "login_name"
},
{
"id": 4,
"type": "column",
"value": "first_name"
},
{
"id": 0,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7
]
},
{
"entity_id": 4,
"token_idxs": [
12,
1... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,326 | professional_basketball | bird:train.json:2801 | Who is the coach for 'BOS' team in year 1950. List the coach ID together with the number of game won and lost. | SELECT coachID, won, lost FROM coaches WHERE year = 1950 AND tmID = 'BOS' | [
"Who",
"is",
"the",
"coach",
"for",
"'",
"BOS",
"'",
"team",
"in",
"year",
"1950",
".",
"List",
"the",
"coach",
"ID",
"together",
"with",
"the",
"number",
"of",
"game",
"won",
"and",
"lost",
"."
] | [
{
"id": 0,
"type": "table",
"value": "coaches"
},
{
"id": 1,
"type": "column",
"value": "coachid"
},
{
"id": 3,
"type": "column",
"value": "lost"
},
{
"id": 4,
"type": "column",
"value": "year"
},
{
"id": 5,
"type": "value",
"value": "1950"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
23
]
},
{
"entity_id": 3,
"token_idxs": [
25
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
6,327 | music_1 | spider:train_spider.json:3531 | What is the id of the longest song? | SELECT f_id FROM files ORDER BY duration DESC LIMIT 1 | [
"What",
"is",
"the",
"i",
"d",
"of",
"the",
"longest",
"song",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "duration"
},
{
"id": 0,
"type": "table",
"value": "files"
},
{
"id": 1,
"type": "column",
"value": "f_id"
}
] | [
{
"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": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
6,328 | bike_1 | spider:train_spider.json:135 | Which bike traveled the most often in zip code 94002? | SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1 | [
"Which",
"bike",
"traveled",
"the",
"most",
"often",
"in",
"zip",
"code",
"94002",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "zip_code"
},
{
"id": 1,
"type": "column",
"value": "bike_id"
},
{
"id": 3,
"type": "value",
"value": "94002"
},
{
"id": 0,
"type": "table",
"value": "trip"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
6,329 | professional_basketball | bird:train.json:2922 | What is the difference in the average age of players when they are drafted in the ABA vs when they are drafted in the NBA between the years 1970 and 1970? | SELECT CAST(SUM(IIF(T2.lgID = 'ABA', 1970 - strftime('%Y', T3.birthDate), 0)) AS REAL) / COUNT(IIF(T2.lgID = 'ABA', 1, 0)) - CAST(SUM(IIF(T2.lgID = 'NBA', 1970 - strftime('%Y', T3.birthDate), 0)) AS REAL) / COUNT(IIF(T2.lgID = 'NBA', 1, 0)) FROM draft AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID INNER JOIN... | [
"What",
"is",
"the",
"difference",
"in",
"the",
"average",
"age",
"of",
"players",
"when",
"they",
"are",
"drafted",
"in",
"the",
"ABA",
"vs",
"when",
"they",
"are",
"drafted",
"in",
"the",
"NBA",
"between",
"the",
"years",
"1970",
"and",
"1970",
"?"
] | [
{
"id": 4,
"type": "table",
"value": "players_teams"
},
{
"id": 1,
"type": "column",
"value": "draftyear"
},
{
"id": 13,
"type": "column",
"value": "birthdate"
},
{
"id": 5,
"type": "column",
"value": "playerid"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": [
28
]
},
{
"entity_id": 3,
"token_idxs": [
21
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"enti... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
6,330 | tracking_orders | spider:train_spider.json:6886 | Find the id of the order made most recently. | SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1 | [
"Find",
"the",
"i",
"d",
"of",
"the",
"order",
"made",
"most",
"recently",
"."
] | [
{
"id": 2,
"type": "column",
"value": "date_order_placed"
},
{
"id": 1,
"type": "column",
"value": "order_id"
},
{
"id": 0,
"type": "table",
"value": "orders"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5,
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O"
] |
6,331 | hockey | bird:train.json:7741 | How old was the goaltender who scored the fewest goals while on the ice when he retired from the NHL? | SELECT T2.lastNHL - T2.birthYear FROM GoaliesSC AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.lastNHL IS NOT NULL GROUP BY T2.lastNHL, T2.birthYear ORDER BY SUM(GA) LIMIT 1 | [
"How",
"old",
"was",
"the",
"goaltender",
"who",
"scored",
"the",
"fewest",
"goals",
"while",
"on",
"the",
"ice",
"when",
"he",
"retired",
"from",
"the",
"NHL",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "birthyear"
},
{
"id": 2,
"type": "table",
"value": "goaliessc"
},
{
"id": 4,
"type": "column",
"value": "playerid"
},
{
"id": 0,
"type": "column",
"value": "lastnhl"
},
{
"id": 3,
"type": "table",
"val... | [
{
"entity_id": 0,
"token_idxs": [
19
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
2,
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,332 | solvency_ii | spider:train_spider.json:4594 | Show the names of products and the number of events they are in, sorted by the number of events in descending order. | SELECT T1.Product_Name , COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*) DESC | [
"Show",
"the",
"names",
"of",
"products",
"and",
"the",
"number",
"of",
"events",
"they",
"are",
"in",
",",
"sorted",
"by",
"the",
"number",
"of",
"events",
"in",
"descending",
"order",
"."
] | [
{
"id": 2,
"type": "table",
"value": "products_in_events"
},
{
"id": 0,
"type": "column",
"value": "product_name"
},
{
"id": 3,
"type": "column",
"value": "product_id"
},
{
"id": 1,
"type": "table",
"value": "products"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,333 | club_leader | bird:test.json:655 | Show the names of club leaders that joined their club before 2018. | SELECT T3.Name , T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID = T2.Club_ID JOIN member AS T3 ON T1.Member_ID = T3.Member_ID WHERE T1.Year_Join < 2018 | [
"Show",
"the",
"names",
"of",
"club",
"leaders",
"that",
"joined",
"their",
"club",
"before",
"2018",
"."
] | [
{
"id": 5,
"type": "table",
"value": "club_leader"
},
{
"id": 1,
"type": "column",
"value": "club_name"
},
{
"id": 3,
"type": "column",
"value": "year_join"
},
{
"id": 7,
"type": "column",
"value": "member_id"
},
{
"id": 8,
"type": "column",
... | [
{
"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": [
11
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,334 | law_episode | bird:train.json:1245 | Please list all the keywords of the episode "Refuge: Part 1". | SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Refuge: Part 1' | [
"Please",
"list",
"all",
"the",
"keywords",
"of",
"the",
"episode",
"\"",
"Refuge",
":",
"Part",
"1",
"\"",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Refuge: Part 1"
},
{
"id": 5,
"type": "column",
"value": "episode_id"
},
{
"id": 0,
"type": "column",
"value": "keyword"
},
{
"id": 1,
"type": "table",
"value": "episode"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9,
10,
11,
12
]
},... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
6,335 | music_4 | spider:train_spider.json:6181 | Please show the categories of the music festivals and the count. | SELECT Category , COUNT(*) FROM music_festival GROUP BY Category | [
"Please",
"show",
"the",
"categories",
"of",
"the",
"music",
"festivals",
"and",
"the",
"count",
"."
] | [
{
"id": 0,
"type": "table",
"value": "music_festival"
},
{
"id": 1,
"type": "column",
"value": "category"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6,
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O"
] |
6,336 | student_loan | bird:train.json:4537 | How many students have absent from school? | SELECT COUNT(name) FROM longest_absense_from_school WHERE month > 1 | [
"How",
"many",
"students",
"have",
"absent",
"from",
"school",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "longest_absense_from_school"
},
{
"id": 1,
"type": "column",
"value": "month"
},
{
"id": 3,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4,
5,
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_id... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O"
] |
6,337 | public_review_platform | bird:train.json:4053 | How many business ids have opening hours from 8AM to 6PM? | SELECT DISTINCT business_id FROM Business_Hours WHERE opening_time = '8AM' AND closing_time = '6PM' | [
"How",
"many",
"business",
"ids",
"have",
"opening",
"hours",
"from",
"8AM",
"to",
"6PM",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "business_hours"
},
{
"id": 2,
"type": "column",
"value": "opening_time"
},
{
"id": 4,
"type": "column",
"value": "closing_time"
},
{
"id": 1,
"type": "column",
"value": "business_id"
},
{
"id": 3,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
6,338 | books | bird:train.json:5931 | For the publisher which published the most books, show its name. | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T2.publisher_id) DESC LIMIT 1 | [
"For",
"the",
"publisher",
"which",
"published",
"the",
"most",
"books",
",",
"show",
"its",
"name",
"."
] | [
{
"id": 0,
"type": "column",
"value": "publisher_name"
},
{
"id": 3,
"type": "column",
"value": "publisher_id"
},
{
"id": 2,
"type": "table",
"value": "publisher"
},
{
"id": 1,
"type": "table",
"value": "book"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"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": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
6,339 | donor | bird:train.json:3239 | State the short description for the project which got the donation at 14:44:29 on 2012/9/6. | SELECT T1.short_description FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_timestamp LIKE '2012-09-06 14:44:29' | [
"State",
"the",
"short",
"description",
"for",
"the",
"project",
"which",
"got",
"the",
"donation",
"at",
"14:44:29",
"on",
"2012/9/6",
"."
] | [
{
"id": 4,
"type": "value",
"value": "2012-09-06 14:44:29"
},
{
"id": 3,
"type": "column",
"value": "donation_timestamp"
},
{
"id": 0,
"type": "column",
"value": "short_description"
},
{
"id": 2,
"type": "table",
"value": "donations"
},
{
"id": 5,
... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O"
] |
6,340 | movie_platform | bird:train.json:108 | Please list the names of the movies that received more than 20 likes? | SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.critic_likes > 20 | [
"Please",
"list",
"the",
"names",
"of",
"the",
"movies",
"that",
"received",
"more",
"than",
"20",
"likes",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "critic_likes"
},
{
"id": 0,
"type": "column",
"value": "movie_title"
},
{
"id": 5,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"type": "table",
"value": "ratings"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entit... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
6,341 | loan_1 | spider:train_spider.json:3040 | Find the name of customers who do not have a loan with a type of Mortgages. | SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages' | [
"Find",
"the",
"name",
"of",
"customers",
"who",
"do",
"not",
"have",
"a",
"loan",
"with",
"a",
"type",
"of",
"Mortgages",
"."
] | [
{
"id": 1,
"type": "column",
"value": "cust_name"
},
{
"id": 3,
"type": "column",
"value": "loan_type"
},
{
"id": 4,
"type": "value",
"value": "Mortgages"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 5,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,342 | products_for_hire | spider:train_spider.json:1976 | What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check' | SELECT payment_date FROM payments WHERE amount_paid > 300 OR payment_type_code = 'Check' | [
"What",
"are",
"the",
"payment",
"date",
"of",
"the",
"payment",
"with",
"amount",
"paid",
"higher",
"than",
"300",
"or",
"with",
"payment",
"type",
"is",
"'",
"Check",
"'"
] | [
{
"id": 4,
"type": "column",
"value": "payment_type_code"
},
{
"id": 1,
"type": "column",
"value": "payment_date"
},
{
"id": 2,
"type": "column",
"value": "amount_paid"
},
{
"id": 0,
"type": "table",
"value": "payments"
},
{
"id": 5,
"type": "v... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
6,343 | scientist_1 | spider:train_spider.json:6502 | What are the SSN and names of scientists working on the project with the most hours? | SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) | [
"What",
"are",
"the",
"SSN",
"and",
"names",
"of",
"scientists",
"working",
"on",
"the",
"project",
"with",
"the",
"most",
"hours",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "scientists"
},
{
"id": 4,
"type": "table",
"value": "assignedto"
},
{
"id": 6,
"type": "column",
"value": "scientist"
},
{
"id": 5,
"type": "table",
"value": "projects"
},
{
"id": 7,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,344 | insurance_fnol | spider:train_spider.json:922 | Which customers have used the service named "Close a policy" or "Upgrade a policy"? Give me the customer names. | SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = "Close a policy" OR t3.service_name = "Upgrade a policy" | [
"Which",
"customers",
"have",
"used",
"the",
"service",
"named",
"\"",
"Close",
"a",
"policy",
"\"",
"or",
"\"",
"Upgrade",
"a",
"policy",
"\"",
"?",
"Give",
"me",
"the",
"customer",
"names",
"."
] | [
{
"id": 3,
"type": "table",
"value": "first_notification_of_loss"
},
{
"id": 7,
"type": "column",
"value": "Upgrade a policy"
},
{
"id": 6,
"type": "column",
"value": "Close a policy"
},
{
"id": 0,
"type": "column",
"value": "customer_name"
},
{
"i... | [
{
"entity_id": 0,
"token_idxs": [
23
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
6,345 | restaurant_bills | bird:test.json:633 | For each order, return the customer name and the dish name. | SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID | [
"For",
"each",
"order",
",",
"return",
"the",
"customer",
"name",
"and",
"the",
"dish",
"name",
"."
] | [
{
"id": 3,
"type": "table",
"value": "customer_order"
},
{
"id": 4,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "column",
"value": "dish_name"
},
{
"id": 2,
"type": "table",
"value": "customer"
},
{
"id": 0,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
6,346 | airline | bird:train.json:5844 | How many flights of Endeavor Air Inc. were faster than scheduled on 2018/8/31? | SELECT SUM(CASE WHEN T1.ACTUAL_ELAPSED_TIME < CRS_ELAPSED_TIME THEN 1 ELSE 0 END) AS count FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.FL_DATE = '2018/8/31' AND T2.Description = 'Endeavor Air Inc.: 9E' | [
"How",
"many",
"flights",
"of",
"Endeavor",
"Air",
"Inc.",
"were",
"faster",
"than",
"scheduled",
"on",
"2018/8/31",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "op_carrier_airline_id"
},
{
"id": 7,
"type": "value",
"value": "Endeavor Air Inc.: 9E"
},
{
"id": 10,
"type": "column",
"value": "actual_elapsed_time"
},
{
"id": 11,
"type": "column",
"value": "crs_elapsed_time"
},
... | [
{
"entity_id": 0,
"token_idxs": [
5,
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,347 | sports_competition | spider:train_spider.json:3367 | List the most common type of competition. | SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1 | [
"List",
"the",
"most",
"common",
"type",
"of",
"competition",
"."
] | [
{
"id": 1,
"type": "column",
"value": "competition_type"
},
{
"id": 0,
"type": "table",
"value": "competition"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,348 | student_loan | bird:train.json:4394 | Name 5 students with due payments that are enlisted alongside which organization they were enlisted. | SELECT T2.organ, T1.name FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T1.bool = 'pos' LIMIT 5 | [
"Name",
"5",
"students",
"with",
"due",
"payments",
"that",
"are",
"enlisted",
"alongside",
"which",
"organization",
"they",
"were",
"enlisted",
"."
] | [
{
"id": 2,
"type": "table",
"value": "no_payment_due"
},
{
"id": 3,
"type": "table",
"value": "enlist"
},
{
"id": 0,
"type": "column",
"value": "organ"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
0
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
6,349 | airline | bird:train.json:5873 | What is the code of Mississippi Valley Airlines? | SELECT Code FROM `Air Carriers` WHERE Description LIKE 'Mississippi Valley Airlines%' | [
"What",
"is",
"the",
"code",
"of",
"Mississippi",
"Valley",
"Airlines",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Mississippi Valley Airlines%"
},
{
"id": 0,
"type": "table",
"value": "Air Carriers"
},
{
"id": 2,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "column",
"value": "code"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5,
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
6,350 | book_review | bird:test.json:595 | List the titles of books in descending order of pages. | SELECT Title FROM book ORDER BY Pages DESC | [
"List",
"the",
"titles",
"of",
"books",
"in",
"descending",
"order",
"of",
"pages",
"."
] | [
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "column",
"value": "pages"
},
{
"id": 0,
"type": "table",
"value": "book"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,351 | tracking_software_problems | spider:train_spider.json:5368 | Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop. | SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" | [
"Give",
"me",
"a",
"list",
"of",
"descriptions",
"of",
"the",
"problems",
"that",
"are",
"reported",
"by",
"the",
"staff",
"whose",
"first",
"name",
"is",
"Christop",
"."
] | [
{
"id": 5,
"type": "column",
"value": "reported_by_staff_id"
},
{
"id": 0,
"type": "column",
"value": "problem_description"
},
{
"id": 3,
"type": "column",
"value": "staff_first_name"
},
{
"id": 1,
"type": "table",
"value": "problems"
},
{
"id": 4,... | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": [
15,
16,
17
]
},
{
"entity_id": 4,
"token_... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O"
] |
6,352 | party_people | spider:train_spider.json:2046 | Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office? | SELECT minister , took_office , left_office FROM party ORDER BY left_office | [
"Who",
"are",
"the",
"ministers",
",",
"when",
"did",
"they",
"take",
"office",
",",
"and",
"when",
"did",
"they",
"leave",
"office",
",",
"ordered",
"by",
"when",
"they",
"left",
"office",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "took_office"
},
{
"id": 3,
"type": "column",
"value": "left_office"
},
{
"id": 1,
"type": "column",
"value": "minister"
},
{
"id": 0,
"type": "table",
"value": "party"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
8,
9
]
},
{
"entity_id": 3,
"token_idxs": [
22,
23
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,353 | products_gen_characteristics | spider:train_spider.json:5565 | Count the number of characteristics of the product named 'laurel'. | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "laurel" | [
"Count",
"the",
"number",
"of",
"characteristics",
"of",
"the",
"product",
"named",
"'",
"laurel",
"'",
"."
] | [
{
"id": 4,
"type": "table",
"value": "product_characteristics"
},
{
"id": 5,
"type": "column",
"value": "characteristic_id"
},
{
"id": 0,
"type": "table",
"value": "characteristics"
},
{
"id": 1,
"type": "column",
"value": "product_name"
},
{
"id":... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
6,354 | simpson_episodes | bird:train.json:4348 | State the birth name of crews who are director and have birth country in South Korea. | SELECT T1.birth_name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.role = 'director' AND T1.birth_country = 'South Korea'; | [
"State",
"the",
"birth",
"name",
"of",
"crews",
"who",
"are",
"director",
"and",
"have",
"birth",
"country",
"in",
"South",
"Korea",
"."
] | [
{
"id": 7,
"type": "column",
"value": "birth_country"
},
{
"id": 8,
"type": "value",
"value": "South Korea"
},
{
"id": 0,
"type": "column",
"value": "birth_name"
},
{
"id": 6,
"type": "value",
"value": "director"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
6,355 | music_2 | spider:train_spider.json:5248 | Find the number of vocal types used in song "Le Pop" | SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" | [
"Find",
"the",
"number",
"of",
"vocal",
"types",
"used",
"in",
"song",
"\"",
"Le",
"Pop",
"\""
] | [
{
"id": 0,
"type": "table",
"value": "vocals"
},
{
"id": 3,
"type": "column",
"value": "Le Pop"
},
{
"id": 4,
"type": "column",
"value": "songid"
},
{
"id": 1,
"type": "table",
"value": "songs"
},
{
"id": 2,
"type": "column",
"value": "titl... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,356 | european_football_2 | bird:dev.json:1049 | How many matches in the 2015/2016 season were held in Scotland Premier League
? | SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t2.season = '2015/2016' AND t1.name = 'Scotland Premier League' | [
"How",
"many",
"matches",
"in",
"the",
"2015/2016",
"season",
"were",
"held",
"in",
"Scotland",
"Premier",
"League",
"\n",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "Scotland Premier League"
},
{
"id": 3,
"type": "column",
"value": "league_id"
},
{
"id": 5,
"type": "value",
"value": "2015/2016"
},
{
"id": 0,
"type": "table",
"value": "league"
},
{
"id": 4,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O",
"O"
] |
6,357 | county_public_safety | spider:train_spider.json:2561 | How many counties correspond to each police force? | SELECT Police_force , COUNT(*) FROM county_public_safety GROUP BY Police_force | [
"How",
"many",
"counties",
"correspond",
"to",
"each",
"police",
"force",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "county_public_safety"
},
{
"id": 1,
"type": "column",
"value": "police_force"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,358 | election | spider:train_spider.json:2767 | For each delegate, find the names of the party they are part of. | SELECT T1.Delegate , T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID | [
"For",
"each",
"delegate",
",",
"find",
"the",
"names",
"of",
"the",
"party",
"they",
"are",
"part",
"of",
"."
] | [
{
"id": 0,
"type": "column",
"value": "delegate"
},
{
"id": 2,
"type": "table",
"value": "election"
},
{
"id": 4,
"type": "column",
"value": "party_id"
},
{
"id": 1,
"type": "column",
"value": "party"
},
{
"id": 3,
"type": "table",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
6,359 | gas_company | spider:train_spider.json:2000 | What are the names and headquarters of all companies ordered by descending market value? | SELECT company , headquarters FROM company ORDER BY market_value DESC | [
"What",
"are",
"the",
"names",
"and",
"headquarters",
"of",
"all",
"companies",
"ordered",
"by",
"descending",
"market",
"value",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "headquarters"
},
{
"id": 3,
"type": "column",
"value": "market_value"
},
{
"id": 0,
"type": "table",
"value": "company"
},
{
"id": 1,
"type": "column",
"value": "company"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,360 | small_bank_1 | spider:train_spider.json:1814 | Find the name and checking balance of the account with the lowest saving balance. | SELECT T2.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1 | [
"Find",
"the",
"name",
"and",
"checking",
"balance",
"of",
"the",
"account",
"with",
"the",
"lowest",
"saving",
"balance",
"."
] | [
{
"id": 3,
"type": "table",
"value": "accounts"
},
{
"id": 4,
"type": "table",
"value": "checking"
},
{
"id": 0,
"type": "column",
"value": "balance"
},
{
"id": 2,
"type": "table",
"value": "savings"
},
{
"id": 5,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
6,361 | address | bird:train.json:5150 | Among the cities with an area code 939, which city has the highest Asian population? | SELECT T2.city FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 939 ORDER BY T2.asian_population DESC LIMIT 1 | [
"Among",
"the",
"cities",
"with",
"an",
"area",
"code",
"939",
",",
"which",
"city",
"has",
"the",
"highest",
"Asian",
"population",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "asian_population"
},
{
"id": 1,
"type": "table",
"value": "area_code"
},
{
"id": 3,
"type": "column",
"value": "area_code"
},
{
"id": 2,
"type": "table",
"value": "zip_data"
},
{
"id": 6,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,362 | theme_gallery | spider:train_spider.json:1652 | What are the names, ages, and countries of artists, sorted by the year they joined? | SELECT name , age , country FROM artist ORDER BY Year_Join | [
"What",
"are",
"the",
"names",
",",
"ages",
",",
"and",
"countries",
"of",
"artists",
",",
"sorted",
"by",
"the",
"year",
"they",
"joined",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "year_join"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 0,
"type": "table",
"value": "artist"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
15,
16,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
6,363 | thrombosis_prediction | bird:dev.json:1202 | How many male patients who underwent testing between 1995 and 1997 and were subsequently diagnosed with Behcet disease did not stay in the hospital for treatment? | SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Diagnosis = 'Behcet' AND T1.SEX = 'M' AND STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1995' AND '1997' AND T1.Admission = '-' | [
"How",
"many",
"male",
"patients",
"who",
"underwent",
"testing",
"between",
"1995",
"and",
"1997",
"and",
"were",
"subsequently",
"diagnosed",
"with",
"Behcet",
"disease",
"did",
"not",
"stay",
"in",
"the",
"hospital",
"for",
"treatment",
"?"
] | [
{
"id": 12,
"type": "column",
"value": "Examination Date"
},
{
"id": 1,
"type": "table",
"value": "examination"
},
{
"id": 3,
"type": "column",
"value": "diagnosis"
},
{
"id": 9,
"type": "column",
"value": "admission"
},
{
"id": 0,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
{
"enti... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,364 | university_basketball | spider:train_spider.json:1017 | What is the maximum enrollment across all schools? | SELECT max(Enrollment) FROM university | [
"What",
"is",
"the",
"maximum",
"enrollment",
"across",
"all",
"schools",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "university"
},
{
"id": 1,
"type": "column",
"value": "enrollment"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
6,365 | bakery_1 | bird:test.json:1534 | Which date corresponds to when a customer purchased a good costing over 15 dollars? | SELECT DISTINCT T1.date FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber = T2.receipt JOIN goods AS T3 ON T2.item = T3.id WHERE T3.price > 15 | [
"Which",
"date",
"corresponds",
"to",
"when",
"a",
"customer",
"purchased",
"a",
"good",
"costing",
"over",
"15",
"dollars",
"?"
] | [
{
"id": 8,
"type": "column",
"value": "receiptnumber"
},
{
"id": 4,
"type": "table",
"value": "receipts"
},
{
"id": 9,
"type": "column",
"value": "receipt"
},
{
"id": 1,
"type": "table",
"value": "goods"
},
{
"id": 2,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
6,366 | soccer_2 | spider:train_spider.json:5038 | Find the states where have the colleges whose enrollments are less than the largest size. | SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college) | [
"Find",
"the",
"states",
"where",
"have",
"the",
"colleges",
"whose",
"enrollments",
"are",
"less",
"than",
"the",
"largest",
"size",
"."
] | [
{
"id": 0,
"type": "table",
"value": "college"
},
{
"id": 1,
"type": "column",
"value": "state"
},
{
"id": 2,
"type": "column",
"value": "enr"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,367 | computer_student | bird:train.json:973 | What are the courses taught by the advisors who gave advice to student with ID 376? | SELECT T3.course_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id INNER JOIN taughtBy AS T3 ON T2.p_id = T3.p_id WHERE T1.p_id = 141 | [
"What",
"are",
"the",
"courses",
"taught",
"by",
"the",
"advisors",
"who",
"gave",
"advice",
"to",
"student",
"with",
"ID",
"376",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "course_id"
},
{
"id": 4,
"type": "table",
"value": "advisedby"
},
{
"id": 1,
"type": "table",
"value": "taughtby"
},
{
"id": 5,
"type": "table",
"value": "person"
},
{
"id": 2,
"type": "column",
"value... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
6,368 | thrombosis_prediction | bird:dev.json:1200 | What proportion of patients who had signs of thrombocytopenia had SLE diagnosed? | SELECT CAST(SUM(CASE WHEN Diagnosis = 'SLE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Examination WHERE Symptoms = 'thrombocytopenia' | [
"What",
"proportion",
"of",
"patients",
"who",
"had",
"signs",
"of",
"thrombocytopenia",
"had",
"SLE",
"diagnosed",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "thrombocytopenia"
},
{
"id": 0,
"type": "table",
"value": "examination"
},
{
"id": 7,
"type": "column",
"value": "diagnosis"
},
{
"id": 1,
"type": "column",
"value": "symptoms"
},
{
"id": 3,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
6,369 | simpson_episodes | bird:train.json:4299 | What are the keywords for episode 426 of the series? | SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.number_in_series = 426; | [
"What",
"are",
"the",
"keywords",
"for",
"episode",
"426",
"of",
"the",
"series",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "number_in_series"
},
{
"id": 5,
"type": "column",
"value": "episode_id"
},
{
"id": 0,
"type": "column",
"value": "keyword"
},
{
"id": 1,
"type": "table",
"value": "episode"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
6,370 | authors | bird:train.json:3653 | What is the homepage URL for the journal that published the most papers? | SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id GROUP BY T1.JournalId ORDER BY COUNT(T1.JournalId) DESC LIMIT 1 | [
"What",
"is",
"the",
"homepage",
"URL",
"for",
"the",
"journal",
"that",
"published",
"the",
"most",
"papers",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "journalid"
},
{
"id": 1,
"type": "column",
"value": "homepage"
},
{
"id": 3,
"type": "table",
"value": "journal"
},
{
"id": 2,
"type": "table",
"value": "paper"
},
{
"id": 4,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,372 | legislator | bird:train.json:4838 | List down the district number of the representative of the house named Jonathan Grout. | SELECT T2.district FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.last_name = 'Grout' AND T1.first_name = 'Jonathan' AND T2.type = 'rep' | [
"List",
"down",
"the",
"district",
"number",
"of",
"the",
"representative",
"of",
"the",
"house",
"named",
"Jonathan",
"Grout",
"."
] | [
{
"id": 2,
"type": "table",
"value": "historical-terms"
},
{
"id": 3,
"type": "column",
"value": "bioguide_id"
},
{
"id": 1,
"type": "table",
"value": "historical"
},
{
"id": 7,
"type": "column",
"value": "first_name"
},
{
"id": 5,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
6,373 | image_and_language | bird:train.json:7598 | In the Y coordinate of image ID 12, how many are 0? | SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE IMG_ID = 12 AND Y = 0 | [
"In",
"the",
"Y",
"coordinate",
"of",
"image",
"ID",
"12",
",",
"how",
"many",
"are",
"0",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "img_obj"
},
{
"id": 1,
"type": "column",
"value": "img_id"
},
{
"id": 2,
"type": "value",
"value": "12"
},
{
"id": 3,
"type": "column",
"value": "y"
},
{
"id": 4,
"type": "value",
"value": "0"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,374 | works_cycles | bird:train.json:7377 | How much is the tax amount of the purchase order with the biggest tax amount? Indicate the purchase order ID. | SELECT TaxAmt, PurchaseOrderID FROM PurchaseOrderHeader ORDER BY TaxAmt DESC LIMIT 1 | [
"How",
"much",
"is",
"the",
"tax",
"amount",
"of",
"the",
"purchase",
"order",
"with",
"the",
"biggest",
"tax",
"amount",
"?",
"Indicate",
"the",
"purchase",
"order",
"ID",
"."
] | [
{
"id": 0,
"type": "table",
"value": "purchaseorderheader"
},
{
"id": 2,
"type": "column",
"value": "purchaseorderid"
},
{
"id": 1,
"type": "column",
"value": "taxamt"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8,
9
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
18,
19,
20
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs"... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
6,375 | shakespeare | bird:train.json:3036 | How many scenes can be found in "Twelfth Night, Or What You Will"? | SELECT COUNT(T2.Scene) AS cnt FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.LongTitle = 'Cymbeline, King of Britain' | [
"How",
"many",
"scenes",
"can",
"be",
"found",
"in",
"\"",
"Twelfth",
"Night",
",",
"Or",
"What",
"You",
"Will",
"\"",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Cymbeline, King of Britain"
},
{
"id": 2,
"type": "column",
"value": "longtitle"
},
{
"id": 1,
"type": "table",
"value": "chapters"
},
{
"id": 6,
"type": "column",
"value": "work_id"
},
{
"id": 0,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,376 | wrestler | spider:train_spider.json:1848 | What is the name of the wrestler with the fewest days held? | SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"wrestler",
"with",
"the",
"fewest",
"days",
"held",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "days_held"
},
{
"id": 0,
"type": "table",
"value": "wrestler"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"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... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,377 | cars | bird:train.json:3088 | State the origin country of the fastest car in the database. | SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.horsepower DESC LIMIT 1 | [
"State",
"the",
"origin",
"country",
"of",
"the",
"fastest",
"car",
"in",
"the",
"database",
"."
] | [
{
"id": 2,
"type": "column",
"value": "horsepower"
},
{
"id": 4,
"type": "table",
"value": "production"
},
{
"id": 0,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 5,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,378 | cre_Doc_Workflow | bird:test.json:2029 | What is the name of the author with most number of documents? | SELECT author_name FROM Documents GROUP BY author_name ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"author",
"with",
"most",
"number",
"of",
"documents",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "author_name"
},
{
"id": 0,
"type": "table",
"value": "documents"
}
] | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,379 | works_cycles | bird:train.json:7195 | What is the average vacation hours taken by Sales person? | SELECT CAST(SUM(T1.VacationHours) AS REAL) / COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'SP' | [
"What",
"is",
"the",
"average",
"vacation",
"hours",
"taken",
"by",
"Sales",
"person",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "businessentityid"
},
{
"id": 5,
"type": "column",
"value": "vacationhours"
},
{
"id": 2,
"type": "column",
"value": "persontype"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
4,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,380 | movie_3 | bird:train.json:9267 | How many rentals did Ella Oliver hire in June 2016? | SELECT COUNT(T1.rental_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'ELLA' AND T2.last_name = 'ELLA' AND date(T1.rental_date) BETWEEN '2005-06-01' AND '2005-06-30' | [
"How",
"many",
"rentals",
"did",
"Ella",
"Oliver",
"hire",
"in",
"June",
"2016",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 9,
"type": "column",
"value": "rental_date"
},
{
"id": 4,
"type": "column",
"value": "first_name"
},
{
"id": 7,
"type": "value",
"value": "2005-06-01"
},
{
"id": 8,
"type": "value",... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,382 | works_cycles | bird:train.json:7464 | List all the scraped work orders for handling damage reason. | SELECT T2.WorkOrderID FROM ScrapReason AS T1 INNER JOIN WorkOrder AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.Name = 'Handling damage' | [
"List",
"all",
"the",
"scraped",
"work",
"orders",
"for",
"handling",
"damage",
"reason",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Handling damage"
},
{
"id": 5,
"type": "column",
"value": "scrapreasonid"
},
{
"id": 0,
"type": "column",
"value": "workorderid"
},
{
"id": 1,
"type": "table",
"value": "scrapreason"
},
{
"id": 2,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"B-TABLE",
"O"
] |
6,383 | professional_basketball | bird:train.json:2825 | Please list the first name of the players from the NBA league with the forward position. | SELECT DISTINCT T1.firstName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE (T1.pos = 'F' OR T1.pos = 'F-C') AND T2.lgID = 'NBA' | [
"Please",
"list",
"the",
"first",
"name",
"of",
"the",
"players",
"from",
"the",
"NBA",
"league",
"with",
"the",
"forward",
"position",
"."
] | [
{
"id": 2,
"type": "table",
"value": "players_teams"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 3,
"type": "column",
"value": "playerid"
},
{
"id": 1,
"type": "table",
"value": "players"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,384 | entrepreneur | spider:train_spider.json:2276 | Return the names of entrepreneurs do no not have the investor Rachel Elnaugh. | SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != "Rachel Elnaugh" | [
"Return",
"the",
"names",
"of",
"entrepreneurs",
"do",
"no",
"not",
"have",
"the",
"investor",
"Rachel",
"Elnaugh",
"."
] | [
{
"id": 4,
"type": "column",
"value": "Rachel Elnaugh"
},
{
"id": 1,
"type": "table",
"value": "entrepreneur"
},
{
"id": 5,
"type": "column",
"value": "people_id"
},
{
"id": 3,
"type": "column",
"value": "investor"
},
{
"id": 2,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
11,
12
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,385 | retail_world | bird:train.json:6330 | What is the average quantity of Ikura ordered in one order? | SELECT CAST(SUM(T2.Quantity) AS REAL) / COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura' | [
"What",
"is",
"the",
"average",
"quantity",
"of",
"Ikura",
"ordered",
"in",
"one",
"order",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "Order Details"
},
{
"id": 2,
"type": "column",
"value": "productname"
},
{
"id": 4,
"type": "column",
"value": "productid"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 6,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O"
] |
6,386 | movie_platform | bird:train.json:10 | List all movies with the best rating score. State the movie title and number of Mubi user who loves the movie. | SELECT DISTINCT T2.movie_title, T2.movie_popularity FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5 | [
"List",
"all",
"movies",
"with",
"the",
"best",
"rating",
"score",
".",
"State",
"the",
"movie",
"title",
"and",
"number",
"of",
"Mubi",
"user",
"who",
"loves",
"the",
"movie",
"."
] | [
{
"id": 1,
"type": "column",
"value": "movie_popularity"
},
{
"id": 4,
"type": "column",
"value": "rating_score"
},
{
"id": 0,
"type": "column",
"value": "movie_title"
},
{
"id": 6,
"type": "column",
"value": "movie_id"
},
{
"id": 2,
"type": "t... | [
{
"entity_id": 0,
"token_idxs": [
11,
12
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,387 | airline | bird:train.json:5868 | What is the tail number of a Compass Airline's plane that flew the most number of flights from LAX to ABQ? | SELECT T2.OP_CARRIER_AIRLINE_ID FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Compass Airlines: CP' AND T2.ORIGIN = 'LAX' AND T2.DEST = 'ABQ' GROUP BY T2.OP_CARRIER_AIRLINE_ID ORDER BY COUNT(T2.OP_CARRIER_AIRLINE_ID) DESC LIMIT 1 | [
"What",
"is",
"the",
"tail",
"number",
"of",
"a",
"Compass",
"Airline",
"'s",
"plane",
"that",
"flew",
"the",
"most",
"number",
"of",
"flights",
"from",
"LAX",
"to",
"ABQ",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "op_carrier_airline_id"
},
{
"id": 5,
"type": "value",
"value": "Compass Airlines: CP"
},
{
"id": 1,
"type": "table",
"value": "Air Carriers"
},
{
"id": 4,
"type": "column",
"value": "description"
},
{
"id": 2,... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8,
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
6,388 | food_inspection | bird:train.json:8855 | In businesses with a score lower than 95 and located around the postal code of 94110, what is the percentage of businesses with a risk category of low risk? | SELECT CAST(SUM(CASE WHEN T1.risk_category = 'Low Risk' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.risk_category) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T2.score < 95 AND T3.postal_code = 94110 | [
"In",
"businesses",
"with",
"a",
"score",
"lower",
"than",
"95",
"and",
"located",
"around",
"the",
"postal",
"code",
"of",
"94110",
",",
"what",
"is",
"the",
"percentage",
"of",
"businesses",
"with",
"a",
"risk",
"category",
"of",
"low",
"risk",
"?"
] | [
{
"id": 9,
"type": "column",
"value": "risk_category"
},
{
"id": 2,
"type": "table",
"value": "inspections"
},
{
"id": 3,
"type": "column",
"value": "business_id"
},
{
"id": 6,
"type": "column",
"value": "postal_code"
},
{
"id": 0,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": [
22
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
... | [
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
6,390 | tv_shows | bird:test.json:150 | Show the distinct transmitters of radios that are not associated with any city channel. | SELECT Transmitter FROM radio WHERE Radio_ID NOT IN (SELECT Radio_ID FROM city_channel_radio) | [
"Show",
"the",
"distinct",
"transmitters",
"of",
"radios",
"that",
"are",
"not",
"associated",
"with",
"any",
"city",
"channel",
"."
] | [
{
"id": 3,
"type": "table",
"value": "city_channel_radio"
},
{
"id": 1,
"type": "column",
"value": "transmitter"
},
{
"id": 2,
"type": "column",
"value": "radio_id"
},
{
"id": 0,
"type": "table",
"value": "radio"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
6,391 | tracking_orders | spider:train_spider.json:6915 | What is the placement date of the order whose invoice number is 10? | SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10 | [
"What",
"is",
"the",
"placement",
"date",
"of",
"the",
"order",
"whose",
"invoice",
"number",
"is",
"10",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "date_order_placed"
},
{
"id": 3,
"type": "column",
"value": "invoice_number"
},
{
"id": 2,
"type": "table",
"value": "shipments"
},
{
"id": 5,
"type": "column",
"value": "order_id"
},
{
"id": 1,
"type": "t... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,392 | e_commerce | bird:test.json:57 | What is the payment method that most customers use? | SELECT Payment_method_code FROM Customer_Payment_Methods GROUP BY Payment_method_code ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"payment",
"method",
"that",
"most",
"customers",
"use",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "customer_payment_methods"
},
{
"id": 1,
"type": "column",
"value": "payment_method_code"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1,
2
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
6,393 | legislator | bird:train.json:4814 | Among male legislators, state number of the legislators who are not the senator. | SELECT COUNT(T3.state) FROM ( SELECT T2.state FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND (T2.class IS NULL OR T2.class = '') GROUP BY T2.state ) T3 | [
"Among",
"male",
"legislators",
",",
"state",
"number",
"of",
"the",
"legislators",
"who",
"are",
"not",
"the",
"senator",
"."
] | [
{
"id": 2,
"type": "table",
"value": "current-terms"
},
{
"id": 3,
"type": "column",
"value": "bioguide_id"
},
{
"id": 5,
"type": "column",
"value": "gender_bio"
},
{
"id": 4,
"type": "column",
"value": "bioguide"
},
{
"id": 1,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,394 | driving_school | spider:train_spider.json:6653 | What is the first and last name of all employees who live in the city Damianfort? | SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort"; | [
"What",
"is",
"the",
"first",
"and",
"last",
"name",
"of",
"all",
"employees",
"who",
"live",
"in",
"the",
"city",
"Damianfort",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "staff_address_id"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 5,
"type": "column",
"value": "Damianfort"
},
{
"id": 6,
"type": "column",
"value": "address_id"
},
{
"id": 1,
"type": "co... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
6,395 | soccer_2 | spider:train_spider.json:5006 | Find the names of the students who are in the position of striker and got a yes tryout decision. | SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker' | [
"Find",
"the",
"names",
"of",
"the",
"students",
"who",
"are",
"in",
"the",
"position",
"of",
"striker",
"and",
"got",
"a",
"yes",
"tryout",
"decision",
"."
] | [
{
"id": 4,
"type": "column",
"value": "decision"
},
{
"id": 7,
"type": "value",
"value": "striker"
},
{
"id": 1,
"type": "table",
"value": "player"
},
{
"id": 2,
"type": "table",
"value": "tryout"
},
{
"id": 0,
"type": "column",
"value": "p... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
17
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
18
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"O"
] |
6,397 | european_football_1 | bird:train.json:2784 | Which team was the home team in the match of the Bundesliga division on 2020/10/2? | SELECT T1.HomeTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.Date = '2020-10-02' AND T2.name = 'Bundesliga' | [
"Which",
"team",
"was",
"the",
"home",
"team",
"in",
"the",
"match",
"of",
"the",
"Bundesliga",
"division",
"on",
"2020/10/2",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "2020-10-02"
},
{
"id": 8,
"type": "value",
"value": "Bundesliga"
},
{
"id": 2,
"type": "table",
"value": "divisions"
},
{
"id": 0,
"type": "column",
"value": "hometeam"
},
{
"id": 4,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,398 | aan_1 | bird:test.json:1034 | What is the name of the author who has co-authored the most papers with Mckeown , Kathleen ? | select t4.name from author_list as t1 join author_list as t2 on t1.paper_id = t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id = t3.author_id join author as t4 on t2.author_id = t4.author_id where t3.name = "mckeown , kathleen" group by t2.author_id order by count(*) desc limit 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"author",
"who",
"has",
"co",
"-",
"authored",
"the",
"most",
"papers",
"with",
"Mckeown",
",",
"Kathleen",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "mckeown , kathleen"
},
{
"id": 4,
"type": "table",
"value": "author_list"
},
{
"id": 0,
"type": "column",
"value": "author_id"
},
{
"id": 5,
"type": "column",
"value": "paper_id"
},
{
"id": 2,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
16,
17,
18
]
},
{
"entity_id": 4,
"token_idxs": []... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
6,399 | college_2 | spider:train_spider.json:1329 | What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students? | SELECT building , room_number FROM classroom WHERE capacity BETWEEN 50 AND 100 | [
"What",
"are",
"the",
"room",
"numbers",
"and",
"corresponding",
"buildings",
"for",
"classrooms",
"which",
"can",
"seat",
"between",
"50",
"to",
"100",
"students",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "room_number"
},
{
"id": 0,
"type": "table",
"value": "classroom"
},
{
"id": 1,
"type": "column",
"value": "building"
},
{
"id": 3,
"type": "column",
"value": "capacity"
},
{
"id": 5,
"type": "value",
"... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
3,
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O"
] |
6,400 | software_company | bird:train.json:8515 | How many female customers have an education level of over 11? | SELECT COUNT(ID) FROM Customers WHERE EDUCATIONNUM > 11 AND SEX = 'Female' | [
"How",
"many",
"female",
"customers",
"have",
"an",
"education",
"level",
"of",
"over",
"11",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "educationnum"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 5,
"type": "value",
"value": "Female"
},
{
"id": 4,
"type": "column",
"value": "sex"
},
{
"id": 1,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,401 | law_episode | bird:train.json:1344 | What is the average ranking episodes that are nominated for an award? | SELECT SUM(T1.rating) / COUNT(T1.episode) FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id | [
"What",
"is",
"the",
"average",
"ranking",
"episodes",
"that",
"are",
"nominated",
"for",
"an",
"award",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "episode_id"
},
{
"id": 0,
"type": "table",
"value": "episode"
},
{
"id": 4,
"type": "column",
"value": "episode"
},
{
"id": 3,
"type": "column",
"value": "rating"
},
{
"id": 1,
"type": "table",
"value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,402 | book_1 | bird:test.json:588 | What are the isbns of books ordered by both clients named Peter Doe and James Smith? | SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.name = "Peter Doe" INTERSECT SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.nam... | [
"What",
"are",
"the",
"isbns",
"of",
"books",
"ordered",
"by",
"both",
"clients",
"named",
"Peter",
"Doe",
"and",
"James",
"Smith",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "James Smith"
},
{
"id": 6,
"type": "table",
"value": "books_order"
},
{
"id": 3,
"type": "column",
"value": "Peter Doe"
},
{
"id": 7,
"type": "column",
"value": "idclient"
},
{
"id": 8,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
11,
12
]
},
{
"entity_id": 4,
"token_idxs": [
14,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,403 | retail_complains | bird:train.json:372 | Give me the social number and state of the client whose phone number is 100-121-8371. | SELECT T1.social, T1.state FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.phone = '100-121-8371' | [
"Give",
"me",
"the",
"social",
"number",
"and",
"state",
"of",
"the",
"client",
"whose",
"phone",
"number",
"is",
"100",
"-",
"121",
"-",
"8371",
"."
] | [
{
"id": 4,
"type": "value",
"value": "100-121-8371"
},
{
"id": 7,
"type": "column",
"value": "state_abbrev"
},
{
"id": 9,
"type": "column",
"value": "district_id"
},
{
"id": 8,
"type": "column",
"value": "statecode"
},
{
"id": 6,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
14,
15,
16,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
6,404 | cs_semester | bird:train.json:909 | List the courses' IDs and students' IDs who failed to pass the course. | SELECT course_id, student_id FROM registration WHERE grade IS NULL OR grade = '' | [
"List",
"the",
"courses",
"'",
"IDs",
"and",
"students",
"'",
"IDs",
"who",
"failed",
"to",
"pass",
"the",
"course",
"."
] | [
{
"id": 0,
"type": "table",
"value": "registration"
},
{
"id": 2,
"type": "column",
"value": "student_id"
},
{
"id": 1,
"type": "column",
"value": "course_id"
},
{
"id": 3,
"type": "column",
"value": "grade"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,405 | video_games | bird:train.json:3399 | What is the least common game genre? | SELECT T.game_name FROM ( SELECT T2.game_name, COUNT(T2.id) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id GROUP BY T2.game_name ORDER BY COUNT(T2.id) ASC LIMIT 1 ) t | [
"What",
"is",
"the",
"least",
"common",
"game",
"genre",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "game_name"
},
{
"id": 4,
"type": "column",
"value": "genre_id"
},
{
"id": 1,
"type": "table",
"value": "genre"
},
{
"id": 2,
"type": "table",
"value": "game"
},
{
"id": 3,
"type": "column",
"value": "i... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O"
] |
6,406 | movies_4 | bird:train.json:496 | Provide the genre of a movie title with a tagline of "A long time ago in a galaxy far, far away…". | SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T3.genre_id = T2.genre_id WHERE T1.tagline = 'A long time ago in a galaxy far, far away...' | [
"Provide",
"the",
"genre",
"of",
"a",
"movie",
"title",
"with",
"a",
"tagline",
"of",
"\"",
"A",
"long",
"time",
"ago",
"in",
"a",
"galaxy",
"far",
",",
"far",
"away",
"…",
"\"",
"."
] | [
{
"id": 3,
"type": "value",
"value": "A long time ago in a galaxy far, far away..."
},
{
"id": 5,
"type": "table",
"value": "movie_genres"
},
{
"id": 0,
"type": "column",
"value": "genre_name"
},
{
"id": 6,
"type": "column",
"value": "genre_id"
},
{
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13,
14,
15,
16,
17,
18,
19,
20,
21... | [
"B-TABLE",
"I-TABLE",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O"
] |
6,407 | decoration_competition | spider:train_spider.json:4491 | Show the leader names and locations of colleges. | SELECT Leader_Name , College_Location FROM college | [
"Show",
"the",
"leader",
"names",
"and",
"locations",
"of",
"colleges",
"."
] | [
{
"id": 2,
"type": "column",
"value": "college_location"
},
{
"id": 1,
"type": "column",
"value": "leader_name"
},
{
"id": 0,
"type": "table",
"value": "college"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
6,408 | storm_record | spider:train_spider.json:2693 | What are the codes and names for all regions, sorted by codes? | SELECT region_code , region_name FROM region ORDER BY region_code | [
"What",
"are",
"the",
"codes",
"and",
"names",
"for",
"all",
"regions",
",",
"sorted",
"by",
"codes",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "region_code"
},
{
"id": 2,
"type": "column",
"value": "region_name"
},
{
"id": 0,
"type": "table",
"value": "region"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
6,409 | dorm_1 | spider:train_spider.json:5760 | Find the name of dorms that do not have amenity TV Lounge. | SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' | [
"Find",
"the",
"name",
"of",
"dorms",
"that",
"do",
"not",
"have",
"amenity",
"TV",
"Lounge",
"."
] | [
{
"id": 2,
"type": "table",
"value": "dorm_amenity"
},
{
"id": 3,
"type": "column",
"value": "amenity_name"
},
{
"id": 5,
"type": "table",
"value": "has_amenity"
},
{
"id": 1,
"type": "column",
"value": "dorm_name"
},
{
"id": 4,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11
]
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"O"
] |
6,410 | beer_factory | bird:train.json:5302 | Among the male customers in Sacramento, what percentage bought Dominion root beer in 2013? | SELECT CAST(COUNT(CASE WHEN T4.BrandName = 'Dominion' THEN T1.CustomerID ELSE NULL END) AS REAL) * 100 / COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.... | [
"Among",
"the",
"male",
"customers",
"in",
"Sacramento",
",",
"what",
"percentage",
"bought",
"Dominion",
"root",
"beer",
"in",
"2013",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "transactiondate"
},
{
"id": 0,
"type": "table",
"value": "rootbeerbrand"
},
{
"id": 12,
"type": "table",
"value": "transaction"
},
{
"id": 4,
"type": "value",
"value": "Sacramento"
},
{
"id": 10,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,411 | book_review | bird:test.json:597 | What are the maximum and minimum number of chapters for each book? | SELECT max(Chapters) , min(Chapters) FROM book | [
"What",
"are",
"the",
"maximum",
"and",
"minimum",
"number",
"of",
"chapters",
"for",
"each",
"book",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "chapters"
},
{
"id": 0,
"type": "table",
"value": "book"
}
] | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
6,412 | talkingdata | bird:train.json:1244 | What percentage of vivo devices belong to users with no information? | SELECT SUM(IIF(T1.gender IS NULL AND T1.age IS NULL AND T1.`group` IS NULL, 1, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo' | [
"What",
"percentage",
"of",
"vivo",
"devices",
"belong",
"to",
"users",
"with",
"no",
"information",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 2,
"type": "column",
"value": "phone_brand"
},
{
"id": 0,
"type": "table",
"value": "gender_age"
},
{
"id": 4,
"type": "column",
"value": "device_id"
},
{
"id": 7,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,413 | simpson_episodes | bird:train.json:4365 | In episodes aired in 2009, how many of them are credited to Sam Im for additional timer? | SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.credited = 'true' AND T2.person = 'Sam Im' AND SUBSTR(T1.air_date, 1, 4) = '2009' AND T2.role = 'additional timer'; | [
"In",
"episodes",
"aired",
"in",
"2009",
",",
"how",
"many",
"of",
"them",
"are",
"credited",
"to",
"Sam",
"I",
"m",
"for",
"additional",
"timer",
"?"
] | [
{
"id": 9,
"type": "value",
"value": "additional timer"
},
{
"id": 2,
"type": "column",
"value": "episode_id"
},
{
"id": 3,
"type": "column",
"value": "credited"
},
{
"id": 10,
"type": "column",
"value": "air_date"
},
{
"id": 0,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
6,414 | headphone_store | bird:test.json:952 | Which store has the headphones in stock? Give me the store name and the total quantity. | SELECT t1.name , sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id = t2.store_id GROUP BY t2.store_id ORDER BY sum(t2.quantity) DESC LIMIT 1 | [
"Which",
"store",
"has",
"the",
"headphones",
"in",
"stock",
"?",
"Give",
"me",
"the",
"store",
"name",
"and",
"the",
"total",
"quantity",
"."
] | [
{
"id": 0,
"type": "column",
"value": "store_id"
},
{
"id": 4,
"type": "column",
"value": "quantity"
},
{
"id": 2,
"type": "table",
"value": "store"
},
{
"id": 3,
"type": "table",
"value": "stock"
},
{
"id": 1,
"type": "column",
"value": "n... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,415 | talkingdata | bird:train.json:1195 | Among the male users, how many users use device model of Desire 820? | 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.device_model = 'Desire 820' AND T1.gender = 'M' | [
"Among",
"the",
"male",
"users",
",",
"how",
"many",
"users",
"use",
"device",
"model",
"of",
"Desire",
"820",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 3,
"type": "column",
"value": "device_model"
},
{
"id": 0,
"type": "table",
"value": "gender_age"
},
{
"id": 4,
"type": "value",
"value": "Desire 820"
},
{
"id": 2,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
12,
13
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
6,416 | shakespeare | bird:train.json:2990 | Who is the daughter of Capulet? | SELECT CharName FROM characters WHERE Description = 'Daughter to Capulet' | [
"Who",
"is",
"the",
"daughter",
"of",
"Capulet",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Daughter to Capulet"
},
{
"id": 2,
"type": "column",
"value": "description"
},
{
"id": 0,
"type": "table",
"value": "characters"
},
{
"id": 1,
"type": "column",
"value": "charname"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_id... | [
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
6,417 | olympics | bird:train.json:4953 | How many Olympic events did Michael Phelps II join in total? Find the percentage of the events where he won a gold medal. | SELECT COUNT(T3.event_id) , CAST(COUNT(CASE WHEN T4.id = '1' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T4.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T1.full_name = 'M... | [
"How",
"many",
"Olympic",
"events",
"did",
"Michael",
"Phelps",
"II",
"join",
"in",
"total",
"?",
"Find",
"the",
"percentage",
"of",
"the",
"events",
"where",
"he",
"won",
"a",
"gold",
"medal",
"."
] | [
{
"id": 2,
"type": "value",
"value": "Michael Fred Phelps, II"
},
{
"id": 4,
"type": "table",
"value": "competitor_event"
},
{
"id": 9,
"type": "table",
"value": "games_competitor"
},
{
"id": 10,
"type": "column",
"value": "competitor_id"
},
{
"id"... | [
{
"entity_id": 0,
"token_idxs": [
23
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5,
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,418 | synthea | bird:train.json:1423 | Name the patients who had an allergy to soy. | SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Allergy to soya' | [
"Name",
"the",
"patients",
"who",
"had",
"an",
"allergy",
"to",
"soy",
"."
] | [
{
"id": 5,
"type": "value",
"value": "Allergy to soya"
},
{
"id": 4,
"type": "column",
"value": "description"
},
{
"id": 3,
"type": "table",
"value": "allergies"
},
{
"id": 2,
"type": "table",
"value": "patients"
},
{
"id": 6,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
7,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"O"
] |
6,419 | bike_1 | spider:train_spider.json:156 | For each zip code, find the ids of all trips that have a higher average mean temperature above 60? | SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f) > 60 | [
"For",
"each",
"zip",
"code",
",",
"find",
"the",
"ids",
"of",
"all",
"trips",
"that",
"have",
"a",
"higher",
"average",
"mean",
"temperature",
"above",
"60",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "mean_temperature_f"
},
{
"id": 0,
"type": "column",
"value": "zip_code"
},
{
"id": 3,
"type": "table",
"value": "weather"
},
{
"id": 2,
"type": "table",
"value": "trip"
},
{
"id": 1,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
19
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,420 | retail_complains | bird:train.json:256 | What is the average number of complaints on credit cards filed by clients from New York in the 3 consecutive years starting from 2015? | SELECT CAST(COUNT(T2.`Complaint ID`) AS REAL) / 3 AS average FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2015' AND '2017' AND T1.city = 'New York City' AND T2.Product = 'Credit card' | [
"What",
"is",
"the",
"average",
"number",
"of",
"complaints",
"on",
"credit",
"cards",
"filed",
"by",
"clients",
"from",
"New",
"York",
"in",
"the",
"3",
"consecutive",
"years",
"starting",
"from",
"2015",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "New York City"
},
{
"id": 11,
"type": "column",
"value": "Date received"
},
{
"id": 12,
"type": "column",
"value": "Complaint ID"
},
{
"id": 9,
"type": "value",
"value": "Credit card"
},
{
"id": 3,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs"... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,421 | sales_in_weather | bird:train.json:8205 | How many items were sold by store 9 during a snowy day? | SELECT COUNT(DISTINCT item_nbr) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr INNER JOIN sales_in_weather AS T3 ON T2.store_nbr = T3.store_nbr WHERE T3.store_nbr = 9 AND T1.snowfall <> 0 AND T1.snowfall IS NOT NULL | [
"How",
"many",
"items",
"were",
"sold",
"by",
"store",
"9",
"during",
"a",
"snowy",
"day",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "sales_in_weather"
},
{
"id": 8,
"type": "column",
"value": "station_nbr"
},
{
"id": 4,
"type": "column",
"value": "store_nbr"
},
{
"id": 1,
"type": "column",
"value": "item_nbr"
},
{
"id": 3,
"type": "table... | [
{
"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": [
6
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
6,422 | student_1 | spider:train_spider.json:4046 | Find the last names of the teachers that teach fifth grade. | SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5 | [
"Find",
"the",
"last",
"names",
"of",
"the",
"teachers",
"that",
"teach",
"fifth",
"grade",
"."
] | [
{
"id": 5,
"type": "column",
"value": "classroom"
},
{
"id": 0,
"type": "column",
"value": "lastname"
},
{
"id": 2,
"type": "table",
"value": "teachers"
},
{
"id": 3,
"type": "column",
"value": "grade"
},
{
"id": 1,
"type": "table",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,423 | mondial_geo | bird:train.json:8480 | Provide the population of the city of the 'World Tourism Organization' headquarter. | SELECT T2.Population FROM organization AS T1 INNER JOIN city AS T2 ON T1.City = T2.Name WHERE T1.Name = 'World Tourism Organization' | [
"Provide",
"the",
"population",
"of",
"the",
"city",
"of",
"the",
"'",
"World",
"Tourism",
"Organization",
"'",
"headquarter",
"."
] | [
{
"id": 4,
"type": "value",
"value": "World Tourism Organization"
},
{
"id": 1,
"type": "table",
"value": "organization"
},
{
"id": 0,
"type": "column",
"value": "population"
},
{
"id": 2,
"type": "table",
"value": "city"
},
{
"id": 3,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O",
"O",
"O"
] |
6,424 | coinmarketcap | bird:train.json:6287 | Name the coins that were not opened on May 2013. | SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE STRFTIME('%Y-%m', T2.date) = '2013-05' AND T2.open IS NULL | [
"Name",
"the",
"coins",
"that",
"were",
"not",
"opened",
"on",
"May",
"2013",
"."
] | [
{
"id": 2,
"type": "table",
"value": "historical"
},
{
"id": 4,
"type": "column",
"value": "coin_id"
},
{
"id": 5,
"type": "value",
"value": "2013-05"
},
{
"id": 1,
"type": "table",
"value": "coins"
},
{
"id": 7,
"type": "value",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
0
]
},
{
"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": ... | [
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
6,425 | music_1 | spider:train_spider.json:3586 | What are the languages that are used most often in songs? | SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1 | [
"What",
"are",
"the",
"languages",
"that",
"are",
"used",
"most",
"often",
"in",
"songs",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "languages"
},
{
"id": 0,
"type": "table",
"value": "song"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,426 | allergy_1 | spider:train_spider.json:455 | Which allergy type has most number of allergies? | SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1 | [
"Which",
"allergy",
"type",
"has",
"most",
"number",
"of",
"allergies",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "allergy_type"
},
{
"id": 1,
"type": "column",
"value": "allergytype"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,427 | college_1 | spider:train_spider.json:3287 | How many professors who has a either Ph.D. or MA degree? | SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA' | [
"How",
"many",
"professors",
"who",
"has",
"a",
"either",
"Ph.D.",
"or",
"MA",
"degree",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "prof_high_degree"
},
{
"id": 0,
"type": "table",
"value": "professor"
},
{
"id": 2,
"type": "value",
"value": "Ph.D."
},
{
"id": 3,
"type": "value",
"value": "MA"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.