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
12,417
music_4
spider:train_spider.json:6183
What is the most common result of the music festival?
SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1
[ "What", "is", "the", "most", "common", "result", "of", "the", "music", "festival", "?" ]
[ { "id": 0, "type": "table", "value": "music_festival" }, { "id": 1, "type": "column", "value": "result" } ]
[ { "entity_id": 0, "token_idxs": [ 8, 9 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "O" ]
12,418
customers_card_transactions
spider:train_spider.json:743
What is the transaction type that has processed the greatest total amount in transactions?
SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1
[ "What", "is", "the", "transaction", "type", "that", "has", "processed", "the", "greatest", "total", "amount", "in", "transactions", "?" ]
[ { "id": 0, "type": "table", "value": "financial_transactions" }, { "id": 2, "type": "column", "value": "transaction_amount" }, { "id": 1, "type": "column", "value": "transaction_type" } ]
[ { "entity_id": 0, "token_idxs": [ 12, 13 ] }, { "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", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
12,419
shakespeare
bird:train.json:2972
Which character was mentioned in the paragraph "Would he do so, I'ld beg your precious mistress, Which he counts but a trifle."? Give the character name.
SELECT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.PlainText = 'Would he do so, I''ld beg your precious mistress,Which he counts but a trifle.'
[ "Which", "character", "was", "mentioned", "in", "the", "paragraph", "\"", "Would", "he", "do", "so", ",", "I'ld", "beg", "your", "precious", "mistress", ",", "Which", "he", "counts", "but", "a", "trifle", ".", "\"", "?", "Give", "the", "character", "name...
[ { "id": 4, "type": "value", "value": "Would he do so, I'ld beg your precious mistress,Which he counts but a trifle." }, { "id": 6, "type": "column", "value": "character_id" }, { "id": 1, "type": "table", "value": "characters" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 30, 31 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8, 9, 10, 11,...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", ...
12,420
restaurant_bills
bird:test.json:632
Show the names of customers and names of dishes they order.
SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID
[ "Show", "the", "names", "of", "customers", "and", "names", "of", "dishes", "they", "order", "." ]
[ { "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": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O" ]
12,421
professional_basketball
bird:train.json:2942
In the year 1997 allstar game, which teams did the players had the most rebounds play in? List their team ids.
SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN player_allstar AS T3 ON T3.playerID = T1.playerID WHERE T3.season_id = 1997 ORDER BY T1.rebounds DESC LIMIT 1
[ "In", "the", "year", "1997", "allstar", "game", ",", "which", "teams", "did", "the", "players", "had", "the", "most", "rebounds", "play", "in", "?", "List", "their", "team", "ids", "." ]
[ { "id": 1, "type": "table", "value": "player_allstar" }, { "id": 5, "type": "table", "value": "players_teams" }, { "id": 2, "type": "column", "value": "season_id" }, { "id": 4, "type": "column", "value": "rebounds" }, { "id": 7, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 21, 22 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entity_i...
[ "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
12,422
donor
bird:train.json:3163
How many schools in the West New York School District have the highest poverty level?
SELECT COUNT(poverty_level) FROM projects WHERE school_district = 'West New York School District' AND poverty_level = 'highest poverty'
[ "How", "many", "schools", "in", "the", "West", "New", "York", "School", "District", "have", "the", "highest", "poverty", "level", "?" ]
[ { "id": 3, "type": "value", "value": "West New York School District" }, { "id": 2, "type": "column", "value": "school_district" }, { "id": 4, "type": "value", "value": "highest poverty" }, { "id": 1, "type": "column", "value": "poverty_level" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 13, 14 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 4, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O" ]
12,423
regional_sales
bird:train.json:2618
How many orders that Medsep Group had made?
SELECT SUM(CASE WHEN T1.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID
[ "How", "many", "orders", "that", "Medsep", "Group", "had", "made", "?" ]
[ { "id": 6, "type": "column", "value": "Customer Names" }, { "id": 1, "type": "table", "value": "Sales Orders" }, { "id": 7, "type": "value", "value": "Medsep Group" }, { "id": 2, "type": "column", "value": "_customerid" }, { "id": 3, "type": "c...
[ { "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-TABLE", "I-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "O" ]
12,424
mondial_geo
bird:train.json:8235
Which country has the highest infant mortality? Also state its population growth.
SELECT T1.Name, T2.Population_Growth FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country ORDER BY T2.Infant_Mortality DESC LIMIT 1
[ "Which", "country", "has", "the", "highest", "infant", "mortality", "?", "Also", "state", "its", "population", "growth", "." ]
[ { "id": 1, "type": "column", "value": "population_growth" }, { "id": 4, "type": "column", "value": "infant_mortality" }, { "id": 3, "type": "table", "value": "population" }, { "id": 2, "type": "table", "value": "country" }, { "id": 6, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 5, 6 ] }, { "entity_id...
[ "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
12,425
journal_committee
spider:train_spider.json:656
Please show the most common age of editors.
SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1
[ "Please", "show", "the", "most", "common", "age", "of", "editors", "." ]
[ { "id": 0, "type": "table", "value": "editor" }, { "id": 1, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
12,426
coffee_shop
spider:train_spider.json:801
Find the id and address of the shops whose score is below the average score.
SELECT shop_id , address FROM shop WHERE score < (SELECT avg(score) FROM shop)
[ "Find", "the", "i", "d", "and", "address", "of", "the", "shops", "whose", "score", "is", "below", "the", "average", "score", "." ]
[ { "id": 1, "type": "column", "value": "shop_id" }, { "id": 2, "type": "column", "value": "address" }, { "id": 3, "type": "column", "value": "score" }, { "id": 0, "type": "table", "value": "shop" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
12,427
store_1
spider:train_spider.json:615
List the name of all playlist.
SELECT name FROM playlists;
[ "List", "the", "name", "of", "all", "playlist", "." ]
[ { "id": 0, "type": "table", "value": "playlists" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
12,428
professional_basketball
bird:train.json:2854
Among the teams that were ranked 3 from 1937 to 1940, what is the team name whose players had the highest point?
SELECT DISTINCT T1.name FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.rank = 3 AND T1.year BETWEEN 1937 AND 1940 ORDER BY T2.points DESC LIMIT 1
[ "Among", "the", "teams", "that", "were", "ranked", "3", "from", "1937", "to", "1940", ",", "what", "is", "the", "team", "name", "whose", "players", "had", "the", "highest", "point", "?" ]
[ { "id": 2, "type": "table", "value": "players_teams" }, { "id": 3, "type": "column", "value": "points" }, { "id": 1, "type": "table", "value": "teams" }, { "id": 0, "type": "column", "value": "name" }, { "id": 4, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 18 ] }, { "entity_id": 3, "token_idxs": [ 22 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, ...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
12,429
video_games
bird:train.json:3439
Indicate, by region, which platform has sold the most games.
SELECT T.region_name FROM ( SELECT T1.platform_name, T4.region_name, SUM(T3.num_sales) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T1.id = T3.game_platform_id INNER JOIN region AS T4 ON T3.region_id = T4.id GROUP BY T1.platform_name, T4.region_name ORDER...
[ "Indicate", ",", "by", "region", ",", "which", "platform", "has", "sold", "the", "most", "games", "." ]
[ { "id": 9, "type": "column", "value": "game_platform_id" }, { "id": 1, "type": "column", "value": "platform_name" }, { "id": 8, "type": "table", "value": "game_platform" }, { "id": 4, "type": "table", "value": "region_sales" }, { "id": 0, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "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", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
12,430
soccer_2016
bird:train.json:1892
What are the average extra runs given in the second innings of every match?
SELECT AVG(Innings_No) FROM Extra_Runs WHERE Innings_No = 2
[ "What", "are", "the", "average", "extra", "runs", "given", "in", "the", "second", "innings", "of", "every", "match", "?" ]
[ { "id": 0, "type": "table", "value": "extra_runs" }, { "id": 1, "type": "column", "value": "innings_no" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 4, 5 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
12,431
aircraft
spider:train_spider.json:4806
What are the total number of domestic passengers at all London airports?
SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
[ "What", "are", "the", "total", "number", "of", "domestic", "passengers", "at", "all", "London", "airports", "?" ]
[ { "id": 3, "type": "column", "value": "domestic_passengers" }, { "id": 1, "type": "column", "value": "airport_name" }, { "id": 2, "type": "column", "value": "%London%" }, { "id": 0, "type": "table", "value": "airport" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 6, 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
12,433
coffee_shop
spider:train_spider.json:805
Which month has the most happy hours?
SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY count(*) DESC LIMIT 1
[ "Which", "month", "has", "the", "most", "happy", "hours", "?" ]
[ { "id": 0, "type": "table", "value": "happy_hour" }, { "id": 1, "type": "column", "value": "month" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
12,434
codebase_comments
bird:train.json:670
How many methods in the same repository share a tokenized name that begins with "query language..."?
SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized LIKE 'query language%'
[ "How", "many", "methods", "in", "the", "same", "repository", "share", "a", "tokenized", "name", "that", "begins", "with", "\"", "query", "language", "...", "\"", "?" ]
[ { "id": 3, "type": "value", "value": "query language%" }, { "id": 2, "type": "column", "value": "nametokenized" }, { "id": 4, "type": "column", "value": "solutionid" }, { "id": 0, "type": "table", "value": "solution" }, { "id": 1, "type": "tabl...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 15, 16 ] }, { "entity_id": 4, "token_idxs": [] }, { "...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O" ]
12,435
car_racing
bird:test.json:1600
Find the manager and sponsor for each team and order them by the car owner.
SELECT Manager , Sponsor FROM team ORDER BY Car_Owner
[ "Find", "the", "manager", "and", "sponsor", "for", "each", "team", "and", "order", "them", "by", "the", "car", "owner", "." ]
[ { "id": 3, "type": "column", "value": "car_owner" }, { "id": 1, "type": "column", "value": "manager" }, { "id": 2, "type": "column", "value": "sponsor" }, { "id": 0, "type": "table", "value": "team" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 13, 14 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
12,436
club_1
spider:train_spider.json:4278
Find the name of the club that has the most female students.
SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = "F" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1
[ "Find", "the", "name", "of", "the", "club", "that", "has", "the", "most", "female", "students", "." ]
[ { "id": 5, "type": "table", "value": "member_of_club" }, { "id": 0, "type": "column", "value": "clubname" }, { "id": 1, "type": "table", "value": "student" }, { "id": 7, "type": "column", "value": "clubid" }, { "id": 6, "type": "column", "v...
[ { "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": [ 5 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
12,437
hospital_1
spider:train_spider.json:3934
Find the number of rooms for different block code?
SELECT count(*) , T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode
[ "Find", "the", "number", "of", "rooms", "for", "different", "block", "code", "?" ]
[ { "id": 3, "type": "column", "value": "blockfloor" }, { "id": 0, "type": "column", "value": "blockcode" }, { "id": 1, "type": "table", "value": "block" }, { "id": 2, "type": "table", "value": "room" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
12,438
california_schools
bird:dev.json:43
What is the average math score of the school with the lowest average score for all subjects, and in which county is it located?
SELECT T1.AvgScrMath, T2.County FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath IS NOT NULL ORDER BY T1.AvgScrMath + T1.AvgScrRead + T1.AvgScrWrite ASC LIMIT 1
[ "What", "is", "the", "average", "math", "score", "of", "the", "school", "with", "the", "lowest", "average", "score", "for", "all", "subjects", ",", "and", "in", "which", "county", "is", "it", "located", "?" ]
[ { "id": 6, "type": "column", "value": "avgscrwrite" }, { "id": 0, "type": "column", "value": "avgscrmath" }, { "id": 7, "type": "column", "value": "avgscrread" }, { "id": 2, "type": "table", "value": "satscores" }, { "id": 3, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 21 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
12,439
train_station
spider:train_spider.json:6609
Show the name, time, and service for all trains.
SELECT name , TIME , service FROM train
[ "Show", "the", "name", ",", "time", ",", "and", "service", "for", "all", "trains", "." ]
[ { "id": 3, "type": "column", "value": "service" }, { "id": 0, "type": "table", "value": "train" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "time" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
12,440
cs_semester
bird:train.json:897
How many courses does the student with the highest GPA this semester take?
SELECT COUNT(course_id) FROM registration WHERE student_id IN ( SELECT student_id FROM student WHERE gpa = ( SELECT MAX(gpa) FROM student ) )
[ "How", "many", "courses", "does", "the", "student", "with", "the", "highest", "GPA", "this", "semester", "take", "?" ]
[ { "id": 0, "type": "table", "value": "registration" }, { "id": 1, "type": "column", "value": "student_id" }, { "id": 2, "type": "column", "value": "course_id" }, { "id": 3, "type": "table", "value": "student" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
12,441
donor
bird:train.json:3306
Among the technology items, what percentage of them are from Best Buy for Business? Provide the date of the project related to those items.
SELECT CAST(SUM(CASE WHEN T1.vendor_name = 'Best Buy for Business' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.projectid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.project_resource_type = 'Technology' UNION ALL SELECT DISTINCT T1.date_posted FROM projects AS T1 INNER JOIN r...
[ "Among", "the", "technology", "items", ",", "what", "percentage", "of", "them", "are", "from", "Best", "Buy", "for", "Business", "?", "Provide", "the", "date", "of", "the", "project", "related", "to", "those", "items", "." ]
[ { "id": 2, "type": "column", "value": "project_resource_type" }, { "id": 7, "type": "value", "value": "Best Buy for Business" }, { "id": 4, "type": "column", "value": "date_posted" }, { "id": 6, "type": "column", "value": "vendor_name" }, { "id": 3...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 21 ] }, { "entity_id": 2, "token_idxs": [ 22 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 18, 19, 20 ...
[ "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-TABLE", "B-COLUMN", "O", "O", "O", "O" ]
12,442
university
bird:train.json:8026
Among universities that score below 80 in 2015, what is the percentage of international students?
SELECT SUM(CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) / COUNT(*) * 100 FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.score < 80 AND T1.year = 2015
[ "Among", "universities", "that", "score", "below", "80", "in", "2015", ",", "what", "is", "the", "percentage", "of", "international", "students", "?" ]
[ { "id": 9, "type": "column", "value": "pct_international_students" }, { "id": 1, "type": "table", "value": "university_ranking_year" }, { "id": 0, "type": "table", "value": "university_year" }, { "id": 3, "type": "column", "value": "university_id" }, {...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
12,443
student_club
bird:dev.json:1430
What is the last name and position of the student that bought pizza on 09/10/2019?
SELECT T1.last_name, T1.position FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T2.expense_date = '2019-09-10' AND T2.expense_description = 'Pizza'
[ "What", "is", "the", "last", "name", "and", "position", "of", "the", "student", "that", "bought", "pizza", "on", "09/10/2019", "?" ]
[ { "id": 8, "type": "column", "value": "expense_description" }, { "id": 5, "type": "column", "value": "link_to_member" }, { "id": 6, "type": "column", "value": "expense_date" }, { "id": 7, "type": "value", "value": "2019-09-10" }, { "id": 0, "ty...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "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", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O" ]
12,444
professional_basketball
bird:train.json:2890
List the champion (team name) and year from year 1950 to 1960.
SELECT DISTINCT T1.name, T2.year FROM teams AS T1 JOIN series_post AS T2 ON T1.tmID = T2.tmIDWinner WHERE T2.round = 'F' AND T2.year BETWEEN 1950 AND 1960
[ "List", "the", "champion", "(", "team", "name", ")", "and", "year", "from", "year", "1950", "to", "1960", "." ]
[ { "id": 3, "type": "table", "value": "series_post" }, { "id": 5, "type": "column", "value": "tmidwinner" }, { "id": 2, "type": "table", "value": "teams" }, { "id": 6, "type": "column", "value": "round" }, { "id": 0, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "O" ]
12,445
hr_1
spider:train_spider.json:3432
What are the full names of employees who with in department 70 or 90?
SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_id = 90
[ "What", "are", "the", "full", "names", "of", "employees", "who", "with", "in", "department", "70", "or", "90", "?" ]
[ { "id": 3, "type": "column", "value": "department_id" }, { "id": 1, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "last_name" }, { "id": 4, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "O" ]
12,447
mondial_geo
bird:train.json:8397
Give the full names of the countries that are located in more than one continent.
SELECT T3.Name FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country GROUP BY T3.Name HAVING COUNT(T3.Name) > 1
[ "Give", "the", "full", "names", "of", "the", "countries", "that", "are", "located", "in", "more", "than", "one", "continent", "." ]
[ { "id": 4, "type": "table", "value": "encompasses" }, { "id": 3, "type": "table", "value": "continent" }, { "id": 7, "type": "column", "value": "continent" }, { "id": 1, "type": "table", "value": "country" }, { "id": 6, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
12,448
loan_1
spider:train_spider.json:3043
What are the names of customers who have taken both Mortgage and Auto loans?
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto'
[ "What", "are", "the", "names", "of", "customers", "who", "have", "taken", "both", "Mortgage", "and", "Auto", "loans", "?" ]
[ { "id": 0, "type": "column", "value": "cust_name" }, { "id": 3, "type": "column", "value": "loan_type" }, { "id": 4, "type": "value", "value": "Mortgages" }, { "id": 1, "type": "table", "value": "customer" }, { "id": 6, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "B-TABLE", "O" ]
12,449
shop_membership
spider:train_spider.json:5424
Show member names without any registered branch.
SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)
[ "Show", "member", "names", "without", "any", "registered", "branch", "." ]
[ { "id": 3, "type": "table", "value": "membership_register_branch" }, { "id": 2, "type": "column", "value": "member_id" }, { "id": 0, "type": "table", "value": "member" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "O" ]
12,450
college_1
spider:train_spider.json:3200
How many sections does each course have?
SELECT count(*) , crs_code FROM CLASS GROUP BY crs_code
[ "How", "many", "sections", "does", "each", "course", "have", "?" ]
[ { "id": 1, "type": "column", "value": "crs_code" }, { "id": 0, "type": "table", "value": "class" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O" ]
12,451
phone_1
spider:train_spider.json:1034
List the name of the company that produced more than one phone model.
SELECT Company_name FROM phone GROUP BY Company_name HAVING count(*) > 1;
[ "List", "the", "name", "of", "the", "company", "that", "produced", "more", "than", "one", "phone", "model", "." ]
[ { "id": 1, "type": "column", "value": "company_name" }, { "id": 0, "type": "table", "value": "phone" }, { "id": 2, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
12,452
codebase_comments
bird:train.json:634
What are the paths of solutions in repository "https://github.com/ecoffey/Bebop.git"
SELECT DISTINCT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/ecoffey/Bebop.git'
[ "What", "are", "the", "paths", "of", "solutions", "in", "repository", "\"", "https://github.com/ecoffey/Bebop.git", "\"" ]
[ { "id": 4, "type": "value", "value": "https://github.com/ecoffey/Bebop.git" }, { "id": 2, "type": "table", "value": "solution" }, { "id": 6, "type": "column", "value": "repoid" }, { "id": 0, "type": "column", "value": "path" }, { "id": 1, "type...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
12,453
insurance_and_eClaims
spider:train_spider.json:1546
Find the customer who started a policy most recently.
SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT max(start_date) FROM policies)
[ "Find", "the", "customer", "who", "started", "a", "policy", "most", "recently", "." ]
[ { "id": 0, "type": "column", "value": "customer_details" }, { "id": 4, "type": "column", "value": "customer_id" }, { "id": 3, "type": "column", "value": "start_date" }, { "id": 2, "type": "table", "value": "customers" }, { "id": 1, "type": "tab...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 4, 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O", "O", "O" ]
12,454
address_1
bird:test.json:765
How many countries do we have?
SELECT count(DISTINCT country) FROM City
[ "How", "many", "countries", "do", "we", "have", "?" ]
[ { "id": 1, "type": "column", "value": "country" }, { "id": 0, "type": "table", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
12,455
retail_world
bird:train.json:6476
Among the products, how many of them were discontinued in production?
SELECT COUNT(*) FROM Products WHERE Discontinued = 1
[ "Among", "the", "products", ",", "how", "many", "of", "them", "were", "discontinued", "in", "production", "?" ]
[ { "id": 1, "type": "column", "value": "discontinued" }, { "id": 0, "type": "table", "value": "products" }, { "id": 2, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
12,456
cre_Doc_Tracking_DB
spider:train_spider.json:4207
Find the code of the role that have the most employees.
SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
[ "Find", "the", "code", "of", "the", "role", "that", "have", "the", "most", "employees", "." ]
[ { "id": 0, "type": "table", "value": "employees" }, { "id": 1, "type": "column", "value": "role_code" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
12,457
simpson_episodes
bird:train.json:4177
Write down the title and summary of the episode with the keyword 'eviction.'
SELECT T1.title, T1.summary FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T2.keyword = 'eviction';
[ "Write", "down", "the", "title", "and", "summary", "of", "the", "episode", "with", "the", "keyword", "'", "eviction", ".", "'" ]
[ { "id": 6, "type": "column", "value": "episode_id" }, { "id": 5, "type": "value", "value": "eviction" }, { "id": 1, "type": "column", "value": "summary" }, { "id": 2, "type": "table", "value": "episode" }, { "id": 3, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
12,458
book_review
bird:test.json:605
For each book type return the type and the number of books of that type.
SELECT TYPE , COUNT(*) FROM book GROUP BY TYPE
[ "For", "each", "book", "type", "return", "the", "type", "and", "the", "number", "of", "books", "of", "that", "type", "." ]
[ { "id": 0, "type": "table", "value": "book" }, { "id": 1, "type": "column", "value": "type" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "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", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
12,459
planet_1
bird:test.json:1888
What are the coordinates of the planet named Mars?
SELECT Coordinates FROM Planet WHERE Name = "Mars";
[ "What", "are", "the", "coordinates", "of", "the", "planet", "named", "Mars", "?" ]
[ { "id": 1, "type": "column", "value": "coordinates" }, { "id": 0, "type": "table", "value": "planet" }, { "id": 2, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "Mars" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O" ]
12,460
student_assessment
spider:train_spider.json:102
What are the ids of the courses that are registered or attended by the student whose id is 121?
SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121
[ "What", "are", "the", "ids", "of", "the", "courses", "that", "are", "registered", "or", "attended", "by", "the", "student", "whose", "i", "d", "is", "121", "?" ]
[ { "id": 0, "type": "table", "value": "student_course_registrations" }, { "id": 1, "type": "table", "value": "student_course_attendance" }, { "id": 3, "type": "column", "value": "student_id" }, { "id": 2, "type": "column", "value": "course_id" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
12,462
books
bird:train.json:5991
What is the average price for the order line?
SELECT AVG(price) FROM order_line
[ "What", "is", "the", "average", "price", "for", "the", "order", "line", "?" ]
[ { "id": 0, "type": "table", "value": "order_line" }, { "id": 1, "type": "column", "value": "price" } ]
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "O" ]
12,463
workshop_paper
spider:train_spider.json:5823
Compute the average score of submissions.
SELECT avg(Scores) FROM submission
[ "Compute", "the", "average", "score", "of", "submissions", "." ]
[ { "id": 0, "type": "table", "value": "submission" }, { "id": 1, "type": "column", "value": "scores" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "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", "B-TABLE", "O" ]
12,464
regional_sales
bird:train.json:2581
List all the order numbers for In-Store sales and find the city where the store is located.
SELECT DISTINCT T1.OrderNumber, T2.`City Name` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.`Sales Channel` = 'In-Store'
[ "List", "all", "the", "order", "numbers", "for", "In", "-", "Store", "sales", "and", "find", "the", "city", "where", "the", "store", "is", "located", "." ]
[ { "id": 3, "type": "table", "value": "Store Locations" }, { "id": 4, "type": "column", "value": "Sales Channel" }, { "id": 2, "type": "table", "value": "Sales Orders" }, { "id": 0, "type": "column", "value": "ordernumber" }, { "id": 1, "type": ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 13, 14 ] }, { "entity_id": 2, "token_idxs": [ 1, 2 ] }, { "entity_id": 3, "token_idxs": [ 16, 17, 18 ] }, { "entity_...
[ "O", "B-TABLE", "I-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
12,465
cre_Students_Information_Systems
bird:test.json:453
List the personal details and the address type descriptions of all the students.
SELECT DISTINCT T1.student_details , T3.address_type_description FROM Students AS T1 JOIN Students_Addresses AS T2 ON T1.student_id = T2.student_id JOIN Ref_Address_Types AS T3 ON T2.address_type_code = T3.address_type_code
[ "List", "the", "personal", "details", "and", "the", "address", "type", "descriptions", "of", "all", "the", "students", "." ]
[ { "id": 1, "type": "column", "value": "address_type_description" }, { "id": 4, "type": "table", "value": "students_addresses" }, { "id": 2, "type": "table", "value": "ref_address_types" }, { "id": 5, "type": "column", "value": "address_type_code" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
12,466
phone_1
spider:train_spider.json:1037
What are the wifi and screen mode type of the hardware model named "LG-P760"?
SELECT T1.WiFi , T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = "LG-P760";
[ "What", "are", "the", "wifi", "and", "screen", "mode", "type", "of", "the", "hardware", "model", "named", "\"", "LG", "-", "P760", "\"", "?" ]
[ { "id": 3, "type": "column", "value": "hardware_model_name" }, { "id": 8, "type": "column", "value": "graphics_mode" }, { "id": 2, "type": "table", "value": "screen_mode" }, { "id": 7, "type": "column", "value": "screen_mode" }, { "id": 5, "typ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 14, 15, 16 ]...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O" ]
12,467
mondial_geo
bird:train.json:8385
How many cities in France have a population of more than 100,000?
SELECT COUNT(T2.Name) FROM country AS T1 INNER JOIN city AS T2 ON T2.Country = T1.Code WHERE T1.Name = 'France' AND T2.Population > 100000
[ "How", "many", "cities", "in", "France", "have", "a", "population", "of", "more", "than", "100,000", "?" ]
[ { "id": 6, "type": "column", "value": "population" }, { "id": 0, "type": "table", "value": "country" }, { "id": 3, "type": "column", "value": "country" }, { "id": 5, "type": "value", "value": "France" }, { "id": 7, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 4 ...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
12,468
thrombosis_prediction
bird:dev.json:1246
For the patients with an abnormal activated partial prothrom bin time, how many of them does not have thrombosis?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T3.Thrombosis = 0 AND T2.APTT > 45
[ "For", "the", "patients", "with", "an", "abnormal", "activated", "partial", "prothrom", "bin", "time", ",", "how", "many", "of", "them", "does", "not", "have", "thrombosis", "?" ]
[ { "id": 0, "type": "table", "value": "examination" }, { "id": 3, "type": "table", "value": "laboratory" }, { "id": 4, "type": "column", "value": "thrombosis" }, { "id": 2, "type": "table", "value": "patient" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
12,469
california_schools
bird:dev.json:19
What is the phone number of the school that has the highest average score in Math?
SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY T2.AvgScrMath DESC LIMIT 1
[ "What", "is", "the", "phone", "number", "of", "the", "school", "that", "has", "the", "highest", "average", "score", "in", "Math", "?" ]
[ { "id": 3, "type": "column", "value": "avgscrmath" }, { "id": 2, "type": "table", "value": "satscores" }, { "id": 1, "type": "table", "value": "schools" }, { "id": 4, "type": "column", "value": "cdscode" }, { "id": 0, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12, 14, 15 ] }, { "entity_id": 4, "token_idxs": [ 13 ]...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O" ]
12,470
world_development_indicators
bird:train.json:2104
What is the average adolescent fertility rate of the country whose Alpha2Code is 1A over the years this indicator was calculated.
SELECT AVG(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName LIKE 'adolescent fertility rate%'
[ "What", "is", "the", "average", "adolescent", "fertility", "rate", "of", "the", "country", "whose", "Alpha2Code", "is", "1A", "over", "the", "years", "this", "indicator", "was", "calculated", "." ]
[ { "id": 7, "type": "value", "value": "adolescent fertility rate%" }, { "id": 6, "type": "column", "value": "indicatorname" }, { "id": 3, "type": "column", "value": "countrycode" }, { "id": 1, "type": "table", "value": "indicators" }, { "id": 4, ...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
12,472
flight_company
spider:train_spider.json:6373
What are the distinct types of the companies that have operated any flights with velocity less than 200?
SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200
[ "What", "are", "the", "distinct", "types", "of", "the", "companies", "that", "have", "operated", "any", "flights", "with", "velocity", "less", "than", "200", "?" ]
[ { "id": 1, "type": "table", "value": "operate_company" }, { "id": 6, "type": "column", "value": "company_id" }, { "id": 3, "type": "column", "value": "velocity" }, { "id": 2, "type": "table", "value": "flight" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 10, 11 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 17 ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
12,473
public_review_platform
bird:train.json:3764
How many "bars" are there in the Yelp business?
SELECT COUNT(T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name LIKE 'Bars'
[ "How", "many", "\"", "bars", "\"", "are", "there", "in", "the", "Yelp", "business", "?" ]
[ { "id": 1, "type": "table", "value": "business_categories" }, { "id": 2, "type": "column", "value": "category_name" }, { "id": 4, "type": "column", "value": "category_id" }, { "id": 0, "type": "table", "value": "categories" }, { "id": 3, "type"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
12,474
simpson_episodes
bird:train.json:4234
What is the average number of stars assigned to The simpson 20s: S20-E12? What is the said episode all about?
SELECT AVG(T2.stars), T1.summary FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.episode_id = 'S20-E12';
[ "What", "is", "the", "average", "number", "of", "stars", "assigned", "to", "The", "simpson", "20s", ":", "S20", "-", "E12", "?", "What", "is", "the", "said", "episode", "all", "about", "?" ]
[ { "id": 3, "type": "column", "value": "episode_id" }, { "id": 0, "type": "column", "value": "summary" }, { "id": 1, "type": "table", "value": "episode" }, { "id": 4, "type": "value", "value": "S20-E12" }, { "id": 5, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 21 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13, 14, 15 ] }...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
12,475
olympics
bird:train.json:4994
Which city was the 1992 Summer Olympic held?
SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '1992 Summer'
[ "Which", "city", "was", "the", "1992", "Summer", "Olympic", "held", "?" ]
[ { "id": 3, "type": "value", "value": "1992 Summer" }, { "id": 2, "type": "column", "value": "games_name" }, { "id": 4, "type": "table", "value": "games_city" }, { "id": 0, "type": "column", "value": "city_name" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4, 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ ...
[ "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O" ]
12,476
olympics
bird:train.json:5057
What is the name of the Olympic game with the most competitors held in Barcelona?
SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN games_city AS T3 ON T2.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id WHERE T4.city_name = 'Barcelona' GROUP BY T1.id ORDER BY COUNT(T2.person_id) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "Olympic", "game", "with", "the", "most", "competitors", "held", "in", "Barcelona", "?" ]
[ { "id": 9, "type": "table", "value": "games_competitor" }, { "id": 1, "type": "column", "value": "games_name" }, { "id": 5, "type": "table", "value": "games_city" }, { "id": 3, "type": "column", "value": "city_name" }, { "id": 4, "type": "value...
[ { "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": [ 14 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-TABLE", "O", "B-TABLE", "I-TABLE", "O", "O", "B-VALUE", "O" ]
12,477
student_loan
bird:train.json:4434
Calculate the average duration of absense of disabled students.
SELECT AVG(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name
[ "Calculate", "the", "average", "duration", "of", "absense", "of", "disabled", "students", "." ]
[ { "id": 0, "type": "table", "value": "longest_absense_from_school" }, { "id": 1, "type": "table", "value": "disabled" }, { "id": 2, "type": "column", "value": "month" }, { "id": 3, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
12,478
customers_card_transactions
spider:train_spider.json:714
Return the id of the customer who has the most cards, as well as the number of cards.
SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
[ "Return", "the", "i", "d", "of", "the", "customer", "who", "has", "the", "most", "cards", ",", "as", "well", "as", "the", "number", "of", "cards", "." ]
[ { "id": 0, "type": "table", "value": "customers_cards" }, { "id": 1, "type": "column", "value": "customer_id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "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", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
12,479
trains
bird:train.json:717
Which direction do most of the trains with rectangle-shaped second cars run?
SELECT T2.direction FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 2 AND T1.shape = 'rectangle' GROUP BY T2.direction ORDER BY COUNT(T2.id) DESC LIMIT 1
[ "Which", "direction", "do", "most", "of", "the", "trains", "with", "rectangle", "-", "shaped", "second", "cars", "run", "?" ]
[ { "id": 0, "type": "column", "value": "direction" }, { "id": 8, "type": "value", "value": "rectangle" }, { "id": 3, "type": "column", "value": "train_id" }, { "id": 5, "type": "column", "value": "position" }, { "id": 2, "type": "table", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-COLUMN", "O", "B-TABLE", "O", "O" ]
12,480
public_review_platform
bird:train.json:3816
Which city has the most businesses whose attribute is full_bar?
SELECT T1.city FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id WHERE T2.attribute_value LIKE 'full_bar' GROUP BY T1.city
[ "Which", "city", "has", "the", "most", "businesses", "whose", "attribute", "is", "full_bar", "?" ]
[ { "id": 2, "type": "table", "value": "business_attributes" }, { "id": 3, "type": "column", "value": "attribute_value" }, { "id": 5, "type": "column", "value": "business_id" }, { "id": 1, "type": "table", "value": "business" }, { "id": 4, "type"...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, {...
[ "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
12,481
retails
bird:train.json:6773
What percentage of customers from the African region is in the household segment?
SELECT CAST(SUM(IIF(T2.r_name = 'AFRICA', 1, 0)) AS REAL) * 100 / COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN customer AS T3 ON T1.n_nationkey = T3.c_nationkey WHERE T3.c_mktsegment = 'HOUSEHOLD'
[ "What", "percentage", "of", "customers", "from", "the", "African", "region", "is", "in", "the", "household", "segment", "?" ]
[ { "id": 1, "type": "column", "value": "c_mktsegment" }, { "id": 5, "type": "column", "value": "n_nationkey" }, { "id": 6, "type": "column", "value": "c_nationkey" }, { "id": 8, "type": "column", "value": "n_regionkey" }, { "id": 9, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entit...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
12,482
book_2
spider:train_spider.json:224
Show the titles of books in descending order of publication price.
SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC
[ "Show", "the", "titles", "of", "books", "in", "descending", "order", "of", "publication", "price", "." ]
[ { "id": 2, "type": "table", "value": "publication" }, { "id": 4, "type": "column", "value": "book_id" }, { "id": 0, "type": "column", "value": "title" }, { "id": 3, "type": "column", "value": "price" }, { "id": 1, "type": "table", "value": ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
12,484
baseball_1
spider:train_spider.json:3709
Which park had most attendances in 2008?
SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;
[ "Which", "park", "had", "most", "attendances", "in", "2008", "?" ]
[ { "id": 5, "type": "column", "value": "attendance" }, { "id": 0, "type": "column", "value": "park_name" }, { "id": 1, "type": "table", "value": "home_game" }, { "id": 6, "type": "column", "value": "park_id" }, { "id": 2, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
12,485
card_games
bird:dev.json:385
Write down the ruling of Beacon of Immortality.
SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Beacon of Immortality'
[ "Write", "down", "the", "ruling", "of", "Beacon", "of", "Immortality", "." ]
[ { "id": 4, "type": "value", "value": "Beacon of Immortality" }, { "id": 2, "type": "table", "value": "rulings" }, { "id": 1, "type": "table", "value": "cards" }, { "id": 0, "type": "column", "value": "text" }, { "id": 3, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
12,486
car_racing
bird:test.json:1599
What are the managers and sponsors of teams? Sort the results by Car Owners.
SELECT Manager , Sponsor FROM team ORDER BY Car_Owner
[ "What", "are", "the", "managers", "and", "sponsors", "of", "teams", "?", "Sort", "the", "results", "by", "Car", "Owners", "." ]
[ { "id": 3, "type": "column", "value": "car_owner" }, { "id": 1, "type": "column", "value": "manager" }, { "id": 2, "type": "column", "value": "sponsor" }, { "id": 0, "type": "table", "value": "team" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 13, 14 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
12,487
movie_3
bird:train.json:9288
Please list the full names of any three inactive customers.
SELECT first_name, last_name FROM customer WHERE active = 0 LIMIT 3
[ "Please", "list", "the", "full", "names", "of", "any", "three", "inactive", "customers", "." ]
[ { "id": 1, "type": "column", "value": "first_name" }, { "id": 2, "type": "column", "value": "last_name" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 3, "type": "column", "value": "active" }, { "id": 4, "type": "value", "val...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
12,488
retails
bird:train.json:6811
What is the nationality of supplier number 1?
SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_suppkey = 1
[ "What", "is", "the", "nationality", "of", "supplier", "number", "1", "?" ]
[ { "id": 5, "type": "column", "value": "s_nationkey" }, { "id": 6, "type": "column", "value": "n_nationkey" }, { "id": 3, "type": "column", "value": "s_suppkey" }, { "id": 1, "type": "table", "value": "supplier" }, { "id": 0, "type": "column", ...
[ { "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": [ 7 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "B-VALUE", "O" ]
12,489
public_review_platform
bird:train.json:3893
Find the location of businesses that have business hours from 8 am to 9 pm every Friday.
SELECT T1.city FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.closing_time LIKE '9PM' AND T2.opening_time LIKE '8AM' AND T3.day_of_week LIKE 'Friday' GROUP BY T1.city
[ "Find", "the", "location", "of", "businesses", "that", "have", "business", "hours", "from", "8", "am", "to", "9", "pm", "every", "Friday", "." ]
[ { "id": 3, "type": "table", "value": "business_hours" }, { "id": 5, "type": "column", "value": "closing_time" }, { "id": 7, "type": "column", "value": "opening_time" }, { "id": 9, "type": "column", "value": "day_of_week" }, { "id": 11, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "O", "B-TABLE", "O" ]
12,490
movie_3
bird:train.json:9359
What is the average rental rate of sci-fi film titles?
SELECT AVG(T1.rental_rate) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T3.category_id = T2.category_id WHERE T3.`name` = 'Sci-Fi'
[ "What", "is", "the", "average", "rental", "rate", "of", "sci", "-", "fi", "film", "titles", "?" ]
[ { "id": 5, "type": "table", "value": "film_category" }, { "id": 3, "type": "column", "value": "rental_rate" }, { "id": 6, "type": "column", "value": "category_id" }, { "id": 0, "type": "table", "value": "category" }, { "id": 7, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7, 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 4, 5 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, ...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O", "O" ]
12,491
cre_Doc_Tracking_DB
spider:train_spider.json:4167
What are all the document type codes and document type names?
SELECT document_type_code , document_type_name FROM Ref_document_types
[ "What", "are", "all", "the", "document", "type", "codes", "and", "document", "type", "names", "?" ]
[ { "id": 0, "type": "table", "value": "ref_document_types" }, { "id": 1, "type": "column", "value": "document_type_code" }, { "id": 2, "type": "column", "value": "document_type_name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
12,493
college_completion
bird:train.json:3700
What's the number of male Hispanic students who graduated from Central Alabama Community College in 2011 within 100 percent of normal/expected time?
SELECT SUM(T2.grad_100) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Central Alabama Community College' AND T2.year = 2011 AND T2.gender = 'M' AND T2.race = 'H'
[ "What", "'s", "the", "number", "of", "male", "Hispanic", "students", "who", "graduated", "from", "Central", "Alabama", "Community", "College", "in", "2011", "within", "100", "percent", "of", "normal", "/", "expected", "time", "?" ]
[ { "id": 5, "type": "value", "value": "Central Alabama Community College" }, { "id": 0, "type": "table", "value": "institution_details" }, { "id": 1, "type": "table", "value": "institution_grads" }, { "id": 4, "type": "column", "value": "chronname" }, {...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 11, 12, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
12,494
works_cycles
bird:train.json:7374
What are the names of the top 6 products that has the biggest size in centimeter and what are its reorder point?
SELECT Name, ReorderPoint FROM Product WHERE SizeUnitMeasureCode = 'CM' ORDER BY Size DESC LIMIT 6
[ "What", "are", "the", "names", "of", "the", "top", "6", "products", "that", "has", "the", "biggest", "size", "in", "centimeter", "and", "what", "are", "its", "reorder", "point", "?" ]
[ { "id": 3, "type": "column", "value": "sizeunitmeasurecode" }, { "id": 2, "type": "column", "value": "reorderpoint" }, { "id": 0, "type": "table", "value": "product" }, { "id": 1, "type": "column", "value": "name" }, { "id": 5, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 20, 21 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
12,495
retail_world
bird:train.json:6314
How many more territories are there in than Eastern Region than in the Southern Region?
SELECT ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ) - ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern' ) AS Calu
[ "How", "many", "more", "territories", "are", "there", "in", "than", "Eastern", "Region", "than", "in", "the", "Southern", "Region", "?" ]
[ { "id": 2, "type": "column", "value": "regiondescription" }, { "id": 0, "type": "table", "value": "territories" }, { "id": 5, "type": "column", "value": "territoryid" }, { "id": 4, "type": "value", "value": "Southern" }, { "id": 6, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O" ]
12,496
wrestler
spider:train_spider.json:1854
What are the elimination moves of wrestlers whose team is "Team Orton"?
SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton"
[ "What", "are", "the", "elimination", "moves", "of", "wrestlers", "whose", "team", "is", "\"", "Team", "Orton", "\"", "?" ]
[ { "id": 1, "type": "column", "value": "elimination_move" }, { "id": 0, "type": "table", "value": "elimination" }, { "id": 3, "type": "column", "value": "Team Orton" }, { "id": 2, "type": "column", "value": "team" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
12,497
authors
bird:train.json:3645
How many papers were published by the "Virtual Reality, IEEE Annual International Symposium" conference in 2012?
SELECT COUNT(T2.Id) FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T1.FullName = 'Virtual Reality, IEEE Annual International Symposium' AND T2.Year = 2012
[ "How", "many", "papers", "were", "published", "by", "the", "\"", "Virtual", "Reality", ",", "IEEE", "Annual", "International", "Symposium", "\"", "conference", "in", "2012", "?" ]
[ { "id": 5, "type": "value", "value": "Virtual Reality, IEEE Annual International Symposium" }, { "id": 3, "type": "column", "value": "conferenceid" }, { "id": 0, "type": "table", "value": "conference" }, { "id": 4, "type": "column", "value": "fullname" }...
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-TABLE", "O", "B-VALUE", "O" ]
12,498
book_publishing_company
bird:train.json:192
Name all the authors for all business titles.
SELECT T3.au_fname, T3.au_lname FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T1.type = 'business'
[ "Name", "all", "the", "authors", "for", "all", "business", "titles", "." ]
[ { "id": 6, "type": "table", "value": "titleauthor" }, { "id": 0, "type": "column", "value": "au_fname" }, { "id": 1, "type": "column", "value": "au_lname" }, { "id": 4, "type": "value", "value": "business" }, { "id": 8, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 0 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "...
[ "B-COLUMN", "O", "B-TABLE", "B-TABLE", "O", "O", "B-VALUE", "B-TABLE", "O" ]
12,499
movie_1
spider:train_spider.json:2452
Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.
SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year
[ "Find", "all", "years", "that", "have", "a", "movie", "that", "received", "a", "rating", "of", "4", "or", "5", ",", "and", "sort", "them", "in", "increasing", "order", "of", "year", "." ]
[ { "id": 2, "type": "table", "value": "rating" }, { "id": 1, "type": "table", "value": "movie" }, { "id": 3, "type": "column", "value": "stars" }, { "id": 0, "type": "column", "value": "year" }, { "id": 5, "type": "column", "value": "mid" ...
[ { "entity_id": 0, "token_idxs": [ 23 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
12,500
social_media
bird:train.json:816
Count the total number of tweet IDs in `en`.
SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Lang = 'en'
[ "Count", "the", "total", "number", "of", "tweet", "IDs", "in", "`", "en", "`", "." ]
[ { "id": 0, "type": "table", "value": "twitter" }, { "id": 3, "type": "column", "value": "tweetid" }, { "id": 1, "type": "column", "value": "lang" }, { "id": 2, "type": "value", "value": "en" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
12,501
real_estate_rentals
bird:test.json:1404
What are the feature name and description of the most commonly seen feature across properties?
SELECT T1.feature_name , T1.feature_description FROM Features AS T1 JOIN Property_Features AS T2 ON T1.feature_id = T2.feature_id GROUP BY T1.feature_name ORDER BY count(*) DESC LIMIT 1;
[ "What", "are", "the", "feature", "name", "and", "description", "of", "the", "most", "commonly", "seen", "feature", "across", "properties", "?" ]
[ { "id": 1, "type": "column", "value": "feature_description" }, { "id": 3, "type": "table", "value": "property_features" }, { "id": 0, "type": "column", "value": "feature_name" }, { "id": 4, "type": "column", "value": "feature_id" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O" ]
12,502
local_govt_and_lot
spider:train_spider.json:4848
What are the id and details of the customers who have at least 3 events?
SELECT T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 3
[ "What", "are", "the", "i", "d", "and", "details", "of", "the", "customers", "who", "have", "at", "least", "3", "events", "?" ]
[ { "id": 1, "type": "column", "value": "customer_details" }, { "id": 3, "type": "table", "value": "customer_events" }, { "id": 0, "type": "column", "value": "customer_id" }, { "id": 2, "type": "table", "value": "customers" }, { "id": 4, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
12,503
food_inspection_2
bird:train.json:6160
What is the establishment's name and employee involved in the inspection ID 44256 on May 5, 2010?
SELECT T1.dba_name, T3.first_name, T3.last_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id WHERE T2.inspection_date = '2010-05-05' AND T2.inspection_id = 44256
[ "What", "is", "the", "establishment", "'s", "name", "and", "employee", "involved", "in", "the", "inspection", "ID", "44256", "on", "May", "5", ",", "2010", "?" ]
[ { "id": 7, "type": "column", "value": "inspection_date" }, { "id": 4, "type": "table", "value": "establishment" }, { "id": 9, "type": "column", "value": "inspection_id" }, { "id": 6, "type": "column", "value": "employee_id" }, { "id": 1, "type"...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "O" ]
12,504
college_3
spider:train_spider.json:4679
What are the first and last names of the instructors who teach the top 3 number of courses?
SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3
[ "What", "are", "the", "first", "and", "last", "names", "of", "the", "instructors", "who", "teach", "the", "top", "3", "number", "of", "courses", "?" ]
[ { "id": 0, "type": "column", "value": "instructor" }, { "id": 4, "type": "table", "value": "faculty" }, { "id": 3, "type": "table", "value": "course" }, { "id": 1, "type": "column", "value": "fname" }, { "id": 2, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
12,505
student_loan
bird:train.json:4390
Which organization did student285 enlist?
SELECT organ FROM enlist WHERE name = 'student285'
[ "Which", "organization", "did", "student285", "enlist", "?" ]
[ { "id": 3, "type": "value", "value": "student285" }, { "id": 0, "type": "table", "value": "enlist" }, { "id": 1, "type": "column", "value": "organ" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-COLUMN", "O", "B-VALUE", "B-TABLE", "O" ]
12,506
bike_1
spider:train_spider.json:202
What are the days that had the smallest temperature range, and what was that range?
SELECT date , max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1
[ "What", "are", "the", "days", "that", "had", "the", "smallest", "temperature", "range", ",", "and", "what", "was", "that", "range", "?" ]
[ { "id": 2, "type": "column", "value": "max_temperature_f" }, { "id": 3, "type": "column", "value": "min_temperature_f" }, { "id": 0, "type": "table", "value": "weather" }, { "id": 1, "type": "column", "value": "date" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O" ]
12,507
olympics
bird:train.json:4927
Which sport does the event "Shooting Women's Trap" belong to?
SELECT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T2.event_name LIKE 'Shooting Women%s Trap'
[ "Which", "sport", "does", "the", "event", "\"", "Shooting", "Women", "'s", "Trap", "\"", "belong", "to", "?" ]
[ { "id": 4, "type": "value", "value": "Shooting Women%s Trap" }, { "id": 0, "type": "column", "value": "sport_name" }, { "id": 3, "type": "column", "value": "event_name" }, { "id": 6, "type": "column", "value": "sport_id" }, { "id": 1, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6, 7, 8, 9 ] }, ...
[ "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O" ]
12,508
menu
bird:train.json:5552
What is the menu id of the menu sponsored by Occidental and Oriental Steamship Company with the highest number of pages?
SELECT T2.menu_id FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T1.sponsor = 'OCCIDENTAL & ORIENTAL STEAMSHIP COMPANY' GROUP BY T2.menu_id ORDER BY COUNT(T2.page_number) DESC LIMIT 1
[ "What", "is", "the", "menu", "i", "d", "of", "the", "menu", "sponsored", "by", "Occidental", "and", "Oriental", "Steamship", "Company", "with", "the", "highest", "number", "of", "pages", "?" ]
[ { "id": 4, "type": "value", "value": "OCCIDENTAL & ORIENTAL STEAMSHIP COMPANY" }, { "id": 6, "type": "column", "value": "page_number" }, { "id": 2, "type": "table", "value": "menupage" }, { "id": 0, "type": "column", "value": "menu_id" }, { "id": 3...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 11, 12, 13, ...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
12,510
flight_4
spider:train_spider.json:6856
What are the names of all cities with more than one airport and how many airports do they have?
SELECT city , count(*) FROM airports GROUP BY city HAVING count(*) > 1
[ "What", "are", "the", "names", "of", "all", "cities", "with", "more", "than", "one", "airport", "and", "how", "many", "airports", "do", "they", "have", "?" ]
[ { "id": 0, "type": "table", "value": "airports" }, { "id": 1, "type": "column", "value": "city" }, { "id": 2, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
12,511
book_publishing_company
bird:train.json:238
Of the titles, which title is about the Carefully researched study of the effects of strong emotions on the body, which state-based publisher published this book, and what is the year-to-date sale?
SELECT T1.title, T2.pub_name, T1.ytd_sales FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.'
[ "Of", "the", "titles", ",", "which", "title", "is", "about", "the", "Carefully", "researched", "study", "of", "the", "effects", "of", "strong", "emotions", "on", "the", "body", ",", "which", "state", "-", "based", "publisher", "published", "this", "book", ...
[ { "id": 6, "type": "value", "value": "Carefully researched study of the effects of strong emotions on the body. Metabolic charts included." }, { "id": 4, "type": "table", "value": "publishers" }, { "id": 2, "type": "column", "value": "ytd_sales" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 40 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 26 ] }, { "entit...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-TABLE", "B-COLUMN", ...
12,512
apartment_rentals
spider:train_spider.json:1245
Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.
SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2
[ "Which", "buildings", "have", "apartments", "that", "have", "more", "than", "two", "bathrooms", "?", "Give", "me", "the", "addresses", "of", "the", "buildings", "." ]
[ { "id": 1, "type": "table", "value": "apartment_buildings" }, { "id": 0, "type": "column", "value": "building_address" }, { "id": 3, "type": "column", "value": "bathroom_count" }, { "id": 5, "type": "column", "value": "building_id" }, { "id": 2, ...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
12,513
real_estate_rentals
bird:test.json:1444
Where do the Senior Citizens live? List building, street, and the city.
SELECT T1.line_1_number_building , T1.line_2_number_street , T1.town_city FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id = T2.user_address_id WHERE T2.user_category_code = 'Senior Citizen';
[ "Where", "do", "the", "Senior", "Citizens", "live", "?", "List", "building", ",", "street", ",", "and", "the", "city", "." ]
[ { "id": 0, "type": "column", "value": "line_1_number_building" }, { "id": 1, "type": "column", "value": "line_2_number_street" }, { "id": 5, "type": "column", "value": "user_category_code" }, { "id": 8, "type": "column", "value": "user_address_id" }, {...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
12,514
bike_1
spider:train_spider.json:207
What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times?
SELECT name FROM station WHERE city = "Palo Alto" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100
[ "What", "are", "the", "names", "of", "stations", "that", "are", "located", "in", "Palo", "Alto", "city", "but", "have", "never", "been", "the", "ending", "point", "of", "trips", "more", "than", "100", "times", "?" ]
[ { "id": 2, "type": "column", "value": "end_station_name" }, { "id": 5, "type": "column", "value": "Palo Alto" }, { "id": 0, "type": "table", "value": "station" }, { "id": 1, "type": "table", "value": "trip" }, { "id": 3, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 21 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O" ]
12,515
dorm_1
spider:train_spider.json:5737
What is the average age for each dorm and what are the names of each dorm?
SELECT avg(T1.age) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name
[ "What", "is", "the", "average", "age", "for", "each", "dorm", "and", "what", "are", "the", "names", "of", "each", "dorm", "?" ]
[ { "id": 0, "type": "column", "value": "dorm_name" }, { "id": 4, "type": "table", "value": "lives_in" }, { "id": 3, "type": "table", "value": "student" }, { "id": 5, "type": "column", "value": "dormid" }, { "id": 6, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
12,516
simpson_episodes
bird:train.json:4236
What is the birth name of Al Jean and his role in creating The simpson 20s: Season 20?
SELECT DISTINCT T1.birth_name, T2.role FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.name = 'Al Jean';
[ "What", "is", "the", "birth", "name", "of", "Al", "Jean", "and", "his", "role", "in", "creating", "The", "simpson", "20s", ":", "Season", "20", "?" ]
[ { "id": 0, "type": "column", "value": "birth_name" }, { "id": 5, "type": "value", "value": "Al Jean" }, { "id": 2, "type": "table", "value": "person" }, { "id": 3, "type": "table", "value": "credit" }, { "id": 6, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
12,517
shipping
bird:train.json:5618
Determine the percentage of manufacturers who are from Texas among all of Lorenzo's customers.
SELECT CAST(SUM(CASE WHEN cust_type = 'manufacturer' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer WHERE state = 'TX'
[ "Determine", "the", "percentage", "of", "manufacturers", "who", "are", "from", "Texas", "among", "all", "of", "Lorenzo", "'s", "customers", "." ]
[ { "id": 7, "type": "value", "value": "manufacturer" }, { "id": 6, "type": "column", "value": "cust_type" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 1, "type": "column", "value": "state" }, { "id": 3, "type": "value", "val...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "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-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
12,518
music_4
spider:train_spider.json:6180
Return the famous release date for the oldest artist.
SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1
[ "Return", "the", "famous", "release", "date", "for", "the", "oldest", "artist", "." ]
[ { "id": 1, "type": "column", "value": "famous_release_date" }, { "id": 0, "type": "table", "value": "artist" }, { "id": 2, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
12,519
chicago_crime
bird:train.json:8640
List the IUCR numbers and index status of homicide incidents.
SELECT index_code FROM IUCR WHERE primary_description = 'HOMICIDE'
[ "List", "the", "IUCR", "numbers", "and", "index", "status", "of", "homicide", "incidents", "." ]
[ { "id": 2, "type": "column", "value": "primary_description" }, { "id": 1, "type": "column", "value": "index_code" }, { "id": 3, "type": "value", "value": "HOMICIDE" }, { "id": 0, "type": "table", "value": "iucr" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
12,520
address
bird:train.json:5097
What is the alias of the city called Hartford?
SELECT DISTINCT T2.alias FROM zip_data AS T1 INNER JOIN alias AS T2 ON T1.zip_code = T2.zip_code WHERE T1.city = 'Hartford'
[ "What", "is", "the", "alias", "of", "the", "city", "called", "Hartford", "?" ]
[ { "id": 1, "type": "table", "value": "zip_data" }, { "id": 4, "type": "value", "value": "Hartford" }, { "id": 5, "type": "column", "value": "zip_code" }, { "id": 0, "type": "column", "value": "alias" }, { "id": 2, "type": "table", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
12,521
baseball_1
spider:train_spider.json:3703
List the names of states that have more than 2 parks.
SELECT state FROM park GROUP BY state HAVING count(*) > 2;
[ "List", "the", "names", "of", "states", "that", "have", "more", "than", "2", "parks", "." ]
[ { "id": 1, "type": "column", "value": "state" }, { "id": 0, "type": "table", "value": "park" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
12,522
world_development_indicators
bird:train.json:2242
How many countries have notes on the indicator Stocks traded, turnover ratio of domestic shares?
SELECT COUNT(T1.Countrycode) FROM CountryNotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T2.IndicatorName = 'Stocks traded, turnover ratio of domestic shares (%)'
[ "How", "many", "countries", "have", "notes", "on", "the", "indicator", "Stocks", "traded", ",", "turnover", "ratio", "of", "domestic", "shares", "?" ]
[ { "id": 3, "type": "value", "value": "Stocks traded, turnover ratio of domestic shares (%)" }, { "id": 2, "type": "column", "value": "indicatorname" }, { "id": 0, "type": "table", "value": "countrynotes" }, { "id": 4, "type": "column", "value": "countrycod...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10, 11, 12, 13, 14 ] }, { "entity_id"...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O" ]
12,523
customer_complaints
spider:train_spider.json:5798
Find the last name of the staff whose email address contains "wrau".
SELECT last_name FROM staff WHERE email_address LIKE "%wrau%"
[ "Find", "the", "last", "name", "of", "the", "staff", "whose", "email", "address", "contains", "\"", "wrau", "\"", "." ]
[ { "id": 2, "type": "column", "value": "email_address" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 3, "type": "column", "value": "%wrau%" }, { "id": 0, "type": "table", "value": "staff" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O" ]