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
3,757
donor
bird:train.json:3283
Find out if the project with the title Team More Books! has a New York teaching fellow.
SELECT T2.teacher_ny_teaching_fellow FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Team More Books!'
[ "Find", "out", "if", "the", "project", "with", "the", "title", "Team", "More", "Books", "!", "has", "a", "New", "York", "teaching", "fellow", "." ]
[ { "id": 0, "type": "column", "value": "teacher_ny_teaching_fellow" }, { "id": 4, "type": "value", "value": "Team More Books!" }, { "id": 5, "type": "column", "value": "projectid" }, { "id": 2, "type": "table", "value": "projects" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [ 16, 17 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 8, 9, ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
3,758
cre_Doc_Control_Systems
spider:train_spider.json:2104
What are all role codes?
SELECT role_code FROM ROLES;
[ "What", "are", "all", "role", "codes", "?" ]
[ { "id": 1, "type": "column", "value": "role_code" }, { "id": 0, "type": "table", "value": "roles" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
3,759
talkingdata
bird:train.json:1138
Among the female users of the devices, how many of them are over 30?
SELECT COUNT(device_id) FROM gender_age WHERE age > 30 AND gender = 'F'
[ "Among", "the", "female", "users", "of", "the", "devices", ",", "how", "many", "of", "them", "are", "over", "30", "?" ]
[ { "id": 0, "type": "table", "value": "gender_age" }, { "id": 1, "type": "column", "value": "device_id" }, { "id": 4, "type": "column", "value": "gender" }, { "id": 2, "type": "column", "value": "age" }, { "id": 3, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
3,760
customers_and_invoices
spider:train_spider.json:1549
How many customers have opened an account?
SELECT count(DISTINCT customer_id) FROM Accounts
[ "How", "many", "customers", "have", "opened", "an", "account", "?" ]
[ { "id": 1, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "accounts" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
3,761
debit_card_specializing
bird:dev.json:1487
Which LAM customer used the Euro as their currency and had the highest consumption in October 2013?
SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM' AND T2.Date = '201310' AND T1.Currency = 'EUR' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1
[ "Which", "LAM", "customer", "used", "the", "Euro", "as", "their", "currency", "and", "had", "the", "highest", "consumption", "in", "October", "2013", "?" ]
[ { "id": 9, "type": "column", "value": "consumption" }, { "id": 0, "type": "column", "value": "customerid" }, { "id": 1, "type": "table", "value": "customers" }, { "id": 2, "type": "table", "value": "yearmonth" }, { "id": 7, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-VALUE", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
3,762
bike_share_1
bird:train.json:9048
How many trips in 2013 had durations longer than 1000 seconds?
SELECT COUNT(duration) FROM trip WHERE start_date LIKE '%/%/2013%' AND duration > 1000
[ "How", "many", "trips", "in", "2013", "had", "durations", "longer", "than", "1000", "seconds", "?" ]
[ { "id": 2, "type": "column", "value": "start_date" }, { "id": 3, "type": "value", "value": "%/%/2013%" }, { "id": 1, "type": "column", "value": "duration" }, { "id": 0, "type": "table", "value": "trip" }, { "id": 4, "type": "value", "value"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
3,763
gas_company
spider:train_spider.json:1998
What are the companies and main industries of all companies that are not headquartered in the United States?
SELECT company , main_industry FROM company WHERE headquarters != 'USA'
[ "What", "are", "the", "companies", "and", "main", "industries", "of", "all", "companies", "that", "are", "not", "headquartered", "in", "the", "United", "States", "?" ]
[ { "id": 2, "type": "column", "value": "main_industry" }, { "id": 3, "type": "column", "value": "headquarters" }, { "id": 0, "type": "table", "value": "company" }, { "id": 1, "type": "column", "value": "company" }, { "id": 4, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
3,764
movie_3
bird:train.json:9276
Indicate the name of the actors of the films rated as 'Parents Strongly Precautioned' with the highest replacement cost.
SELECT T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'PG-13' ORDER BY T3.replacement_cost DESC LIMIT 1
[ "Indicate", "the", "name", "of", "the", "actors", "of", "the", "films", "rated", "as", "'", "Parents", "Strongly", "Precautioned", "'", "with", "the", "highest", "replacement", "cost", "." ]
[ { "id": 5, "type": "column", "value": "replacement_cost" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 7, "type": "table", "value": "film_actor" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 9, "type": "colu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
3,765
california_schools
bird:dev.json:73
What is the free or reduced price meal count for ages 5 to 17 in the Youth Authority School with a mailing street address of PO Box 1040?
SELECT T1.`FRPM Count (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.MailStreet = 'PO Box 1040' AND T2.SOCType = 'Youth Authority Facilities'
[ "What", "is", "the", "free", "or", "reduced", "price", "meal", "count", "for", "ages", "5", "to", "17", "in", "the", "Youth", "Authority", "School", "with", "a", "mailing", "street", "address", "of", "PO", "Box", "1040", "?" ]
[ { "id": 7, "type": "value", "value": "Youth Authority Facilities" }, { "id": 0, "type": "column", "value": "FRPM Count (Ages 5-17)" }, { "id": 5, "type": "value", "value": "PO Box 1040" }, { "id": 4, "type": "column", "value": "mailstreet" }, { "id...
[ { "entity_id": 0, "token_idxs": [ 7, 8, 9, 10, 11, 12, 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 18 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "toke...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "B-TABLE", "B-VALUE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
3,766
college_2
spider:train_spider.json:1476
Find courses that ran in Fall 2009 or in Spring 2010.
SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010
[ "Find", "courses", "that", "ran", "in", "Fall", "2009", "or", "in", "Spring", "2010", "." ]
[ { "id": 1, "type": "column", "value": "course_id" }, { "id": 2, "type": "column", "value": "semester" }, { "id": 0, "type": "table", "value": "section" }, { "id": 6, "type": "value", "value": "Spring" }, { "id": 3, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "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-VALUE", "B-VALUE", "O", "O", "B-VALUE", "B-VALUE", "O" ]
3,767
image_and_language
bird:train.json:7514
What is the bounding box of the object with image id 4 and a prediction relationship class id of 144?
SELECT T2.X, T2.Y, T2.W, T2.H FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID WHERE T1.PRED_CLASS_ID = 144 AND T1.IMG_ID = 3
[ "What", "is", "the", "bounding", "box", "of", "the", "object", "with", "image", "i", "d", "4", "and", "a", "prediction", "relationship", "class", "i", "d", "of", "144", "?" ]
[ { "id": 7, "type": "column", "value": "pred_class_id" }, { "id": 4, "type": "table", "value": "img_rel" }, { "id": 5, "type": "table", "value": "img_obj" }, { "id": 6, "type": "column", "value": "img_id" }, { "id": 8, "type": "value", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-VALUE", "O" ]
3,768
restaurant_1
spider:train_spider.json:2826
What is the age of student Linda Smith?
SELECT Age FROM Student WHERE Fname = "Linda" AND Lname = "Smith";
[ "What", "is", "the", "age", "of", "student", "Linda", "Smith", "?" ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 2, "type": "column", "value": "fname" }, { "id": 3, "type": "column", "value": "Linda" }, { "id": 4, "type": "column", "value": "lname" }, { "id": 5, "type": "column", "value": "Smit...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O" ]
3,769
company_office
spider:train_spider.json:4559
Find the stories of the building with the largest height.
SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1
[ "Find", "the", "stories", "of", "the", "building", "with", "the", "largest", "height", "." ]
[ { "id": 0, "type": "table", "value": "buildings" }, { "id": 1, "type": "column", "value": "stories" }, { "id": 2, "type": "column", "value": "height" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
3,771
flight_4
spider:train_spider.json:6866
What are the cities with exactly two airports?
SELECT city FROM airports GROUP BY city HAVING count(*) = 2
[ "What", "are", "the", "cities", "with", "exactly", "two", "airports", "?" ]
[ { "id": 0, "type": "table", "value": "airports" }, { "id": 1, "type": "column", "value": "city" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
3,772
storm_record
spider:train_spider.json:2696
Show names for all regions except for Denmark.
SELECT region_name FROM region WHERE region_name != 'Denmark'
[ "Show", "names", "for", "all", "regions", "except", "for", "Denmark", "." ]
[ { "id": 1, "type": "column", "value": "region_name" }, { "id": 2, "type": "value", "value": "Denmark" }, { "id": 0, "type": "table", "value": "region" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
3,773
movie_platform
bird:train.json:158
Between 1/1/2010 to 12/31/2020, how many users, who were a trialist when they created the list, gave the movie "The Secret Life of Words" a rating score of 3?
SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'The Secret Life of Words' AND T1.rating_score = 3 AND T1.user_trialist = 0 AND T1.rating_timestamp_utc BETWEEN '2010%' AND '2020%'
[ "Between", "1/1/2010", "to", "12/31/2020", ",", "how", "many", "users", ",", "who", "were", "a", "trialist", "when", "they", "created", "the", "list", ",", "gave", "the", "movie", "\"", "The", "Secret", "Life", "of", "Words", "\"", "a", "rating", "score"...
[ { "id": 5, "type": "value", "value": "The Secret Life of Words" }, { "id": 10, "type": "column", "value": "rating_timestamp_utc" }, { "id": 8, "type": "column", "value": "user_trialist" }, { "id": 6, "type": "column", "value": "rating_score" }, { "...
[ { "entity_id": 0, "token_idxs": [ 30 ] }, { "entity_id": 1, "token_idxs": [ 21 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 22, 23 ] }, {...
[ "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE...
3,774
icfp_1
spider:train_spider.json:2895
Find papers whose second author has last name "Turon" and is affiliated with an institution in the country "USA".
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "USA" AND t2.authorder = 2 AND t1.lname = "Turon"
[ "Find", "papers", "whose", "second", "author", "has", "last", "name", "\"", "Turon", "\"", "and", "is", "affiliated", "with", "an", "institution", "in", "the", "country", "\"", "USA", "\"", "." ]
[ { "id": 11, "type": "table", "value": "authorship" }, { "id": 6, "type": "column", "value": "authorder" }, { "id": 4, "type": "column", "value": "country" }, { "id": 10, "type": "table", "value": "authors" }, { "id": 12, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 17 ] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "enti...
[ "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
3,775
hockey
bird:train.json:7661
Please list the awards won by coaches who were born in 1952.
SELECT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthYear = 1952
[ "Please", "list", "the", "awards", "won", "by", "coaches", "who", "were", "born", "in", "1952", "." ]
[ { "id": 2, "type": "table", "value": "awardscoaches" }, { "id": 3, "type": "column", "value": "birthyear" }, { "id": 5, "type": "column", "value": "coachid" }, { "id": 1, "type": "table", "value": "master" }, { "id": 0, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4, 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "entity_id"...
[ "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
3,776
superstore
bird:train.json:2452
Among the customers from Houston, Texas, what is the total profit of their orders in the Central region?
SELECT SUM(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.City = 'Houston' AND T1.State = 'Texas' AND T2.Region = 'Central'
[ "Among", "the", "customers", "from", "Houston", ",", "Texas", ",", "what", "is", "the", "total", "profit", "of", "their", "orders", "in", "the", "Central", "region", "?" ]
[ { "id": 3, "type": "table", "value": "central_superstore" }, { "id": 11, "type": "column", "value": "Customer ID" }, { "id": 4, "type": "column", "value": "Product ID" }, { "id": 0, "type": "table", "value": "product" }, { "id": 6, "type": "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
3,777
chinook_1
spider:train_spider.json:829
What is the average unit price of all the tracks?
SELECT AVG(UnitPrice) FROM TRACK
[ "What", "is", "the", "average", "unit", "price", "of", "all", "the", "tracks", "?" ]
[ { "id": 1, "type": "column", "value": "unitprice" }, { "id": 0, "type": "table", "value": "track" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
3,778
talkingdata
bird:train.json:1237
What is the most common age group among all device users?
SELECT T.num FROM ( SELECT `group`, COUNT(`group`) AS num FROM gender_age GROUP BY `group` ) T
[ "What", "is", "the", "most", "common", "age", "group", "among", "all", "device", "users", "?" ]
[ { "id": 1, "type": "table", "value": "gender_age" }, { "id": 2, "type": "column", "value": "group" }, { "id": 0, "type": "column", "value": "num" } ]
[ { "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" ]
3,779
document_management
spider:train_spider.json:4532
Count the number of users that are logged in.
SELECT count(*) FROM users WHERE user_login = 1
[ "Count", "the", "number", "of", "users", "that", "are", "logged", "in", "." ]
[ { "id": 1, "type": "column", "value": "user_login" }, { "id": 0, "type": "table", "value": "users" }, { "id": 2, "type": "value", "value": "1" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
3,780
warehouse_1
bird:test.json:1704
What are the different locations of warehouses?
SELECT count(DISTINCT LOCATION) FROM warehouses
[ "What", "are", "the", "different", "locations", "of", "warehouses", "?" ]
[ { "id": 0, "type": "table", "value": "warehouses" }, { "id": 1, "type": "column", "value": "location" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
3,781
aan_1
bird:test.json:1003
How many reference papers does paper with id D12-1027 have?
SELECT count(*) FROM Citation WHERE paper_id = "D12-1027"
[ "How", "many", "reference", "papers", "does", "paper", "with", "i", "d", "D12", "-", "1027", "have", "?" ]
[ { "id": 0, "type": "table", "value": "citation" }, { "id": 1, "type": "column", "value": "paper_id" }, { "id": 2, "type": "column", "value": "D12-1027" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 9, 10, 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O" ]
3,782
music_tracker
bird:train.json:2060
How many releases by the artist michael jackson are tagged "pop"?
SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.artist = 'michael jackson'
[ "How", "many", "releases", "by", "the", "artist", "michael", "jackson", "are", "tagged", "\"", "pop", "\"", "?" ]
[ { "id": 7, "type": "value", "value": "michael jackson" }, { "id": 2, "type": "column", "value": "groupname" }, { "id": 0, "type": "table", "value": "torrents" }, { "id": 6, "type": "column", "value": "artist" }, { "id": 1, "type": "table", ...
[ { "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": [ 9 ] }, { "entity_id": 5, "token_idxs": [ 11 ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
3,783
cs_semester
bird:train.json:881
How many courses does Alvera McQuillin take?
SELECT COUNT(T1.course_id) FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.f_name = 'Alvera' AND T2.l_name = 'McQuillin'
[ "How", "many", "courses", "does", "Alvera", "McQuillin", "take", "?" ]
[ { "id": 0, "type": "table", "value": "registration" }, { "id": 3, "type": "column", "value": "student_id" }, { "id": 2, "type": "column", "value": "course_id" }, { "id": 7, "type": "value", "value": "McQuillin" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 4 ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "O", "O" ]
3,784
airline
bird:train.json:5871
How many hours in total did all of the Delta Air Lines aircraft were delayed due to a late aircraft in August of 2018? Identify the plane number of the aircraft with the highest delayed hours.
SELECT T1.TAIL_NUM, SUM(CAST(T1.LATE_AIRCRAFT_DELAY AS REAL) / 60) AS delay FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T2.Code = T1.OP_CARRIER_AIRLINE_ID WHERE T1.FL_DATE LIKE '2018/8/%' AND T2.Description = 'Delta Air Lines Inc.: DL' ORDER BY delay DESC LIMIT 1
[ "How", "many", "hours", "in", "total", "did", "all", "of", "the", "Delta", "Air", "Lines", "aircraft", "were", "delayed", "due", "to", "a", "late", "aircraft", "in", "August", "of", "2018", "?", "Identify", "the", "plane", "number", "of", "the", "aircraf...
[ { "id": 9, "type": "value", "value": "Delta Air Lines Inc.: DL" }, { "id": 5, "type": "column", "value": "op_carrier_airline_id" }, { "id": 11, "type": "column", "value": "late_aircraft_delay" }, { "id": 2, "type": "table", "value": "Air Carriers" }, {...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10, 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "t...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,785
video_games
bird:train.json:3307
How many more games were sold on game platform ID 50 than on game platform ID 51 in region ID 1?
SELECT (SUM(CASE WHEN T.game_platform_id = 50 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.game_platform_id = 51 THEN T.num_sales ELSE 0 END)) * 100000 AS nums FROM region_sales AS T WHERE T.region_id = 1
[ "How", "many", "more", "games", "were", "sold", "on", "game", "platform", "ID", "50", "than", "on", "game", "platform", "ID", "51", "in", "region", "ID", "1", "?" ]
[ { "id": 6, "type": "column", "value": "game_platform_id" }, { "id": 0, "type": "table", "value": "region_sales" }, { "id": 1, "type": "column", "value": "region_id" }, { "id": 5, "type": "column", "value": "num_sales" }, { "id": 3, "type": "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 18, 19 ] }, { "entity_id": 2, "token_idxs": [ 20 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
3,786
flight_4
spider:train_spider.json:6850
How many airports are there per city in the US ordered from most to least?
SELECT count(*) , city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY count(*) DESC
[ "How", "many", "airports", "are", "there", "per", "city", "in", "the", "US", "ordered", "from", "most", "to", "least", "?" ]
[ { "id": 3, "type": "value", "value": "United States" }, { "id": 0, "type": "table", "value": "airports" }, { "id": 2, "type": "column", "value": "country" }, { "id": 1, "type": "column", "value": "city" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,787
government_shift
bird:test.json:368
Which customer has used the most types of services ? Give me the customer details .
select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id group by t1.customer_details order by count(*) desc limit 1
[ "Which", "customer", "has", "used", "the", "most", "types", "of", "services", "?", "Give", "me", "the", "customer", "details", "." ]
[ { "id": 2, "type": "table", "value": "customers_and_services" }, { "id": 0, "type": "column", "value": "customer_details" }, { "id": 3, "type": "column", "value": "customer_id" }, { "id": 1, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
3,789
olympics
bird:train.json:4959
What is the name of the competitor who has won the most medals?
SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T4.id != 4 GROUP BY T1.full_name ORDER BY COUNT(T4.id) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "competitor", "who", "has", "won", "the", "most", "medals", "?" ]
[ { "id": 4, "type": "table", "value": "competitor_event" }, { "id": 7, "type": "table", "value": "games_competitor" }, { "id": 8, "type": "column", "value": "competitor_id" }, { "id": 0, "type": "column", "value": "full_name" }, { "id": 9, "type...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
3,790
works_cycles
bird:train.json:7050
How many product maintenance documents are private?
SELECT COUNT(DocumentNode) FROM Document WHERE DocumentSummary IS NULL
[ "How", "many", "product", "maintenance", "documents", "are", "private", "?" ]
[ { "id": 1, "type": "column", "value": "documentsummary" }, { "id": 2, "type": "column", "value": "documentnode" }, { "id": 0, "type": "table", "value": "document" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "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", "B-TABLE", "B-COLUMN", "O", "O" ]
3,791
student_1
spider:train_spider.json:4055
What are the first name and last name of all the teachers?
SELECT DISTINCT firstname , lastname FROM teachers
[ "What", "are", "the", "first", "name", "and", "last", "name", "of", "all", "the", "teachers", "?" ]
[ { "id": 1, "type": "column", "value": "firstname" }, { "id": 0, "type": "table", "value": "teachers" }, { "id": 2, "type": "column", "value": "lastname" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "e...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
3,792
movie_platform
bird:train.json:133
Which 1988 movie got the most ratings?
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 1988 ORDER BY T1.rating_score DESC LIMIT 1
[ "Which", "1988", "movie", "got", "the", "most", "ratings", "?" ]
[ { "id": 3, "type": "column", "value": "movie_release_year" }, { "id": 5, "type": "column", "value": "rating_score" }, { "id": 0, "type": "column", "value": "movie_title" }, { "id": 6, "type": "column", "value": "movie_id" }, { "id": 1, "type": ...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { ...
[ "O", "B-VALUE", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O" ]
3,793
flight_4
spider:train_spider.json:6848
What is the number of airports per country, ordered from most to least?
SELECT count(*) , country FROM airports GROUP BY country ORDER BY count(*) DESC
[ "What", "is", "the", "number", "of", "airports", "per", "country", ",", "ordered", "from", "most", "to", "least", "?" ]
[ { "id": 0, "type": "table", "value": "airports" }, { "id": 1, "type": "column", "value": "country" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
3,794
retails
bird:train.json:6762
What is the average number of items shipped each day in April of 1994?
SELECT AVG(l_linenumber) FROM lineitem WHERE l_shipdate BETWEEN '1994-01-01' AND '1994-01-30'
[ "What", "is", "the", "average", "number", "of", "items", "shipped", "each", "day", "in", "April", "of", "1994", "?" ]
[ { "id": 4, "type": "column", "value": "l_linenumber" }, { "id": 1, "type": "column", "value": "l_shipdate" }, { "id": 2, "type": "value", "value": "1994-01-01" }, { "id": 3, "type": "value", "value": "1994-01-30" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
3,795
department_store
spider:train_spider.json:4751
Return the names and ids of all products whose price is between 600 and 700.
SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700
[ "Return", "the", "names", "and", "ids", "of", "all", "products", "whose", "price", "is", "between", "600", "and", "700", "." ]
[ { "id": 3, "type": "column", "value": "product_price" }, { "id": 1, "type": "column", "value": "product_name" }, { "id": 2, "type": "column", "value": "product_id" }, { "id": 0, "type": "table", "value": "products" }, { "id": 4, "type": "value"...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id"...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
3,796
tracking_orders
spider:train_spider.json:6907
Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?
SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= "1975-01-01" AND T1.date_order_placed <= "1976-01-01"
[ "Give", "me", "a", "list", "of", "distinct", "product", "ids", "from", "orders", "placed", "between", "1975", "-", "01", "-", "01", "and", "1976", "-", "01", "-", "01", "?" ]
[ { "id": 4, "type": "column", "value": "date_order_placed" }, { "id": 2, "type": "table", "value": "order_items" }, { "id": 0, "type": "column", "value": "product_id" }, { "id": 5, "type": "column", "value": "1975-01-01" }, { "id": 6, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 6, 7 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id"...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
3,797
legislator
bird:train.json:4802
Compare the number of legislators who started the term in 1875 and 2005.
SELECT SUM(CASE WHEN `current-terms`.start LIKE '2005%' THEN 1 ELSE 0 END) - ( SELECT SUM(CASE WHEN start LIKE '1875%' THEN 1 ELSE 0 END) FROM `historical-terms` ) FROM `current-terms`
[ "Compare", "the", "number", "of", "legislators", "who", "started", "the", "term", "in", "1875", "and", "2005", "." ]
[ { "id": 2, "type": "table", "value": "historical-terms" }, { "id": 0, "type": "table", "value": "current-terms" }, { "id": 4, "type": "column", "value": "start" }, { "id": 5, "type": "value", "value": "2005%" }, { "id": 6, "type": "value", ...
[ { "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": [ 6 ] }, { "entity_id": 5, "token_idxs": [ 12 ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
3,798
world
bird:train.json:7889
What is the district of Zaanstad?
SELECT District FROM City WHERE name = 'Zaanstad'
[ "What", "is", "the", "district", "of", "Zaanstad", "?" ]
[ { "id": 1, "type": "column", "value": "district" }, { "id": 3, "type": "value", "value": "Zaanstad" }, { "id": 0, "type": "table", "value": "city" }, { "id": 2, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
3,799
retail_world
bird:train.json:6299
Which phone number should I call if I want to reach Nancy Davolio's home?
SELECT HomePhone FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy'
[ "Which", "phone", "number", "should", "I", "call", "if", "I", "want", "to", "reach", "Nancy", "Davolio", "'s", "home", "?" ]
[ { "id": 0, "type": "table", "value": "employees" }, { "id": 1, "type": "column", "value": "homephone" }, { "id": 4, "type": "column", "value": "firstname" }, { "id": 2, "type": "column", "value": "lastname" }, { "id": 3, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O" ]
3,800
cre_Theme_park
spider:train_spider.json:5942
What are the details of the three most expensive hotels?
SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3
[ "What", "are", "the", "details", "of", "the", "three", "most", "expensive", "hotels", "?" ]
[ { "id": 1, "type": "column", "value": "other_hotel_details" }, { "id": 2, "type": "column", "value": "price_range" }, { "id": 0, "type": "table", "value": "hotels" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
3,801
customers_and_invoices
spider:train_spider.json:1586
What are the ids for transactions that have an amount greater than the average amount of a transaction?
SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT avg(transaction_amount) FROM Financial_transactions)
[ "What", "are", "the", "ids", "for", "transactions", "that", "have", "an", "amount", "greater", "than", "the", "average", "amount", "of", "a", "transaction", "?" ]
[ { "id": 0, "type": "table", "value": "financial_transactions" }, { "id": 2, "type": "column", "value": "transaction_amount" }, { "id": 1, "type": "column", "value": "transaction_id" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 17 ] }, { "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-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,802
video_game
bird:test.json:1949
Please show the names and rank of players that have played the game titled "Super Mario World".
SELECT T3.Player_name , T3.rank_of_the_year FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T1.Title = "Super Mario World"
[ "Please", "show", "the", "names", "and", "rank", "of", "players", "that", "have", "played", "the", "game", "titled", "\"", "Super", "Mario", "World", "\"", "." ]
[ { "id": 4, "type": "column", "value": "Super Mario World" }, { "id": 1, "type": "column", "value": "rank_of_the_year" }, { "id": 0, "type": "column", "value": "player_name" }, { "id": 6, "type": "table", "value": "game_player" }, { "id": 7, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 15, 16, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O" ]
3,803
retail_world
bird:train.json:6505
How many sales representatives whose salaries are higher than 2000?
SELECT COUNT(Title) FROM Employees WHERE Salary > 2000 AND Title = 'Sales Representative'
[ "How", "many", "sales", "representatives", "whose", "salaries", "are", "higher", "than", "2000", "?" ]
[ { "id": 4, "type": "value", "value": "Sales Representative" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 2, "type": "column", "value": "salary" }, { "id": 1, "type": "column", "value": "title" }, { "id": 3, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 2, 3 ] }, { "entity_id":...
[ "O", "O", "B-VALUE", "I-VALUE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
3,804
movies_4
bird:train.json:408
Please list the names of the production company of the movie "Four Rooms".
SELECT T1.company_name FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T3.title = 'Four Rooms'
[ "Please", "list", "the", "names", "of", "the", "production", "company", "of", "the", "movie", "\"", "Four", "Rooms", "\"", "." ]
[ { "id": 4, "type": "table", "value": "production_company" }, { "id": 5, "type": "table", "value": "movie_company" }, { "id": 0, "type": "column", "value": "company_name" }, { "id": 3, "type": "value", "value": "Four Rooms" }, { "id": 7, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12, 13 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_i...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O" ]
3,805
superhero
bird:dev.json:742
How many vampire superheroes are there?
SELECT COUNT(T1.superhero_name) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Vampire'
[ "How", "many", "vampire", "superheroes", "are", "there", "?" ]
[ { "id": 4, "type": "column", "value": "superhero_name" }, { "id": 0, "type": "table", "value": "superhero" }, { "id": 3, "type": "value", "value": "Vampire" }, { "id": 5, "type": "column", "value": "race_id" }, { "id": 1, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O" ]
3,806
sales_in_weather
bird:train.json:8214
What is the difference between the units sold for item 1 when the sunset was the earliest and the latest?
SELECT ( SELECT SUM(T2.units) AS sumunit FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 5 AND sunset IS NOT NULL GROUP BY T1.sunset ORDER BY T1.sunset LIMIT 1 ) - ( SELECT SUM(T2.units) AS sumunit FROM weather AS...
[ "What", "is", "the", "difference", "between", "the", "units", "sold", "for", "item", "1", "when", "the", "sunset", "was", "the", "earliest", "and", "the", "latest", "?" ]
[ { "id": 4, "type": "table", "value": "sales_in_weather" }, { "id": 5, "type": "column", "value": "store_nbr" }, { "id": 1, "type": "table", "value": "relation" }, { "id": 6, "type": "column", "value": "item_nbr" }, { "id": 3, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 14, 15 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
3,807
sales_in_weather
bird:train.json:8197
What is the maximum average speed?
SELECT MAX(avgspeed) FROM weather
[ "What", "is", "the", "maximum", "average", "speed", "?" ]
[ { "id": 1, "type": "column", "value": "avgspeed" }, { "id": 0, "type": "table", "value": "weather" } ]
[ { "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": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
3,808
music_2
spider:train_spider.json:5200
Find all the songs whose name contains the word "the".
SELECT title FROM songs WHERE title LIKE '% the %'
[ "Find", "all", "the", "songs", "whose", "name", "contains", "the", "word", "\"", "the", "\"", "." ]
[ { "id": 2, "type": "value", "value": "% the %" }, { "id": 0, "type": "table", "value": "songs" }, { "id": 1, "type": "column", "value": "title" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O" ]
3,809
hockey
bird:train.json:7749
Between 1917 to 1920, what are the names of the team who ranked first in the first half of the season each year?
SELECT DISTINCT T2.name FROM TeamsHalf AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.half = 1 AND T1.rank = 1 AND T1.year BETWEEN 1917 AND 1920
[ "Between", "1917", "to", "1920", ",", "what", "are", "the", "names", "of", "the", "team", "who", "ranked", "first", "in", "the", "first", "half", "of", "the", "season", "each", "year", "?" ]
[ { "id": 1, "type": "table", "value": "teamshalf" }, { "id": 2, "type": "table", "value": "teams" }, { "id": 0, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "half" }, { "id": 5, "type": "column", "value": "rank"...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,810
music_tracker
bird:train.json:2058
Please list the titles of all the releases with the tag "1980s".
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'
[ "Please", "list", "the", "titles", "of", "all", "the", "releases", "with", "the", "tag", "\"", "1980s", "\"", "." ]
[ { "id": 0, "type": "column", "value": "groupname" }, { "id": 1, "type": "table", "value": "torrents" }, { "id": 4, "type": "value", "value": "1980s" }, { "id": 2, "type": "table", "value": "tags" }, { "id": 3, "type": "column", "value": "ta...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O" ]
3,812
company_1
spider:train_spider.json:2134
Find the names of departments that are located in Houston.
SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber = t2.dnumber WHERE t2.dlocation = 'Houston'
[ "Find", "the", "names", "of", "departments", "that", "are", "located", "in", "Houston", "." ]
[ { "id": 2, "type": "table", "value": "dept_locations" }, { "id": 1, "type": "table", "value": "department" }, { "id": 3, "type": "column", "value": "dlocation" }, { "id": 4, "type": "value", "value": "Houston" }, { "id": 5, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
3,813
movie_3
bird:train.json:9345
How many Italian film titles were special featured with deleted scenes?
SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN `language` AS T2 ON T1.language_id = T2.language_id WHERE T2.`name` = 'Italian' AND T1.special_features = 'deleted scenes'
[ "How", "many", "Italian", "film", "titles", "were", "special", "featured", "with", "deleted", "scenes", "?" ]
[ { "id": 6, "type": "column", "value": "special_features" }, { "id": 7, "type": "value", "value": "deleted scenes" }, { "id": 3, "type": "column", "value": "language_id" }, { "id": 1, "type": "table", "value": "language" }, { "id": 2, "type": "c...
[ { "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": [ 2 ...
[ "O", "O", "B-VALUE", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "I-VALUE", "O" ]
3,815
customer_complaints
spider:train_spider.json:5792
What is the average price of the products for each category?
SELECT avg(product_price) , product_category_code FROM products GROUP BY product_category_code
[ "What", "is", "the", "average", "price", "of", "the", "products", "for", "each", "category", "?" ]
[ { "id": 1, "type": "column", "value": "product_category_code" }, { "id": 2, "type": "column", "value": "product_price" }, { "id": 0, "type": "table", "value": "products" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5,...
[ "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
3,816
works_cycles
bird:train.json:7075
Please list the credit card IDs of the employees who work as store contact.
SELECT T2.CreditCardID FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'SC'
[ "Please", "list", "the", "credit", "card", "IDs", "of", "the", "employees", "who", "work", "as", "store", "contact", "." ]
[ { "id": 2, "type": "table", "value": "personcreditcard" }, { "id": 5, "type": "column", "value": "businessentityid" }, { "id": 0, "type": "column", "value": "creditcardid" }, { "id": 3, "type": "column", "value": "persontype" }, { "id": 1, "typ...
[ { "entity_id": 0, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_id...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,817
mondial_geo
bird:train.json:8344
Provide all rivers name and length in USA.
SELECT DISTINCT T3.Name, T3.Length FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T2.Country = 'USA'
[ "Provide", "all", "rivers", "name", "and", "length", "in", "USA", "." ]
[ { "id": 3, "type": "column", "value": "country" }, { "id": 6, "type": "table", "value": "located" }, { "id": 1, "type": "column", "value": "length" }, { "id": 2, "type": "table", "value": "river" }, { "id": 7, "type": "column", "value": "ri...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
3,818
european_football_1
bird:train.json:2764
In how many matches in the Seria A division did both teams have equal goals?
SELECT COUNT(T1.FTR) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'Seria A' AND T1.FTR = 'D'
[ "In", "how", "many", "matches", "in", "the", "Seria", "A", "division", "did", "both", "teams", "have", "equal", "goals", "?" ]
[ { "id": 1, "type": "table", "value": "divisions" }, { "id": 4, "type": "column", "value": "division" }, { "id": 6, "type": "value", "value": "Seria A" }, { "id": 0, "type": "table", "value": "matchs" }, { "id": 5, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
3,819
card_games
bird:dev.json:381
List down the name of artists for cards in Chinese Simplified.
SELECT T1.artist FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Chinese Simplified'
[ "List", "down", "the", "name", "of", "artists", "for", "cards", "in", "Chinese", "Simplified", "." ]
[ { "id": 4, "type": "value", "value": "Chinese Simplified" }, { "id": 2, "type": "table", "value": "foreign_data" }, { "id": 3, "type": "column", "value": "language" }, { "id": 0, "type": "column", "value": "artist" }, { "id": 1, "type": "table"...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9, 10 ] }, { "entity_id"...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O" ]
3,820
retail_world
bird:train.json:6339
For the order from "HILAA" on 1997/12/25, what was the total quantity of the products in that order?
SELECT SUM(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.CustomerID = 'HILAA' AND T1.OrderDate LIKE '1997-12-25%'
[ "For", "the", "order", "from", "\"", "HILAA", "\"", "on", "1997/12/25", ",", "what", "was", "the", "total", "quantity", "of", "the", "products", "in", "that", "order", "?" ]
[ { "id": 1, "type": "table", "value": "Order Details" }, { "id": 7, "type": "value", "value": "1997-12-25%" }, { "id": 4, "type": "column", "value": "customerid" }, { "id": 6, "type": "column", "value": "orderdate" }, { "id": 2, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 20 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
3,821
retail_world
bird:train.json:6498
What is the average unit price of Tokyo Traders' products?
SELECT SUM(T1.UnitPrice) / COUNT(T2.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Tokyo Traders'
[ "What", "is", "the", "average", "unit", "price", "of", "Tokyo", "Traders", "'", "products", "?" ]
[ { "id": 3, "type": "value", "value": "Tokyo Traders" }, { "id": 2, "type": "column", "value": "companyname" }, { "id": 4, "type": "column", "value": "supplierid" }, { "id": 1, "type": "table", "value": "suppliers" }, { "id": 5, "type": "column"...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "B-TABLE", "O" ]
3,822
company_employee
spider:train_spider.json:4104
Show the headquarters that have at least two companies.
SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2
[ "Show", "the", "headquarters", "that", "have", "at", "least", "two", "companies", "." ]
[ { "id": 1, "type": "column", "value": "headquarters" }, { "id": 0, "type": "table", "value": "company" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
3,823
airline
bird:train.json:5821
Among the flights on 2018/8/1, how many of them departed from an airport in New York?
SELECT COUNT(*) FROM Airlines WHERE FL_DATE = '2018/8/1' AND ORIGIN = 'JFK'
[ "Among", "the", "flights", "on", "2018/8/1", ",", "how", "many", "of", "them", "departed", "from", "an", "airport", "in", "New", "York", "?" ]
[ { "id": 0, "type": "table", "value": "airlines" }, { "id": 2, "type": "value", "value": "2018/8/1" }, { "id": 1, "type": "column", "value": "fl_date" }, { "id": 3, "type": "column", "value": "origin" }, { "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": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,824
musical
spider:train_spider.json:241
What are the names of actors who are not 20 years old?
SELECT Name FROM actor WHERE Age != 20
[ "What", "are", "the", "names", "of", "actors", "who", "are", "not", "20", "years", "old", "?" ]
[ { "id": 0, "type": "table", "value": "actor" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "age" }, { "id": 3, "type": "value", "value": "20" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O" ]
3,825
disney
bird:train.json:4716
The main character Elsa is voiced by which actor and who is the director of the movie?
SELECT T1.`voice-actor`, T3.director FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title INNER JOIN director AS T3 ON T2.movie_title = T3.name WHERE T2.hero = 'Elsa'
[ "The", "main", "character", "Elsa", "is", "voiced", "by", "which", "actor", "and", "who", "is", "the", "director", "of", "the", "movie", "?" ]
[ { "id": 5, "type": "table", "value": "voice-actors" }, { "id": 0, "type": "column", "value": "voice-actor" }, { "id": 7, "type": "column", "value": "movie_title" }, { "id": 6, "type": "table", "value": "characters" }, { "id": 1, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id"...
[ "O", "O", "B-TABLE", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
3,826
olympics
bird:train.json:5045
List out the id of event that achieve the gold medal.
SELECT T2.event_id FROM medal AS T1 INNER JOIN competitor_event AS T2 ON T1.id = T2.medal_id WHERE T1.medal_name = 'Gold'
[ "List", "out", "the", "i", "d", "of", "event", "that", "achieve", "the", "gold", "medal", "." ]
[ { "id": 2, "type": "table", "value": "competitor_event" }, { "id": 3, "type": "column", "value": "medal_name" }, { "id": 0, "type": "column", "value": "event_id" }, { "id": 6, "type": "column", "value": "medal_id" }, { "id": 1, "type": "table",...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
3,827
world_development_indicators
bird:train.json:2215
What portion of the nations in Latin America and the Caribbean had more than 50% of their land used for agriculture in 1961?
SELECT CAST(SUM(CASE WHEN T1.Value > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.CountryCode) FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Year = 1961 AND T2.Region = 'Latin America & Caribbean' AND indicatorname = 'Agricultural land (% of land area)'
[ "What", "portion", "of", "the", "nations", "in", "Latin", "America", "and", "the", "Caribbean", "had", "more", "than", "50", "%", "of", "their", "land", "used", "for", "agriculture", "in", "1961", "?" ]
[ { "id": 8, "type": "value", "value": "Agricultural land (% of land area)" }, { "id": 6, "type": "value", "value": "Latin America & Caribbean" }, { "id": 7, "type": "column", "value": "indicatorname" }, { "id": 2, "type": "column", "value": "countrycode" ...
[ { "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": [ 23 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
3,828
bike_share_1
bird:train.json:9072
On the day with the hottest temperature ever in 2014, how many bike trips started from the station 2nd at Folsom?
SELECT COUNT(T1.start_station_name) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.date LIKE '%2014%' AND T2.zip_code = 94107 AND T1.start_station_name = '2nd at Folsom' ORDER BY T2.max_temperature_f DESC LIMIT 1
[ "On", "the", "day", "with", "the", "hottest", "temperature", "ever", "in", "2014", ",", "how", "many", "bike", "trips", "started", "from", "the", "station", "2nd", "at", "Folsom", "?" ]
[ { "id": 3, "type": "column", "value": "start_station_name" }, { "id": 2, "type": "column", "value": "max_temperature_f" }, { "id": 8, "type": "value", "value": "2nd at Folsom" }, { "id": 4, "type": "column", "value": "zip_code" }, { "id": 1, "t...
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "B-VALUE", "O" ]
3,829
ice_hockey_draft
bird:train.json:6994
Indicate the height of all players from team Oshawa Generals in inches.
SELECT T3.height_in_inch FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T2.TEAM = 'Oshawa Generals'
[ "Indicate", "the", "height", "of", "all", "players", "from", "team", "Oshawa", "Generals", "in", "inches", "." ]
[ { "id": 3, "type": "value", "value": "Oshawa Generals" }, { "id": 0, "type": "column", "value": "height_in_inch" }, { "id": 5, "type": "table", "value": "seasonstatus" }, { "id": 1, "type": "table", "value": "height_info" }, { "id": 4, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8, 9 ] }, { "entity_id": 4, "token_idxs": [ 5, 6 ] }, { "en...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "B-VALUE", "I-VALUE", "O", "O", "O" ]
3,830
wine_1
spider:train_spider.json:6555
What are the average prices of wines for different years?
SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR
[ "What", "are", "the", "average", "prices", "of", "wines", "for", "different", "years", "?" ]
[ { "id": 2, "type": "column", "value": "price" }, { "id": 0, "type": "table", "value": "wine" }, { "id": 1, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
3,831
college_2
spider:train_spider.json:1424
Find the title of course whose prerequisite is course Differential Geometry.
SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')
[ "Find", "the", "title", "of", "course", "whose", "prerequisite", "is", "course", "Differential", "Geometry", "." ]
[ { "id": 4, "type": "value", "value": "Differential Geometry" }, { "id": 2, "type": "column", "value": "course_id" }, { "id": 5, "type": "column", "value": "prereq_id" }, { "id": 0, "type": "table", "value": "course" }, { "id": 3, "type": "table...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 9, 10 ] }, { ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-TABLE", "B-VALUE", "I-VALUE", "O" ]
3,832
shakespeare
bird:train.json:3045
What is the percentage of act number 5 in Titus Andronicus?
SELECT CAST(SUM(IIF(T2.act = 5, 1, 0)) AS REAL) * 100 / COUNT(T2.act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Titus Andronicus'
[ "What", "is", "the", "percentage", "of", "act", "number", "5", "in", "Titus", "Andronicus", "?" ]
[ { "id": 3, "type": "value", "value": "Titus Andronicus" }, { "id": 1, "type": "table", "value": "chapters" }, { "id": 5, "type": "column", "value": "work_id" }, { "id": 0, "type": "table", "value": "works" }, { "id": 2, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-COLUMN", "B-VALUE", "O" ]
3,833
school_player
spider:train_spider.json:4896
Show the nicknames of schools that are not in division 1.
SELECT Nickname FROM school_details WHERE Division != "Division 1"
[ "Show", "the", "nicknames", "of", "schools", "that", "are", "not", "in", "division", "1", "." ]
[ { "id": 0, "type": "table", "value": "school_details" }, { "id": 3, "type": "column", "value": "Division 1" }, { "id": 1, "type": "column", "value": "nickname" }, { "id": 2, "type": "column", "value": "division" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
3,834
synthea
bird:train.json:1482
How many male patients are diagnosed with hypertension as compared to female patients?
SELECT COUNT(DISTINCT CASE WHEN T2.gender = 'M' THEN T2.patient END) AS Male , COUNT(DISTINCT CASE WHEN T2.gender = 'F' THEN T2.patient END) AS Female FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Hypertension'
[ "How", "many", "male", "patients", "are", "diagnosed", "with", "hypertension", "as", "compared", "to", "female", "patients", "?" ]
[ { "id": 3, "type": "value", "value": "Hypertension" }, { "id": 2, "type": "column", "value": "description" }, { "id": 0, "type": "table", "value": "conditions" }, { "id": 1, "type": "table", "value": "patients" }, { "id": 4, "type": "column", ...
[ { "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": [ 12 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,835
customers_card_transactions
spider:train_spider.json:697
Show the number of customer cards.
SELECT count(*) FROM Customers_cards
[ "Show", "the", "number", "of", "customer", "cards", "." ]
[ { "id": 0, "type": "table", "value": "customers_cards" } ]
[ { "entity_id": 0, "token_idxs": [ 4, 5 ] }, { "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", "I-TABLE", "O" ]
3,836
olympics
bird:train.json:5042
What is the percentage of the people who are under 35 and participated in the summer season?
SELECT CAST(COUNT(CASE WHEN T2.age < 35 THEN 1 END) AS REAL) * 100 / COUNT(T2.games_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer'
[ "What", "is", "the", "percentage", "of", "the", "people", "who", "are", "under", "35", "and", "participated", "in", "the", "summer", "season", "?" ]
[ { "id": 1, "type": "table", "value": "games_competitor" }, { "id": 5, "type": "column", "value": "games_id" }, { "id": 2, "type": "column", "value": "season" }, { "id": 3, "type": "value", "value": "Summer" }, { "id": 0, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
3,837
riding_club
spider:train_spider.json:1729
Show the names of players coached by the rank 1 coach.
SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1
[ "Show", "the", "names", "of", "players", "coached", "by", "the", "rank", "1", "coach", "." ]
[ { "id": 4, "type": "table", "value": "player_coach" }, { "id": 0, "type": "column", "value": "player_name" }, { "id": 6, "type": "column", "value": "player_id" }, { "id": 7, "type": "column", "value": "coach_id" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "B-VALUE", "B-TABLE", "O" ]
3,838
professional_basketball
bird:train.json:2943
For the latest passing player who could play all the positions in the court, how many points did he have in his career?
SELECT SUM(T2.points) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T1.pos = 'C-F-G' GROUP BY T2.playerID, T2.year ORDER BY T2.year DESC LIMIT 1
[ "For", "the", "latest", "passing", "player", "who", "could", "play", "all", "the", "positions", "in", "the", "court", ",", "how", "many", "points", "did", "he", "have", "in", "his", "career", "?" ]
[ { "id": 3, "type": "table", "value": "players_teams" }, { "id": 0, "type": "column", "value": "playerid" }, { "id": 2, "type": "table", "value": "players" }, { "id": 6, "type": "column", "value": "points" }, { "id": 5, "type": "value", "val...
[ { "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": [ 17 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
3,839
cre_Doc_and_collections
bird:test.json:736
What are the names of the collections that are related to the collection named Best?
SELECT DISTINCT T4.Collection_Name FROM Collection_Subset_Members AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Related_Collection_ID = T2.Collection_ID JOIN Collections AS T3 ON T1.Collection_ID = T3.Collection_ID JOIN Collections AS T4 ON T2.Collection_ID = T4.Collection_ID WHERE T3.Collection_Name = "Best";
[ "What", "are", "the", "names", "of", "the", "collections", "that", "are", "related", "to", "the", "collection", "named", "Best", "?" ]
[ { "id": 4, "type": "table", "value": "collection_subset_members" }, { "id": 5, "type": "column", "value": "related_collection_id" }, { "id": 0, "type": "column", "value": "collection_name" }, { "id": 3, "type": "column", "value": "collection_id" }, { ...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "enti...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-COLUMN", "B-COLUMN", "B-COLUMN", "O" ]
3,840
bike_share_1
bird:train.json:9002
Among all the trips, which day had the most bikes borrowed? What was the average coldest temperature on that day?
SELECT T2.date, AVG(T2.min_temperature_f) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code GROUP BY T2.date ORDER BY COUNT(T1.start_date) DESC LIMIT 1
[ "Among", "all", "the", "trips", ",", "which", "day", "had", "the", "most", "bikes", "borrowed", "?", "What", "was", "the", "average", "coldest", "temperature", "on", "that", "day", "?" ]
[ { "id": 3, "type": "column", "value": "min_temperature_f" }, { "id": 5, "type": "column", "value": "start_date" }, { "id": 4, "type": "column", "value": "zip_code" }, { "id": 2, "type": "table", "value": "weather" }, { "id": 0, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 14, 15 ] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
3,842
world
bird:train.json:7899
How many cities are there in the country ruled by Kostis Stefanopoulos?
SELECT COUNT(DISTINCT T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.HeadOfState = 'Kostis Stefanopoulos'
[ "How", "many", "cities", "are", "there", "in", "the", "country", "ruled", "by", "Kostis", "Stefanopoulos", "?" ]
[ { "id": 3, "type": "value", "value": "Kostis Stefanopoulos" }, { "id": 2, "type": "column", "value": "headofstate" }, { "id": 5, "type": "column", "value": "countrycode" }, { "id": 1, "type": "table", "value": "country" }, { "id": 0, "type": "t...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O" ]
3,843
sales
bird:train.json:5444
How many customers are named Madison?
SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Madison'
[ "How", "many", "customers", "are", "named", "Madison", "?" ]
[ { "id": 3, "type": "column", "value": "customerid" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 1, "type": "column", "value": "firstname" }, { "id": 2, "type": "value", "value": "Madison" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
3,844
university_basketball
spider:train_spider.json:990
Return the primary conference of the school with the lowest acc percentage score.
SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1
[ "Return", "the", "primary", "conference", "of", "the", "school", "with", "the", "lowest", "acc", "percentage", "score", "." ]
[ { "id": 0, "type": "column", "value": "primary_conference" }, { "id": 2, "type": "table", "value": "basketball_match" }, { "id": 3, "type": "column", "value": "acc_percent" }, { "id": 1, "type": "table", "value": "university" }, { "id": 4, "typ...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
3,845
phone_1
spider:train_spider.json:1045
Find the details for all chip models.
SELECT * FROM chip_model
[ "Find", "the", "details", "for", "all", "chip", "models", "." ]
[ { "id": 0, "type": "table", "value": "chip_model" } ]
[ { "entity_id": 0, "token_idxs": [ 5, 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
3,846
country_language
bird:test.json:1395
What are the names of countries that do not have an official language?
SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages)
[ "What", "are", "the", "names", "of", "countries", "that", "do", "not", "have", "an", "official", "language", "?" ]
[ { "id": 3, "type": "table", "value": "official_languages" }, { "id": 4, "type": "column", "value": "country_id" }, { "id": 0, "type": "table", "value": "countries" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11, 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
3,847
inn_1
spider:train_spider.json:2587
Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.
SELECT Kids FROM Reservations WHERE CheckIn = "2010-09-21" AND FirstName = "DAMIEN" AND LastName = "TRACHSEL";
[ "Return", "the", "number", "of", "kids", "for", "the", "room", "reserved", "and", "checked", "in", "by", "DAMIEN", "TRACHSEL", "on", " ", "Sep", "21", ",", "2010", "." ]
[ { "id": 0, "type": "table", "value": "reservations" }, { "id": 3, "type": "column", "value": "2010-09-21" }, { "id": 4, "type": "column", "value": "firstname" }, { "id": 6, "type": "column", "value": "lastname" }, { "id": 7, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 8, 9 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
3,849
network_2
spider:train_spider.json:4431
What is the name of all the people who are older than at least one engineer? Order them by age.
SELECT name FROM Person WHERE age > (SELECT min(age) FROM person WHERE job = 'engineer') ORDER BY age
[ "What", "is", "the", "name", "of", "all", "the", "people", "who", "are", "older", "than", "at", "least", "one", "engineer", "?", "Order", "them", "by", "age", "." ]
[ { "id": 4, "type": "value", "value": "engineer" }, { "id": 0, "type": "table", "value": "person" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "age" }, { "id": 3, "type": "column", "value": "job" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 20 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 15 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O" ]
3,850
warehouse_1
bird:test.json:1694
What are the average and maximum values for each type of content in boxes?
SELECT avg(value) , max(value) , CONTENTS FROM boxes GROUP BY CONTENTS
[ "What", "are", "the", "average", "and", "maximum", "values", "for", "each", "type", "of", "content", "in", "boxes", "?" ]
[ { "id": 1, "type": "column", "value": "contents" }, { "id": 0, "type": "table", "value": "boxes" }, { "id": 2, "type": "column", "value": "value" } ]
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
3,851
retail_complains
bird:train.json:369
Give me the full birthdate, email and phone number of the youngest client in Indianapolis .
SELECT T1.year, T1.month, T1.day, T1.email, T1.phone FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' ORDER BY T1.year DESC, T1.month DESC, T1.day DESC LIMIT 1
[ "Give", "me", "the", "full", "birthdate", ",", "email", "and", "phone", "number", "of", "the", "youngest", "client", "in", "Indianapolis", "." ]
[ { "id": 8, "type": "value", "value": "Indianapolis" }, { "id": 9, "type": "column", "value": "district_id" }, { "id": 6, "type": "table", "value": "district" }, { "id": 5, "type": "table", "value": "client" }, { "id": 1, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
3,852
college_completion
bird:train.json:3693
Calculate the percentage of Black students in all private for profit institutions.
SELECT CAST(SUM(CASE WHEN T2.race = 'B' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.race = 'B' AND T1.control = 'Private for-profit'
[ "Calculate", "the", "percentage", "of", "Black", "students", "in", "all", "private", "for", "profit", "institutions", "." ]
[ { "id": 0, "type": "table", "value": "institution_details" }, { "id": 6, "type": "value", "value": "Private for-profit" }, { "id": 1, "type": "table", "value": "institution_grads" }, { "id": 8, "type": "column", "value": "grad_cohort" }, { "id": 5,...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O" ]
3,854
customer_deliveries
spider:train_spider.json:2854
Find the payment method that is used most frequently.
SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1
[ "Find", "the", "payment", "method", "that", "is", "used", "most", "frequently", "." ]
[ { "id": 1, "type": "column", "value": "payment_method" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O" ]
3,855
codebase_comments
bird:train.json:642
Please provide the id of the respository that the most people like.
SELECT Id FROM Repo WHERE Stars = ( SELECT MAX(Stars) FROM Repo )
[ "Please", "provide", "the", "i", "d", "of", "the", "respository", "that", "the", "most", "people", "like", "." ]
[ { "id": 2, "type": "column", "value": "stars" }, { "id": 0, "type": "table", "value": "repo" }, { "id": 1, "type": "column", "value": "id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,856
tracking_grants_for_research
spider:train_spider.json:4346
What is the total amount of grants given by each organisations? Also list the organisation id.
SELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_id
[ "What", "is", "the", "total", "amount", "of", "grants", "given", "by", "each", "organisations", "?", "Also", "list", "the", "organisation", "i", "d." ]
[ { "id": 1, "type": "column", "value": "organisation_id" }, { "id": 2, "type": "column", "value": "grant_amount" }, { "id": 0, "type": "table", "value": "grants" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 15, 16 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
3,857
card_games
bird:dev.json:434
How many sets are available just in Japanese and not in Magic: The Gathering Online?
SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.language = 'Japanese' AND (T1.mtgoCode IS NULL OR T1.mtgoCode = '')
[ "How", "many", "sets", "are", "available", "just", "in", "Japanese", "and", "not", "in", "Magic", ":", "The", "Gathering", "Online", "?" ]
[ { "id": 1, "type": "table", "value": "set_translations" }, { "id": 5, "type": "column", "value": "language" }, { "id": 6, "type": "value", "value": "Japanese" }, { "id": 7, "type": "column", "value": "mtgocode" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
3,858
video_games
bird:train.json:3469
What are the sales made by the games in Japan region?
SELECT SUM(CASE WHEN T2.region_name = 'Japan' THEN T1.num_sales ELSE 0 END) AS nums FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id
[ "What", "are", "the", "sales", "made", "by", "the", "games", "in", "Japan", "region", "?" ]
[ { "id": 0, "type": "table", "value": "region_sales" }, { "id": 6, "type": "column", "value": "region_name" }, { "id": 2, "type": "column", "value": "region_id" }, { "id": 5, "type": "column", "value": "num_sales" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 3 ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
3,859
region_building
bird:test.json:337
Show the capital of the region that has the most buildings.
SELECT T2.capital FROM building AS T1 JOIN region AS T2 ON T1.Region_ID = T2.Region_ID GROUP BY T1.Region_ID ORDER BY COUNT(*) DESC LIMIT 1
[ "Show", "the", "capital", "of", "the", "region", "that", "has", "the", "most", "buildings", "." ]
[ { "id": 0, "type": "column", "value": "region_id" }, { "id": 2, "type": "table", "value": "building" }, { "id": 1, "type": "column", "value": "capital" }, { "id": 3, "type": "table", "value": "region" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "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", "B-TABLE", "O" ]
3,860
csu_1
spider:train_spider.json:2330
Find the name of the campuses opened before 1800.
SELECT campus FROM campuses WHERE YEAR < 1800
[ "Find", "the", "name", "of", "the", "campuses", "opened", "before", "1800", "." ]
[ { "id": 0, "type": "table", "value": "campuses" }, { "id": 1, "type": "column", "value": "campus" }, { "id": 2, "type": "column", "value": "year" }, { "id": 3, "type": "value", "value": "1800" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
3,861
movie_1
spider:train_spider.json:2465
What is the title of the newest movie?
SELECT title FROM Movie WHERE YEAR = (SELECT max(YEAR) FROM Movie)
[ "What", "is", "the", "title", "of", "the", "newest", "movie", "?" ]
[ { "id": 0, "type": "table", "value": "movie" }, { "id": 1, "type": "column", "value": "title" }, { "id": 2, "type": "column", "value": "year" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
3,862
country_language
bird:test.json:1362
What are the names of languages that contain the word "ish"?
SELECT name FROM languages WHERE name LIKE "%ish%"
[ "What", "are", "the", "names", "of", "languages", "that", "contain", "the", "word", "\"", "ish", "\"", "?" ]
[ { "id": 0, "type": "table", "value": "languages" }, { "id": 2, "type": "column", "value": "%ish%" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
3,863
address_1
bird:test.json:818
What are the city codes of the cities with the maximum distance?
SELECT city1_code , city2_code FROM Direct_distance ORDER BY distance DESC LIMIT 1
[ "What", "are", "the", "city", "codes", "of", "the", "cities", "with", "the", "maximum", "distance", "?" ]
[ { "id": 0, "type": "table", "value": "direct_distance" }, { "id": 1, "type": "column", "value": "city1_code" }, { "id": 2, "type": "column", "value": "city2_code" }, { "id": 3, "type": "column", "value": "distance" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3, 4 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]