question_id
int64
0
16.1k
db_id
stringclasses
259 values
dber_id
stringlengths
15
29
question
stringlengths
16
325
SQL
stringlengths
18
1.25k
tokens
listlengths
4
62
entities
listlengths
0
21
entity_to_token
listlengths
20
20
dber_tags
listlengths
4
62
4,627
image_and_language
bird:train.json:7496
Give the number of samples in image no.2377985 whose attribute is electrical.
SELECT SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 2347915
[ "Give", "the", "number", "of", "samples", "in", "image", "no.2377985", "whose", "attribute", "is", "electrical", "." ]
[ { "id": 4, "type": "column", "value": "att_class_id" }, { "id": 0, "type": "table", "value": "img_obj_att" }, { "id": 1, "type": "table", "value": "att_classes" }, { "id": 7, "type": "column", "value": "att_class" }, { "id": 3, "type": "value",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O" ]
4,628
book_press
bird:test.json:2010
Who wrote the best selling book? Give me the author name.
SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id = t2.author_id ORDER BY t2.sale_amount DESC LIMIT 1
[ "Who", "wrote", "the", "best", "selling", "book", "?", "Give", "me", "the", "author", "name", "." ]
[ { "id": 3, "type": "column", "value": "sale_amount" }, { "id": 4, "type": "column", "value": "author_id" }, { "id": 1, "type": "table", "value": "author" }, { "id": 0, "type": "column", "value": "name" }, { "id": 2, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
4,629
video_games
bird:train.json:3464
Calculate the difference between sales of games from region ID 2 and region ID 3.
SELECT SUM(CASE WHEN T.region_id = 2 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.region_id = 3 THEN T.num_sales ELSE 0 END) FROM region_sales t
[ "Calculate", "the", "difference", "between", "sales", "of", "games", "from", "region", "ID", "2", "and", "region", "ID", "3", "." ]
[ { "id": 0, "type": "table", "value": "region_sales" }, { "id": 2, "type": "column", "value": "num_sales" }, { "id": 3, "type": "column", "value": "region_id" }, { "id": 1, "type": "value", "value": "0" }, { "id": 4, "type": "value", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 12, 13 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_i...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
4,630
customers_and_invoices
spider:train_spider.json:1604
Count the number of invoices.
SELECT count(*) FROM Invoices
[ "Count", "the", "number", "of", "invoices", "." ]
[ { "id": 0, "type": "table", "value": "invoices" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O" ]
4,631
retails
bird:train.json:6900
How many customers in the machinery segment are in debt?
SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0 AND c_mktsegment = 'MACHINERY'
[ "How", "many", "customers", "in", "the", "machinery", "segment", "are", "in", "debt", "?" ]
[ { "id": 4, "type": "column", "value": "c_mktsegment" }, { "id": 1, "type": "column", "value": "c_custkey" }, { "id": 2, "type": "column", "value": "c_acctbal" }, { "id": 5, "type": "value", "value": "MACHINERY" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O" ]
4,632
world
bird:train.json:7874
Write down the name of the largest population country.
SELECT Name FROM Country ORDER BY Population DESC LIMIT 1
[ "Write", "down", "the", "name", "of", "the", "largest", "population", "country", "." ]
[ { "id": 2, "type": "column", "value": "population" }, { "id": 0, "type": "table", "value": "country" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-TABLE", "O" ]
4,633
food_inspection_2
bird:train.json:6125
Which employee was responsible for inspection no.48224? Give the full name.
SELECT T2.first_name, T2.last_name FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T1.inspection_id = 48224
[ "Which", "employee", "was", "responsible", "for", "inspection", "no.48224", "?", "Give", "the", "full", "name", "." ]
[ { "id": 4, "type": "column", "value": "inspection_id" }, { "id": 6, "type": "column", "value": "employee_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 2, "type": "table", "value": "inspection" }, { "id": 1, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O" ]
4,634
law_episode
bird:train.json:1278
What are the keywords of the "Shield" episode?
SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Shield'
[ "What", "are", "the", "keywords", "of", "the", "\"", "Shield", "\"", "episode", "?" ]
[ { "id": 5, "type": "column", "value": "episode_id" }, { "id": 0, "type": "column", "value": "keyword" }, { "id": 1, "type": "table", "value": "episode" }, { "id": 2, "type": "table", "value": "keyword" }, { "id": 4, "type": "value", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "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", "O", "O", "B-VALUE", "O", "B-TABLE", "O" ]
4,635
bike_racing
bird:test.json:1470
How many bikes are heavier than 780 grams?
SELECT count(*) FROM bike WHERE weight > 780
[ "How", "many", "bikes", "are", "heavier", "than", "780", "grams", "?" ]
[ { "id": 1, "type": "column", "value": "weight" }, { "id": 0, "type": "table", "value": "bike" }, { "id": 2, "type": "value", "value": "780" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "O" ]
4,636
roller_coaster
spider:train_spider.json:6216
Show the name and population of the country that has the highest roller coaster.
SELECT T1.Name , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1
[ "Show", "the", "name", "and", "population", "of", "the", "country", "that", "has", "the", "highest", "roller", "coaster", "." ]
[ { "id": 3, "type": "table", "value": "roller_coaster" }, { "id": 1, "type": "column", "value": "population" }, { "id": 5, "type": "column", "value": "country_id" }, { "id": 2, "type": "table", "value": "country" }, { "id": 4, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 12, 13 ] }, { "entity_id": 4, "token_idxs": [ 11 ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O" ]
4,637
codebase_community
bird:dev.json:664
What is the sum of score of the post on 2010-07-19?
SELECT SUM(Score) FROM posts WHERE LasActivityDate LIKE '2010-07-19%'
[ "What", "is", "the", "sum", "of", "score", "of", "the", "post", "on", "2010", "-", "07", "-", "19", "?" ]
[ { "id": 1, "type": "column", "value": "lasactivitydate" }, { "id": 2, "type": "value", "value": "2010-07-19%" }, { "id": 0, "type": "table", "value": "posts" }, { "id": 3, "type": "column", "value": "score" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10, 11, 12, 13, 14 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idx...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
4,638
climbing
spider:train_spider.json:1122
What are the countries of mountains with height bigger than 5000?
SELECT Country FROM mountain WHERE Height > 5000
[ "What", "are", "the", "countries", "of", "mountains", "with", "height", "bigger", "than", "5000", "?" ]
[ { "id": 0, "type": "table", "value": "mountain" }, { "id": 1, "type": "column", "value": "country" }, { "id": 2, "type": "column", "value": "height" }, { "id": 3, "type": "value", "value": "5000" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
4,639
books
bird:train.json:6057
Provide the International Standard Book Number of the book The Mystery in the Rocky Mountains.
SELECT isbn13 FROM book WHERE title = 'The Mystery in the Rocky Mountains'
[ "Provide", "the", "International", "Standard", "Book", "Number", "of", "the", "book", "The", "Mystery", "in", "the", "Rocky", "Mountains", "." ]
[ { "id": 3, "type": "value", "value": "The Mystery in the Rocky Mountains" }, { "id": 1, "type": "column", "value": "isbn13" }, { "id": 2, "type": "column", "value": "title" }, { "id": 0, "type": "table", "value": "book" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10, 11, 12, 13, 14 ] }, { "entity_id": 4, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
4,640
baseball_1
spider:train_spider.json:3629
what is the full name and id of the college with the largest number of baseball players?
SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;
[ "what", "is", "the", "full", "name", "and", "i", "d", "of", "the", "college", "with", "the", "largest", "number", "of", "baseball", "players", "?" ]
[ { "id": 3, "type": "table", "value": "player_college" }, { "id": 0, "type": "column", "value": "college_id" }, { "id": 1, "type": "column", "value": "name_full" }, { "id": 2, "type": "table", "value": "college" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
4,641
customers_and_invoices
spider:train_spider.json:1563
Show customer ids who don't have an account.
SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts
[ "Show", "customer", "ids", "who", "do", "n't", "have", "an", "account", "." ]
[ { "id": 2, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 1, "type": "table", "value": "accounts" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
4,642
works_cycles
bird:train.json:7018
List all product names and its product line for all purchase order with order quantity of 5000 or more.
SELECT T1.Name, T1.ProductLine FROM Product AS T1 INNER JOIN PurchaseOrderDetail AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderQty > 4999
[ "List", "all", "product", "names", "and", "its", "product", "line", "for", "all", "purchase", "order", "with", "order", "quantity", "of", "5000", "or", "more", "." ]
[ { "id": 3, "type": "table", "value": "purchaseorderdetail" }, { "id": 1, "type": "column", "value": "productline" }, { "id": 6, "type": "column", "value": "productid" }, { "id": 4, "type": "column", "value": "orderqty" }, { "id": 2, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ 13 ...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
4,643
language_corpus
bird:train.json:5688
List the titles for all Catalan language wikipedia page from revision page id 106600 to 106700.
SELECT title FROM pages WHERE revision BETWEEN 106600 AND 106700
[ "List", "the", "titles", "for", "all", "Catalan", "language", "wikipedia", "page", "from", "revision", "page", "i", "d", "106600", "to", "106700", "." ]
[ { "id": 2, "type": "column", "value": "revision" }, { "id": 3, "type": "value", "value": "106600" }, { "id": 4, "type": "value", "value": "106700" }, { "id": 0, "type": "table", "value": "pages" }, { "id": 1, "type": "column", "value": "tit...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
4,645
movie_platform
bird:train.json:51
What's the description for the movie list "Short and pretty damn sweet"?
SELECT list_description FROM lists WHERE list_title = 'Short and pretty damn sweet'
[ "What", "'s", "the", "description", "for", "the", "movie", "list", "\"", "Short", "and", "pretty", "damn", "sweet", "\"", "?" ]
[ { "id": 3, "type": "value", "value": "Short and pretty damn sweet" }, { "id": 1, "type": "column", "value": "list_description" }, { "id": 2, "type": "column", "value": "list_title" }, { "id": 0, "type": "table", "value": "lists" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9, 10, 11, 12, 13 ] }, { "entity_id": 4, "token_idxs...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
4,646
mondial_geo
bird:train.json:8500
Which Asian country gave its agricultural sector the largest share of its gross domestic product?
SELECT T2.Country FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T2.Country = T3.Code INNER JOIN economy AS T4 ON T4.Country = T3.Code WHERE T1.Name = 'Asia' ORDER BY T4.Agriculture DESC LIMIT 1
[ "Which", "Asian", "country", "gave", "its", "agricultural", "sector", "the", "largest", "share", "of", "its", "gross", "domestic", "product", "?" ]
[ { "id": 4, "type": "column", "value": "agriculture" }, { "id": 8, "type": "table", "value": "encompasses" }, { "id": 7, "type": "table", "value": "continent" }, { "id": 9, "type": "column", "value": "continent" }, { "id": 0, "type": "column", ...
[ { "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": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-VALUE", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
4,647
movie_platform
bird:train.json:92
Please provide the title of the list with the most comments on the list.
SELECT list_title FROM lists GROUP BY list_title ORDER BY COUNT(list_comments) DESC LIMIT 1
[ "Please", "provide", "the", "title", "of", "the", "list", "with", "the", "most", "comments", "on", "the", "list", "." ]
[ { "id": 2, "type": "column", "value": "list_comments" }, { "id": 1, "type": "column", "value": "list_title" }, { "id": 0, "type": "table", "value": "lists" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
4,648
mondial_geo
bird:train.json:8218
Which countries have more than 90% of African? List the name of the country in full.
SELECT T2.Name FROM ethnicGroup AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T1.Name = 'African' AND T1.Percentage > 90
[ "Which", "countries", "have", "more", "than", "90", "%", "of", "African", "?", "List", "the", "name", "of", "the", "country", "in", "full", "." ]
[ { "id": 1, "type": "table", "value": "ethnicgroup" }, { "id": 6, "type": "column", "value": "percentage" }, { "id": 2, "type": "table", "value": "country" }, { "id": 3, "type": "column", "value": "country" }, { "id": 5, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O" ]
4,650
simpson_episodes
bird:train.json:4329
How many episodes have the star score greater than 8?
SELECT COUNT(DISTINCT episode_id) FROM Vote WHERE stars > 8;
[ "How", "many", "episodes", "have", "the", "star", "score", "greater", "than", "8", "?" ]
[ { "id": 3, "type": "column", "value": "episode_id" }, { "id": 1, "type": "column", "value": "stars" }, { "id": 0, "type": "table", "value": "vote" }, { "id": 2, "type": "value", "value": "8" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
4,651
chicago_crime
bird:train.json:8704
In which district have there been more intimidation-type crimes?
SELECT T3.district_name FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.primary_description = 'INTIMIDATION' GROUP BY T3.district_name ORDER BY COUNT(T1.primary_description) DESC LIMIT 1
[ "In", "which", "district", "have", "there", "been", "more", "intimidation", "-", "type", "crimes", "?" ]
[ { "id": 2, "type": "column", "value": "primary_description" }, { "id": 0, "type": "column", "value": "district_name" }, { "id": 3, "type": "value", "value": "INTIMIDATION" }, { "id": 6, "type": "column", "value": "district_no" }, { "id": 1, "ty...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "O" ]
4,652
apartment_rentals
spider:train_spider.json:1228
Show the distinct apartment numbers of the apartments that have bookings with status code "Confirmed".
SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed"
[ "Show", "the", "distinct", "apartment", "numbers", "of", "the", "apartments", "that", "have", "bookings", "with", "status", "code", "\"", "Confirmed", "\"", "." ]
[ { "id": 3, "type": "column", "value": "booking_status_code" }, { "id": 1, "type": "table", "value": "apartment_bookings" }, { "id": 0, "type": "column", "value": "apt_number" }, { "id": 2, "type": "table", "value": "apartments" }, { "id": 4, "t...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 11, 12, 13 ] }, { "entity_id": 4, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "I-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O" ]
4,653
district_spokesman
bird:test.json:1191
Which spokesman has lower points than the average?
SELECT name FROM spokesman WHERE points < (SELECT avg(points) FROM spokesman)
[ "Which", "spokesman", "has", "lower", "points", "than", "the", "average", "?" ]
[ { "id": 0, "type": "table", "value": "spokesman" }, { "id": 2, "type": "column", "value": "points" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
4,654
works_cycles
bird:train.json:7444
What is the name of the product stored in location 1 compartment L container 6?
SELECT T2.Name FROM ProductInventory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.LocationID = 1 AND T1.Shelf = 'L' AND T1.Bin = 6
[ "What", "is", "the", "name", "of", "the", "product", "stored", "in", "location", "1", "compartment", "L", "container", "6", "?" ]
[ { "id": 1, "type": "table", "value": "productinventory" }, { "id": 4, "type": "column", "value": "locationid" }, { "id": 3, "type": "column", "value": "productid" }, { "id": 2, "type": "table", "value": "product" }, { "id": 6, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "B-COLUMN", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "O" ]
4,655
tracking_share_transactions
spider:train_spider.json:5865
What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"?
SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR"
[ "What", "are", "the", "lot", "details", "of", "lots", "associated", "with", "transactions", "whose", "share", "count", "is", "bigger", "than", "100", "and", "whose", "type", "code", "is", "\"", "PUR", "\"", "?" ]
[ { "id": 7, "type": "column", "value": "transaction_type_code" }, { "id": 3, "type": "table", "value": "transactions_lots" }, { "id": 4, "type": "column", "value": "transaction_id" }, { "id": 1, "type": "table", "value": "transactions" }, { "id": 0,...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
4,656
software_company
bird:train.json:8554
Of customers who provide other services, how many are from places where inhabitants are more than 20000?
SELECT COUNT(T2.GEOID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.OCCUPATION = 'Other-service' AND T2.INHABITANTS_K > 20
[ "Of", "customers", "who", "provide", "other", "services", ",", "how", "many", "are", "from", "places", "where", "inhabitants", "are", "more", "than", "20000", "?" ]
[ { "id": 4, "type": "value", "value": "Other-service" }, { "id": 5, "type": "column", "value": "inhabitants_k" }, { "id": 3, "type": "column", "value": "occupation" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 1, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4, 5 ] }, { "entity_id": 5, "toke...
[ "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
4,657
sakila_1
spider:train_spider.json:2997
Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental.
SELECT DISTINCT T1.first_name , T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'
[ "Return", "the", "full", "name", "of", "the", "staff", "who", "provided", "a", "customer", "with", "the", "first", "name", "April", "and", "the", "last", "name", "Burns", "with", "a", "film", "rental", "." ]
[ { "id": 5, "type": "column", "value": "customer_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 2, "type": "table", "value": "customer" }, { "id": 8, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 13, 14 ] }, { "entity_id": 1, "token_idxs": [ 18, 19 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O", "B-TABLE", "O" ]
4,658
formula_1
spider:train_spider.json:2227
Find the id, forename and number of races of all drivers who have at least participated in two races?
SELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2
[ "Find", "the", "i", "d", ",", "forename", "and", "number", "of", "races", "of", "all", "drivers", "who", "have", "at", "least", "participated", "in", "two", "races", "?" ]
[ { "id": 0, "type": "column", "value": "driverid" }, { "id": 1, "type": "column", "value": "forename" }, { "id": 4, "type": "table", "value": "drivers" }, { "id": 5, "type": "table", "value": "results" }, { "id": 6, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 20 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
4,659
beer_factory
bird:train.json:5340
How many transactions have been made to purchase a root beer brand from California?
SELECT COUNT(T3.RootBeerID) FROM rootbeerbrand AS T1 INNER JOIN rootbeer AS T2 ON T1.BrandID = T2.BrandID INNER JOIN `transaction` AS T3 ON T2.RootBeerID = T3.RootBeerID WHERE T1.State = 'CA'
[ "How", "many", "transactions", "have", "been", "made", "to", "purchase", "a", "root", "beer", "brand", "from", "California", "?" ]
[ { "id": 4, "type": "table", "value": "rootbeerbrand" }, { "id": 0, "type": "table", "value": "transaction" }, { "id": 3, "type": "column", "value": "rootbeerid" }, { "id": 5, "type": "table", "value": "rootbeer" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "O" ]
4,660
toxicology
bird:dev.json:300
What atoms comprise TR186?
SELECT T.atom_id FROM atom AS T WHERE T.molecule_id = 'TR186'
[ "What", "atoms", "comprise", "TR186", "?" ]
[ { "id": 2, "type": "column", "value": "molecule_id" }, { "id": 1, "type": "column", "value": "atom_id" }, { "id": 3, "type": "value", "value": "TR186" }, { "id": 0, "type": "table", "value": "atom" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "B-VALUE", "O" ]
4,661
college_1
spider:train_spider.json:3185
How many credits does course CIS-220 have, and what its description?
SELECT crs_credit , crs_description FROM course WHERE crs_code = 'CIS-220'
[ "How", "many", "credits", "does", "course", "CIS-220", "have", ",", "and", "what", "its", "description", "?" ]
[ { "id": 2, "type": "column", "value": "crs_description" }, { "id": 1, "type": "column", "value": "crs_credit" }, { "id": 3, "type": "column", "value": "crs_code" }, { "id": 4, "type": "value", "value": "CIS-220" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
4,662
world
bird:train.json:7822
List the languages used in the USA.
SELECT Language FROM CountryLanguage WHERE CountryCode = 'USA'
[ "List", "the", "languages", "used", "in", "the", "USA", "." ]
[ { "id": 0, "type": "table", "value": "countrylanguage" }, { "id": 2, "type": "column", "value": "countrycode" }, { "id": 1, "type": "column", "value": "language" }, { "id": 3, "type": "value", "value": "USA" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
4,663
music_platform_2
bird:train.json:7971
List all the podcasts reviewed by a reviewer who has a review titled "Inspired & On Fire!".
SELECT T1.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Inspired & On Fire!'
[ "List", "all", "the", "podcasts", "reviewed", "by", "a", "reviewer", "who", "has", "a", "review", "titled", "\"", "Inspired", "&", "On", "Fire", "!", "\"", "." ]
[ { "id": 3, "type": "value", "value": "Inspired & On Fire!" }, { "id": 4, "type": "column", "value": "podcast_id" }, { "id": 1, "type": "table", "value": "podcasts" }, { "id": 2, "type": "table", "value": "reviews" }, { "id": 0, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 14, 15, 16, 17, 18 ] }, { "entity_id": 4,...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
4,664
public_review_platform
bird:train.json:3869
How many users became an elite user the same year they joined Yelp?
SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = T2.year_id
[ "How", "many", "users", "became", "an", "elite", "user", "the", "same", "year", "they", "joined", "Yelp", "?" ]
[ { "id": 2, "type": "column", "value": "user_yelping_since_year" }, { "id": 3, "type": "column", "value": "year_id" }, { "id": 4, "type": "column", "value": "user_id" }, { "id": 0, "type": "table", "value": "users" }, { "id": 1, "type": "table",...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_...
[ "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
4,665
movie_3
bird:train.json:9129
Please list the titles of all the films that the customer RUTH MARTINEZ has rented.
SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'
[ "Please", "list", "the", "titles", "of", "all", "the", "films", "that", "the", "customer", "RUTH", "MARTINEZ", "has", "rented", "." ]
[ { "id": 10, "type": "column", "value": "inventory_id" }, { "id": 11, "type": "column", "value": "customer_id" }, { "id": 4, "type": "column", "value": "first_name" }, { "id": 2, "type": "table", "value": "inventory" }, { "id": 6, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "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", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-VALUE", "B-VALUE", "O", "B-TABLE", "O" ]
4,666
train_station
spider:train_spider.json:6615
Show the station name with greatest number of trains.
SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id ORDER BY count(*) DESC LIMIT 1
[ "Show", "the", "station", "name", "with", "greatest", "number", "of", "trains", "." ]
[ { "id": 2, "type": "table", "value": "train_station" }, { "id": 0, "type": "column", "value": "station_id" }, { "id": 3, "type": "table", "value": "station" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
4,667
regional_sales
bird:train.json:2593
Mention the most populated city and median income of the store in Florida state.
SELECT `City Name`, `Median Income` FROM `Store Locations` WHERE State = 'Florida' ORDER BY Population DESC LIMIT 1
[ "Mention", "the", "most", "populated", "city", "and", "median", "income", "of", "the", "store", "in", "Florida", "state", "." ]
[ { "id": 0, "type": "table", "value": "Store Locations" }, { "id": 2, "type": "column", "value": "Median Income" }, { "id": 5, "type": "column", "value": "population" }, { "id": 1, "type": "column", "value": "City Name" }, { "id": 4, "type": "va...
[ { "entity_id": 0, "token_idxs": [ 10, 11 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_i...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "B-VALUE", "B-COLUMN", "O" ]
4,668
scientist_1
spider:train_spider.json:6506
What are the names of projects that have not been assigned?
SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)
[ "What", "are", "the", "names", "of", "projects", "that", "have", "not", "been", "assigned", "?" ]
[ { "id": 3, "type": "table", "value": "assignedto" }, { "id": 0, "type": "table", "value": "projects" }, { "id": 4, "type": "column", "value": "project" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
4,670
student_loan
bird:train.json:4526
List out the number of students who have the longest duration of absense from school and enlisted in the peace corps.
SELECT COUNT(T1.NAME) FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'peace_corps' ORDER BY T1.month DESC LIMIT 1
[ "List", "out", "the", "number", "of", "students", "who", "have", "the", "longest", "duration", "of", "absense", "from", "school", "and", "enlisted", "in", "the", "peace", "corps", "." ]
[ { "id": 0, "type": "table", "value": "longest_absense_from_school" }, { "id": 3, "type": "value", "value": "peace_corps" }, { "id": 1, "type": "table", "value": "enlist" }, { "id": 2, "type": "column", "value": "organ" }, { "id": 4, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 12, 13, 14 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 19, 20 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O" ]
4,671
mondial_geo
bird:train.json:8484
State the inflation rate of Greece.
SELECT T2.Inflation FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Greece'
[ "State", "the", "inflation", "rate", "of", "Greece", "." ]
[ { "id": 0, "type": "column", "value": "inflation" }, { "id": 1, "type": "table", "value": "country" }, { "id": 2, "type": "table", "value": "economy" }, { "id": 6, "type": "column", "value": "country" }, { "id": 4, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
4,672
wine_1
spider:train_spider.json:6551
What are the wines that have prices lower than 50 and have appelations in Monterey county?
SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50
[ "What", "are", "the", "wines", "that", "have", "prices", "lower", "than", "50", "and", "have", "appelations", "in", "Monterey", "county", "?" ]
[ { "id": 1, "type": "table", "value": "appellations" }, { "id": 3, "type": "column", "value": "appelation" }, { "id": 5, "type": "column", "value": "Monterey" }, { "id": 4, "type": "column", "value": "county" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-COLUMN", "O" ]
4,674
sales_in_weather
bird:train.json:8166
Tell the wet-bulb temperature of the weather station which contained store no.6 on 2012/2/15.
SELECT T1.wetbulb FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 14 AND T1.`date` = '2012-02-15'
[ "Tell", "the", "wet", "-", "bulb", "temperature", "of", "the", "weather", "station", "which", "contained", "store", "no.6", "on", "2012/2/15", "." ]
[ { "id": 3, "type": "column", "value": "station_nbr" }, { "id": 7, "type": "value", "value": "2012-02-15" }, { "id": 4, "type": "column", "value": "store_nbr" }, { "id": 2, "type": "table", "value": "relation" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 12 ] ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
4,675
hospital_1
spider:train_spider.json:3898
Which department has the largest number of employees?
SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;
[ "Which", "department", "has", "the", "largest", "number", "of", "employees", "?" ]
[ { "id": 1, "type": "column", "value": "departmentid" }, { "id": 0, "type": "table", "value": "department" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
4,676
retails
bird:train.json:6676
Among all the orders made by a customer in the household segment, what is the highest total price?
SELECT MAX(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD'
[ "Among", "all", "the", "orders", "made", "by", "a", "customer", "in", "the", "household", "segment", ",", "what", "is", "the", "highest", "total", "price", "?" ]
[ { "id": 2, "type": "column", "value": "c_mktsegment" }, { "id": 4, "type": "column", "value": "o_totalprice" }, { "id": 3, "type": "value", "value": "HOUSEHOLD" }, { "id": 5, "type": "column", "value": "o_custkey" }, { "id": 6, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 17, 18 ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
4,677
chinook_1
spider:train_spider.json:816
Find the different billing countries for all invoices.
SELECT distinct(BillingCountry) FROM INVOICE
[ "Find", "the", "different", "billing", "countries", "for", "all", "invoices", "." ]
[ { "id": 1, "type": "column", "value": "billingcountry" }, { "id": 0, "type": "table", "value": "invoice" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "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, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O" ]
4,678
baseball_1
spider:train_spider.json:3674
How many times in total did the team Boston Red Stockings participate in postseason games?
SELECT count(*) FROM ( SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' );
[ "How", "many", "times", "in", "total", "did", "the", "team", "Boston", "Red", "Stockings", "participate", "in", "postseason", "games", "?" ]
[ { "id": 3, "type": "value", "value": "Boston Red Stockings" }, { "id": 4, "type": "column", "value": "team_id_winner" }, { "id": 6, "type": "column", "value": "team_id_loser" }, { "id": 0, "type": "table", "value": "postseason" }, { "id": 5, "t...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
4,679
hockey
bird:train.json:7636
Name the goalies and season they played when Boston Bruins won number 1 in rank.
SELECT T1.firstName, T1.lastName, T3.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.year = T3.year AND T2.tmID = T3.tmID WHERE T1.deathYear IS NOT NULL AND T3.name = 'Boston Bruins' AND T3.rank = 1 AND T1.pos = 'G'
[ "Name", "the", "goalies", "and", "season", "they", "played", "when", "Boston", "Bruins", "won", "number", "1", "in", "rank", "." ]
[ { "id": 8, "type": "value", "value": "Boston Bruins" }, { "id": 0, "type": "column", "value": "firstname" }, { "id": 6, "type": "column", "value": "deathyear" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 13, "type": "column", ...
[ { "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": [ 2 ] }, { ...
[ "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "O", "B-COLUMN", "O" ]
4,680
customers_and_addresses
spider:train_spider.json:6118
Return the number of customers who have at least one order with "Cancelled" status.
SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = "Cancelled"
[ "Return", "the", "number", "of", "customers", "who", "have", "at", "least", "one", "order", "with", "\"", "Cancelled", "\"", "status", "." ]
[ { "id": 0, "type": "table", "value": "customer_orders" }, { "id": 1, "type": "column", "value": "order_status" }, { "id": 3, "type": "column", "value": "customer_id" }, { "id": 2, "type": "column", "value": "Cancelled" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
4,682
club_leader
bird:test.json:658
Show the nations that have both members older than 22 and members younger than 19.
SELECT Nationality FROM member WHERE Age > 22 INTERSECT SELECT Nationality FROM member WHERE Age < 19
[ "Show", "the", "nations", "that", "have", "both", "members", "older", "than", "22", "and", "members", "younger", "than", "19", "." ]
[ { "id": 1, "type": "column", "value": "nationality" }, { "id": 0, "type": "table", "value": "member" }, { "id": 2, "type": "column", "value": "age" }, { "id": 3, "type": "value", "value": "22" }, { "id": 4, "type": "value", "value": "19" ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O" ]
4,683
ice_hockey_draft
bird:train.json:6993
Who had the most assists of team Plymouth Whalers in the 1999-2000 season?
SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.TEAM = 'Plymouth Whalers' AND T2.SEASON = '1999-2000' ORDER BY T2.A DESC LIMIT 1
[ "Who", "had", "the", "most", "assists", "of", "team", "Plymouth", "Whalers", "in", "the", "1999", "-", "2000", "season", "?" ]
[ { "id": 6, "type": "value", "value": "Plymouth Whalers" }, { "id": 2, "type": "table", "value": "seasonstatus" }, { "id": 0, "type": "column", "value": "playername" }, { "id": 1, "type": "table", "value": "playerinfo" }, { "id": 8, "type": "val...
[ { "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": [ 6 ] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "O" ]
4,684
sales
bird:train.json:5396
What is the total sales amount for Reflector?
SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Reflector'
[ "What", "is", "the", "total", "sales", "amount", "for", "Reflector", "?" ]
[ { "id": 3, "type": "value", "value": "Reflector" }, { "id": 4, "type": "column", "value": "productid" }, { "id": 0, "type": "table", "value": "products" }, { "id": 6, "type": "column", "value": "quantity" }, { "id": 1, "type": "table", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
4,685
codebase_community
bird:dev.json:712
What is the post ID and the comments commented in the post titled by "Group differences on a five point Likert item"?
SELECT T2.Id, T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title = 'Group differences on a five point Likert item'
[ "What", "is", "the", "post", "ID", "and", "the", "comments", "commented", "in", "the", "post", "titled", "by", "\"", "Group", "differences", "on", "a", "five", "point", "Likert", "item", "\"", "?" ]
[ { "id": 5, "type": "value", "value": "Group differences on a five point Likert item" }, { "id": 2, "type": "table", "value": "comments" }, { "id": 6, "type": "column", "value": "postid" }, { "id": 3, "type": "table", "value": "posts" }, { "id": 4, ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
4,686
advertising_agencies
bird:test.json:2112
What are the distinct invoice ids and statuses for all payments?
SELECT DISTINCT T1.invoice_id , T1.invoice_status FROM Invoices AS T1 JOIN Payments AS T2 ON T1.invoice_id = T2.invoice_id
[ "What", "are", "the", "distinct", "invoice", "ids", "and", "statuses", "for", "all", "payments", "?" ]
[ { "id": 1, "type": "column", "value": "invoice_status" }, { "id": 0, "type": "column", "value": "invoice_id" }, { "id": 2, "type": "table", "value": "invoices" }, { "id": 3, "type": "table", "value": "payments" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O" ]
4,687
shipping
bird:train.json:5679
List the weight of the customer's shipment with annual revenue of 39448581.
SELECT T1.weight FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.annual_revenue = 39448581
[ "List", "the", "weight", "of", "the", "customer", "'s", "shipment", "with", "annual", "revenue", "of", "39448581", "." ]
[ { "id": 3, "type": "column", "value": "annual_revenue" }, { "id": 1, "type": "table", "value": "shipment" }, { "id": 2, "type": "table", "value": "customer" }, { "id": 4, "type": "value", "value": "39448581" }, { "id": 5, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 12 ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
4,688
movie_platform
bird:train.json:68
How many critics of the movie "Imitation of Life" got more than 1 like?
SELECT COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Imitation of Life' AND T1.critic_likes > 1
[ "How", "many", "critics", "of", "the", "movie", "\"", "Imitation", "of", "Life", "\"", "got", "more", "than", "1", "like", "?" ]
[ { "id": 4, "type": "value", "value": "Imitation of Life" }, { "id": 5, "type": "column", "value": "critic_likes" }, { "id": 3, "type": "column", "value": "movie_title" }, { "id": 2, "type": "column", "value": "movie_id" }, { "id": 0, "type": "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7, 8, 9 ] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
4,689
e_learning
spider:train_spider.json:3816
Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.
SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC
[ "Find", "the", "subject", "ID", ",", "name", "of", "subject", "and", "the", "corresponding", "number", "of", "courses", "for", "each", "subject", ",", "and", "sort", "by", "the", "course", "count", "in", "ascending", "order", "." ]
[ { "id": 1, "type": "column", "value": "subject_name" }, { "id": 0, "type": "column", "value": "subject_id" }, { "id": 3, "type": "table", "value": "subjects" }, { "id": 2, "type": "table", "value": "courses" } ]
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
4,690
driving_school
spider:train_spider.json:6675
What is the status code with the least number of customers?
SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;
[ "What", "is", "the", "status", "code", "with", "the", "least", "number", "of", "customers", "?" ]
[ { "id": 1, "type": "column", "value": "customer_status_code" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "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", "O", "O", "B-TABLE", "O" ]
4,691
legislator
bird:train.json:4746
What is the username of the current official Facebook presence of the oldest current legislator?
SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id ORDER BY T1.birthday_bio LIMIT 1
[ "What", "is", "the", "username", "of", "the", "current", "official", "Facebook", "presence", "of", "the", "oldest", "current", "legislator", "?" ]
[ { "id": 2, "type": "table", "value": "social-media" }, { "id": 3, "type": "column", "value": "birthday_bio" }, { "id": 5, "type": "column", "value": "bioguide_id" }, { "id": 0, "type": "column", "value": "facebook" }, { "id": 4, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
4,692
bike_share_1
bird:train.json:9084
Does the bike with Id number 16 making any intercity trip? If yes, calculate the total travel duration during all the intercity trip. Convert the duration to hour.
SELECT T1.end_station_name, T2.city, CAST(SUM(T1.duration) AS REAL) / 3600 FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.bike_id = 16 AND T1.start_station_name != T1.end_station_name
[ "Does", "the", "bike", "with", "I", "d", "number", "16", "making", "any", "intercity", "trip", "?", "If", "yes", ",", "calculate", "the", "total", "travel", "duration", "during", "all", "the", "intercity", "trip", ".", "Convert", "the", "duration", "to", ...
[ { "id": 6, "type": "column", "value": "start_station_name" }, { "id": 0, "type": "column", "value": "end_station_name" }, { "id": 9, "type": "column", "value": "duration" }, { "id": 3, "type": "table", "value": "station" }, { "id": 7, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 24 ] }, { "entity_id": 2, "token_idxs": [ 25 ] }, { "entity_id": 3, "token_idxs": [ 29 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
4,693
film_rank
spider:train_spider.json:4137
What are the countries of markets and their corresponding years of market estimation?
SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID
[ "What", "are", "the", "countries", "of", "markets", "and", "their", "corresponding", "years", "of", "market", "estimation", "?" ]
[ { "id": 2, "type": "table", "value": "film_market_estimation" }, { "id": 4, "type": "column", "value": "market_id" }, { "id": 0, "type": "column", "value": "country" }, { "id": 3, "type": "table", "value": "market" }, { "id": 1, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-TABLE", "O" ]
4,694
candidate_poll
spider:train_spider.json:2396
Which poll resource provided the most number of candidate information?
SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1
[ "Which", "poll", "resource", "provided", "the", "most", "number", "of", "candidate", "information", "?" ]
[ { "id": 1, "type": "column", "value": "poll_source" }, { "id": 0, "type": "table", "value": "candidate" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "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, "toke...
[ "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
4,695
language_corpus
bird:train.json:5691
Which word has the most occurrences within the same page of wikipedia about Catalan language?
SELECT T1.word FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T2.occurrences = ( SELECT MAX(occurrences) FROM pages_words )
[ "Which", "word", "has", "the", "most", "occurrences", "within", "the", "same", "page", "of", "wikipedia", "about", "Catalan", "language", "?" ]
[ { "id": 2, "type": "table", "value": "pages_words" }, { "id": 3, "type": "column", "value": "occurrences" }, { "id": 1, "type": "table", "value": "words" }, { "id": 0, "type": "column", "value": "word" }, { "id": 4, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
4,696
human_resources
bird:train.json:8972
How many Account Representatives are there in Illinois with satisfying performance?
SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representative' AND T1.performance = 'Good' AND T2.state = 'IL'
[ "How", "many", "Account", "Representatives", "are", "there", "in", "Illinois", "with", "satisfying", "performance", "?" ]
[ { "id": 5, "type": "value", "value": "Account Representative" }, { "id": 4, "type": "column", "value": "positiontitle" }, { "id": 6, "type": "column", "value": "performance" }, { "id": 3, "type": "column", "value": "positionid" }, { "id": 10, "...
[ { "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": [ 2, 3 ] ...
[ "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
4,697
movie_1
spider:train_spider.json:2474
Find the names of all reviewers who have contributed three or more ratings.
SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3
[ "Find", "the", "names", "of", "all", "reviewers", "who", "have", "contributed", "three", "or", "more", "ratings", "." ]
[ { "id": 3, "type": "table", "value": "reviewer" }, { "id": 2, "type": "table", "value": "rating" }, { "id": 1, "type": "column", "value": "name" }, { "id": 0, "type": "column", "value": "rid" }, { "id": 4, "type": "value", "value": "3" } ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
4,698
superhero
bird:dev.json:773
Which superhero has the same eyes, hair and skin colour? Indicate the publisher of the superhero.
SELECT T1.superhero_name, T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.eye_colour_id = T1.hair_colour_id AND T1.eye_colour_id = T1.skin_colour_id
[ "Which", "superhero", "has", "the", "same", "eyes", ",", "hair", "and", "skin", "colour", "?", "Indicate", "the", "publisher", "of", "the", "superhero", "." ]
[ { "id": 0, "type": "column", "value": "superhero_name" }, { "id": 1, "type": "column", "value": "publisher_name" }, { "id": 7, "type": "column", "value": "hair_colour_id" }, { "id": 8, "type": "column", "value": "skin_colour_id" }, { "id": 6, "...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O" ]
4,699
store_1
spider:train_spider.json:557
List the customers first and last name of 10 least expensive invoices.
SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10;
[ "List", "the", "customers", "first", "and", "last", "name", "of", "10", "least", "expensive", "invoices", "." ]
[ { "id": 5, "type": "column", "value": "customer_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 2, "type": "table", "value": "customers" }, { "id": 3, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
4,701
shakespeare
bird:train.json:3017
How many chapters are there in "Midsummer Night's Dream"?
SELECT COUNT(T2.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Midsummer Night''s Dream'
[ "How", "many", "chapters", "are", "there", "in", "\"", "Midsummer", "Night", "'s", "Dream", "\"", "?" ]
[ { "id": 3, "type": "value", "value": "Midsummer Night's Dream" }, { "id": 1, "type": "table", "value": "chapters" }, { "id": 5, "type": "column", "value": "work_id" }, { "id": 0, "type": "table", "value": "works" }, { "id": 2, "type": "column",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8, 9, 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
4,702
european_football_2
bird:dev.json:1143
What was the highest score of the home team in the Netherlands Eredivisie league?
SELECT MAX(t2.home_team_goal) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Netherlands Eredivisie'
[ "What", "was", "the", "highest", "score", "of", "the", "home", "team", "in", "the", "Netherlands", "Eredivisie", "league", "?" ]
[ { "id": 3, "type": "value", "value": "Netherlands Eredivisie" }, { "id": 4, "type": "column", "value": "home_team_goal" }, { "id": 6, "type": "column", "value": "league_id" }, { "id": 0, "type": "table", "value": "league" }, { "id": 1, "type": ...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [ 7, 8 ] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "B-TABLE", "O" ]
4,703
movie_1
spider:train_spider.json:2508
What is the name of the movie that is rated by most of times?
SELECT T2.title , T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "movie", "that", "is", "rated", "by", "most", "of", "times", "?" ]
[ { "id": 2, "type": "table", "value": "rating" }, { "id": 1, "type": "column", "value": "title" }, { "id": 3, "type": "table", "value": "movie" }, { "id": 0, "type": "column", "value": "mid" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
4,704
election
spider:train_spider.json:2793
Which people severed as governor most frequently?
SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1
[ "Which", "people", "severed", "as", "governor", "most", "frequently", "?" ]
[ { "id": 1, "type": "column", "value": "governor" }, { "id": 0, "type": "table", "value": "party" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
4,705
movie_3
bird:train.json:9405
Among the active customers, how many of them have Nina as their first name?
SELECT COUNT(customer_id) FROM customer WHERE first_name = 'Nina' AND active = 1
[ "Among", "the", "active", "customers", ",", "how", "many", "of", "them", "have", "Nina", "as", "their", "first", "name", "?" ]
[ { "id": 1, "type": "column", "value": "customer_id" }, { "id": 2, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 4, "type": "column", "value": "active" }, { "id": 3, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13, 14 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { ...
[ "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
4,706
public_review_platform
bird:train.json:4075
Write down the any five of ID and name of category that starts with alphabet "P".
SELECT category_id, category_name FROM Categories WHERE category_name LIKE 'P%' LIMIT 5
[ "Write", "down", "the", "any", "five", "of", "ID", "and", "name", "of", "category", "that", "starts", "with", "alphabet", "\"", "P", "\"", "." ]
[ { "id": 2, "type": "column", "value": "category_name" }, { "id": 1, "type": "column", "value": "category_id" }, { "id": 0, "type": "table", "value": "categories" }, { "id": 3, "type": "value", "value": "P%" } ]
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
4,707
bike_racing
bird:test.json:1477
What are the ids and names of racing bikes that are purchased by at least 4 cyclists?
SELECT T1.id , T1.product_name FROM bike AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.bike_id GROUP BY T1.id HAVING count(*) >= 4
[ "What", "are", "the", "ids", "and", "names", "of", "racing", "bikes", "that", "are", "purchased", "by", "at", "least", "4", "cyclists", "?" ]
[ { "id": 3, "type": "table", "value": "cyclists_own_bikes" }, { "id": 1, "type": "column", "value": "product_name" }, { "id": 5, "type": "column", "value": "bike_id" }, { "id": 2, "type": "table", "value": "bike" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
4,708
college_1
spider:train_spider.json:3301
Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.
SELECT stu_fname , stu_gpa FROM student WHERE stu_gpa < (SELECT avg(stu_gpa) FROM student)
[ "Find", "the", "first", "name", "and", "gpa", "of", "the", "students", "whose", "gpa", "is", "lower", "than", "the", "average", "gpa", "of", "all", "students", "." ]
[ { "id": 1, "type": "column", "value": "stu_fname" }, { "id": 0, "type": "table", "value": "student" }, { "id": 2, "type": "column", "value": "stu_gpa" } ]
[ { "entity_id": 0, "token_idxs": [ 19 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
4,709
university_basketball
spider:train_spider.json:984
What is the founded year of the non public school that was founded most recently?
SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1
[ "What", "is", "the", "founded", "year", "of", "the", "non", "public", "school", "that", "was", "founded", "most", "recently", "?" ]
[ { "id": 2, "type": "column", "value": "affiliation" }, { "id": 0, "type": "table", "value": "university" }, { "id": 1, "type": "column", "value": "founded" }, { "id": 3, "type": "value", "value": "Public" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O" ]
4,710
baseball_1
spider:train_spider.json:3672
For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.
SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year
[ "For", "each", "year", ",", "return", "the", "year", "and", "the", "number", "of", "times", "the", "team", "Boston", "Red", "Stockings", "won", "in", "the", "postseasons", "." ]
[ { "id": 4, "type": "value", "value": "Boston Red Stockings" }, { "id": 5, "type": "column", "value": "team_id_winner" }, { "id": 1, "type": "table", "value": "postseason" }, { "id": 6, "type": "column", "value": "team_id_br" }, { "id": 0, "type...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 20 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 14, 15, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-TABLE", "O" ]
4,711
movie_3
bird:train.json:9375
How long did Austin Cintron take to return the movie 'Destiny Saturday'?
SELECT T2.rental_date - T2.return_date FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'AUSTIN' AND T4.title = 'DESTINY SATURDAY'
[ "How", "long", "did", "Austin", "Cintron", "take", "to", "return", "the", "movie", "'", "Destiny", "Saturday", "'", "?" ]
[ { "id": 8, "type": "value", "value": "DESTINY SATURDAY" }, { "id": 11, "type": "column", "value": "inventory_id" }, { "id": 1, "type": "column", "value": "rental_date" }, { "id": 2, "type": "column", "value": "return_date" }, { "id": 12, "type"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "O" ]
4,712
video_games
bird:train.json:3495
In which region where a game had the lowest number of sales?
SELECT DISTINCT T1.region_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id ORDER BY T2.num_sales LIMIT 1
[ "In", "which", "region", "where", "a", "game", "had", "the", "lowest", "number", "of", "sales", "?" ]
[ { "id": 2, "type": "table", "value": "region_sales" }, { "id": 0, "type": "column", "value": "region_name" }, { "id": 3, "type": "column", "value": "num_sales" }, { "id": 5, "type": "column", "value": "region_id" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
4,713
club_1
spider:train_spider.json:4277
Find the club which has the largest number of members majoring in "600".
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.major = "600" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1
[ "Find", "the", "club", "which", "has", "the", "largest", "number", "of", "members", "majoring", "in", "\"", "600", "\"", "." ]
[ { "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": 2, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O" ]
4,714
theme_gallery
spider:train_spider.json:1666
What are the theme and year for all exhibitions that have a ticket price under 15?
SELECT theme , YEAR FROM exhibition WHERE ticket_price < 15
[ "What", "are", "the", "theme", "and", "year", "for", "all", "exhibitions", "that", "have", "a", "ticket", "price", "under", "15", "?" ]
[ { "id": 3, "type": "column", "value": "ticket_price" }, { "id": 0, "type": "table", "value": "exhibition" }, { "id": 1, "type": "column", "value": "theme" }, { "id": 2, "type": "column", "value": "year" }, { "id": 4, "type": "value", "value...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 12, 13 ] }, { "entity_id": 4, "token_idxs": [ 15 ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
4,715
customers_and_invoices
spider:train_spider.json:1583
What is the average, minimum, maximum, and total transaction amount?
SELECT avg(transaction_amount) , min(transaction_amount) , max(transaction_amount) , sum(transaction_amount) FROM Financial_transactions
[ "What", "is", "the", "average", ",", "minimum", ",", "maximum", ",", "and", "total", "transaction", "amount", "?" ]
[ { "id": 0, "type": "table", "value": "financial_transactions" }, { "id": 1, "type": "column", "value": "transaction_amount" } ]
[ { "entity_id": 0, "token_idxs": [ 9, 10 ] }, { "entity_id": 1, "token_idxs": [ 11, 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "I-COLUMN", "O" ]
4,716
superhero
bird:dev.json:808
Find the race of the superhero who weighs 108kg and is 188cm tall.
SELECT DISTINCT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.weight_kg = 108 AND T1.height_cm = 188
[ "Find", "the", "race", "of", "the", "superhero", "who", "weighs", "108", "kg", "and", "is", "188", "cm", "tall", "." ]
[ { "id": 1, "type": "table", "value": "superhero" }, { "id": 5, "type": "column", "value": "weight_kg" }, { "id": 7, "type": "column", "value": "height_cm" }, { "id": 3, "type": "column", "value": "race_id" }, { "id": 0, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 0 ] }, { "entity_id": 5, "...
[ "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O" ]
4,717
synthea
bird:train.json:1485
What is the average body mass index for patients with higher total cholesterol?
SELECT SUM(T1.VALUE) / COUNT(T1.PATIENT) FROM observations AS T1 INNER JOIN ( SELECT DISTINCT PATIENT FROM observations WHERE DESCRIPTION = 'Total Cholesterol' AND VALUE > 200 ) AS T2 ON T1.PATIENT = T2.PATIENT WHERE T1.DESCRIPTION = 'Body Mass Index'
[ "What", "is", "the", "average", "body", "mass", "index", "for", "patients", "with", "higher", "total", "cholesterol", "?" ]
[ { "id": 5, "type": "value", "value": "Total Cholesterol" }, { "id": 2, "type": "value", "value": "Body Mass Index" }, { "id": 0, "type": "table", "value": "observations" }, { "id": 1, "type": "column", "value": "description" }, { "id": 3, "type...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O" ]
4,718
flight_4
spider:train_spider.json:6843
Which countries has the most number of airlines whose active status is 'Y'?
SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY count(*) DESC LIMIT 1
[ "Which", "countries", "has", "the", "most", "number", "of", "airlines", "whose", "active", "status", "is", "'", "Y", "'", "?" ]
[ { "id": 0, "type": "table", "value": "airlines" }, { "id": 1, "type": "column", "value": "country" }, { "id": 2, "type": "column", "value": "active" }, { "id": 3, "type": "value", "value": "Y" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O" ]
4,719
hockey
bird:train.json:7652
How many teams have the same total number of postseason wins and postseason loses?
SELECT DISTINCT COUNT(tmID) FROM Goalies WHERE PostW = PostL
[ "How", "many", "teams", "have", "the", "same", "total", "number", "of", "postseason", "wins", "and", "postseason", "loses", "?" ]
[ { "id": 0, "type": "table", "value": "goalies" }, { "id": 1, "type": "column", "value": "postw" }, { "id": 2, "type": "column", "value": "postl" }, { "id": 3, "type": "column", "value": "tmid" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O" ]
4,720
county_public_safety
spider:train_spider.json:2548
List the names of the city with the top 5 white percentages.
SELECT Name FROM city ORDER BY White DESC LIMIT 5
[ "List", "the", "names", "of", "the", "city", "with", "the", "top", "5", "white", "percentages", "." ]
[ { "id": 2, "type": "column", "value": "white" }, { "id": 0, "type": "table", "value": "city" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
4,721
loan_1
spider:train_spider.json:3066
Find the name of bank branch that provided the greatest total amount of loans.
SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY sum(T2.amount) DESC LIMIT 1
[ "Find", "the", "name", "of", "bank", "branch", "that", "provided", "the", "greatest", "total", "amount", "of", "loans", "." ]
[ { "id": 3, "type": "column", "value": "branch_id" }, { "id": 4, "type": "column", "value": "amount" }, { "id": 0, "type": "column", "value": "bname" }, { "id": 1, "type": "table", "value": "bank" }, { "id": 2, "type": "table", "value": "loa...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
4,722
soccer_1
spider:train_spider.json:1306
List the names and birthdays of the top five players in terms of potential.
SELECT DISTINCT T1.player_name , T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5
[ "List", "the", "names", "and", "birthdays", "of", "the", "top", "five", "players", "in", "terms", "of", "potential", "." ]
[ { "id": 3, "type": "table", "value": "player_attributes" }, { "id": 5, "type": "column", "value": "player_api_id" }, { "id": 0, "type": "column", "value": "player_name" }, { "id": 4, "type": "column", "value": "potential" }, { "id": 1, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entit...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-TABLE", "O", "B-COLUMN", "O" ]
4,723
codebase_comments
bird:train.json:675
Provide the tokenized name of the method "Sky.Excel.ExcelBook.TypeConvert".
SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert'
[ "Provide", "the", "tokenized", "name", "of", "the", "method", "\"", "Sky", ".", "Excel", ".", "ExcelBook", ".", "TypeConvert", "\"", "." ]
[ { "id": 3, "type": "value", "value": "Sky.Excel.ExcelBook.TypeConvert" }, { "id": 1, "type": "column", "value": "nametokenized" }, { "id": 0, "type": "table", "value": "method" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10, 11, 12, 13, 14 ] }, { ...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
4,724
address
bird:train.json:5134
Name 10 cities with their states that are under the Lexington-Fayette, KY office of the Canada Border Services Agency.
SELECT DISTINCT T2.city, T2.state FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Lexington-Fayette, KY' LIMIT 10
[ "Name", "10", "cities", "with", "their", "states", "that", "are", "under", "the", "Lexington", "-", "Fayette", ",", "KY", "office", "of", "the", "Canada", "Border", "Services", "Agency", "." ]
[ { "id": 5, "type": "value", "value": "Lexington-Fayette, KY" }, { "id": 4, "type": "column", "value": "cbsa_name" }, { "id": 3, "type": "table", "value": "zip_data" }, { "id": 1, "type": "column", "value": "state" }, { "id": 0, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 0 ] }, { "entity_id": 5, "...
[ "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O" ]
4,725
movie_platform
bird:train.json:23
How many users gave "Pavee Lackeen: The Traveller Girl" movie a rating score of 4?
SELECT COUNT(T2.user_id) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'Pavee Lackeen: The Traveller Girl' AND T2.rating_score = 4
[ "How", "many", "users", "gave", "\"", "Pavee", "Lackeen", ":", "The", "Traveller", "Girl", "\"", "movie", "a", "rating", "score", "of", "4", "?" ]
[ { "id": 5, "type": "value", "value": "Pavee Lackeen: The Traveller Girl" }, { "id": 6, "type": "column", "value": "rating_score" }, { "id": 4, "type": "column", "value": "movie_title" }, { "id": 3, "type": "column", "value": "movie_id" }, { "id": 1...
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "O" ]
4,726
aan_1
bird:test.json:1014
Count the number of papers Mckeown , Kathleen has cited .
select count(*) from citation as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = "mckeown , kathleen"
[ "Count", "the", "number", "of", "papers", "Mckeown", ",", "Kathleen", "has", "cited", "." ]
[ { "id": 2, "type": "column", "value": "mckeown , kathleen" }, { "id": 4, "type": "table", "value": "author_list" }, { "id": 5, "type": "column", "value": "author_id" }, { "id": 3, "type": "table", "value": "citation" }, { "id": 6, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 5, 6, 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O" ]
4,727
thrombosis_prediction
bird:dev.json:1179
For the patient who was diagnosed with SLE on 1994/2/19, what was his/her anti-Cardiolipin antibody concentration status on 1993/11/12?
SELECT `aCL IgA`, `aCL IgG`, `aCL IgM` FROM Examination WHERE ID IN ( SELECT ID FROM Patient WHERE Diagnosis = 'SLE' AND Description = '1994-02-19' ) AND `Examination Date` = '1993-11-12'
[ "For", "the", "patient", "who", "was", "diagnosed", "with", "SLE", "on", "1994/2/19", ",", "what", "was", "his", "/", "her", "anti", "-", "Cardiolipin", "antibody", "concentration", "status", "on", "1993/11/12", "?" ]
[ { "id": 5, "type": "column", "value": "Examination Date" }, { "id": 0, "type": "table", "value": "examination" }, { "id": 10, "type": "column", "value": "description" }, { "id": 6, "type": "value", "value": "1993-11-12" }, { "id": 11, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
4,728
soccer_1
spider:train_spider.json:1293
List all country and league names.
SELECT T1.name , T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id
[ "List", "all", "country", "and", "league", "names", "." ]
[ { "id": 4, "type": "column", "value": "country_id" }, { "id": 1, "type": "table", "value": "country" }, { "id": 2, "type": "table", "value": "league" }, { "id": 0, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "B-TABLE", "B-COLUMN", "O" ]
4,729
shakespeare
bird:train.json:3046
How many of the works of Shakespeare are Tragedy?
SELECT COUNT(id) FROM works WHERE GenreType = 'Tragedy'
[ "How", "many", "of", "the", "works", "of", "Shakespeare", "are", "Tragedy", "?" ]
[ { "id": 1, "type": "column", "value": "genretype" }, { "id": 2, "type": "value", "value": "Tragedy" }, { "id": 0, "type": "table", "value": "works" }, { "id": 3, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
4,730
soccer_2016
bird:train.json:2036
How many matches have 7 points of winning margin?
SELECT COUNT(Match_Id) FROM Match WHERE win_margin = 7
[ "How", "many", "matches", "have", "7", "points", "of", "winning", "margin", "?" ]
[ { "id": 1, "type": "column", "value": "win_margin" }, { "id": 3, "type": "column", "value": "match_id" }, { "id": 0, "type": "table", "value": "match" }, { "id": 2, "type": "value", "value": "7" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "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", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O" ]
4,731
cars
bird:train.json:3065
What is the acceleration of the most expensive car?
SELECT T1.acceleration FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1
[ "What", "is", "the", "acceleration", "of", "the", "most", "expensive", "car", "?" ]
[ { "id": 0, "type": "column", "value": "acceleration" }, { "id": 2, "type": "table", "value": "price" }, { "id": 3, "type": "column", "value": "price" }, { "id": 1, "type": "table", "value": "data" }, { "id": 4, "type": "column", "value": "i...
[ { "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", "O", "O", "O", "O" ]
4,732
loan_1
spider:train_spider.json:3026
Find the number of different cities which banks are located at.
SELECT count(DISTINCT city) FROM bank
[ "Find", "the", "number", "of", "different", "cities", "which", "banks", "are", "located", "at", "." ]
[ { "id": 0, "type": "table", "value": "bank" }, { "id": 1, "type": "column", "value": "city" } ]
[ { "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", "O", "O", "O" ]