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
9,415
hockey
bird:train.json:7727
How many wins does the team have whose goaltender have the most number of successfully stopping the other team from scoring during the entire game?
SELECT SUM(W) FROM Goalies GROUP BY tmID ORDER BY SUM(SHO) DESC LIMIT 1
[ "How", "many", "wins", "does", "the", "team", "have", "whose", "goaltender", "have", "the", "most", "number", "of", "successfully", "stopping", "the", "other", "team", "from", "scoring", "during", "the", "entire", "game", "?" ]
[ { "id": 0, "type": "table", "value": "goalies" }, { "id": 1, "type": "column", "value": "tmid" }, { "id": 3, "type": "column", "value": "sho" }, { "id": 2, "type": "column", "value": "w" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 0 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,416
mental_health_survey
bird:train.json:4575
Betweeen 2016 to 2019, which year recorded the highest number of people with mental illness?
SELECT T1.SurveyID FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.SurveyID BETWEEN 2016 AND 2019 AND T2.questionid = 34 AND T1.AnswerText LIKE 'Yes' GROUP BY T1.SurveyID ORDER BY COUNT(T1.UserID) DESC LIMIT 1
[ "Betweeen", "2016", "to", "2019", ",", "which", "year", "recorded", "the", "highest", "number", "of", "people", "with", "mental", "illness", "?" ]
[ { "id": 3, "type": "column", "value": "questionid" }, { "id": 7, "type": "column", "value": "answertext" }, { "id": 0, "type": "column", "value": "surveyid" }, { "id": 2, "type": "table", "value": "question" }, { "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": [ 1 ] }, { "entity_id": 5, "token_idxs": [ 3 ...
[ "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,417
address
bird:train.json:5190
What percentage of households are in "Coroyell" out of its state?
SELECT CAST(SUM(CASE WHEN T1.county = 'CORYELL' THEN T2.households ELSE 0 END) AS REAL) * 100 / SUM(T2.households) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code
[ "What", "percentage", "of", "households", "are", "in", "\"", "Coroyell", "\"", "out", "of", "its", "state", "?" ]
[ { "id": 4, "type": "column", "value": "households" }, { "id": 1, "type": "table", "value": "zip_data" }, { "id": 2, "type": "column", "value": "zip_code" }, { "id": 0, "type": "table", "value": "country" }, { "id": 7, "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": [ 3 ] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "O" ]
9,418
sales_in_weather
bird:train.json:8167
Give the number of stores which opened on the weather station that recorded the fastest average wind speed.
SELECT COUNT(T.store_nbr) FROM ( SELECT DISTINCT store_nbr FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY avgspeed DESC LIMIT 1 ) ) T
[ "Give", "the", "number", "of", "stores", "which", "opened", "on", "the", "weather", "station", "that", "recorded", "the", "fastest", "average", "wind", "speed", "." ]
[ { "id": 2, "type": "column", "value": "station_nbr" }, { "id": 0, "type": "column", "value": "store_nbr" }, { "id": 1, "type": "table", "value": "relation" }, { "id": 4, "type": "column", "value": "avgspeed" }, { "id": 3, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 17 ] }, { "entit...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,419
cars
bird:train.json:3122
Among the cars introduced in 1977, provide the names and the horse powers of cars from Europe.
SELECT T1.car_name, T1.horsepower FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T2.model_year = 1977 AND T3.country = 'Europe'
[ "Among", "the", "cars", "introduced", "in", "1977", ",", "provide", "the", "names", "and", "the", "horse", "powers", "of", "cars", "from", "Europe", "." ]
[ { "id": 1, "type": "column", "value": "horsepower" }, { "id": 4, "type": "table", "value": "production" }, { "id": 7, "type": "column", "value": "model_year" }, { "id": 0, "type": "column", "value": "car_name" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 12, 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3, 4 ] }, { "...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "B-VALUE", "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
9,420
sales
bird:train.json:5365
Calculate the average quantity per sales from sales id 20 to 30.
SELECT AVG(Quantity) FROM Sales WHERE SalesID BETWEEN 20 AND 30
[ "Calculate", "the", "average", "quantity", "per", "sales", "from", "sales", "i", "d", "20", "to", "30", "." ]
[ { "id": 4, "type": "column", "value": "quantity" }, { "id": 1, "type": "column", "value": "salesid" }, { "id": 0, "type": "table", "value": "sales" }, { "id": 2, "type": "value", "value": "20" }, { "id": 3, "type": "value", "value": "30" ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 7, 8, 9 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-VALUE", "O", "B-VALUE", "O" ]
9,421
college_2
spider:train_spider.json:1448
Find the number and averaged salary of all instructors who are in the department with the highest budget.
SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1
[ "Find", "the", "number", "and", "averaged", "salary", "of", "all", "instructors", "who", "are", "in", "the", "department", "with", "the", "highest", "budget", "." ]
[ { "id": 0, "type": "table", "value": "instructor" }, { "id": 1, "type": "table", "value": "department" }, { "id": 4, "type": "column", "value": "dept_name" }, { "id": 2, "type": "column", "value": "budget" }, { "id": 3, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entit...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
9,422
simpson_episodes
bird:train.json:4275
What was the character that Dan Castellaneta did the voice over for and was awarded?
SELECT DISTINCT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.award LIKE '%Voice-Over%' AND T1.person = 'Dan Castellaneta';
[ "What", "was", "the", "character", "that", "Dan", "Castellaneta", "did", "the", "voice", "over", "for", "and", "was", "awarded", "?" ]
[ { "id": 7, "type": "value", "value": "Dan Castellaneta" }, { "id": 2, "type": "table", "value": "character_award" }, { "id": 5, "type": "value", "value": "%Voice-Over%" }, { "id": 0, "type": "column", "value": "character" }, { "id": 3, "type": ...
[ { "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": [ 14 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-COLUMN", "O" ]
9,423
movies_4
bird:train.json:523
How many movies were produced by "Eddie Murphy Productions"?
SELECT COUNT(T1.movie_id) FROM movie_company AS T1 INNER JOIN production_company AS T2 ON T1.company_id = T2.company_id WHERE T2.company_name = 'Eddie Murphy Productions'
[ "How", "many", "movies", "were", "produced", "by", "\"", "Eddie", "Murphy", "Productions", "\"", "?" ]
[ { "id": 3, "type": "value", "value": "Eddie Murphy Productions" }, { "id": 1, "type": "table", "value": "production_company" }, { "id": 0, "type": "table", "value": "movie_company" }, { "id": 2, "type": "column", "value": "company_name" }, { "id": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "B-TABLE", "O", "O" ]
9,424
cars
bird:train.json:3089
What is the percentage of Japanese cars in the database?
SELECT CAST(SUM(CASE WHEN T2.country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin
[ "What", "is", "the", "percentage", "of", "Japanese", "cars", "in", "the", "database", "?" ]
[ { "id": 0, "type": "table", "value": "production" }, { "id": 1, "type": "table", "value": "country" }, { "id": 2, "type": "column", "value": "country" }, { "id": 3, "type": "column", "value": "origin" }, { "id": 7, "type": "value", "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": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O" ]
9,425
cre_Doc_Tracking_DB
spider:train_spider.json:4183
What are all the location codes and location names?
SELECT location_code , location_name FROM Ref_locations
[ "What", "are", "all", "the", "location", "codes", "and", "location", "names", "?" ]
[ { "id": 0, "type": "table", "value": "ref_locations" }, { "id": 1, "type": "column", "value": "location_code" }, { "id": 2, "type": "column", "value": "location_name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,426
journal_committee
spider:train_spider.json:657
Show the distinct themes of journals.
SELECT DISTINCT Theme FROM journal
[ "Show", "the", "distinct", "themes", "of", "journals", "." ]
[ { "id": 0, "type": "table", "value": "journal" }, { "id": 1, "type": "column", "value": "theme" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
9,427
advertising_agencies
bird:test.json:2131
Show the meeting ids and the number of staff in each meeting.
SELECT meeting_id , count(*) FROM Staff_in_meetings GROUP BY meeting_id
[ "Show", "the", "meeting", "ids", "and", "the", "number", "of", "staff", "in", "each", "meeting", "." ]
[ { "id": 0, "type": "table", "value": "staff_in_meetings" }, { "id": 1, "type": "column", "value": "meeting_id" } ]
[ { "entity_id": 0, "token_idxs": [ 8, 9, 10, 11 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "I-TABLE", "O" ]
9,428
customers_and_orders
bird:test.json:244
What are the minimum, average, and maximum prices across all products?
SELECT min(product_price) , avg(product_price) , max(product_price) FROM Products
[ "What", "are", "the", "minimum", ",", "average", ",", "and", "maximum", "prices", "across", "all", "products", "?" ]
[ { "id": 1, "type": "column", "value": "product_price" }, { "id": 0, "type": "table", "value": "products" } ]
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,429
beer_factory
bird:train.json:5253
Show the credit card number of Lisa Ling.
SELECT DISTINCT T2.CreditCardNumber FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Lisa' AND T1.Last = 'Ling'
[ "Show", "the", "credit", "card", "number", "of", "Lisa", "Ling", "." ]
[ { "id": 0, "type": "column", "value": "creditcardnumber" }, { "id": 2, "type": "table", "value": "transaction" }, { "id": 3, "type": "column", "value": "customerid" }, { "id": 1, "type": "table", "value": "customers" }, { "id": 4, "type": "colu...
[ { "entity_id": 0, "token_idxs": [ 2, 3, 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_id...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-VALUE", "B-VALUE", "O" ]
9,430
online_exams
bird:test.json:195
List the distinct subject code of exams in ascending alphabetical order .
select distinct subject_code from exams order by subject_code asc
[ "List", "the", "distinct", "subject", "code", "of", "exams", "in", "ascending", "alphabetical", "order", "." ]
[ { "id": 1, "type": "column", "value": "subject_code" }, { "id": 0, "type": "table", "value": "exams" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "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", "B-TABLE", "O", "O", "O", "O", "O" ]
9,433
sakila_1
spider:train_spider.json:2944
Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.
SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'
[ "Find", "all", "the", "payment", "dates", "for", "the", "payments", "with", "an", "amount", "larger", "than", "10", "and", "the", "payments", "handled", "by", "a", "staff", "person", "with", "the", "first", "name", "Elsa", "." ]
[ { "id": 1, "type": "column", "value": "payment_date" }, { "id": 5, "type": "column", "value": "first_name" }, { "id": 7, "type": "column", "value": "staff_id" }, { "id": 0, "type": "table", "value": "payment" }, { "id": 2, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 20 ] }, ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
9,434
store_1
spider:train_spider.json:640
What are the tracks that Dean Peeters bought?
SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "Daan" AND T4.last_name = "Peeters";
[ "What", "are", "the", "tracks", "that", "Dean", "Peeters", "bought", "?" ]
[ { "id": 10, "type": "table", "value": "invoice_lines" }, { "id": 4, "type": "column", "value": "customer_id" }, { "id": 5, "type": "column", "value": "first_name" }, { "id": 11, "type": "column", "value": "invoice_id" }, { "id": 1, "type": "tab...
[ { "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", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "O", "O" ]
9,435
professional_basketball
bird:train.json:2831
Among the players who have won the award of Rookie of the year, what is the height of the tallest player?
SELECT T1.height FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' ORDER BY T1.height DESC LIMIT 1
[ "Among", "the", "players", "who", "have", "won", "the", "award", "of", "Rookie", "of", "the", "year", ",", "what", "is", "the", "height", "of", "the", "tallest", "player", "?" ]
[ { "id": 4, "type": "value", "value": "Rookie of the Year" }, { "id": 2, "type": "table", "value": "awards_players" }, { "id": 5, "type": "column", "value": "playerid" }, { "id": 1, "type": "table", "value": "players" }, { "id": 0, "type": "colu...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 9, 10, 11, ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O" ]
9,436
mondial_geo
bird:train.json:8269
Where country does Baghdad belongs to?
SELECT Name FROM country WHERE Province = 'Baghdad'
[ "Where", "country", "does", "Baghdad", "belongs", "to", "?" ]
[ { "id": 2, "type": "column", "value": "province" }, { "id": 0, "type": "table", "value": "country" }, { "id": 3, "type": "value", "value": "Baghdad" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "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", "O", "O" ]
9,437
toxicology
bird:dev.json:299
Is molecule TR124 carcinogenic?
SELECT T.label FROM molecule AS T WHERE T.molecule_id = 'TR124'
[ "Is", "molecule", "TR124", "carcinogenic", "?" ]
[ { "id": 2, "type": "column", "value": "molecule_id" }, { "id": 0, "type": "table", "value": "molecule" }, { "id": 1, "type": "column", "value": "label" }, { "id": 3, "type": "value", "value": "TR124" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "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", "B-TABLE", "B-VALUE", "O", "O" ]
9,438
image_and_language
bird:train.json:7489
What is the average difference in the y coordinate of 2 object samples with the relation "parked on" in image no.1?
SELECT CAST(SUM(T3.Y) AS REAL) / COUNT(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE NULL END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID
[ "What", "is", "the", "average", "difference", "in", "the", "y", "coordinate", "of", "2", "object", "samples", "with", "the", "relation", "\"", "parked", "on", "\"", "in", "image", "no.1", "?" ]
[ { "id": 3, "type": "column", "value": "obj1_sample_id" }, { "id": 7, "type": "column", "value": "obj2_sample_id" }, { "id": 8, "type": "column", "value": "pred_class_id" }, { "id": 1, "type": "table", "value": "pred_classes" }, { "id": 4, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 21 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "B-TABLE", "O", "O" ]
9,439
match_season
spider:train_spider.json:1109
Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender"
[ "Return", "the", "colleges", "that", "have", "players", "who", "play", "the", "Midfielder", "position", ",", "as", "well", "as", "players", "who", "play", "the", "Defender", "position", "." ]
[ { "id": 0, "type": "table", "value": "match_season" }, { "id": 3, "type": "column", "value": "Midfielder" }, { "id": 2, "type": "column", "value": "position" }, { "id": 4, "type": "column", "value": "Defender" }, { "id": 1, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 20 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "entit...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
9,441
driving_school
spider:train_spider.json:6659
What are the first and last names for all customers?
SELECT first_name , last_name FROM Customers;
[ "What", "are", "the", "first", "and", "last", "names", "for", "all", "customers", "?" ]
[ { "id": 1, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 2, "type": "column", "value": "last_name" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5, 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O" ]
9,442
loan_1
spider:train_spider.json:3054
Find the state which has the most number of customers.
SELECT state FROM bank GROUP BY state ORDER BY sum(no_of_customers) DESC LIMIT 1
[ "Find", "the", "state", "which", "has", "the", "most", "number", "of", "customers", "." ]
[ { "id": 2, "type": "column", "value": "no_of_customers" }, { "id": 1, "type": "column", "value": "state" }, { "id": 0, "type": "table", "value": "bank" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,443
law_episode
bird:train.json:1299
What roles have not been credited at the end of the episodes?
SELECT DISTINCT role FROM Credit WHERE credited = 'false'
[ "What", "roles", "have", "not", "been", "credited", "at", "the", "end", "of", "the", "episodes", "?" ]
[ { "id": 2, "type": "column", "value": "credited" }, { "id": 0, "type": "table", "value": "credit" }, { "id": 3, "type": "value", "value": "false" }, { "id": 1, "type": "column", "value": "role" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O" ]
9,444
coinmarketcap
bird:train.json:6273
Which crytocurrency had a bigger number of coins circulating in the market and in the general public's hands on 2013/4/28, Bitcoin or Litecoin?
SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-28' AND T1.name IN ('Bitcoin', 'Litecoin') ORDER BY T2.circulating_supply DESC LIMIT 1
[ "Which", "crytocurrency", "had", "a", "bigger", "number", "of", "coins", "circulating", "in", "the", "market", "and", "in", "the", "general", "public", "'s", "hands", "on", "2013/4/28", ",", "Bitcoin", "or", "Litecoin", "?" ]
[ { "id": 3, "type": "column", "value": "circulating_supply" }, { "id": 2, "type": "table", "value": "historical" }, { "id": 7, "type": "value", "value": "2013-04-28" }, { "id": 9, "type": "value", "value": "Litecoin" }, { "id": 5, "type": "colum...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "O" ]
9,445
menu
bird:train.json:5499
On the menu with the most dishes, how many dishes were there on its second page?
SELECT COUNT(T1.dish_id) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id WHERE T2.page_number = 2 GROUP BY T3.name ORDER BY T3.dish_count DESC LIMIT 1
[ "On", "the", "menu", "with", "the", "most", "dishes", ",", "how", "many", "dishes", "were", "there", "on", "its", "second", "page", "?" ]
[ { "id": 10, "type": "column", "value": "menu_page_id" }, { "id": 2, "type": "column", "value": "page_number" }, { "id": 4, "type": "column", "value": "dish_count" }, { "id": 6, "type": "table", "value": "menuitem" }, { "id": 7, "type": "table",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 10 ...
[ "O", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,447
donor
bird:train.json:3276
What percentage of projects in the City of Santa Barbara are in suburban metro?
SELECT CAST(SUM(CASE WHEN school_metro = 'suburban' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(projectid) FROM projects WHERE school_city = 'Santa Barbara'
[ "What", "percentage", "of", "projects", "in", "the", "City", "of", "Santa", "Barbara", "are", "in", "suburban", "metro", "?" ]
[ { "id": 2, "type": "value", "value": "Santa Barbara" }, { "id": 7, "type": "column", "value": "school_metro" }, { "id": 1, "type": "column", "value": "school_city" }, { "id": 4, "type": "column", "value": "projectid" }, { "id": 0, "type": "tabl...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
9,448
movie_3
bird:train.json:9294
Please list the titles of any three action films.
SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Action' LIMIT 3
[ "Please", "list", "the", "titles", "of", "any", "three", "action", "films", "." ]
[ { "id": 5, "type": "table", "value": "film_category" }, { "id": 6, "type": "column", "value": "category_id" }, { "id": 1, "type": "table", "value": "category" }, { "id": 7, "type": "column", "value": "film_id" }, { "id": 3, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
9,449
food_inspection_2
bird:train.json:6230
List point level of inspections with no fine.
SELECT DISTINCT T1.point_level FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.fine = 0
[ "List", "point", "level", "of", "inspections", "with", "no", "fine", "." ]
[ { "id": 1, "type": "table", "value": "inspection_point" }, { "id": 0, "type": "column", "value": "point_level" }, { "id": 2, "type": "table", "value": "violation" }, { "id": 5, "type": "column", "value": "point_id" }, { "id": 3, "type": "column...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O", "B-COLUMN", "O" ]
9,450
synthea
bird:train.json:1480
What care plans have been received by Mrs. Elly Koss during year 1970?
SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND strftime('%Y', T2.START) = '2013'
[ "What", "care", "plans", "have", "been", "received", "by", "Mrs.", "Elly", "Koss", "during", "year", "1970", "?" ]
[ { "id": 0, "type": "column", "value": "description" }, { "id": 2, "type": "table", "value": "careplans" }, { "id": 1, "type": "table", "value": "patients" }, { "id": 3, "type": "column", "value": "patient" }, { "id": 4, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 8 ...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O" ]
9,451
cre_Students_Information_Systems
bird:test.json:470
What are the achievement detail and the type description of each achievements?
SELECT T1.achievement_details , T2.achievement_type_description FROM Achievements AS T1 JOIN Ref_Achievement_Type AS T2 ON T1.achievement_type_code = T2.achievement_type_code
[ "What", "are", "the", "achievement", "detail", "and", "the", "type", "description", "of", "each", "achievements", "?" ]
[ { "id": 1, "type": "column", "value": "achievement_type_description" }, { "id": 4, "type": "column", "value": "achievement_type_code" }, { "id": 3, "type": "table", "value": "ref_achievement_type" }, { "id": 0, "type": "column", "value": "achievement_detai...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O" ]
9,452
car_retails
bird:train.json:1601
On what date did the customer with the lowest credit limit serviced by sales representative Barry Jones make payments for his/her orders?
SELECT T3.paymentDate FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN payments AS T3 ON T2.customerNumber = T3.customerNumber WHERE T1.firstName = 'Barry' AND T1.lastName = 'Jones' AND T1.jobTitle = 'Sales Rep' ORDER BY T2.creditLimit ASC LIMIT 1
[ "On", "what", "date", "did", "the", "customer", "with", "the", "lowest", "credit", "limit", "serviced", "by", "sales", "representative", "Barry", "Jones", "make", "payments", "for", "his", "/", "her", "orders", "?" ]
[ { "id": 13, "type": "column", "value": "salesrepemployeenumber" }, { "id": 5, "type": "column", "value": "customernumber" }, { "id": 12, "type": "column", "value": "employeenumber" }, { "id": 0, "type": "column", "value": "paymentdate" }, { "id": 2...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "entity_id": 2, "token_idxs": [ 9, 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "B-VALUE", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
9,453
superhero
bird:dev.json:723
Among the superheroes with blue eyes, how many of them have the super power of "Agility"?
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id INNER JOIN colour AS T4 ON T1.eye_colour_id = T4.id WHERE T3.power_name = 'Agility' AND T4.colour = 'Blue'
[ "Among", "the", "superheroes", "with", "blue", "eyes", ",", "how", "many", "of", "them", "have", "the", "super", "power", "of", "\"", "Agility", "\"", "?" ]
[ { "id": 3, "type": "column", "value": "eye_colour_id" }, { "id": 2, "type": "table", "value": "superpower" }, { "id": 4, "type": "column", "value": "power_name" }, { "id": 9, "type": "table", "value": "hero_power" }, { "id": 8, "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": [] }, { "entity_id": 5, "token_idxs": [ 17 ] }, { ...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
9,454
address
bird:train.json:5091
Among the residential areas with the bad alias "Internal Revenue Service", how many of them are in the Eastern time zone?
SELECT COUNT(T1.zip_code) FROM zip_data AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T2.bad_alias = 'Internal Revenue Service' AND T1.time_zone = 'Eastern'
[ "Among", "the", "residential", "areas", "with", "the", "bad", "alias", "\"", "Internal", "Revenue", "Service", "\"", ",", "how", "many", "of", "them", "are", "in", "the", "Eastern", "time", "zone", "?" ]
[ { "id": 4, "type": "value", "value": "Internal Revenue Service" }, { "id": 3, "type": "column", "value": "bad_alias" }, { "id": 5, "type": "column", "value": "time_zone" }, { "id": 0, "type": "table", "value": "zip_data" }, { "id": 2, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6, 7 ] }, { "entity_id": 4, "token_idxs": [ 9, 10, 11 ] }, { "enti...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O" ]
9,455
works_cycles
bird:train.json:7067
Please list the employees who have more than 20 vacations hours and wish to receive e-mail promotions.
SELECT T1.BusinessEntityID FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 1 AND T1.VacationHours > 20
[ "Please", "list", "the", "employees", "who", "have", "more", "than", "20", "vacations", "hours", "and", "wish", "to", "receive", "e", "-", "mail", "promotions", "." ]
[ { "id": 0, "type": "column", "value": "businessentityid" }, { "id": 3, "type": "column", "value": "emailpromotion" }, { "id": 5, "type": "column", "value": "vacationhours" }, { "id": 1, "type": "table", "value": "employee" }, { "id": 2, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 15, 16, 17, 18 ] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
9,456
cre_Theme_park
spider:train_spider.json:5960
Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS...
[ "Find", "the", "tourist", "attractions", "that", "have", "parking", "or", "shopping", "as", "their", "feature", "details", ".", "What", "are", "the", "names", "of", "the", "attractions", "?" ]
[ { "id": 6, "type": "table", "value": "tourist_attraction_features" }, { "id": 8, "type": "column", "value": "tourist_attraction_id" }, { "id": 5, "type": "table", "value": "tourist_attractions" }, { "id": 2, "type": "column", "value": "feature_details" }...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, ...
[ "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
9,457
farm
spider:train_spider.json:25
Give the average number of working horses on farms with more than 5000 total horses.
SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000
[ "Give", "the", "average", "number", "of", "working", "horses", "on", "farms", "with", "more", "than", "5000", "total", "horses", "." ]
[ { "id": 3, "type": "column", "value": "working_horses" }, { "id": 1, "type": "column", "value": "total_horses" }, { "id": 0, "type": "table", "value": "farm" }, { "id": 2, "type": "value", "value": "5000" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 13, 14 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-COLUMN", "I-COLUMN", "O" ]
9,458
flight_4
spider:train_spider.json:6813
Find the name of the airports located in Cuba or Argentina.
SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'
[ "Find", "the", "name", "of", "the", "airports", "located", "in", "Cuba", "or", "Argentina", "." ]
[ { "id": 4, "type": "value", "value": "Argentina" }, { "id": 0, "type": "table", "value": "airports" }, { "id": 2, "type": "column", "value": "country" }, { "id": 1, "type": "column", "value": "name" }, { "id": 3, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
9,460
voter_2
spider:train_spider.json:5450
Find the maximum age of all the students.
SELECT max(Age) FROM STUDENT
[ "Find", "the", "maximum", "age", "of", "all", "the", "students", "." ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "age" } ]
[ { "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" ]
9,461
authors
bird:train.json:3661
How many author published papers in the 'IEEE Computer' journal?
SELECT COUNT(T2.Name) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T3.FullName = 'IEEE Computer'
[ "How", "many", "author", "published", "papers", "in", "the", "'", "IEEE", "Computer", "'", "journal", "?" ]
[ { "id": 2, "type": "value", "value": "IEEE Computer" }, { "id": 5, "type": "table", "value": "paperauthor" }, { "id": 6, "type": "column", "value": "journalid" }, { "id": 1, "type": "column", "value": "fullname" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id"...
[ "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-TABLE", "O" ]
9,462
books
bird:train.json:6048
How many books written by Akira Watanabe are available on Gravity?
SELECT COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T1.author_id = T2.author_id WHERE T1.author_name = 'Akira Watanabe'
[ "How", "many", "books", "written", "by", "Akira", "Watanabe", "are", "available", "on", "Gravity", "?" ]
[ { "id": 3, "type": "value", "value": "Akira Watanabe" }, { "id": 1, "type": "table", "value": "book_author" }, { "id": 2, "type": "column", "value": "author_name" }, { "id": 4, "type": "column", "value": "author_id" }, { "id": 0, "type": "table...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O" ]
9,463
chicago_crime
bird:train.json:8747
Give the FBI code for the crime described by "The killing of one human being by another."
SELECT fbi_code_no FROM FBI_Code WHERE description = 'The killing of one human being by another.'
[ "Give", "the", "FBI", "code", "for", "the", "crime", "described", "by", "\"", "The", "killing", "of", "one", "human", "being", "by", "another", ".", "\"" ]
[ { "id": 3, "type": "value", "value": "The killing of one human being by another." }, { "id": 1, "type": "column", "value": "fbi_code_no" }, { "id": 2, "type": "column", "value": "description" }, { "id": 0, "type": "table", "value": "fbi_code" } ]
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 10, 11, 12, 13, 14, 15, 16, 17, 18 ...
[ "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
9,464
legislator
bird:train.json:4825
How many of the legislators are male?
SELECT COUNT(*) FROM current WHERE gender_bio = 'M'
[ "How", "many", "of", "the", "legislators", "are", "male", "?" ]
[ { "id": 1, "type": "column", "value": "gender_bio" }, { "id": 0, "type": "table", "value": "current" }, { "id": 2, "type": "value", "value": "M" } ]
[ { "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" ]
9,465
movie_3
bird:train.json:9355
What is the inventory ID of Karen Jackson?
SELECT T2.inventory_id FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'KAREN' AND T1.last_name = 'JACKSON'
[ "What", "is", "the", "inventory", "ID", "of", "Karen", "Jackson", "?" ]
[ { "id": 0, "type": "column", "value": "inventory_id" }, { "id": 3, "type": "column", "value": "customer_id" }, { "id": 4, "type": "column", "value": "first_name" }, { "id": 6, "type": "column", "value": "last_name" }, { "id": 1, "type": "table"...
[ { "entity_id": 0, "token_idxs": [ 3, 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", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "B-VALUE", "O" ]
9,466
shipping
bird:train.json:5680
What is the customer's address for the shipment with ship ID 1117?
SELECT T2.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T1.ship_id = '1117'
[ "What", "is", "the", "customer", "'s", "address", "for", "the", "shipment", "with", "ship", "ID", "1117", "?" ]
[ { "id": 1, "type": "table", "value": "shipment" }, { "id": 2, "type": "table", "value": "customer" }, { "id": 0, "type": "column", "value": "address" }, { "id": 3, "type": "column", "value": "ship_id" }, { "id": 5, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ 12 ...
[ "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "O" ]
9,467
store_1
spider:train_spider.json:587
What is the title, phone and hire date of Nancy Edwards?
SELECT title , phone , hire_date FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards";
[ "What", "is", "the", "title", ",", "phone", "and", "hire", "date", "of", "Nancy", "Edwards", "?" ]
[ { "id": 4, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 3, "type": "column", "value": "hire_date" }, { "id": 6, "type": "column", "value": "last_name" }, { "id": 7, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "B-COLUMN", "O" ]
9,468
cinema
spider:train_spider.json:1945
Show the title and director for all films.
SELECT title , directed_by FROM film
[ "Show", "the", "title", "and", "director", "for", "all", "films", "." ]
[ { "id": 2, "type": "column", "value": "directed_by" }, { "id": 1, "type": "column", "value": "title" }, { "id": 0, "type": "table", "value": "film" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "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-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
9,469
retail_complains
bird:train.json:397
Among the female clients that age between 20 to 40, list the date when their complaints were received.
SELECT DISTINCT T3.`Date received` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID INNER JOIN callcenterlogs AS T3 ON T2.`Complaint ID` = T3.`Complaint ID` WHERE T1.age BETWEEN 20 AND 40 AND T1.sex = 'Female'
[ "Among", "the", "female", "clients", "that", "age", "between", "20", "to", "40", ",", "list", "the", "date", "when", "their", "complaints", "were", "received", "." ]
[ { "id": 1, "type": "table", "value": "callcenterlogs" }, { "id": 0, "type": "column", "value": "Date received" }, { "id": 4, "type": "column", "value": "Complaint ID" }, { "id": 10, "type": "column", "value": "client_id" }, { "id": 2, "type": "...
[ { "entity_id": 0, "token_idxs": [ 17, 18 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "entity_i...
[ "O", "O", "B-VALUE", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O" ]
9,470
synthea
bird:train.json:1537
What is the care plan for the patient with social security number 999-15-3685?
SELECT DISTINCT T1.DESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ssn = '999-15-3685'
[ "What", "is", "the", "care", "plan", "for", "the", "patient", "with", "social", "security", "number", "999", "-", "15", "-", "3685", "?" ]
[ { "id": 0, "type": "column", "value": "description" }, { "id": 4, "type": "value", "value": "999-15-3685" }, { "id": 1, "type": "table", "value": "careplans" }, { "id": 2, "type": "table", "value": "patients" }, { "id": 5, "type": "column", ...
[ { "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": [ 12, 13, 14, 15, 16 ...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
9,471
genes
bird:train.json:2506
What type of interactions occurs in genes whose function is cellular transport and transport medicine and are classified as non-essential?
SELECT T2.Type FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T1.Function = 'TRANSCRIPTION' AND T1.Essential = 'Non-Essential'
[ "What", "type", "of", "interactions", "occurs", "in", "genes", "whose", "function", "is", "cellular", "transport", "and", "transport", "medicine", "and", "are", "classified", "as", "non", "-", "essential", "?" ]
[ { "id": 6, "type": "value", "value": "TRANSCRIPTION" }, { "id": 8, "type": "value", "value": "Non-Essential" }, { "id": 2, "type": "table", "value": "interactions" }, { "id": 7, "type": "column", "value": "essential" }, { "id": 5, "type": "colu...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "B-COLUMN", "O" ]
9,472
advertising_agencies
bird:test.json:2075
Show all sic codes and the number of clients with each code.
SELECT sic_code , count(*) FROM Clients GROUP BY sic_code
[ "Show", "all", "sic", "codes", "and", "the", "number", "of", "clients", "with", "each", "code", "." ]
[ { "id": 1, "type": "column", "value": "sic_code" }, { "id": 0, "type": "table", "value": "clients" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "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", "B-TABLE", "O", "O", "O", "O" ]
9,473
mountain_photos
spider:train_spider.json:3714
What are the maximum and average height of the mountains?
SELECT max(height) , avg(height) FROM mountain
[ "What", "are", "the", "maximum", "and", "average", "height", "of", "the", "mountains", "?" ]
[ { "id": 0, "type": "table", "value": "mountain" }, { "id": 1, "type": "column", "value": "height" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
9,474
manufactory_1
spider:train_spider.json:5339
What is all the product data, as well as each product's manufacturer?
SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code
[ "What", "is", "all", "the", "product", "data", ",", "as", "well", "as", " ", "each", "product", "'s", "manufacturer", "?" ]
[ { "id": 1, "type": "table", "value": "manufacturers" }, { "id": 2, "type": "column", "value": "manufacturer" }, { "id": 0, "type": "table", "value": "products" }, { "id": 3, "type": "column", "value": "code" } ]
[ { "entity_id": 0, "token_idxs": [ 12, 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "t...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O" ]
9,475
cre_Doc_Tracking_DB
spider:train_spider.json:4239
What are the id of each employee and the number of document destroyed by that employee?
SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
[ "What", "are", "the", "i", "d", "of", "each", "employee", "and", "the", "number", "of", "document", "destroyed", "by", "that", "employee", "?" ]
[ { "id": 0, "type": "table", "value": "documents_to_be_destroyed" }, { "id": 1, "type": "column", "value": "destroyed_by_employee_id" } ]
[ { "entity_id": 0, "token_idxs": [ 12 ] }, { "entity_id": 1, "token_idxs": [ 13, 14, 15, 16 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "e...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
9,476
shakespeare
bird:train.json:3010
On average, how many scenes are there in each of the comedy works written by Shakespeare?
SELECT CAST(SUM(T2.Scene) AS REAL) / COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.GenreType = 'Comedy'
[ "On", "average", ",", "how", "many", "scenes", "are", "there", "in", "each", "of", "the", "comedy", "works", "written", "by", "Shakespeare", "?" ]
[ { "id": 2, "type": "column", "value": "genretype" }, { "id": 1, "type": "table", "value": "chapters" }, { "id": 5, "type": "column", "value": "work_id" }, { "id": 3, "type": "value", "value": "Comedy" }, { "id": 0, "type": "table", "value":...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs"...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O" ]
9,477
dorm_1
spider:train_spider.json:5710
List in alphabetic order all different amenities.
SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name
[ "List", "in", "alphabetic", "order", "all", "different", "amenities", "." ]
[ { "id": 0, "type": "table", "value": "dorm_amenity" }, { "id": 1, "type": "column", "value": "amenity_name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,478
trains
bird:train.json:723
How many cars running east have double-sided tail cars?
SELECT COUNT(T1.id) FROM trains AS T1 INNER JOIN cars AS T2 ON T1.id = T2.train_id INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars GROUP BY train_id ) AS T3 ON T1.id = T3.train_id WHERE T1.direction = 'east' AND T2.position = T3.trailPosi AND T2.sides = 'double'
[ "How", "many", "cars", "running", "east", "have", "double", "-", "sided", "tail", "cars", "?" ]
[ { "id": 4, "type": "column", "value": "direction" }, { "id": 7, "type": "column", "value": "trailposi" }, { "id": 3, "type": "column", "value": "train_id" }, { "id": 6, "type": "column", "value": "position" }, { "id": 1, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "B-VALUE", "O", "B-VALUE", "O", "B-COLUMN", "B-TABLE", "O", "O" ]
9,479
retail_complains
bird:train.json:300
Lists the last name of all clients who made a PS-type complaint and were served by TOVA.
SELECT t1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'PS' AND T2.server = 'TOVA'
[ "Lists", "the", "last", "name", "of", "all", "clients", "who", "made", "a", "PS", "-", "type", "complaint", "and", "were", "served", "by", "TOVA", "." ]
[ { "id": 2, "type": "table", "value": "callcenterlogs" }, { "id": 4, "type": "column", "value": "rand client" }, { "id": 3, "type": "column", "value": "client_id" }, { "id": 1, "type": "table", "value": "client" }, { "id": 7, "type": "column", ...
[ { "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": [ 5 ] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
9,480
donor
bird:train.json:3192
What is the donation message for donation ID a84dace1ff716f6f0c7af8ef9090a5d5?
SELECT donation_message FROM donations WHERE donationid = 'a84dace1ff716f6f0c7af8ef9090a5d5'
[ "What", "is", "the", "donation", "message", "for", "donation", "ID", "a84dace1ff716f6f0c7af8ef9090a5d5", "?" ]
[ { "id": 3, "type": "value", "value": "a84dace1ff716f6f0c7af8ef9090a5d5" }, { "id": 1, "type": "column", "value": "donation_message" }, { "id": 2, "type": "column", "value": "donationid" }, { "id": 0, "type": "table", "value": "donations" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O" ]
9,481
e_learning
spider:train_spider.json:3778
List all the dates of enrollment and completion of students.
SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment
[ "List", "all", "the", "dates", "of", "enrollment", "and", "completion", "of", "students", "." ]
[ { "id": 0, "type": "table", "value": "student_course_enrolment" }, { "id": 2, "type": "column", "value": "date_of_completion" }, { "id": 1, "type": "column", "value": "date_of_enrolment" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "O" ]
9,482
works_cycles
bird:train.json:7328
Name all stores and its sales representative in France territory.
SELECT T3.Name, T4.FirstName, T4.LastName FROM SalesTerritory AS T1 INNER JOIN Customer AS T2 ON T1.TerritoryID = T2.TerritoryID INNER JOIN Store AS T3 ON T2.StoreID = T3.BusinessEntityID INNER JOIN Person AS T4 ON T2.PersonID = T4.BusinessEntityID WHERE T1.Name = 'France'
[ "Name", "all", "stores", "and", "its", "sales", "representative", "in", "France", "territory", "." ]
[ { "id": 7, "type": "column", "value": "businessentityid" }, { "id": 8, "type": "table", "value": "salesterritory" }, { "id": 11, "type": "column", "value": "territoryid" }, { "id": 1, "type": "column", "value": "firstname" }, { "id": 2, "type":...
[ { "entity_id": 0, "token_idxs": [ 0 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "token_idxs": ...
[ "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
9,483
insurance_and_eClaims
spider:train_spider.json:1524
What are the names of customers who do not have any policies?
SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id
[ "What", "are", "the", "names", "of", "customers", "who", "do", "not", "have", "any", "policies", "?" ]
[ { "id": 1, "type": "column", "value": "customer_details" }, { "id": 3, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 2, "type": "table", "value": "policies" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "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", "B-TABLE", "O" ]
9,484
county_public_safety
spider:train_spider.json:2547
What is the name of the county with the greatest population?
SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "county", "with", "the", "greatest", "population", "?" ]
[ { "id": 0, "type": "table", "value": "county_public_safety" }, { "id": 2, "type": "column", "value": "population" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "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-COLUMN", "O" ]
9,486
regional_sales
bird:train.json:2713
Please indicate total order quantity of product Candles and calculate the percentage of such product among all the orders.
SELECT SUM(CASE WHEN T1.`Product Name` = 'Candles' THEN T2.`Order Quantity` ELSE 0 END), CAST(SUM(CASE WHEN T1.`Product Name` = 'Candles' THEN T2.`Order Quantity` ELSE 0 END) AS REAL) * 100 / SUM(T2.`Order Quantity`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store L...
[ "Please", "indicate", "total", "order", "quantity", "of", "product", "Candles", "and", "calculate", "the", "percentage", "of", "such", "product", "among", "all", "the", "orders", "." ]
[ { "id": 0, "type": "table", "value": "Store Locations" }, { "id": 7, "type": "column", "value": "Order Quantity" }, { "id": 2, "type": "table", "value": "Sales Orders" }, { "id": 10, "type": "column", "value": "Product Name" }, { "id": 8, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 16, 17, 18 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
9,487
tracking_grants_for_research
spider:train_spider.json:4336
What are the response received dates for the documents described as 'Regular' or granted with more than 100?
SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100
[ "What", "are", "the", "response", "received", "dates", "for", "the", "documents", "described", "as", "'", "Regular", "'", "or", "granted", "with", "more", "than", "100", "?" ]
[ { "id": 0, "type": "column", "value": "response_received_date" }, { "id": 5, "type": "column", "value": "document_description" }, { "id": 9, "type": "column", "value": "document_type_code" }, { "id": 3, "type": "table", "value": "document_types" }, { ...
[ { "entity_id": 0, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "e...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
9,488
allergy_1
spider:train_spider.json:534
How many students are over 18 and do not have allergy to food type or animal type?
SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" OR T2.allergytype = "animal")
[ "How", "many", "students", "are", "over", "18", "and", "do", "not", "have", "allergy", "to", "food", "type", "or", "animal", "type", "?" ]
[ { "id": 5, "type": "table", "value": "allergy_type" }, { "id": 4, "type": "table", "value": "has_allergy" }, { "id": 7, "type": "column", "value": "allergytype" }, { "id": 0, "type": "table", "value": "student" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O" ]
9,490
pilot_1
bird:test.json:1130
Count the number of planes flown by pilots older than 40.
SELECT count(plane_name) FROM pilotskills WHERE age > 40
[ "Count", "the", "number", "of", "planes", "flown", "by", "pilots", "older", "than", "40", "." ]
[ { "id": 0, "type": "table", "value": "pilotskills" }, { "id": 3, "type": "column", "value": "plane_name" }, { "id": 1, "type": "column", "value": "age" }, { "id": 2, "type": "value", "value": "40" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
9,491
scientist_1
spider:train_spider.json:6477
Find the average hours of all projects.
SELECT avg(hours) FROM projects
[ "Find", "the", "average", "hours", "of", "all", "projects", "." ]
[ { "id": 0, "type": "table", "value": "projects" }, { "id": 1, "type": "column", "value": "hours" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "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", "B-TABLE", "O" ]
9,492
institution_sports
bird:test.json:1653
What are the stadiums of institutions in descending order of the capacity.
SELECT Stadium FROM institution ORDER BY Capacity DESC
[ "What", "are", "the", "stadiums", "of", "institutions", "in", "descending", "order", "of", "the", "capacity", "." ]
[ { "id": 0, "type": "table", "value": "institution" }, { "id": 2, "type": "column", "value": "capacity" }, { "id": 1, "type": "column", "value": "stadium" } ]
[ { "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" ]
9,493
formula_1
spider:train_spider.json:2185
Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?
SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20
[ "Find", "all", "the", "forenames", "of", "distinct", "drivers", "who", "won", "in", "position", "1", "as", "driver", "standing", "and", "had", "more", "than", "20", "points", "?" ]
[ { "id": 2, "type": "table", "value": "driverstandings" }, { "id": 0, "type": "column", "value": "forename" }, { "id": 3, "type": "column", "value": "driverid" }, { "id": 4, "type": "column", "value": "position" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-COLUMN", "B-VALUE", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
9,494
mental_health_survey
bird:train.json:4582
How many questions in 2014's survey had more than 200 answers?
SELECT COUNT(QuestionID) FROM Answer WHERE SurveyID LIKE 2014 GROUP BY QuestionID ORDER BY COUNT(QuestionID) > 200 LIMIT 1
[ "How", "many", "questions", "in", "2014", "'s", "survey", "had", "more", "than", "200", "answers", "?" ]
[ { "id": 1, "type": "column", "value": "questionid" }, { "id": 2, "type": "column", "value": "surveyid" }, { "id": 0, "type": "table", "value": "answer" }, { "id": 3, "type": "value", "value": "2014" }, { "id": 4, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
9,495
art_1
bird:test.json:1221
Give the full name of the artist who lived the longest.
SELECT lname , fname FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
[ "Give", "the", "full", "name", "of", "the", "artist", "who", "lived", "the", "longest", "." ]
[ { "id": 3, "type": "column", "value": "deathyear" }, { "id": 4, "type": "column", "value": "birthyear" }, { "id": 0, "type": "table", "value": "artists" }, { "id": 1, "type": "column", "value": "lname" }, { "id": 2, "type": "column", "value...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
9,496
works_cycles
bird:train.json:7367
What is the Crankarm product's net profit?
SELECT T2.LastReceiptCost - T2.StandardPrice FROM Product AS T1 INNER JOIN ProductVendor AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE '%Crankarm%'
[ "What", "is", "the", "Crankarm", "product", "'s", "net", "profit", "?" ]
[ { "id": 4, "type": "column", "value": "lastreceiptcost" }, { "id": 1, "type": "table", "value": "productvendor" }, { "id": 5, "type": "column", "value": "standardprice" }, { "id": 3, "type": "value", "value": "%Crankarm%" }, { "id": 6, "type": ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O" ]
9,497
thrombosis_prediction
bird:dev.json:1253
For the patient who has the highest Ig A within the normal range, what is his or her diagnosis?
SELECT patientData.Diagnosis FROM Patient AS patientData INNER JOIN Laboratory AS labData ON patientData.ID = labData.ID WHERE labData.IGA BETWEEN 80 AND 500 ORDER BY labData.IGA DESC LIMIT 1
[ "For", "the", "patient", "who", "has", "the", "highest", "Ig", "A", "within", "the", "normal", "range", ",", "what", "is", "his", "or", "her", "diagnosis", "?" ]
[ { "id": 2, "type": "table", "value": "laboratory" }, { "id": 0, "type": "column", "value": "diagnosis" }, { "id": 1, "type": "table", "value": "patient" }, { "id": 3, "type": "column", "value": "iga" }, { "id": 5, "type": "value", "value": ...
[ { "entity_id": 0, "token_idxs": [ 19 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,498
film_rank
spider:train_spider.json:4147
What are the titles of films that do not have a film market estimation?
SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)
[ "What", "are", "the", "titles", "of", "films", "that", "do", "not", "have", "a", "film", "market", "estimation", "?" ]
[ { "id": 3, "type": "table", "value": "film_market_estimation" }, { "id": 2, "type": "column", "value": "film_id" }, { "id": 1, "type": "column", "value": "title" }, { "id": 0, "type": "table", "value": "film" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12, 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_i...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-TABLE", "I-TABLE", "O" ]
9,499
genes
bird:train.json:2511
Which negatively correlated, genetically interacting genes are non-essential? What percentage do they represent with respect to those that are essential?
SELECT CAST(COUNT(T1.GeneID) AS REAL) * 100 / ( SELECT COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T2.Expression_Corr < 0 ) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T2.Expression_Corr < 0 AND T1.Essential = 'Non-Essential'
[ "Which", "negatively", "correlated", ",", "genetically", "interacting", "genes", "are", "non", "-", "essential", "?", "What", "percentage", "do", "they", "represent", "with", "respect", "to", "those", "that", "are", "essential", "?" ]
[ { "id": 4, "type": "column", "value": "expression_corr" }, { "id": 7, "type": "value", "value": "Non-Essential" }, { "id": 1, "type": "table", "value": "interactions" }, { "id": 6, "type": "column", "value": "essential" }, { "id": 3, "type": "c...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "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-TABLE", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,500
art_1
bird:test.json:1225
What is the first name and age of the artist who lived the longest?
SELECT fname , deathYear - birthYear FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
[ "What", "is", "the", "first", "name", "and", "age", "of", "the", "artist", "who", "lived", "the", "longest", "?" ]
[ { "id": 2, "type": "column", "value": "deathyear" }, { "id": 3, "type": "column", "value": "birthyear" }, { "id": 0, "type": "table", "value": "artists" }, { "id": 1, "type": "column", "value": "fname" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
9,501
works_cycles
bird:train.json:7433
How much more expensive in percentage is the product with the highest selling price from the product with the lowest selling price in the Clothing category?
SELECT (MAX(T1.ListPrice) - MIN(T1.ListPrice)) * 100 / MIN(T1.ListPrice) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID INNER JOIN ProductCategory AS T3 ON T2.ProductCategoryID = T3.ProductCategoryID WHERE T3.Name = 'Clothing'
[ "How", "much", "more", "expensive", "in", "percentage", "is", "the", "product", "with", "the", "highest", "selling", "price", "from", "the", "product", "with", "the", "lowest", "selling", "price", "in", "the", "Clothing", "category", "?" ]
[ { "id": 8, "type": "column", "value": "productsubcategoryid" }, { "id": 4, "type": "table", "value": "productsubcategory" }, { "id": 5, "type": "column", "value": "productcategoryid" }, { "id": 0, "type": "table", "value": "productcategory" }, { "i...
[ { "entity_id": 0, "token_idxs": [ 25 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 24 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O" ]
9,503
movie_3
bird:train.json:9344
What are the last updated date for English film titles that were released in 2006?
SELECT DISTINCT T1.last_update FROM film AS T1 INNER JOIN `language` AS T2 ON T1.language_id = T2.language_id WHERE T2.`name` = 'English' AND T1.release_year = 2006
[ "What", "are", "the", "last", "updated", "date", "for", "English", "film", "titles", "that", "were", "released", "in", "2006", "?" ]
[ { "id": 6, "type": "column", "value": "release_year" }, { "id": 0, "type": "column", "value": "last_update" }, { "id": 3, "type": "column", "value": "language_id" }, { "id": 2, "type": "table", "value": "language" }, { "id": 5, "type": "value",...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
9,504
ice_hockey_draft
bird:train.json:6965
What is the highest point highest point of Per Mars in the draft year?
SELECT T1.P FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Per Mars' ORDER BY T1.P DESC LIMIT 1
[ "What", "is", "the", "highest", "point", "highest", "point", "of", "Per", "Mars", "in", "the", "draft", "year", "?" ]
[ { "id": 1, "type": "table", "value": "seasonstatus" }, { "id": 2, "type": "table", "value": "playerinfo" }, { "id": 3, "type": "column", "value": "playername" }, { "id": 4, "type": "value", "value": "Per Mars" }, { "id": 5, "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": [ 8, 9 ] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O" ]
9,505
talkingdata
bird:train.json:1212
What age group is the most using SM-T2558 model phones?
SELECT T.`group` FROM ( SELECT T1.`group`, COUNT(T1.device_id) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'SM-T2558' GROUP BY T1.`group` ) AS T ORDER BY T.num DESC LIMIT 1
[ "What", "age", "group", "is", "the", "most", "using", "SM", "-", "T2558", "model", "phones", "?" ]
[ { "id": 3, "type": "table", "value": "phone_brand_device_model2" }, { "id": 4, "type": "column", "value": "device_model" }, { "id": 2, "type": "table", "value": "gender_age" }, { "id": 6, "type": "column", "value": "device_id" }, { "id": 5, "ty...
[ { "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": [ 10 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "O", "O" ]
9,506
riding_club
spider:train_spider.json:1733
Show the residences that have both a player of gender "M" and a player of gender "F".
SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F"
[ "Show", "the", "residences", "that", "have", "both", "a", "player", "of", "gender", "\"", "M", "\"", "and", "a", "player", "of", "gender", "\"", "F", "\"", "." ]
[ { "id": 1, "type": "column", "value": "residence" }, { "id": 0, "type": "table", "value": "player" }, { "id": 2, "type": "column", "value": "gender" }, { "id": 3, "type": "column", "value": "M" }, { "id": 4, "type": "column", "value": "F" ...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 19 ] }, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O" ]
9,507
works_cycles
bird:train.json:7055
For the employee who has been hired the latest, what is his or her pay rate?
SELECT T1.Rate FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T2.HireDate DESC LIMIT 1
[ "For", "the", "employee", "who", "has", "been", "hired", "the", "latest", ",", "what", "is", "his", "or", "her", "pay", "rate", "?" ]
[ { "id": 1, "type": "table", "value": "employeepayhistory" }, { "id": 4, "type": "column", "value": "businessentityid" }, { "id": 2, "type": "table", "value": "employee" }, { "id": 3, "type": "column", "value": "hiredate" }, { "id": 0, "type": "...
[ { "entity_id": 0, "token_idxs": [ 16 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 6, 7 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,508
inn_1
spider:train_spider.json:2573
What are the names of modern rooms that have a base price lower than $160 and two beds.
SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern';
[ "What", "are", "the", "names", "of", "modern", "rooms", "that", "have", "a", "base", "price", "lower", "than", "$", "160", "and", "two", "beds", "." ]
[ { "id": 2, "type": "column", "value": "baseprice" }, { "id": 1, "type": "column", "value": "roomname" }, { "id": 7, "type": "value", "value": "modern" }, { "id": 0, "type": "table", "value": "rooms" }, { "id": 6, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10, 11 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [ 18 ] }, {...
[ "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O" ]
9,509
superstore
bird:train.json:2349
Please list the IDs of the orders made by Aimee Bixby with more than 3 kinds of products ordered.
SELECT DISTINCT T2.`Order ID` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby' GROUP BY T2.`Product ID` HAVING COUNT(T2.`Product ID`) > 3
[ "Please", "list", "the", "IDs", "of", "the", "orders", "made", "by", "Aimee", "Bixby", "with", "more", "than", "3", "kinds", "of", "products", "ordered", "." ]
[ { "id": 3, "type": "table", "value": "central_superstore" }, { "id": 4, "type": "column", "value": "Customer Name" }, { "id": 5, "type": "value", "value": "Aimee Bixby" }, { "id": 7, "type": "column", "value": "Customer ID" }, { "id": 0, "type"...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [ 18 ] }, { "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", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
9,510
movie_3
bird:train.json:9261
How many actors with the surname Kilmer are there?
SELECT COUNT(actor_id) FROM actor WHERE last_name = 'Kilmer'
[ "How", "many", "actors", "with", "the", "surname", "Kilmer", "are", "there", "?" ]
[ { "id": 1, "type": "column", "value": "last_name" }, { "id": 3, "type": "column", "value": "actor_id" }, { "id": 2, "type": "value", "value": "Kilmer" }, { "id": 0, "type": "table", "value": "actor" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-VALUE", "O", "O", "O" ]
9,511
ship_1
spider:train_spider.json:6244
how many ships are there?
SELECT count(*) FROM ship
[ "how", "many", "ships", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "ship" } ]
[ { "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" ]
9,513
customers_and_orders
bird:test.json:280
What are the names of customers who use the least common payment method?
SELECT customer_name FROM Customers WHERE payment_method_code = ( SELECT payment_method_code FROM Customers GROUP BY payment_method_code ORDER BY count(*) ASC LIMIT 1)
[ "What", "are", "the", "names", "of", "customers", "who", "use", "the", "least", "common", "payment", "method", "?" ]
[ { "id": 2, "type": "column", "value": "payment_method_code" }, { "id": 1, "type": "column", "value": "customer_name" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "to...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,514
sales
bird:train.json:5427
How many of the employees have the last name "Ringer" ?
SELECT COUNT(LastName) FROM Employees WHERE LastName = 'Ringer'
[ "How", "many", "of", "the", "employees", "have", "the", "last", "name", "\"", "Ringer", "\"", "?" ]
[ { "id": 0, "type": "table", "value": "employees" }, { "id": 1, "type": "column", "value": "lastname" }, { "id": 2, "type": "value", "value": "Ringer" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7, 8 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O" ]
9,515
college_3
spider:train_spider.json:4651
Find the first names of students whose first names contain letter "a".
SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'
[ "Find", "the", "first", "names", "of", "students", "whose", "first", "names", "contain", "letter", "\"", "a", "\"", "." ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "fname" }, { "id": 2, "type": "value", "value": "%a%" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
9,516
video_games
bird:train.json:3426
What is the name of the genre with the most number of video games?
SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T2.id = T1.genre_id GROUP BY T2.genre_name ORDER BY COUNT(T1.genre_id) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "genre", "with", "the", "most", "number", "of", "video", "games", "?" ]
[ { "id": 0, "type": "column", "value": "genre_name" }, { "id": 4, "type": "column", "value": "genre_id" }, { "id": 2, "type": "table", "value": "genre" }, { "id": 1, "type": "table", "value": "game" }, { "id": 3, "type": "column", "value": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "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-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,517
craftbeer
bird:train.json:8857
Where in New York can you locate the brewery that makes the bitterest beer? List both the brewery's name and the name of the city.
SELECT T2.name, T2.city FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.state = 'NY' ORDER BY T1.ibu DESC LIMIT 1
[ "Where", "in", "New", "York", "can", "you", "locate", "the", "brewery", "that", "makes", "the", "bitterest", "beer", "?", "List", "both", "the", "brewery", "'s", "name", "and", "the", "name", "of", "the", "city", "." ]
[ { "id": 7, "type": "column", "value": "brewery_id" }, { "id": 3, "type": "table", "value": "breweries" }, { "id": 2, "type": "table", "value": "beers" }, { "id": 4, "type": "column", "value": "state" }, { "id": 0, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 20 ] }, { "entity_id": 1, "token_idxs": [ 26 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 18, 19 ] }, { "entity_id": 4, "token_idxs": [ 9 ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,518
school_finance
spider:train_spider.json:1892
Show each county along with the number of schools and total enrollment in each county.
SELECT county , count(*) , sum(enrollment) FROM school GROUP BY county
[ "Show", "each", "county", "along", "with", "the", "number", "of", "schools", "and", "total", "enrollment", "in", "each", "county", "." ]
[ { "id": 2, "type": "column", "value": "enrollment" }, { "id": 0, "type": "table", "value": "school" }, { "id": 1, "type": "column", "value": "county" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O" ]
9,519
works_cycles
bird:train.json:7216
How many employees in the Information Service department work the evening shift?
SELECT COUNT(T2.BusinessEntityID) FROM Department AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN Shift AS T3 ON T2.ShiftId = T3.ShiftId WHERE T1.Name = 'Information Services' AND T3.Name = 'Evening'
[ "How", "many", "employees", "in", "the", "Information", "Service", "department", "work", "the", "evening", "shift", "?" ]
[ { "id": 3, "type": "table", "value": "employeedepartmenthistory" }, { "id": 6, "type": "value", "value": "Information Services" }, { "id": 1, "type": "column", "value": "businessentityid" }, { "id": 8, "type": "column", "value": "departmentid" }, { ...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "B-TABLE", "B-TABLE", "O", "B-VALUE", "B-TABLE", "O" ]
9,520
books
bird:train.json:5994
How many publishers have the word "book" in their name?
SELECT COUNT(*) FROM publisher WHERE publisher_name LIKE '%book%'
[ "How", "many", "publishers", "have", "the", "word", "\"", "book", "\"", "in", "their", "name", "?" ]
[ { "id": 1, "type": "column", "value": "publisher_name" }, { "id": 0, "type": "table", "value": "publisher" }, { "id": 2, "type": "value", "value": "%book%" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "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", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O" ]
9,521
food_inspection
bird:train.json:8834
What was the inspection type when El Aji Peruvian Restaurant got highest inspection score?
SELECT T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'El Aji Peruvian Restaurant' ORDER BY T1.score DESC LIMIT 1
[ "What", "was", "the", "inspection", "type", "when", "El", "Aji", "Peruvian", "Restaurant", "got", "highest", "inspection", "score", "?" ]
[ { "id": 4, "type": "value", "value": "El Aji Peruvian Restaurant" }, { "id": 1, "type": "table", "value": "inspections" }, { "id": 6, "type": "column", "value": "business_id" }, { "id": 2, "type": "table", "value": "businesses" }, { "id": 5, "t...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 12 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6, 7, 8, 9 ] }, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
9,522
student_assessment
spider:train_spider.json:108
What are the ids of the students who attended courses in the statistics department in order of attendance date.
SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.date_of_attendance
[ "What", "are", "the", "ids", "of", "the", "students", "who", "attended", "courses", "in", "the", "statistics", "department", "in", "order", "of", "attendance", "date", "." ]
[ { "id": 2, "type": "table", "value": "student_course_attendance" }, { "id": 5, "type": "column", "value": "date_of_attendance" }, { "id": 3, "type": "column", "value": "course_name" }, { "id": 0, "type": "column", "value": "student_id" }, { "id": 4...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 12 ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
9,523
public_review_platform
bird:train.json:3767
In which year did the user who gave the most number of "5" star reviews join the Yelp?
SELECT T2.user_yelping_since_year FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.review_stars = 5 GROUP BY T2.user_yelping_since_year ORDER BY COUNT(T1.review_stars) DESC LIMIT 1
[ "In", "which", "year", "did", "the", "user", "who", "gave", "the", "most", "number", "of", "\"", "5", "\"", "star", "reviews", "join", "the", "Yelp", "?" ]
[ { "id": 0, "type": "column", "value": "user_yelping_since_year" }, { "id": 3, "type": "column", "value": "review_stars" }, { "id": 1, "type": "table", "value": "reviews" }, { "id": 5, "type": "column", "value": "user_id" }, { "id": 2, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "O", "O", "O", "O" ]