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,951
pilot_1
bird:test.json:1129
How many planes are controlled by the pilots whose age is older than 40?
SELECT count(plane_name) FROM pilotskills WHERE age > 40
[ "How", "many", "planes", "are", "controlled", "by", "the", "pilots", "whose", "age", "is", "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": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 2, 3 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
9,952
software_company
bird:train.json:8543
Among the widowed female customers, give the income of those who has an level of education of 5 and below.
SELECT INCOME_K FROM Demog WHERE GEOID IN ( SELECT GEOID FROM Customers WHERE EDUCATIONNUM < 5 AND SEX = 'Female' AND MARITAL_STATUS = 'Widowed' )
[ "Among", "the", "widowed", "female", "customers", ",", "give", "the", "income", "of", "those", "who", "has", "an", "level", "of", "education", "of", "5", "and", "below", "." ]
[ { "id": 8, "type": "column", "value": "marital_status" }, { "id": 4, "type": "column", "value": "educationnum" }, { "id": 3, "type": "table", "value": "customers" }, { "id": 1, "type": "column", "value": "income_k" }, { "id": 9, "type": "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "entity_id": 5, ...
[ "O", "O", "B-VALUE", "B-VALUE", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O" ]
9,953
shipping
bird:train.json:5607
To whom did the company transport its heaviest shipment?
SELECT T2.cust_name FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id ORDER BY T1.weight DESC LIMIT 1
[ "To", "whom", "did", "the", "company", "transport", "its", "heaviest", "shipment", "?" ]
[ { "id": 0, "type": "column", "value": "cust_name" }, { "id": 1, "type": "table", "value": "shipment" }, { "id": 2, "type": "table", "value": "customer" }, { "id": 4, "type": "column", "value": "cust_id" }, { "id": 3, "type": "column", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,954
computer_student
bird:train.json:983
How many basic and medium undergraduate courses are there?
SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_300'
[ "How", "many", "basic", "and", "medium", "undergraduate", "courses", "are", "there", "?" ]
[ { "id": 1, "type": "column", "value": "courselevel" }, { "id": 2, "type": "value", "value": "Level_300" }, { "id": 0, "type": "table", "value": "course" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
9,955
university
bird:train.json:8033
Which university had the highest reputation in 2012?
SELECT T2.university_name FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2012 ORDER BY T1.score DESC LIMIT 1
[ "Which", "university", "had", "the", "highest", "reputation", "in", "2012", "?" ]
[ { "id": 1, "type": "table", "value": "university_ranking_year" }, { "id": 0, "type": "column", "value": "university_name" }, { "id": 6, "type": "column", "value": "university_id" }, { "id": 2, "type": "table", "value": "university" }, { "id": 5, ...
[ { "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": [ 7 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
9,956
menu
bird:train.json:5480
Among the menus in which the dish "Clear green turtle" had appeared, how many of them did not support taking out or booking in advance?
SELECT SUM(CASE WHEN T4.name = 'Clear green turtle' THEN 1 ELSE 0 END) 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 INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.call_number IS NULL
[ "Among", "the", "menus", "in", "which", "the", "dish", "\"", "Clear", "green", "turtle", "\"", "had", "appeared", ",", "how", "many", "of", "them", "did", "not", "support", "taking", "out", "or", "booking", "in", "advance", "?" ]
[ { "id": 12, "type": "value", "value": "Clear green turtle" }, { "id": 10, "type": "column", "value": "menu_page_id" }, { "id": 1, "type": "column", "value": "call_number" }, { "id": 6, "type": "table", "value": "menuitem" }, { "id": 7, "type": ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 19 ] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,957
olympics
bird:train.json:5068
What is the name of the youngest competitor?
SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id ORDER BY T2.age LIMIT 1
[ "What", "is", "the", "name", "of", "the", "youngest", "competitor", "?" ]
[ { "id": 2, "type": "table", "value": "games_competitor" }, { "id": 0, "type": "column", "value": "full_name" }, { "id": 5, "type": "column", "value": "person_id" }, { "id": 1, "type": "table", "value": "person" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
9,958
legislator
bird:train.json:4797
Among legislators who have an Instagram account, list down their full names and nicknames who have a Thomas ID of less than 1000.
SELECT T1.official_full_name, T1.nickname_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.instagram IS NOT NULL AND T1.thomas_id < 1000
[ "Among", "legislators", "who", "have", "an", "Instagram", "account", ",", "list", "down", "their", "full", "names", "and", "nicknames", "who", "have", "a", "Thomas", "ID", "of", "less", "than", "1000", "." ]
[ { "id": 0, "type": "column", "value": "official_full_name" }, { "id": 1, "type": "column", "value": "nickname_name" }, { "id": 3, "type": "table", "value": "social-media" }, { "id": 5, "type": "column", "value": "bioguide_id" }, { "id": 6, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
9,959
soccer_2
spider:train_spider.json:4976
List all information about college sorted by enrollment number in the ascending order.
SELECT * FROM College ORDER BY enr
[ "List", "all", "information", "about", "college", "sorted", "by", "enrollment", "number", "in", "the", "ascending", "order", "." ]
[ { "id": 0, "type": "table", "value": "college" }, { "id": 1, "type": "column", "value": "enr" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,960
authors
bird:train.json:3662
Where was the 'A context-based navigation paradigm for accessing Web data' paper published? State the name of the conference.
SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'A context-based navigation paradigm for accessing Web data'
[ "Where", "was", "the", "'", "A", "context", "-", "based", "navigation", "paradigm", "for", "accessing", "Web", "data", "'", "paper", "published", "?", "State", "the", "name", "of", "the", "conference", "." ]
[ { "id": 4, "type": "value", "value": "A context-based navigation paradigm for accessing Web data" }, { "id": 5, "type": "column", "value": "conferenceid" }, { "id": 2, "type": "table", "value": "conference" }, { "id": 0, "type": "column", "value": "fullnam...
[ { "entity_id": 0, "token_idxs": [ 20 ] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 23 ] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "token_idxs": [ 4, 5, ...
[ "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
9,961
country_language
bird:test.json:1369
Return the maximum and minimum health scores across all countries other than Norway.
SELECT max(health_score) , min(health_score) FROM countries WHERE name != "Norway"
[ "Return", "the", "maximum", "and", "minimum", "health", "scores", "across", "all", "countries", "other", "than", "Norway", "." ]
[ { "id": 3, "type": "column", "value": "health_score" }, { "id": 0, "type": "table", "value": "countries" }, { "id": 2, "type": "column", "value": "Norway" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
9,962
european_football_2
bird:dev.json:1058
Who has the highest average finishing rate between the highest and shortest football player?
SELECT A FROM ( SELECT AVG(finishing) result, 'Max' A FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T1.height = ( SELECT MAX(height) FROM Player ) UNION SELECT AVG(finishing) result, 'Min' A FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_api_id = T2...
[ "Who", "has", "the", "highest", "average", "finishing", "rate", "between", "the", "highest", "and", "shortest", "football", "player", "?" ]
[ { "id": 4, "type": "table", "value": "player_attributes" }, { "id": 8, "type": "column", "value": "player_api_id" }, { "id": 7, "type": "column", "value": "finishing" }, { "id": 1, "type": "column", "value": "result" }, { "id": 3, "type": "tabl...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 3 ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,963
ice_hockey_draft
bird:train.json:6947
Identify the name and position of the player who has committed the most rule violations.
SELECT T2.PlayerName, T2.position_info FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.PIM = ( SELECT MAX(PIM) FROM SeasonStatus )
[ "Identify", "the", "name", "and", "position", "of", "the", "player", "who", "has", "committed", "the", "most", "rule", "violations", "." ]
[ { "id": 1, "type": "column", "value": "position_info" }, { "id": 2, "type": "table", "value": "seasonstatus" }, { "id": 0, "type": "column", "value": "playername" }, { "id": 3, "type": "table", "value": "playerinfo" }, { "id": 5, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,964
disney
bird:train.json:4657
Which director did Bill Thompson work the most with?
SELECT director FROM director AS T1 INNER JOIN `voice-actors` AS T2 ON T1.name = T2.movie WHERE T2.`voice-actor` = 'Bill Thompson' GROUP BY director ORDER BY COUNT(director) DESC LIMIT 1
[ "Which", "director", "did", "Bill", "Thompson", "work", "the", "most", "with", "?" ]
[ { "id": 4, "type": "value", "value": "Bill Thompson" }, { "id": 2, "type": "table", "value": "voice-actors" }, { "id": 3, "type": "column", "value": "voice-actor" }, { "id": 0, "type": "column", "value": "director" }, { "id": 1, "type": "table"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3, 4 ] }, { "entity_id": 5, "toke...
[ "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O" ]
9,965
retail_world
bird:train.json:6414
What is the full name of the employee in charge of the Southern region who is to report to Andrew Fuller?
SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Southern' AND T1.ReportsTo = ( SELECT Em...
[ "What", "is", "the", "full", "name", "of", "the", "employee", "in", "charge", "of", "the", "Southern", "region", "who", "is", "to", "report", "to", "Andrew", "Fuller", "?" ]
[ { "id": 9, "type": "table", "value": "employeeterritories" }, { "id": 5, "type": "column", "value": "regiondescription" }, { "id": 3, "type": "table", "value": "territories" }, { "id": 10, "type": "column", "value": "territoryid" }, { "id": 11, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "B-VALUE", "O" ]
9,966
movie_2
bird:test.json:1854
What are the names of the movies not being shown in any theaters?
SELECT Title FROM Movies WHERE Code NOT IN (SELECT Movie FROM MovieTheaters WHERE Movie != 'null')
[ "What", "are", "the", "names", "of", "the", "movies", "not", "being", "shown", "in", "any", "theaters", "?" ]
[ { "id": 3, "type": "table", "value": "movietheaters" }, { "id": 0, "type": "table", "value": "movies" }, { "id": 1, "type": "column", "value": "title" }, { "id": 4, "type": "column", "value": "movie" }, { "id": 2, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,967
donor
bird:train.json:3150
For each donation not from a teacher, state the donor account id and calculate the percentage of donation given for optional support.
SELECT donor_acctid, donation_optional_support / donation_total FROM donations WHERE is_teacher_acct = 'f'
[ "For", "each", "donation", "not", "from", "a", "teacher", ",", "state", "the", "donor", "account", "i", "d", "and", "calculate", "the", "percentage", "of", "donation", "given", "for", "optional", "support", "." ]
[ { "id": 4, "type": "column", "value": "donation_optional_support" }, { "id": 2, "type": "column", "value": "is_teacher_acct" }, { "id": 5, "type": "column", "value": "donation_total" }, { "id": 1, "type": "column", "value": "donor_acctid" }, { "id"...
[ { "entity_id": 0, "token_idxs": [ 19 ] }, { "entity_id": 1, "token_idxs": [ 10, 11, 12, 13 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 18 ] }, { "entity_id": 4, "toke...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
9,968
solvency_ii
spider:train_spider.json:4583
How many products are there?
SELECT count(*) FROM Products
[ "How", "many", "products", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "products" } ]
[ { "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,969
e_learning
spider:train_spider.json:3783
Find the number of distinct courses that have enrolled students.
SELECT count(course_id) FROM Student_Course_Enrolment
[ "Find", "the", "number", "of", "distinct", "courses", "that", "have", "enrolled", "students", "." ]
[ { "id": 0, "type": "table", "value": "student_course_enrolment" }, { "id": 1, "type": "column", "value": "course_id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
9,970
legislator
bird:train.json:4813
List out the first name of legislators who are senior Senator.
SELECT T1.first_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state_rank = 'senior' GROUP BY T1.first_name
[ "List", "out", "the", "first", "name", "of", "legislators", "who", "are", "senior", "Senator", "." ]
[ { "id": 2, "type": "table", "value": "current-terms" }, { "id": 5, "type": "column", "value": "bioguide_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 3, "type": "column", "value": "state_rank" }, { "id": 6, "type": "colum...
[ { "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": [ 9 ] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
9,971
movie_3
bird:train.json:9265
What language was the most used in movies released in 2006?
SELECT T.language_id FROM ( SELECT T1.language_id, COUNT(T1.language_id) AS num FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE STRFTIME('%Y',T1.release_year) = '2006' GROUP BY T1.language_id ) AS T ORDER BY T.num DESC LIMIT 1
[ "What", "language", "was", "the", "most", "used", "in", "movies", "released", "in", "2006", "?" ]
[ { "id": 6, "type": "column", "value": "release_year" }, { "id": 0, "type": "column", "value": "language_id" }, { "id": 3, "type": "table", "value": "language" }, { "id": 2, "type": "table", "value": "film" }, { "id": 4, "type": "value", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
9,972
books
bird:train.json:5969
List the email of customers that bought the book titled Switch on the Night.
SELECT T4.email FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.title = 'Switch on the Night'
[ "List", "the", "email", "of", "customers", "that", "bought", "the", "book", "titled", "Switch", "on", "the", "Night", "." ]
[ { "id": 3, "type": "value", "value": "Switch on the Night" }, { "id": 5, "type": "column", "value": "customer_id" }, { "id": 4, "type": "table", "value": "cust_order" }, { "id": 7, "type": "table", "value": "order_line" }, { "id": 1, "type": "t...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 10, 11, 12, 13 ] }, { "entity_id": 4, "token_...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O" ]
9,973
insurance_fnol
spider:train_spider.json:929
List all the customers in increasing order of IDs.
SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC
[ "List", "all", "the", "customers", "in", "increasing", "order", "of", "IDs", "." ]
[ { "id": 2, "type": "column", "value": "customer_name" }, { "id": 1, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
9,974
csu_1
spider:train_spider.json:2373
How many faculty, in total, are there in the year 2002?
SELECT sum(faculty) FROM faculty WHERE YEAR = 2002
[ "How", "many", "faculty", ",", "in", "total", ",", "are", "there", "in", "the", "year", "2002", "?" ]
[ { "id": 0, "type": "table", "value": "faculty" }, { "id": 3, "type": "column", "value": "faculty" }, { "id": 1, "type": "column", "value": "year" }, { "id": 2, "type": "value", "value": "2002" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-VALUE", "O" ]
9,975
professional_basketball
bird:train.json:2939
In the year 1998, how many home wins did the team which had the 1st round, 12th pick have that year?
SELECT T2.homeWon FROM draft AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.draftYear = T2.year WHERE T1.draftRound = 1 AND T1.draftSelection = 12 AND T1.draftYear = 1998
[ "In", "the", "year", "1998", ",", "how", "many", "home", "wins", "did", "the", "team", "which", "had", "the", "1st", "round", ",", "12th", "pick", "have", "that", "year", "?" ]
[ { "id": 5, "type": "column", "value": "draftselection" }, { "id": 3, "type": "column", "value": "draftround" }, { "id": 7, "type": "column", "value": "draftyear" }, { "id": 0, "type": "column", "value": "homewon" }, { "id": 1, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
9,976
gymnast
spider:train_spider.json:1740
List the total points of gymnasts in descending order of floor exercise points.
SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC
[ "List", "the", "total", "points", "of", "gymnasts", "in", "descending", "order", "of", "floor", "exercise", "points", "." ]
[ { "id": 2, "type": "column", "value": "floor_exercise_points" }, { "id": 1, "type": "column", "value": "total_points" }, { "id": 0, "type": "table", "value": "gymnast" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 10, 11, 12 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] },...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
9,978
car_racing
bird:test.json:1631
Which country has both drivers with make "Dodge" and drivers with make "Chevrolet"?
SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = "Dodge" INTERSECT SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = "Chevrolet"
[ "Which", "country", "has", "both", "drivers", "with", "make", "\"", "Dodge", "\"", "and", "drivers", "with", "make", "\"", "Chevrolet", "\"", "?" ]
[ { "id": 6, "type": "column", "value": "country_id" }, { "id": 5, "type": "column", "value": "Chevrolet" }, { "id": 0, "type": "column", "value": "country" }, { "id": 2, "type": "table", "value": "country" }, { "id": 1, "type": "table", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity...
[ "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
9,979
synthea
bird:train.json:1391
What is the most common allergy among patients?
SELECT DESCRIPTION FROM allergies GROUP BY DESCRIPTION ORDER BY COUNT(DESCRIPTION) DESC LIMIT 1
[ "What", "is", "the", "most", "common", "allergy", "among", "patients", "?" ]
[ { "id": 1, "type": "column", "value": "description" }, { "id": 0, "type": "table", "value": "allergies" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O" ]
9,981
works_cycles
bird:train.json:7437
What is the bussiness id for Mr. Hung-Fu Ting?
SELECT BusinessEntityID FROM Person WHERE Title = 'Mr.' AND FirstName = 'Hung-Fu' AND LastName = 'Ting'
[ "What", "is", "the", "bussiness", "i", "d", "for", "Mr.", "Hung", "-", "Fu", "Ting", "?" ]
[ { "id": 1, "type": "column", "value": "businessentityid" }, { "id": 4, "type": "column", "value": "firstname" }, { "id": 6, "type": "column", "value": "lastname" }, { "id": 5, "type": "value", "value": "Hung-Fu" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-VALUE", "B-VALUE", "I-VALUE", "I-VALUE", "B-VALUE", "O" ]
9,982
tracking_grants_for_research
spider:train_spider.json:4334
Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described
SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research...
[ "Find", "out", "the", "send", "dates", "of", "the", "documents", "with", "the", "grant", "amount", "of", "more", "than", "5000", "were", "granted", "by", "organisation", "type", "described" ]
[ { "id": 6, "type": "column", "value": "organisation_type_description" }, { "id": 1, "type": "table", "value": "organisation_types" }, { "id": 3, "type": "column", "value": "organisation_type" }, { "id": 10, "type": "column", "value": "organisation_id" },...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 19 ] }, { "entity_id": 3, "token_idxs": [ 20 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "B-COLUMN" ]
9,983
food_inspection
bird:train.json:8802
What is the average score for "Chairman Bao" in all its unscheduled routine inspections?
SELECT CAST(SUM(CASE WHEN T2.name = 'Chairman Bao' THEN T1.score ELSE 0 END) AS REAL) / COUNT(CASE WHEN T1.type = 'Routine - Unscheduled' THEN T1.score ELSE 0 END) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id
[ "What", "is", "the", "average", "score", "for", "\"", "Chairman", "Bao", "\"", "in", "all", "its", "unscheduled", "routine", "inspections", "?" ]
[ { "id": 6, "type": "value", "value": "Routine - Unscheduled" }, { "id": 8, "type": "value", "value": "Chairman Bao" }, { "id": 0, "type": "table", "value": "inspections" }, { "id": 2, "type": "column", "value": "business_id" }, { "id": 1, "type...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-TABLE", "O" ]
9,984
ship_1
spider:train_spider.json:6232
Which classes have more than two captains?
SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2
[ "Which", "classes", "have", "more", "than", "two", "captains", "?" ]
[ { "id": 0, "type": "table", "value": "captain" }, { "id": 1, "type": "column", "value": "class" }, { "id": 2, "type": "value", "value": "2" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
9,985
language_corpus
bird:train.json:5806
How many times greater is the appearances of the biword pair "a base" than "a decimal"?
SELECT CAST(occurrences AS REAL) / ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'a' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'decimal' ) ) FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'a' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'base' )
[ "How", "many", "times", "greater", "is", "the", "appearances", "of", "the", "biword", "pair", "\"", "a", "base", "\"", "than", "\"", "a", "decimal", "\"", "?" ]
[ { "id": 3, "type": "column", "value": "occurrences" }, { "id": 0, "type": "table", "value": "biwords" }, { "id": 9, "type": "value", "value": "decimal" }, { "id": 4, "type": "table", "value": "words" }, { "id": 1, "type": "column", "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", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
9,986
hospital_1
spider:train_spider.json:3969
Sort the list of names and costs of all procedures in the descending order of cost.
SELECT name , cost FROM procedures ORDER BY cost DESC
[ "Sort", "the", "list", "of", "names", "and", "costs", "of", "all", "procedures", "in", "the", "descending", "order", "of", "cost", "." ]
[ { "id": 0, "type": "table", "value": "procedures" }, { "id": 1, "type": "column", "value": "name" }, { "id": 2, "type": "column", "value": "cost" } ]
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,987
food_inspection_2
bird:train.json:6146
What is the full name of the employee who was responsible for the most inspection in March 2016?
SELECT T3.first_name, T3.last_name FROM ( SELECT T1.employee_id, COUNT(T1.inspection_id) FROM inspection AS T1 WHERE strftime('%Y-%m', T1.inspection_date) = '2016-03' GROUP BY T1.employee_id ORDER BY COUNT(T1.inspection_id) DESC LIMIT 1 ) AS T2 INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id
[ "What", "is", "the", "full", "name", "of", "the", "employee", "who", "was", "responsible", "for", "the", "most", "inspection", "in", "March", "2016", "?" ]
[ { "id": 8, "type": "column", "value": "inspection_date" }, { "id": 6, "type": "column", "value": "inspection_id" }, { "id": 3, "type": "column", "value": "employee_id" }, { "id": 0, "type": "column", "value": "first_name" }, { "id": 4, "type": ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O" ]
9,988
card_games
bird:dev.json:347
Find all cards illustrated by Stephen Daniel and describe the text of the ruling of these cards. State if these cards have missing or degraded properties and values.
SELECT T1.id, T2.text, T1.hasContentWarning FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Stephen Daniele'
[ "Find", "all", "cards", "illustrated", "by", "Stephen", "Daniel", "and", "describe", "the", "text", "of", "the", "ruling", "of", "these", "cards", ".", "State", "if", "these", "cards", "have", "missing", "or", "degraded", "properties", "and", "values", "." ]
[ { "id": 2, "type": "column", "value": "hascontentwarning" }, { "id": 6, "type": "value", "value": "Stephen Daniele" }, { "id": 4, "type": "table", "value": "rulings" }, { "id": 5, "type": "column", "value": "artist" }, { "id": 3, "type": "table...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,989
synthea
bird:train.json:1412
Give the social security number of the female Irish patient allergic to grass pollen.
SELECT T2.ssn FROM allergies AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Allergy to grass pollen' AND T2.ethnicity = 'irish' AND T2.gender = 'F'
[ "Give", "the", "social", "security", "number", "of", "the", "female", "Irish", "patient", "allergic", "to", "grass", "pollen", "." ]
[ { "id": 5, "type": "value", "value": "Allergy to grass pollen" }, { "id": 4, "type": "column", "value": "description" }, { "id": 1, "type": "table", "value": "allergies" }, { "id": 6, "type": "column", "value": "ethnicity" }, { "id": 2, "type":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-VALUE", "B-COLUMN", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
9,990
bakery_1
bird:test.json:1505
List all the flavors of Croissant available in this bakery.
SELECT flavor FROM goods WHERE food = "Croissant"
[ "List", "all", "the", "flavors", "of", "Croissant", "available", "in", "this", "bakery", "." ]
[ { "id": 3, "type": "column", "value": "Croissant" }, { "id": 1, "type": "column", "value": "flavor" }, { "id": 0, "type": "table", "value": "goods" }, { "id": 2, "type": "column", "value": "food" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
9,991
phone_1
spider:train_spider.json:1040
List the hardware model name for the phons that were produced by "Nokia Corporation" but whose screen mode type is not Text.
SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = "Nokia Corporation" AND T1.Type != "Text";
[ "List", "the", "hardware", "model", "name", "for", "the", "phons", "that", "were", "produced", "by", "\"", "Nokia", "Corporation", "\"", "but", "whose", "screen", "mode", "type", "is", "not", "Text", "." ]
[ { "id": 0, "type": "column", "value": "hardware_model_name" }, { "id": 6, "type": "column", "value": "Nokia Corporation" }, { "id": 3, "type": "column", "value": "graphics_mode" }, { "id": 5, "type": "column", "value": "company_name" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 18, 19 ] }, ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "O" ]
9,992
movielens
bird:train.json:2256
Among the best actors, how many of them got a rating of 5 to the movies they starred?
SELECT COUNT(T1.actorid) FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN u2base AS T3 ON T2.movieid = T3.movieid WHERE T1.a_quality = 5 AND T3.rating = 5
[ "Among", "the", "best", "actors", ",", "how", "many", "of", "them", "got", "a", "rating", "of", "5", "to", "the", "movies", "they", "starred", "?" ]
[ { "id": 3, "type": "table", "value": "movies2actors" }, { "id": 5, "type": "column", "value": "a_quality" }, { "id": 1, "type": "column", "value": "actorid" }, { "id": 4, "type": "column", "value": "movieid" }, { "id": 0, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 16 ] }, { "entity_id": 5, ...
[ "O", "O", "B-TABLE", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "O", "O" ]
9,993
retail_complains
bird:train.json:382
How many customers in the Northeast use Microsoft email?
SELECT COUNT(T1.email) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T3.Region = 'Northeast' AND T1.email LIKE '%@outlook.com'
[ "How", "many", "customers", "in", "the", "Northeast", "use", "Microsoft", "email", "?" ]
[ { "id": 8, "type": "value", "value": "%@outlook.com" }, { "id": 4, "type": "column", "value": "state_abbrev" }, { "id": 9, "type": "column", "value": "district_id" }, { "id": 5, "type": "column", "value": "statecode" }, { "id": 7, "type": "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "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-VALUE", "O", "O", "B-COLUMN", "O" ]
9,994
activity_1
spider:train_spider.json:6744
How many faculty members do we have for each rank and gender?
SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex
[ "How", "many", "faculty", "members", "do", "we", "have", "for", "each", "rank", "and", "gender", "?" ]
[ { "id": 0, "type": "table", "value": "faculty" }, { "id": 1, "type": "column", "value": "rank" }, { "id": 2, "type": "column", "value": "sex" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
9,995
food_inspection_2
bird:train.json:6120
Among the inspections done by sanitarian Joshua Rosa, how many of them have the result of "pass"?
SELECT COUNT(T2.inspection_id) FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.results = 'Pass' AND T1.first_name = 'Joshua' AND T1.last_name = 'Rosa'
[ "Among", "the", "inspections", "done", "by", "sanitarian", "Joshua", "Rosa", ",", "how", "many", "of", "them", "have", "the", "result", "of", "\"", "pass", "\"", "?" ]
[ { "id": 2, "type": "column", "value": "inspection_id" }, { "id": 3, "type": "column", "value": "employee_id" }, { "id": 1, "type": "table", "value": "inspection" }, { "id": 6, "type": "column", "value": "first_name" }, { "id": 8, "type": "colum...
[ { "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": [ 15 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
9,996
world_development_indicators
bird:train.json:2212
What is the subject of the series SP.DYN.AMRT.MA and what does it pertain to?
SELECT DISTINCT T1.Topic, T2.Description FROM Series AS T1 INNER JOIN SeriesNotes AS T2 ON T1.SeriesCode = T2.Seriescode WHERE T1.SeriesCode = 'SP.DYN.AMRT.MA'
[ "What", "is", "the", "subject", "of", "the", "series", "SP.DYN.AMRT.MA", "and", "what", "does", "it", "pertain", "to", "?" ]
[ { "id": 5, "type": "value", "value": "SP.DYN.AMRT.MA" }, { "id": 1, "type": "column", "value": "description" }, { "id": 3, "type": "table", "value": "seriesnotes" }, { "id": 4, "type": "column", "value": "seriescode" }, { "id": 2, "type": "tabl...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10, 11, 12 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O" ]
9,997
shipping
bird:train.json:5603
Who was the driver of truck no.3 on 2016/9/19? Tell the full name.
SELECT T3.first_name, T3.last_name FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T1.truck_id = '3' AND T2.ship_date = '2016-09-19'
[ "Who", "was", "the", "driver", "of", "truck", "no.3", "on", "2016/9/19", "?", "Tell", "the", "full", "name", "." ]
[ { "id": 0, "type": "column", "value": "first_name" }, { "id": 9, "type": "value", "value": "2016-09-19" }, { "id": 1, "type": "column", "value": "last_name" }, { "id": 5, "type": "column", "value": "driver_id" }, { "id": 8, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,998
student_club
bird:dev.json:1386
What is the total expense for the Yearly Kickoff?
SELECT SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'Yearly Kickoff'
[ "What", "is", "the", "total", "expense", "for", "the", "Yearly", "Kickoff", "?" ]
[ { "id": 2, "type": "value", "value": "Yearly Kickoff" }, { "id": 7, "type": "column", "value": "link_to_budget" }, { "id": 9, "type": "column", "value": "link_to_event" }, { "id": 1, "type": "column", "value": "event_name" }, { "id": 6, "type":...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O" ]
9,999
cookbook
bird:train.json:8881
Which recipe needs the most frozen raspberries in light syrup? State its title.
SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'frozen raspberries in light syrup' AND T2.max_qty = T2.min_qty
[ "Which", "recipe", "needs", "the", "most", "frozen", "raspberries", "in", "light", "syrup", "?", "State", "its", "title", "." ]
[ { "id": 6, "type": "value", "value": "frozen raspberries in light syrup" }, { "id": 4, "type": "column", "value": "ingredient_id" }, { "id": 1, "type": "table", "value": "ingredient" }, { "id": 9, "type": "column", "value": "recipe_id" }, { "id": 3...
[ { "entity_id": 0, "token_idxs": [ 13 ] }, { "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":...
[ "O", "B-TABLE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "O", "B-COLUMN", "O" ]
10,000
books
bird:train.json:6004
What is the address that received the most orders?
SELECT T2.street_name, T2.city FROM cust_order AS T1 INNER JOIN address AS T2 ON T1.dest_address_id = T2.address_id GROUP BY T2.street_number, T2.street_name, T2.city ORDER BY COUNT(T1.dest_address_id) DESC LIMIT 1
[ "What", "is", "the", "address", "that", "received", "the", "most", "orders", "?" ]
[ { "id": 5, "type": "column", "value": "dest_address_id" }, { "id": 0, "type": "column", "value": "street_number" }, { "id": 1, "type": "column", "value": "street_name" }, { "id": 3, "type": "table", "value": "cust_order" }, { "id": 6, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7, 8 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "I-TABLE", "O" ]
10,001
sales
bird:train.json:5417
List the first names of employees with trading quantity for more than 500.
SELECT DISTINCT T1.FirstName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T2.Quantity > 500
[ "List", "the", "first", "names", "of", "employees", "with", "trading", "quantity", "for", "more", "than", "500", "." ]
[ { "id": 6, "type": "column", "value": "salespersonid" }, { "id": 5, "type": "column", "value": "employeeid" }, { "id": 0, "type": "column", "value": "firstname" }, { "id": 1, "type": "table", "value": "employees" }, { "id": 3, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, ...
[ "O", "O", "B-COLUMN", "B-TABLE", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O" ]
10,002
olympics
bird:train.json:4938
How many competitor ids does Martina Kohlov have?
SELECT COUNT(T2.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T1.full_name = 'Martina Kohlov'
[ "How", "many", "competitor", "ids", "does", "Martina", "Kohlov", "have", "?" ]
[ { "id": 1, "type": "table", "value": "games_competitor" }, { "id": 3, "type": "value", "value": "Martina Kohlov" }, { "id": 2, "type": "column", "value": "full_name" }, { "id": 5, "type": "column", "value": "person_id" }, { "id": 0, "type": "ta...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5, 6 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id":...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O" ]
10,003
movie_1
spider:train_spider.json:2472
Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars.
SELECT T3.name , T2.title , T1.stars , T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name , T2.title , T1.stars
[ "Return", "reviewer", "name", ",", "movie", "title", ",", "stars", ",", "and", "ratingDate", ".", "And", "sort", "the", "data", "first", "by", "reviewer", "name", ",", "then", "by", "movie", "title", ",", "and", "lastly", "by", "number", "of", "stars", ...
[ { "id": 3, "type": "column", "value": "ratingdate" }, { "id": 4, "type": "table", "value": "reviewer" }, { "id": 5, "type": "table", "value": "rating" }, { "id": 1, "type": "column", "value": "title" }, { "id": 2, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [ 19 ] }, { "entity_id": 1, "token_idxs": [ 24 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 18 ] }, { "enti...
[ "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,004
authors
bird:train.json:3624
Give the number of papers that were published on "IEEE Transactions on Nuclear Science" in 1999.
SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Nuclear Science' AND T2.Year = 1999
[ "Give", "the", "number", "of", "papers", "that", "were", "published", "on", "\"", "IEEE", "Transactions", "on", "Nuclear", "Science", "\"", "in", "1999", "." ]
[ { "id": 5, "type": "value", "value": "IEEE Transactions on Nuclear Science" }, { "id": 3, "type": "column", "value": "journalid" }, { "id": 4, "type": "column", "value": "fullname" }, { "id": 0, "type": "table", "value": "journal" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 10, ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O", "B-VALUE", "O" ]
10,005
donor
bird:train.json:3158
How much donations have been collected for project 'Whistle While We Work!'?
SELECT SUM(T2.donation_to_project) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'Whistle While We Work!'
[ "How", "much", "donations", "have", "been", "collected", "for", "project", "'", "Whistle", "While", "We", "Work", "!", "'", "?" ]
[ { "id": 3, "type": "value", "value": "Whistle While We Work!" }, { "id": 4, "type": "column", "value": "donation_to_project" }, { "id": 1, "type": "table", "value": "donations" }, { "id": 5, "type": "column", "value": "projectid" }, { "id": 0, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 10, 11, 12, 13 ] }, { "entity_id": 4, "token_idxs": [] }...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "O" ]
10,006
simpson_episodes
bird:train.json:4267
Please list two people who are the nominees for the "Outstanding Voice-Over Performance" award for season 20.
SELECT person FROM Award WHERE result = 'Nominee' AND award = 'Outstanding Voice-Over Performance' AND episode_id LIKE 'S20%' LIMIT 2;
[ "Please", "list", "two", "people", "who", "are", "the", "nominees", "for", "the", "\"", "Outstanding", "Voice", "-", "Over", "Performance", "\"", "award", "for", "season", "20", "." ]
[ { "id": 5, "type": "value", "value": "Outstanding Voice-Over Performance" }, { "id": 6, "type": "column", "value": "episode_id" }, { "id": 3, "type": "value", "value": "Nominee" }, { "id": 1, "type": "column", "value": "person" }, { "id": 2, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 19 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 17 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "O", "B-COLUMN", "O", "B-COLUMN", "B-VALUE", "O" ]
10,007
movie_3
bird:train.json:9158
State the address location of store No.1.
SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 1
[ "State", "the", "address", "location", "of", "store", "No.1", "." ]
[ { "id": 7, "type": "column", "value": "address_id" }, { "id": 1, "type": "column", "value": "address2" }, { "id": 2, "type": "column", "value": "district" }, { "id": 5, "type": "column", "value": "store_id" }, { "id": 0, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [ 5 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "O" ]
10,008
movies_4
bird:train.json:463
List the director's name of the movies released between 1/01/1916 and 12/31/1925.
SELECT T2.person_name FROM movie_cast AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.person_id INNER JOIN movie AS T3 ON T1.movie_id = T3.movie_id INNER JOIN movie_crew AS T4 ON T1.movie_id = T4.movie_id WHERE T4.job = 'Director' AND T3.release_date BETWEEN '1916-01-01' AND '1925-12-31'
[ "List", "the", "director", "'s", "name", "of", "the", "movies", "released", "between", "1/01/1916", "and", "12/31/1925", "." ]
[ { "id": 6, "type": "column", "value": "release_date" }, { "id": 0, "type": "column", "value": "person_name" }, { "id": 1, "type": "table", "value": "movie_crew" }, { "id": 7, "type": "value", "value": "1916-01-01" }, { "id": 8, "type": "value",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2 ...
[ "O", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O" ]
10,009
restaurant
bird:train.json:1754
Among the restaurants on street number below 1000, how many of them are in Railroad St.?
SELECT COUNT(city) FROM location WHERE street_name = 'railroad' AND street_num < 1000
[ "Among", "the", "restaurants", "on", "street", "number", "below", "1000", ",", "how", "many", "of", "them", "are", "in", "Railroad", "St.", "?" ]
[ { "id": 2, "type": "column", "value": "street_name" }, { "id": 4, "type": "column", "value": "street_num" }, { "id": 0, "type": "table", "value": "location" }, { "id": 3, "type": "value", "value": "railroad" }, { "id": 1, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [ 4, 5 ] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O" ]
10,010
club_1
spider:train_spider.json:4285
Where us the club named "Tennis Club" located?
SELECT clublocation FROM club WHERE clubname = "Tennis Club"
[ "Where", "us", "the", "club", "named", "\"", "Tennis", "Club", "\"", "located", "?" ]
[ { "id": 1, "type": "column", "value": "clublocation" }, { "id": 3, "type": "column", "value": "Tennis Club" }, { "id": 2, "type": "column", "value": "clubname" }, { "id": 0, "type": "table", "value": "club" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 8, 9 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 6, 7 ] }, { "entity_id": 4, "token_idxs": [] }...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "I-COLUMN", "O" ]
10,011
icfp_1
spider:train_spider.json:2868
How many papers have "Atsushi Ohori" published?
SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Atsushi" AND t1.lname = "Ohori"
[ "How", "many", "papers", "have", "\"", "Atsushi", "Ohori", "\"", "published", "?" ]
[ { "id": 2, "type": "table", "value": "authorship" }, { "id": 1, "type": "table", "value": "authors" }, { "id": 3, "type": "column", "value": "paperid" }, { "id": 5, "type": "column", "value": "Atsushi" }, { "id": 0, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O" ]
10,012
hospital_1
spider:train_spider.json:3967
Tell me the highest, lowest, and average cost of procedures.
SELECT MAX(cost) , MIN(cost) , AVG(cost) FROM procedures
[ "Tell", "me", "the", "highest", ",", "lowest", ",", "and", "average", "cost", "of", "procedures", "." ]
[ { "id": 0, "type": "table", "value": "procedures" }, { "id": 1, "type": "column", "value": "cost" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O" ]
10,013
retail_world
bird:train.json:6380
How many products were ordered in the order with the highest freight?
SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID GROUP BY T2.ProductID ORDER BY COUNT(T1.Freight) DESC LIMIT 1
[ "How", "many", "products", "were", "ordered", "in", "the", "order", "with", "the", "highest", "freight", "?" ]
[ { "id": 2, "type": "table", "value": "Order Details" }, { "id": 0, "type": "column", "value": "productid" }, { "id": 3, "type": "column", "value": "orderid" }, { "id": 4, "type": "column", "value": "freight" }, { "id": 1, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "B-TABLE", "O", "O", "B-COLUMN", "O" ]
10,014
public_review_platform
bird:train.json:3829
Please name one attribute that business number 2 does not have.
SELECT T1.attribute_name FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value LIKE 'none' LIMIT 1
[ "Please", "name", "one", "attribute", "that", "business", "number", "2", "does", "not", "have", "." ]
[ { "id": 2, "type": "table", "value": "business_attributes" }, { "id": 3, "type": "column", "value": "attribute_value" }, { "id": 0, "type": "column", "value": "attribute_name" }, { "id": 5, "type": "column", "value": "attribute_id" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,016
retail_complains
bird:train.json:378
Please calculate the number of clients by each division.
SELECT T2.division, COUNT(T2.division) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id GROUP BY T2.division
[ "Please", "calculate", "the", "number", "of", "clients", "by", "each", "division", "." ]
[ { "id": 3, "type": "column", "value": "district_id" }, { "id": 0, "type": "column", "value": "division" }, { "id": 2, "type": "table", "value": "district" }, { "id": 1, "type": "table", "value": "client" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "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", "O", "O", "B-COLUMN", "O" ]
10,017
product_catalog
spider:train_spider.json:336
Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.
SELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700
[ "Which", "catalog", "contents", "has", "price", "above", "700", "dollars", "?", "Show", "their", "catalog", "entry", "names", "and", "capacities", "." ]
[ { "id": 1, "type": "column", "value": "catalog_entry_name" }, { "id": 0, "type": "table", "value": "catalog_contents" }, { "id": 3, "type": "column", "value": "price_in_dollars" }, { "id": 2, "type": "column", "value": "capacity" }, { "id": 4, ...
[ { "entity_id": 0, "token_idxs": [ 1, 2 ] }, { "entity_id": 1, "token_idxs": [ 11, 12, 13 ] }, { "entity_id": 2, "token_idxs": [ 15 ] }, { "entity_id": 3, "token_idxs": [ 4, 5, 7 ] }, { "entity_i...
[ "O", "B-TABLE", "I-TABLE", "O", "B-COLUMN", "I-COLUMN", "B-VALUE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O" ]
10,018
gas_company
spider:train_spider.json:2033
order all gas station locations by the opening year.
SELECT LOCATION FROM gas_station ORDER BY open_year
[ "order", "all", "gas", "station", "locations", "by", "the", "opening", "year", "." ]
[ { "id": 0, "type": "table", "value": "gas_station" }, { "id": 2, "type": "column", "value": "open_year" }, { "id": 1, "type": "column", "value": "location" } ]
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 7, 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "en...
[ "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,019
sales_in_weather
bird:train.json:8181
Which weather station has the highest number of stores?
SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(store_nbr) DESC LIMIT 1
[ "Which", "weather", "station", "has", "the", "highest", "number", "of", "stores", "?" ]
[ { "id": 1, "type": "column", "value": "station_nbr" }, { "id": 2, "type": "column", "value": "store_nbr" }, { "id": 0, "type": "table", "value": "relation" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,020
law_episode
bird:train.json:1335
Which role have won at least two awards for the entire season and list out the name?
SELECT T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id GROUP BY T2.role HAVING COUNT(T2.award_id) > 1
[ "Which", "role", "have", "won", "at", "least", "two", "awards", "for", "the", "entire", "season", "and", "list", "out", "the", "name", "?" ]
[ { "id": 5, "type": "column", "value": "person_id" }, { "id": 6, "type": "column", "value": "award_id" }, { "id": 2, "type": "table", "value": "person" }, { "id": 3, "type": "table", "value": "award" }, { "id": 0, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 16 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O" ]
10,022
movie_2
bird:test.json:1851
Show all information of all unrated movies.
SELECT * FROM movies WHERE rating = 'null'
[ "Show", "all", "information", "of", "all", "unrated", "movies", "." ]
[ { "id": 0, "type": "table", "value": "movies" }, { "id": 1, "type": "column", "value": "rating" }, { "id": 2, "type": "value", "value": "null" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
10,023
regional_sales
bird:train.json:2716
How many sales teams are there in the Midwest?
SELECT SUM(CASE WHEN Region = 'Midwest' THEN 1 ELSE 0 END) FROM `Sales Team`
[ "How", "many", "sales", "teams", "are", "there", "in", "the", "Midwest", "?" ]
[ { "id": 0, "type": "table", "value": "Sales Team" }, { "id": 4, "type": "value", "value": "Midwest" }, { "id": 3, "type": "column", "value": "region" }, { "id": 1, "type": "value", "value": "0" }, { "id": 2, "type": "value", "value": "1" ...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "B-VALUE", "O" ]
10,024
store_product
spider:train_spider.json:4941
What is the total population for all the districts that have an area larger tahn the average city area?
SELECT sum(city_population) FROM district WHERE city_area > (SELECT avg(city_area) FROM district)
[ "What", "is", "the", "total", "population", "for", "all", "the", "districts", "that", "have", "an", "area", "larger", "tahn", "the", "average", "city", "area", "?" ]
[ { "id": 2, "type": "column", "value": "city_population" }, { "id": 1, "type": "column", "value": "city_area" }, { "id": 0, "type": "table", "value": "district" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 17, 18 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,026
cre_Students_Information_Systems
bird:test.json:501
How much total loan does each student have ? List the student ids and the amounts .
select student_id , sum(amount_of_loan) from student_loans group by student_id
[ "How", "much", "total", "loan", "does", "each", "student", "have", "?", "List", "the", "student", "ids", "and", "the", "amounts", "." ]
[ { "id": 2, "type": "column", "value": "amount_of_loan" }, { "id": 0, "type": "table", "value": "student_loans" }, { "id": 1, "type": "column", "value": "student_id" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11, 12 ] }, { "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", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O" ]
10,027
cre_Students_Information_Systems
bird:test.json:493
When was the earliest date of loan?
SELECT date_of_loan FROM Student_Loans ORDER BY date_of_loan ASC LIMIT 1
[ "When", "was", "the", "earliest", "date", "of", "loan", "?" ]
[ { "id": 0, "type": "table", "value": "student_loans" }, { "id": 1, "type": "column", "value": "date_of_loan" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4, 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_id...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O" ]
10,028
district_spokesman
bird:test.json:1180
Select the area and government website of the district with the smallest population.
SELECT area_km , Government_website FROM district ORDER BY Population LIMIT 1
[ "Select", "the", "area", "and", "government", "website", "of", "the", "district", "with", "the", "smallest", "population", "." ]
[ { "id": 2, "type": "column", "value": "government_website" }, { "id": 3, "type": "column", "value": "population" }, { "id": 0, "type": "table", "value": "district" }, { "id": 1, "type": "column", "value": "area_km" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4, 5 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
10,029
bbc_channels
bird:test.json:125
Which director is in charge of the most programs?
SELECT t2.name FROM program AS t1 JOIN director AS t2 ON t1.director_id = t2.director_id GROUP BY t1.director_id ORDER BY count(*) DESC LIMIT 1
[ "Which", "director", "is", "in", "charge", "of", "the", "most", "programs", "?" ]
[ { "id": 0, "type": "column", "value": "director_id" }, { "id": 3, "type": "table", "value": "director" }, { "id": 2, "type": "table", "value": "program" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,030
codebase_community
bird:dev.json:575
What is the badge name that user 'SilentGhost' obtained?
SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'SilentGhost'
[ "What", "is", "the", "badge", "name", "that", "user", "'", "SilentGhost", "'", "obtained", "?" ]
[ { "id": 3, "type": "column", "value": "displayname" }, { "id": 4, "type": "value", "value": "SilentGhost" }, { "id": 2, "type": "table", "value": "badges" }, { "id": 6, "type": "column", "value": "userid" }, { "id": 1, "type": "table", "val...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "O", "B-VALUE", "O", "O", "O" ]
10,031
retail_world
bird:train.json:6322
Of all the orders that have ordered Ikura, how many of them enjoys a unit price that's lower than its standard unit price?
SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura' AND T2.UnitPrice < T1.UnitPrice
[ "Of", "all", "the", "orders", "that", "have", "ordered", "Ikura", ",", "how", "many", "of", "them", "enjoys", "a", "unit", "price", "that", "'s", "lower", "than", "its", "standard", "unit", "price", "?" ]
[ { "id": 1, "type": "table", "value": "Order Details" }, { "id": 4, "type": "column", "value": "productname" }, { "id": 3, "type": "column", "value": "productid" }, { "id": 6, "type": "column", "value": "unitprice" }, { "id": 0, "type": "table",...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "B-TABLE", "I-TABLE", "O", "B-COLUMN", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,032
party_host
spider:train_spider.json:2677
Which nations have both hosts of age above 45 and hosts of age below 35?
SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35
[ "Which", "nations", "have", "both", "hosts", "of", "age", "above", "45", "and", "hosts", "of", "age", "below", "35", "?" ]
[ { "id": 1, "type": "column", "value": "nationality" }, { "id": 0, "type": "table", "value": "host" }, { "id": 2, "type": "column", "value": "age" }, { "id": 3, "type": "value", "value": "45" }, { "id": 4, "type": "value", "value": "35" } ...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O" ]
10,033
club_1
spider:train_spider.json:4287
Where is the club "Pen and Paper Gaming" located?
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming"
[ "Where", "is", "the", "club", "\"", "Pen", "and", "Paper", "Gaming", "\"", "located", "?" ]
[ { "id": 3, "type": "column", "value": "Pen and Paper Gaming" }, { "id": 1, "type": "column", "value": "clublocation" }, { "id": 2, "type": "column", "value": "clubname" }, { "id": 0, "type": "table", "value": "club" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5, 6, 7, 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "O" ]
10,034
music_4
spider:train_spider.json:6168
What are the songs in volumes that have resulted in a nomination at music festivals?
SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = "Nominated"
[ "What", "are", "the", "songs", "in", "volumes", "that", "have", "resulted", "in", "a", "nomination", "at", "music", "festivals", "?" ]
[ { "id": 1, "type": "table", "value": "music_festival" }, { "id": 4, "type": "column", "value": "Nominated" }, { "id": 6, "type": "column", "value": "volume_id" }, { "id": 2, "type": "table", "value": "volume" }, { "id": 3, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 13, 14 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-TABLE", "I-TABLE", "O" ]
10,035
soccer_2016
bird:train.json:1894
List the name of the players born between 1970 and 1990 in descending order of age.
SELECT Player_Name FROM Player WHERE DOB BETWEEN '1970-01-01' AND '1990-12-31' ORDER BY DOB DESC
[ "List", "the", "name", "of", "the", "players", "born", "between", "1970", "and", "1990", "in", "descending", "order", "of", "age", "." ]
[ { "id": 1, "type": "column", "value": "player_name" }, { "id": 3, "type": "value", "value": "1970-01-01" }, { "id": 4, "type": "value", "value": "1990-12-31" }, { "id": 0, "type": "table", "value": "player" }, { "id": 2, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
10,036
movie_3
bird:train.json:9399
Which category is the film "Beach Heartbreakers" falls into?
SELECT T3.name 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 T1.title = 'BEACH HEARTBREAKERS'
[ "Which", "category", "is", "the", "film", "\"", "Beach", "Heartbreakers", "\"", "falls", "into", "?" ]
[ { "id": 3, "type": "value", "value": "BEACH HEARTBREAKERS" }, { "id": 5, "type": "table", "value": "film_category" }, { "id": 6, "type": "column", "value": "category_id" }, { "id": 1, "type": "table", "value": "category" }, { "id": 7, "type": "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6, 7 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity_id":...
[ "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O" ]
10,038
device
spider:train_spider.json:5071
What are the names of shops that have more than a single kind of device in stock?
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1
[ "What", "are", "the", "names", "of", "shops", "that", "have", "more", "than", "a", "single", "kind", "of", "device", "in", "stock", "?" ]
[ { "id": 1, "type": "column", "value": "shop_name" }, { "id": 0, "type": "column", "value": "shop_id" }, { "id": 2, "type": "table", "value": "stock" }, { "id": 3, "type": "table", "value": "shop" }, { "id": 4, "type": "value", "value": "1" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,039
hockey
bird:train.json:7769
Among the coaches who have taught the Philadelphia Flyers, how many of them are born in March?
SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthMon = 3
[ "Among", "the", "coaches", "who", "have", "taught", "the", "Philadelphia", "Flyers", ",", "how", "many", "of", "them", "are", "born", "in", "March", "?" ]
[ { "id": 5, "type": "value", "value": "Philadelphia Flyers" }, { "id": 6, "type": "column", "value": "birthmon" }, { "id": 1, "type": "column", "value": "coachid" }, { "id": 2, "type": "table", "value": "coaches" }, { "id": 0, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
10,040
works_cycles
bird:train.json:7090
What company has a Colonial Voice card that expired in March 2005?
SELECT T2.BusinessEntityID FROM CreditCard AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.CreditCardID = T2.CreditCardID WHERE T1.CardType = 'ColonialVoice' AND T1.ExpMonth = 3 AND T1.ExpYear = 2005
[ "What", "company", "has", "a", "Colonial", "Voice", "card", "that", "expired", "in", "March", "2005", "?" ]
[ { "id": 0, "type": "column", "value": "businessentityid" }, { "id": 2, "type": "table", "value": "personcreditcard" }, { "id": 5, "type": "value", "value": "ColonialVoice" }, { "id": 3, "type": "column", "value": "creditcardid" }, { "id": 1, "t...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-VALUE", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
10,041
food_inspection_2
bird:train.json:6221
How much salary does Jessica Anthony receive?
SELECT salary FROM employee WHERE first_name = 'Jessica' AND last_name = 'Anthony'
[ "How", "much", "salary", "does", "Jessica", "Anthony", "receive", "?" ]
[ { "id": 2, "type": "column", "value": "first_name" }, { "id": 4, "type": "column", "value": "last_name" }, { "id": 0, "type": "table", "value": "employee" }, { "id": 3, "type": "value", "value": "Jessica" }, { "id": 5, "type": "value", "val...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "B-VALUE", "O", "O" ]
10,042
department_store
spider:train_spider.json:4720
How many customers use each payment method?
SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code
[ "How", "many", "customers", "use", "each", "payment", "method", "?" ]
[ { "id": 1, "type": "column", "value": "payment_method_code" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,043
movie_3
bird:train.json:9381
Indicate the percentage of inactive customers at store no.1.
SELECT CAST(SUM(CASE WHEN active = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(customer_id) FROM customer WHERE store_id = 1
[ "Indicate", "the", "percentage", "of", "inactive", "customers", "at", "store", "no.1", "." ]
[ { "id": 4, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 1, "type": "column", "value": "store_id" }, { "id": 6, "type": "column", "value": "active" }, { "id": 3, "type": "value", "val...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "B-COLUMN", "O", "O" ]
10,044
roller_coaster
spider:train_spider.json:6208
What are the speeds of the longest roller coaster?
SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1
[ "What", "are", "the", "speeds", "of", "the", "longest", "roller", "coaster", "?" ]
[ { "id": 0, "type": "table", "value": "roller_coaster" }, { "id": 2, "type": "column", "value": "length" }, { "id": 1, "type": "column", "value": "speed" } ]
[ { "entity_id": 0, "token_idxs": [ 7, 8 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "O" ]
10,045
products_gen_characteristics
spider:train_spider.json:5535
How many products are in the 'Spices' category and have a typical price of over 1000?
SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000
[ "How", "many", "products", "are", "in", "the", "'", "Spices", "'", "category", "and", "have", "a", "typical", "price", "of", "over", "1000", "?" ]
[ { "id": 1, "type": "column", "value": "product_category_code" }, { "id": 3, "type": "column", "value": "typical_buying_price" }, { "id": 0, "type": "table", "value": "products" }, { "id": 2, "type": "column", "value": "Spices" }, { "id": 4, "ty...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [ 13, 14 ] }, { "entity_id": 4, "token_idxs": [ 17 ...
[ "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O" ]
10,046
network_2
spider:train_spider.json:4468
Who is the friend of Zach with longest year relationship?
SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')
[ "Who", "is", "the", "friend", "of", "Zach", "with", "longest", "year", "relationship", "?" ]
[ { "id": 0, "type": "table", "value": "personfriend" }, { "id": 1, "type": "column", "value": "friend" }, { "id": 2, "type": "column", "value": "name" }, { "id": 3, "type": "value", "value": "Zach" }, { "id": 4, "type": "column", "value": "y...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "O" ]
10,047
cre_Doc_and_collections
bird:test.json:740
What are the collection subsets that the collection named 'Best' in?
SELECT DISTINCT T1.Collection_Subset_Name FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID JOIN Collections AS T3 ON T2.Collection_ID = T3.Collection_ID WHERE T3.Collection_Name = "Best";
[ "What", "are", "the", "collection", "subsets", "that", "the", "collection", "named", "'", "Best", "'", "in", "?" ]
[ { "id": 5, "type": "table", "value": "collection_subset_members" }, { "id": 0, "type": "column", "value": "collection_subset_name" }, { "id": 7, "type": "column", "value": "collection_subset_id" }, { "id": 4, "type": "table", "value": "collection_subsets" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 4 ] }, { "entity...
[ "O", "O", "O", "B-TABLE", "B-TABLE", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O" ]
10,048
works_cycles
bird:train.json:7037
How many active employees whose payrate is equal or below 30 per hour.
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.CurrentFlag = 1 AND T2.Rate <= 30
[ "How", "many", "active", "employees", "whose", "payrate", "is", "equal", "or", "below", "30", "per", "hour", "." ]
[ { "id": 1, "type": "table", "value": "employeepayhistory" }, { "id": 2, "type": "column", "value": "businessentityid" }, { "id": 3, "type": "column", "value": "currentflag" }, { "id": 0, "type": "table", "value": "employee" }, { "id": 5, "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": [] }, { "entity_id": 5, "token_idxs": [ 5 ...
[ "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O", "O", "O" ]
10,049
customers_card_transactions
spider:train_spider.json:684
How many customers do not have an account?
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
[ "How", "many", "customers", "do", "not", "have", "an", "account", "?" ]
[ { "id": 1, "type": "column", "value": "customer_id" }, { "id": 0, "type": "table", "value": "customers" }, { "id": 2, "type": "table", "value": "accounts" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]
10,050
european_football_2
bird:dev.json:1142
In the 2015–2016 season, how many games were played in the Italian Serie A league?
SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Italy Serie A' AND t2.season = '2015/2016'
[ "In", "the", "2015–2016", "season", ",", "how", "many", "games", "were", "played", "in", "the", "Italian", "Serie", "A", "league", "?" ]
[ { "id": 5, "type": "value", "value": "Italy Serie A" }, { "id": 3, "type": "column", "value": "league_id" }, { "id": 7, "type": "value", "value": "2015/2016" }, { "id": 0, "type": "table", "value": "league" }, { "id": 6, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O" ]
10,051
document_management
spider:train_spider.json:4499
Find the name and access counts of all documents, in alphabetic order of the document name.
SELECT document_name , access_count FROM documents ORDER BY document_name
[ "Find", "the", "name", "and", "access", "counts", "of", "all", "documents", ",", "in", "alphabetic", "order", "of", "the", "document", "name", "." ]
[ { "id": 1, "type": "column", "value": "document_name" }, { "id": 2, "type": "column", "value": "access_count" }, { "id": 0, "type": "table", "value": "documents" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [ 15, 16 ] }, { "entity_id": 2, "token_idxs": [ 4, 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O" ]
10,052
sports_competition
spider:train_spider.json:3382
What is the number of players who have points less than 30 for each position?
SELECT count(*) , POSITION FROM player WHERE points < 30 GROUP BY POSITION
[ "What", "is", "the", "number", "of", "players", "who", "have", "points", "less", "than", "30", "for", "each", "position", "?" ]
[ { "id": 1, "type": "column", "value": "position" }, { "id": 0, "type": "table", "value": "player" }, { "id": 2, "type": "column", "value": "points" }, { "id": 3, "type": "value", "value": "30" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "B-COLUMN", "O" ]
10,053
planet_1
bird:test.json:1884
What is the smallest number of packages received and by whom ?
select t2.name , count(*) from package as t1 join client as t2 on t1.recipient = t2.accountnumber group by t1.recipient order by count(*) limit 1;
[ "What", "is", "the", "smallest", "number", "of", "packages", "received", "and", "by", "whom", "?" ]
[ { "id": 4, "type": "column", "value": "accountnumber" }, { "id": 0, "type": "column", "value": "recipient" }, { "id": 2, "type": "table", "value": "package" }, { "id": 3, "type": "table", "value": "client" }, { "id": 1, "type": "column", "v...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O" ]
10,054
boat_1
bird:test.json:888
What is average age of all sailors who have a rating of 7?
SELECT AVG(age) FROM Sailors WHERE rating = 7
[ "What", "is", "average", "age", "of", "all", "sailors", "who", "have", "a", "rating", "of", "7", "?" ]
[ { "id": 0, "type": "table", "value": "sailors" }, { "id": 1, "type": "column", "value": "rating" }, { "id": 3, "type": "column", "value": "age" }, { "id": 2, "type": "value", "value": "7" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O" ]
10,055
retail_world
bird:train.json:6358
What is the most expensive product?
SELECT ProductName FROM Products WHERE UnitPrice = ( SELECT MAX(UnitPrice) FROM Products )
[ "What", "is", "the", "most", "expensive", "product", "?" ]
[ { "id": 1, "type": "column", "value": "productname" }, { "id": 2, "type": "column", "value": "unitprice" }, { "id": 0, "type": "table", "value": "products" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O" ]
10,056
cs_semester
bird:train.json:913
Provide the full names and emails of unpaid research assistants.
SELECT T2.f_name, T2.l_name, T2.email FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T1.salary = 'free'
[ "Provide", "the", "full", "names", "and", "emails", "of", "unpaid", "research", "assistants", "." ]
[ { "id": 7, "type": "column", "value": "student_id" }, { "id": 4, "type": "table", "value": "student" }, { "id": 0, "type": "column", "value": "f_name" }, { "id": 1, "type": "column", "value": "l_name" }, { "id": 5, "type": "column", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]