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,735
hr_1
spider:train_spider.json:3440
Which employees were hired after September 7th, 1987?
SELECT * FROM employees WHERE hire_date > '1987-09-07'
[ "Which", "employees", "were", "hired", "after", "September", "7th", ",", "1987", "?" ]
[ { "id": 2, "type": "value", "value": "1987-09-07" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 1, "type": "column", "value": "hire_date" } ]
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O" ]
9,736
e_learning
spider:train_spider.json:3776
List all the login names and family names of course author and tutors.
SELECT login_name , family_name FROM Course_Authors_and_Tutors
[ "List", "all", "the", "login", "names", "and", "family", "names", "of", "course", "author", "and", "tutors", "." ]
[ { "id": 0, "type": "table", "value": "course_authors_and_tutors" }, { "id": 2, "type": "column", "value": "family_name" }, { "id": 1, "type": "column", "value": "login_name" } ]
[ { "entity_id": 0, "token_idxs": [ 9, 10, 11, 12 ] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "to...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "I-TABLE", "I-TABLE", "I-TABLE", "O" ]
9,737
railway
spider:train_spider.json:5642
Show id and location of railways that are associated with more than one train.
SELECT T2.Railway_ID , T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID HAVING COUNT(*) > 1
[ "Show", "i", "d", "and", "location", "of", "railways", "that", "are", "associated", "with", "more", "than", "one", "train", "." ]
[ { "id": 0, "type": "column", "value": "railway_id" }, { "id": 1, "type": "column", "value": "location" }, { "id": 2, "type": "table", "value": "railway" }, { "id": 3, "type": "table", "value": "train" }, { "id": 4, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,738
chicago_crime
bird:train.json:8683
What is the average number of reckless homicides that happened in a district?
SELECT CAST(COUNT(T2.report_no) AS REAL) / COUNT(DISTINCT T1.district_name) FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no INNER JOIN IUCR AS T3 ON T3.iucr_no = T2.iucr_no WHERE T3.secondary_description = 'RECKLESS HOMICIDE'
[ "What", "is", "the", "average", "number", "of", "reckless", "homicides", "that", "happened", "in", "a", "district", "?" ]
[ { "id": 1, "type": "column", "value": "secondary_description" }, { "id": 2, "type": "value", "value": "RECKLESS HOMICIDE" }, { "id": 6, "type": "column", "value": "district_name" }, { "id": 7, "type": "column", "value": "district_no" }, { "id": 8, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6, 7 ] }, { "entity_id": 3, "token_idxs": [ 12 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "tok...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "B-TABLE", "O" ]
9,739
toxicology
bird:dev.json:315
Among the molecules which contain "cl" element, which of them are carcinogenic?
SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'cl' AND T2.label = '+'
[ "Among", "the", "molecules", "which", "contain", "\"", "cl", "\"", "element", ",", "which", "of", "them", "are", "carcinogenic", "?" ]
[ { "id": 0, "type": "column", "value": "molecule_id" }, { "id": 2, "type": "table", "value": "molecule" }, { "id": 3, "type": "column", "value": "element" }, { "id": 5, "type": "column", "value": "label" }, { "id": 1, "type": "table", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_id": 5, "...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O" ]
9,741
bike_share_1
bird:train.json:9088
Count the number of subscribers who started their trips in Market at 4th.
SELECT COUNT(CASE WHEN subscription_type = 'Subscriber' AND start_station_name = 'Market at 4th' THEN id END) FROM trip
[ "Count", "the", "number", "of", "subscribers", "who", "started", "their", "trips", "in", "Market", "at", "4th", "." ]
[ { "id": 4, "type": "column", "value": "start_station_name" }, { "id": 2, "type": "column", "value": "subscription_type" }, { "id": 5, "type": "value", "value": "Market at 4th" }, { "id": 3, "type": "value", "value": "Subscriber" }, { "id": 0, "...
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O" ]
9,742
college_1
spider:train_spider.json:3184
What is the school code of the accounting department?
SELECT school_code FROM department WHERE dept_name = "Accounting"
[ "What", "is", "the", "school", "code", "of", "the", "accounting", "department", "?" ]
[ { "id": 1, "type": "column", "value": "school_code" }, { "id": 0, "type": "table", "value": "department" }, { "id": 3, "type": "column", "value": "Accounting" }, { "id": 2, "type": "column", "value": "dept_name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3, 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id":...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
9,743
retail_world
bird:train.json:6464
Calculate the average salary per order for Andrew Fuller.
SELECT CAST(SUM(T1.Salary) AS REAL) / COUNT(T2.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Andrew' AND T1.LastName = 'Fuller'
[ "Calculate", "the", "average", "salary", "per", "order", "for", "Andrew", "Fuller", "." ]
[ { "id": 2, "type": "column", "value": "employeeid" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 3, "type": "column", "value": "firstname" }, { "id": 5, "type": "column", "value": "lastname" }, { "id": 1, "type": "table", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 7 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-VALUE", "B-VALUE", "O" ]
9,744
superhero
bird:dev.json:720
Please list the full names of all the superheroes with over 15 super powers.
SELECT DISTINCT T1.full_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id GROUP BY T1.full_name HAVING COUNT(T2.power_id) > 15
[ "Please", "list", "the", "full", "names", "of", "all", "the", "superheroes", "with", "over", "15", "super", "powers", "." ]
[ { "id": 2, "type": "table", "value": "hero_power" }, { "id": 0, "type": "column", "value": "full_name" }, { "id": 1, "type": "table", "value": "superhero" }, { "id": 6, "type": "column", "value": "power_id" }, { "id": 5, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 3, 4 ] }, { "entity_id": 1, "token_idxs": [ 8 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-TABLE", "B-COLUMN", "O" ]
9,745
tracking_orders
spider:train_spider.json:6897
What is the name of the customer who has the most orders?
SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
[ "What", "is", "the", "name", "of", "the", "customer", "who", "has", "the", "most", "orders", "?" ]
[ { "id": 1, "type": "column", "value": "customer_name" }, { "id": 0, "type": "column", "value": "customer_id" }, { "id": 2, "type": "table", "value": "customers" }, { "id": 3, "type": "table", "value": "orders" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]
9,746
race_track
spider:train_spider.json:778
What are the years of opening for tracks with seating between 4000 and 5000?
SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000
[ "What", "are", "the", "years", "of", "opening", "for", "tracks", "with", "seating", "between", "4000", "and", "5000", "?" ]
[ { "id": 1, "type": "column", "value": "year_opened" }, { "id": 2, "type": "column", "value": "seating" }, { "id": 0, "type": "table", "value": "track" }, { "id": 3, "type": "value", "value": "4000" }, { "id": 4, "type": "value", "value": "5...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 3, 4, 5 ] }, { "entity_id": 2, "token_idxs": [ 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O" ]
9,747
bakery_1
bird:test.json:1488
Give the id and flavor of the most expensive cake.
SELECT id , flavor FROM goods WHERE food = "Cake" ORDER BY price DESC LIMIT 1
[ "Give", "the", "i", "d", "and", "flavor", "of", "the", "most", "expensive", "cake", "." ]
[ { "id": 2, "type": "column", "value": "flavor" }, { "id": 0, "type": "table", "value": "goods" }, { "id": 5, "type": "column", "value": "price" }, { "id": 3, "type": "column", "value": "food" }, { "id": 4, "type": "column", "value": "Cake" ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 10 ] }, { "entity_id"...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,748
program_share
spider:train_spider.json:3733
Show me the owner of the channel with the highest rating.
SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1
[ "Show", "me", "the", "owner", "of", "the", "channel", "with", "the", "highest", "rating", "." ]
[ { "id": 2, "type": "column", "value": "rating_in_percent" }, { "id": 0, "type": "table", "value": "channel" }, { "id": 1, "type": "column", "value": "owner" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
9,750
flight_1
spider:train_spider.json:415
Show aircraft names and number of flights for each aircraft.
SELECT T2.name , count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid
[ "Show", "aircraft", "names", "and", "number", "of", "flights", "for", "each", "aircraft", "." ]
[ { "id": 3, "type": "table", "value": "aircraft" }, { "id": 2, "type": "table", "value": "flight" }, { "id": 1, "type": "column", "value": "name" }, { "id": 0, "type": "column", "value": "aid" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [ 1 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O" ]
9,752
toxicology
bird:dev.json:269
How many bond id have element iodine?
SELECT COUNT(T3.bond_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T1.element = 'i'
[ "How", "many", "bond", "i", "d", "have", "element", "iodine", "?" ]
[ { "id": 6, "type": "column", "value": "molecule_id" }, { "id": 5, "type": "table", "value": "molecule" }, { "id": 1, "type": "column", "value": "element" }, { "id": 3, "type": "column", "value": "bond_id" }, { "id": 0, "type": "table", "val...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "B-TABLE", "B-VALUE", "B-COLUMN", "O", "B-COLUMN", "O", "O" ]
9,753
university
bird:train.json:8107
Calculate the average number of students of all universities in 2012.
SELECT AVG(num_students) FROM university_year WHERE year = 2012
[ "Calculate", "the", "average", "number", "of", "students", "of", "all", "universities", "in", "2012", "." ]
[ { "id": 0, "type": "table", "value": "university_year" }, { "id": 3, "type": "column", "value": "num_students" }, { "id": 1, "type": "column", "value": "year" }, { "id": 2, "type": "value", "value": "2012" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
9,754
university
bird:train.json:8082
What are the names of the universities that got 98 in teaching in 2011?
SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 AND T2.score = 98
[ "What", "are", "the", "names", "of", "the", "universities", "that", "got", "98", "in", "teaching", "in", "2011", "?" ]
[ { "id": 3, "type": "table", "value": "university_ranking_year" }, { "id": 12, "type": "column", "value": "ranking_criteria_id" }, { "id": 2, "type": "table", "value": "ranking_criteria" }, { "id": 0, "type": "column", "value": "university_name" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "B-VALUE", "O" ]
9,756
voter_2
spider:train_spider.json:5447
How many voting records do we have?
SELECT count(*) FROM VOTING_RECORD
[ "How", "many", "voting", "records", "do", "we", "have", "?" ]
[ { "id": 0, "type": "table", "value": "voting_record" } ]
[ { "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": [] }, { "entity_id": 5, "token_idxs": [] ...
[ "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "O" ]
9,757
cre_Students_Information_Systems
bird:test.json:457
List the biographical data and the date of the transcript of all the students.
SELECT T1.bio_data , T2.date_of_transcript FROM Students AS T1 JOIN Transcripts AS T2 ON T1.student_id = T2.student_id
[ "List", "the", "biographical", "data", "and", "the", "date", "of", "the", "transcript", "of", "all", "the", "students", "." ]
[ { "id": 1, "type": "column", "value": "date_of_transcript" }, { "id": 3, "type": "table", "value": "transcripts" }, { "id": 4, "type": "column", "value": "student_id" }, { "id": 0, "type": "column", "value": "bio_data" }, { "id": 2, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "B-TABLE", "O", "O", "O", "B-TABLE", "O" ]
9,758
hospital_1
spider:train_spider.json:3923
What is the name of the medication used for the patient staying in room 111?
SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111
[ "What", "is", "the", "name", "of", "the", "medication", "used", "for", "the", "patient", "staying", "in", "room", "111", "?" ]
[ { "id": 1, "type": "table", "value": "medication" }, { "id": 4, "type": "table", "value": "prescribes" }, { "id": 5, "type": "column", "value": "medication" }, { "id": 8, "type": "table", "value": "patient" }, { "id": 9, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 14 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "B-COLUMN", "B-VALUE", "O" ]
9,759
talkingdata
bird:train.json:1133
For the event which happened at 14:09:49 on 2016/5/6, in the location coordinate(116, 40), how many apps were active?
SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id WHERE T2.timestamp = '2016-05-06 14:09:49' AND T1.is_active = '1' AND T2.longitude = '116' AND T2.latitude = '40'
[ "For", "the", "event", "which", "happened", "at", "14:09:49", "on", "2016/5/6", ",", "in", "the", "location", "coordinate(116", ",", "40", ")", ",", "how", "many", "apps", "were", "active", "?" ]
[ { "id": 5, "type": "value", "value": "2016-05-06 14:09:49" }, { "id": 0, "type": "table", "value": "app_events" }, { "id": 4, "type": "column", "value": "timestamp" }, { "id": 6, "type": "column", "value": "is_active" }, { "id": 8, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 20 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
9,760
music_2
spider:train_spider.json:5186
Find all the songs produced by artists with first name "Marianne".
SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = "Marianne"
[ "Find", "all", "the", "songs", "produced", "by", "artists", "with", "first", "name", "\"", "Marianne", "\"", "." ]
[ { "id": 4, "type": "table", "value": "performance" }, { "id": 2, "type": "column", "value": "firstname" }, { "id": 3, "type": "column", "value": "Marianne" }, { "id": 7, "type": "column", "value": "bandmate" }, { "id": 6, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id"...
[ "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "O", "O" ]
9,762
thrombosis_prediction
bird:dev.json:1282
Please list the top three patients' birthdays with the highest glutamic pylvic transaminase in the normal range.
SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT < 60 ORDER BY T2.GPT DESC LIMIT 3
[ "Please", "list", "the", "top", "three", "patients", "'", "birthdays", "with", "the", "highest", "glutamic", "pylvic", "transaminase", "in", "the", "normal", "range", "." ]
[ { "id": 2, "type": "table", "value": "laboratory" }, { "id": 0, "type": "column", "value": "birthday" }, { "id": 1, "type": "table", "value": "patient" }, { "id": 3, "type": "column", "value": "gpt" }, { "id": 4, "type": "value", "value": "...
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,764
law_episode
bird:train.json:1317
Write down the title, summary, and air date of the episode that garnered 72 10-star votes.
SELECT T2.title, T2.summary, T2.air_date FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.stars = 10 AND T1.votes = 72
[ "Write", "down", "the", "title", ",", "summary", ",", "and", "air", "date", "of", "the", "episode", "that", "garnered", "72", "10", "-", "star", "votes", "." ]
[ { "id": 5, "type": "column", "value": "episode_id" }, { "id": 2, "type": "column", "value": "air_date" }, { "id": 1, "type": "column", "value": "summary" }, { "id": 4, "type": "table", "value": "episode" }, { "id": 0, "type": "column", "val...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [ 19 ] }, { "entity_id": 4, "token_idxs": [ 12 ...
[ "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-VALUE", "O", "B-COLUMN", "B-TABLE", "O" ]
9,765
student_loan
bird:train.json:4368
How many students have never been absent from school?
SELECT COUNT(name) FROM longest_absense_from_school WHERE `month` = 0
[ "How", "many", "students", "have", "never", "been", "absent", "from", "school", "?" ]
[ { "id": 0, "type": "table", "value": "longest_absense_from_school" }, { "id": 1, "type": "column", "value": "month" }, { "id": 3, "type": "column", "value": "name" }, { "id": 2, "type": "value", "value": "0" } ]
[ { "entity_id": 0, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_id...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
9,766
mondial_geo
bird:train.json:8313
Please list the countries on the European Continent that have a population growth of more than 3%.
SELECT T2.Country FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent INNER JOIN population AS T4 ON T4.Country = T1.Code WHERE T3.Name = 'Europe' AND T4.Population_Growth > 0.03
[ "Please", "list", "the", "countries", "on", "the", "European", "Continent", "that", "have", "a", "population", "growth", "of", "more", "than", "3", "%", "." ]
[ { "id": 6, "type": "column", "value": "population_growth" }, { "id": 9, "type": "table", "value": "encompasses" }, { "id": 1, "type": "table", "value": "population" }, { "id": 2, "type": "table", "value": "continent" }, { "id": 10, "type": "col...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 6 ...
[ "O", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
9,767
driving_school
spider:train_spider.json:6679
What is the maximum, minimum, and average amount of money outsanding for all customers?
SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers;
[ "What", "is", "the", "maximum", ",", "minimum", ",", "and", "average", "amount", "of", "money", "outsanding", "for", "all", "customers", "?" ]
[ { "id": 1, "type": "column", "value": "amount_outstanding" }, { "id": 0, "type": "table", "value": "customers" } ]
[ { "entity_id": 0, "token_idxs": [ 15 ] }, { "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, "t...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O" ]
9,768
thrombosis_prediction
bird:dev.json:1213
Name the ID of the patient who is born on the April 1st, 1982. Is his/her alkaliphophatase (ALP) within normal range?
SELECT T1.ID , CASE WHEN T2.ALP < 300 THEN 'normal' ELSE 'abNormal' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1982-04-01'
[ "Name", "the", "ID", "of", "the", "patient", "who", "is", "born", "on", "the", "April", "1st", ",", "1982", ".", "Is", "his", "/", "her", "alkaliphophatase", "(", "ALP", ")", "within", "normal", "range", "?" ]
[ { "id": 2, "type": "table", "value": "laboratory" }, { "id": 4, "type": "value", "value": "1982-04-01" }, { "id": 3, "type": "column", "value": "birthday" }, { "id": 5, "type": "value", "value": "abNormal" }, { "id": 1, "type": "table", "va...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
9,769
sports_competition
spider:train_spider.json:3339
List the distinct region of clubs in ascending alphabetical order.
SELECT DISTINCT Region FROM club ORDER BY Region ASC
[ "List", "the", "distinct", "region", "of", "clubs", "in", "ascending", "alphabetical", "order", "." ]
[ { "id": 1, "type": "column", "value": "region" }, { "id": 0, "type": "table", "value": "club" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O" ]
9,770
works_cycles
bird:train.json:7325
Please provide contact details of all Marketing Managers. State their name and phone number.
SELECT T1.FirstName, T1.LastName, T2.PhoneNumber FROM Person AS T1 INNER JOIN PersonPhone AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Employee AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T3.JobTitle = 'Marketing Manager'
[ "Please", "provide", "contact", "details", "of", "all", "Marketing", "Managers", ".", "State", "their", "name", "and", "phone", "number", "." ]
[ { "id": 5, "type": "value", "value": "Marketing Manager" }, { "id": 8, "type": "column", "value": "businessentityid" }, { "id": 2, "type": "column", "value": "phonenumber" }, { "id": 7, "type": "table", "value": "personphone" }, { "id": 0, "typ...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "O" ]
9,772
e_learning
spider:train_spider.json:3840
Find the student ID and middle name for all the students with at most two enrollments.
SELECT T1.student_id , T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2
[ "Find", "the", "student", "ID", "and", "middle", "name", "for", "all", "the", "students", "with", "at", "most", "two", "enrollments", "." ]
[ { "id": 2, "type": "table", "value": "student_course_enrolment" }, { "id": 1, "type": "column", "value": "middle_name" }, { "id": 0, "type": "column", "value": "student_id" }, { "id": 3, "type": "table", "value": "students" }, { "id": 4, "type"...
[ { "entity_id": 0, "token_idxs": [ 2, 3 ] }, { "entity_id": 1, "token_idxs": [ 5, 6 ] }, { "entity_id": 2, "token_idxs": [ 13, 14, 15 ] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "O" ]
9,773
regional_sales
bird:train.json:2601
Calculate the order percentage by "Carlos Miller" sales team.
SELECT CAST(SUM(CASE WHEN T2.`Sales Team` = 'Carlos Miller' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID
[ "Calculate", "the", "order", "percentage", "by", "\"", "Carlos", "Miller", "\"", "sales", "team", "." ]
[ { "id": 9, "type": "value", "value": "Carlos Miller" }, { "id": 0, "type": "table", "value": "Sales Orders" }, { "id": 3, "type": "column", "value": "_salesteamid" }, { "id": 2, "type": "column", "value": "salesteamid" }, { "id": 5, "type": "co...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 2 ...
[ "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-VALUE", "I-VALUE", "O", "B-COLUMN", "I-COLUMN", "O" ]
9,775
cre_Students_Information_Systems
bird:test.json:503
How many courses does each student take? List the student id, the student biographical data and the course count.
SELECT T1.student_id , T1.bio_data , count(*) FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id
[ "How", "many", "courses", "does", "each", "student", "take", "?", "List", "the", "student", "i", "d", ",", "the", "student", "biographical", "data", "and", "the", "course", "count", "." ]
[ { "id": 0, "type": "column", "value": "student_id" }, { "id": 1, "type": "column", "value": "bio_data" }, { "id": 2, "type": "table", "value": "students" }, { "id": 3, "type": "table", "value": "classes" } ]
[ { "entity_id": 0, "token_idxs": [ 11, 12 ] }, { "entity_id": 1, "token_idxs": [ 17 ] }, { "entity_id": 2, "token_idxs": [ 10 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O" ]
9,776
cre_Doc_and_collections
bird:test.json:676
Who is the owner of the parent document of every documents where 'Marlin' is the owner?
SELECT T2.Owner FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID WHERE T1.Owner = 'Marlin'
[ "Who", "is", "the", "owner", "of", "the", "parent", "document", "of", "every", "documents", "where", "'", "Marlin", "'", "is", "the", "owner", "?" ]
[ { "id": 3, "type": "column", "value": "parent_document_object_id" }, { "id": 4, "type": "column", "value": "document_object_id" }, { "id": 1, "type": "table", "value": "document_objects" }, { "id": 2, "type": "value", "value": "Marlin" }, { "id": 0...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 13 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 7, 8 ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "I-COLUMN", "O", "B-TABLE", "O", "O", "B-VALUE", "O", "O", "O", "B-COLUMN", "O" ]
9,777
world_development_indicators
bird:train.json:2173
State the currency of Malaysia and what are the indicator code used by this country in 1970?
SELECT T1.currencyunit, T2.IndicatorCode FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.TableName = 'Malaysia' AND T2.Year = 1970
[ "State", "the", "currency", "of", "Malaysia", "and", "what", "are", "the", "indicator", "code", "used", "by", "this", "country", "in", "1970", "?" ]
[ { "id": 1, "type": "column", "value": "indicatorcode" }, { "id": 0, "type": "column", "value": "currencyunit" }, { "id": 4, "type": "column", "value": "countrycode" }, { "id": 3, "type": "table", "value": "indicators" }, { "id": 5, "type": "col...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 14 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "B-VALUE", "O" ]
9,778
country_language
bird:test.json:1378
Show the official languages and the number of countries speaking each language.
SELECT T2.name , COUNT(*) FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.name
[ "Show", "the", "official", "languages", "and", "the", "number", "of", "countries", "speaking", "each", "language", "." ]
[ { "id": 1, "type": "table", "value": "official_languages" }, { "id": 3, "type": "column", "value": "language_id" }, { "id": 2, "type": "table", "value": "languages" }, { "id": 0, "type": "column", "value": "name" }, { "id": 4, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-TABLE", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,779
small_bank_1
spider:train_spider.json:1784
How many accounts have a savings balance above the average savings balance?
SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings)
[ "How", "many", "accounts", "have", "a", "savings", "balance", "above", "the", "average", "savings", "balance", "?" ]
[ { "id": 0, "type": "table", "value": "savings" }, { "id": 1, "type": "column", "value": "balance" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 11 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,780
authors
bird:train.json:3605
Give the Title and author's name of the books that were preprint in 1997.
SELECT DISTINCT T2.Name, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.ConferenceId = 0 AND T1.JournalId = 0 AND T1.Year = 1997 AND T1.Title <> ''
[ "Give", "the", "Title", "and", "author", "'s", "name", "of", "the", "books", "that", "were", "preprint", "in", "1997", "." ]
[ { "id": 6, "type": "column", "value": "conferenceid" }, { "id": 3, "type": "table", "value": "paperauthor" }, { "id": 8, "type": "column", "value": "journalid" }, { "id": 5, "type": "column", "value": "paperid" }, { "id": 1, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "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, "...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
9,781
perpetrator
spider:train_spider.json:2314
What are the heights of perpetrators in descending order of the number of people they injured?
SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC
[ "What", "are", "the", "heights", "of", "perpetrators", "in", "descending", "order", "of", "the", "number", "of", "people", "they", "injured", "?" ]
[ { "id": 2, "type": "table", "value": "perpetrator" }, { "id": 4, "type": "column", "value": "people_id" }, { "id": 3, "type": "column", "value": "injured" }, { "id": 0, "type": "column", "value": "height" }, { "id": 1, "type": "table", "val...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [ 15 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O" ]
9,782
retail_world
bird:train.json:6429
What are the products that belong to the beverage category?
SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Beverages'
[ "What", "are", "the", "products", "that", "belong", "to", "the", "beverage", "category", "?" ]
[ { "id": 3, "type": "column", "value": "categoryname" }, { "id": 0, "type": "column", "value": "productname" }, { "id": 1, "type": "table", "value": "categories" }, { "id": 5, "type": "column", "value": "categoryid" }, { "id": 4, "type": "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 8 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "B-COLUMN", "O" ]
9,783
school_finance
spider:train_spider.json:1899
List the amount and donor name for the largest amount of donation.
SELECT amount , donator_name FROM endowment ORDER BY amount DESC LIMIT 1
[ "List", "the", "amount", "and", "donor", "name", "for", "the", "largest", "amount", "of", "donation", "." ]
[ { "id": 2, "type": "column", "value": "donator_name" }, { "id": 0, "type": "table", "value": "endowment" }, { "id": 1, "type": "column", "value": "amount" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 4, 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
9,784
voter_2
spider:train_spider.json:5508
Which major has the most students?
SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1
[ "Which", "major", "has", "the", "most", "students", "?" ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "major" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "O" ]
9,785
university
bird:train.json:7995
In 2014, what is the name of the university which was considered a leader in the publications rank?
SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Publications Rank' AND T2.year = 2014 AND T1.id = 17 ORDER BY T2.score DESC LIMIT 1
[ "In", "2014", ",", "what", "is", "the", "name", "of", "the", "university", "which", "was", "considered", "a", "leader", "in", "the", "publications", "rank", "?" ]
[ { "id": 4, "type": "table", "value": "university_ranking_year" }, { "id": 12, "type": "column", "value": "ranking_criteria_id" }, { "id": 8, "type": "value", "value": "Publications Rank" }, { "id": 3, "type": "table", "value": "ranking_criteria" }, { ...
[ { "entity_id": 0, "token_idxs": [] }, { "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", "B-VALUE", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "I-VALUE", "O" ]
9,786
movie_3
bird:train.json:9142
What is Diane Collins' email address?
SELECT email FROM customer WHERE first_name = 'DIANE' AND last_name = 'COLLINS'
[ "What", "is", "Diane", "Collins", "'", "email", "address", "?" ]
[ { "id": 2, "type": "column", "value": "first_name" }, { "id": 4, "type": "column", "value": "last_name" }, { "id": 0, "type": "table", "value": "customer" }, { "id": 5, "type": "value", "value": "COLLINS" }, { "id": 1, "type": "column", "va...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-VALUE", "B-VALUE", "O", "B-COLUMN", "O", "O" ]
9,787
public_review_platform
bird:train.json:3768
For the user who gave the most number of long reviews, what is his/her averge ratings of all review?
SELECT CAST(SUM(T1.review_stars) AS REAL) / COUNT(T1.review_stars) FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.review_length LIKE 'Long' GROUP BY T1.user_id ORDER BY COUNT(T1.review_length) DESC LIMIT 1
[ "For", "the", "user", "who", "gave", "the", "most", "number", "of", "long", "reviews", ",", "what", "is", "his", "/", "her", "averge", "ratings", "of", "all", "review", "?" ]
[ { "id": 3, "type": "column", "value": "review_length" }, { "id": 5, "type": "column", "value": "review_stars" }, { "id": 0, "type": "column", "value": "user_id" }, { "id": 1, "type": "table", "value": "reviews" }, { "id": 2, "type": "table", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 10 ] }, { "entity_id": 2, "token_idxs": [ 2 ] }, { "entity_id": 3, "token_idxs": [ 21 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entit...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O" ]
9,788
olympics
bird:train.json:5077
How many female competitors were from Iran?
SELECT COUNT(T2.person_id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Iran' AND T3.gender = 'F'
[ "How", "many", "female", "competitors", "were", "from", "Iran", "?" ]
[ { "id": 3, "type": "table", "value": "person_region" }, { "id": 5, "type": "column", "value": "region_name" }, { "id": 2, "type": "table", "value": "noc_region" }, { "id": 1, "type": "column", "value": "person_id" }, { "id": 9, "type": "column"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
9,789
mondial_geo
bird:train.json:8274
Which country has the most neighbors? Give the full name of the country.
SELECT T1.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 GROUP BY T1.Name ORDER BY COUNT(T1.Name) DESC LIMIT 1
[ "Which", "country", "has", "the", "most", "neighbors", "?", "Give", "the", "full", "name", "of", "the", "country", "." ]
[ { "id": 4, "type": "column", "value": "country1" }, { "id": 1, "type": "table", "value": "country" }, { "id": 2, "type": "table", "value": "borders" }, { "id": 0, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": "c...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 1 ] }, { "entity_id": 5, ...
[ "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
9,790
apartment_rentals
spider:train_spider.json:1268
How many apartments do not have any facility?
SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
[ "How", "many", "apartments", "do", "not", "have", "any", "facility", "?" ]
[ { "id": 2, "type": "table", "value": "apartment_facilities" }, { "id": 0, "type": "table", "value": "apartments" }, { "id": 1, "type": "column", "value": "apt_id" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
9,791
warehouse_1
bird:test.json:1746
In how many different warehouses are Rocks stored within boxes?
SELECT count(DISTINCT LOCATION) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks'
[ "In", "how", "many", "different", "warehouses", "are", "Rocks", "stored", "within", "boxes", "?" ]
[ { "id": 1, "type": "table", "value": "warehouses" }, { "id": 5, "type": "column", "value": "warehouse" }, { "id": 2, "type": "column", "value": "contents" }, { "id": 4, "type": "column", "value": "location" }, { "id": 0, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "O", "B-TABLE", "O" ]
9,792
financial
bird:dev.json:171
What was the difference in the number of crimes committed in East and North Bohemia in 1996?
SELECT SUM(IIF(A3 = 'east Bohemia', A16, 0)) - SUM(IIF(A3 = 'north Bohemia', A16, 0)) FROM district
[ "What", "was", "the", "difference", "in", "the", "number", "of", "crimes", "committed", "in", "East", "and", "North", "Bohemia", "in", "1996", "?" ]
[ { "id": 5, "type": "value", "value": "north Bohemia" }, { "id": 4, "type": "value", "value": "east Bohemia" }, { "id": 0, "type": "table", "value": "district" }, { "id": 1, "type": "column", "value": "a16" }, { "id": 3, "type": "column", "v...
[ { "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": [ 14 ] }, { "entity_id": 5, "token_idxs": [ 13 ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "B-VALUE", "O", "O", "O" ]
9,793
disney
bird:train.json:4631
Among the movies directed by Wolfgang Reitherman, which one of them was the most popular?
SELECT T2.movie_title FROM director AS T1 INNER JOIN movies_total_gross AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Wolfgang Reitherman' ORDER BY T2.total_gross DESC LIMIT 1
[ "Among", "the", "movies", "directed", "by", "Wolfgang", "Reitherman", ",", "which", "one", "of", "them", "was", "the", "most", "popular", "?" ]
[ { "id": 4, "type": "value", "value": "Wolfgang Reitherman" }, { "id": 2, "type": "table", "value": "movies_total_gross" }, { "id": 0, "type": "column", "value": "movie_title" }, { "id": 5, "type": "column", "value": "total_gross" }, { "id": 1, ...
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 5, 6 ] }, { "entity_id":...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,794
hr_1
spider:train_spider.json:3515
display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.
SELECT first_name , last_name , salary , department_id , MAX(salary) FROM employees GROUP BY department_id
[ "display", "the", "department", "ID", ",", "full", "name", "(", "first", "and", "last", "name", ")", ",", "salary", "for", "those", "employees", "who", "is", "highest", "salary", "in", "every", "department", "." ]
[ { "id": 1, "type": "column", "value": "department_id" }, { "id": 2, "type": "column", "value": "first_name" }, { "id": 0, "type": "table", "value": "employees" }, { "id": 3, "type": "column", "value": "last_name" }, { "id": 4, "type": "column",...
[ { "entity_id": 0, "token_idxs": [ 17 ] }, { "entity_id": 1, "token_idxs": [ 2, 3 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 10, 11 ] }, { "entity_id": 4, "token_idxs": [ ...
[ "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O" ]
9,795
retail_complains
bird:train.json:240
On which day was the most verbose complaint received?
SELECT `Date received` FROM callcenterlogs WHERE ser_time = ( SELECT MAX(ser_time) FROM callcenterlogs )
[ "On", "which", "day", "was", "the", "most", "verbose", "complaint", "received", "?" ]
[ { "id": 0, "type": "table", "value": "callcenterlogs" }, { "id": 1, "type": "column", "value": "Date received" }, { "id": 2, "type": "column", "value": "ser_time" } ]
[ { "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-COLUMN", "O" ]
9,796
city_record
spider:train_spider.json:6307
Which cities have served as host cities more than once? Return me their GDP and population.
SELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City HAVING count(*) > 1
[ "Which", "cities", "have", "served", "as", "host", "cities", "more", "than", "once", "?", "Return", "me", "their", "GDP", "and", "population", "." ]
[ { "id": 2, "type": "column", "value": "regional_population" }, { "id": 4, "type": "table", "value": "hosting_city" }, { "id": 0, "type": "column", "value": "host_city" }, { "id": 6, "type": "column", "value": "city_id" }, { "id": 3, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 14 ] }, { "entity_id": 2, "token_idxs": [ 16 ] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [] }, { "entit...
[ "O", "B-COLUMN", "O", "O", "O", "B-COLUMN", "B-TABLE", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O" ]
9,797
book_1
bird:test.json:550
Give the name of the client who has made the most orders.
SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient GROUP BY T1.idClient ORDER BY count(*) DESC LIMIT 1
[ "Give", "the", "name", "of", "the", "client", "who", "has", "made", "the", "most", "orders", "." ]
[ { "id": 0, "type": "column", "value": "idclient" }, { "id": 2, "type": "table", "value": "orders" }, { "id": 3, "type": "table", "value": "client" }, { "id": 1, "type": "column", "value": "name" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [ 5 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "B-TABLE", "O" ]
9,798
election
spider:train_spider.json:2760
Which delegates are from counties with population smaller than 100000?
SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000
[ "Which", "delegates", "are", "from", "counties", "with", "population", "smaller", "than", "100000", "?" ]
[ { "id": 3, "type": "column", "value": "population" }, { "id": 5, "type": "column", "value": "county_id" }, { "id": 0, "type": "column", "value": "delegate" }, { "id": 2, "type": "table", "value": "election" }, { "id": 6, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [ 1 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 6 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_...
[ "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
9,799
music_1
spider:train_spider.json:3612
What country is the artist who made the fewest songs from?
SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1
[ "What", "country", "is", "the", "artist", "who", "made", "the", "fewest", "songs", "from", "?" ]
[ { "id": 0, "type": "column", "value": "artist_name" }, { "id": 1, "type": "column", "value": "country" }, { "id": 2, "type": "table", "value": "artist" }, { "id": 3, "type": "table", "value": "song" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O", "O" ]
9,800
student_club
bird:dev.json:1343
With the biggest budget for the "Food", what was the remaining of it?
SELECT remaining FROM budget WHERE category = 'Food' AND amount = ( SELECT MAX(amount) FROM budget WHERE category = 'Food' )
[ "With", "the", "biggest", "budget", "for", "the", "\"", "Food", "\"", ",", "what", "was", "the", "remaining", "of", "it", "?" ]
[ { "id": 1, "type": "column", "value": "remaining" }, { "id": 2, "type": "column", "value": "category" }, { "id": 0, "type": "table", "value": "budget" }, { "id": 4, "type": "column", "value": "amount" }, { "id": 3, "type": "value", "value":...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 13 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "B-VALUE", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O" ]
9,801
sakila_1
spider:train_spider.json:2974
Where is store 1 located?
SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1
[ "Where", "is", "store", "1", "located", "?" ]
[ { "id": 5, "type": "column", "value": "address_id" }, { "id": 3, "type": "column", "value": "store_id" }, { "id": 0, "type": "column", "value": "address" }, { "id": 2, "type": "table", "value": "address" }, { "id": 1, "type": "table", "valu...
[ { "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": [ 3 ] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "B-VALUE", "O", "O" ]
9,802
allergy_1
spider:train_spider.json:499
Show all advisors and corresponding number of students.
SELECT advisor , count(*) FROM Student GROUP BY advisor
[ "Show", "all", "advisors", "and", "corresponding", "number", "of", "students", "." ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "advisor" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-TABLE", "O" ]
9,803
debit_card_specializing
bird:dev.json:1502
Please list the chains of the gas stations with transactions in euro.
SELECT DISTINCT T3.ChainID FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN gasstations AS T3 ON T1.GasStationID = T3.GasStationID WHERE T2.Currency = 'EUR'
[ "Please", "list", "the", "chains", "of", "the", "gas", "stations", "with", "transactions", "in", "euro", "." ]
[ { "id": 4, "type": "table", "value": "transactions_1k" }, { "id": 6, "type": "column", "value": "gasstationid" }, { "id": 1, "type": "table", "value": "gasstations" }, { "id": 7, "type": "column", "value": "customerid" }, { "id": 5, "type": "ta...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { ...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "O", "B-TABLE", "O", "B-VALUE", "O" ]
9,804
image_and_language
bird:train.json:7602
What object class is in the X and Y coordinates of 126 and 363?
SELECT T1.IMG_ID, T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 126 AND T1.Y = 363
[ "What", "object", "class", "is", "in", "the", "X", "and", "Y", "coordinates", "of", "126", "and", "363", "?" ]
[ { "id": 4, "type": "column", "value": "obj_class_id" }, { "id": 3, "type": "table", "value": "obj_classes" }, { "id": 1, "type": "column", "value": "obj_class" }, { "id": 2, "type": "table", "value": "img_obj" }, { "id": 0, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 1, 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "toke...
[ "O", "B-COLUMN", "I-COLUMN", "B-COLUMN", "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-VALUE", "O", "B-VALUE", "O" ]
9,805
college_1
spider:train_spider.json:3206
How many classes are held in each department?
SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code
[ "How", "many", "classes", "are", "held", "in", "each", "department", "?" ]
[ { "id": 0, "type": "column", "value": "dept_code" }, { "id": 3, "type": "column", "value": "crs_code" }, { "id": 2, "type": "table", "value": "course" }, { "id": 1, "type": "table", "value": "class" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
9,806
soccer_2016
bird:train.json:1867
List the names and countries of the players from Gujarat Lions who played in the match held on 11th April 2016.
SELECT T4.Player_Name, T5.Country_Name FROM Player_Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Team_Id INNER JOIN Match AS T3 ON T3.Match_Id = T1.Match_Id INNER JOIN Player AS T4 ON T4.Player_Id = T1.Player_Id INNER JOIN Country AS T5 ON T5.Country_Id = T4.Country_Name WHERE T2.Team_Name = 'Gujarat Lions' AND ...
[ "List", "the", "names", "and", "countries", "of", "the", "players", "from", "Gujarat", "Lions", "who", "played", "in", "the", "match", "held", "on", "11th", "April", "2016", "." ]
[ { "id": 6, "type": "value", "value": "Gujarat Lions" }, { "id": 1, "type": "column", "value": "country_name" }, { "id": 11, "type": "table", "value": "player_match" }, { "id": 0, "type": "column", "value": "player_name" }, { "id": 4, "type": "c...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "B-TABLE", "I-TABLE", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-VALUE", "I-VALUE", "O", "B-COLUMN", "B-TABLE", "I-TABLE", "B-TABLE", "O", "O", "O", "O", "O", "O" ]
9,807
election
spider:train_spider.json:2780
Return the names of all counties sorted by county name in descending alphabetical order.
SELECT County_name FROM county ORDER BY County_name DESC
[ "Return", "the", "names", "of", "all", "counties", "sorted", "by", "county", "name", "in", "descending", "alphabetical", "order", "." ]
[ { "id": 1, "type": "column", "value": "county_name" }, { "id": 0, "type": "table", "value": "county" } ]
[ { "entity_id": 0, "token_idxs": [ 8 ] }, { "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", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O" ]
9,808
institution_sports
bird:test.json:1654
Return the stadiums of institutions, ordered by capacity descending.
SELECT Stadium FROM institution ORDER BY Capacity DESC
[ "Return", "the", "stadiums", "of", "institutions", ",", "ordered", "by", "capacity", "descending", "." ]
[ { "id": 0, "type": "table", "value": "institution" }, { "id": 2, "type": "column", "value": "capacity" }, { "id": 1, "type": "column", "value": "stadium" } ]
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O", "O" ]
9,809
advertising_agencies
bird:test.json:2066
How many clients does each agency have?
SELECT agency_id , count(*) FROM Clients GROUP BY agency_id
[ "How", "many", "clients", "does", "each", "agency", "have", "?" ]
[ { "id": 1, "type": "column", "value": "agency_id" }, { "id": 0, "type": "table", "value": "clients" } ]
[ { "entity_id": 0, "token_idxs": [ 2 ] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O" ]
9,810
club_1
spider:train_spider.json:4315
Find the average age of the members in the club "Bootup Baltimore".
SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore"
[ "Find", "the", "average", "age", "of", "the", "members", "in", "the", "club", "\"", "Bootup", "Baltimore", "\"", "." ]
[ { "id": 2, "type": "column", "value": "Bootup Baltimore" }, { "id": 5, "type": "table", "value": "member_of_club" }, { "id": 1, "type": "column", "value": "clubname" }, { "id": 0, "type": "table", "value": "student" }, { "id": 7, "type": "colum...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11, 12 ] }, { "entity_id": 3, "token_idxs": [ 3 ] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "I-TABLE", "I-TABLE", "B-TABLE", "O", "B-COLUMN", "I-COLUMN", "O", "O" ]
9,811
app_store
bird:train.json:2521
Name the top 10 most reviewed apps.
SELECT DISTINCT App FROM playstore ORDER BY Reviews DESC LIMIT 10
[ "Name", "the", "top", "10", "most", "reviewed", "apps", "." ]
[ { "id": 0, "type": "table", "value": "playstore" }, { "id": 2, "type": "column", "value": "reviews" }, { "id": 1, "type": "column", "value": "app" } ]
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6 ] }, { "entity_id": 2, "token_idxs": [ 5 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O" ]
9,812
cre_Doc_and_collections
bird:test.json:720
What is the collection name of a document owned by 'Ransom'?
SELECT T1.Collection_Name FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID JOIN Document_Objects AS T3 ON T2.Document_object_id = T3.Document_object_id WHERE T3.owner = 'Ransom'
[ "What", "is", "the", "collection", "name", "of", "a", "document", "owned", "by", "'", "Ransom", "'", "?" ]
[ { "id": 5, "type": "table", "value": "documents_in_collections" }, { "id": 6, "type": "column", "value": "document_object_id" }, { "id": 1, "type": "table", "value": "document_objects" }, { "id": 0, "type": "column", "value": "collection_name" }, { ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 11 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, ...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "B-VALUE", "O", "O" ]
9,814
superstore
bird:train.json:2410
List the name of all the products with order quantities greater than or equal to 10 in the central superstore that has been shipped by the slowest delivery method.
SELECT DISTINCT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'Standard Class' AND T1.Quantity >= 10
[ "List", "the", "name", "of", "all", "the", "products", "with", "order", "quantities", "greater", "than", "or", "equal", "to", "10", "in", "the", "central", "superstore", "that", "has", "been", "shipped", "by", "the", "slowest", "delivery", "method", "." ]
[ { "id": 1, "type": "table", "value": "central_superstore" }, { "id": 5, "type": "value", "value": "Standard Class" }, { "id": 0, "type": "column", "value": "Product Name" }, { "id": 3, "type": "column", "value": "Product ID" }, { "id": 4, "type...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 18, 19 ] }, { "entity_id": 2, "token_idxs": [ 6 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 23 ] }, { "entity_i...
[ "O", "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "B-VALUE", "O", "O", "B-TABLE", "I-TABLE", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O" ]
9,815
mondial_geo
bird:train.json:8243
Among the countries with the African ethnic group, how many of them has a population of over 10000000?
SELECT COUNT(T1.Name) FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'African' AND T1.Area > 10000000
[ "Among", "the", "countries", "with", "the", "African", "ethnic", "group", ",", "how", "many", "of", "them", "has", "a", "population", "of", "over", "10000000", "?" ]
[ { "id": 1, "type": "table", "value": "ethnicgroup" }, { "id": 7, "type": "value", "value": "10000000" }, { "id": 0, "type": "table", "value": "country" }, { "id": 4, "type": "column", "value": "country" }, { "id": 5, "type": "value", "value...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 6, 7 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 2 ] }, { "entity_id": 5, "toke...
[ "O", "O", "B-COLUMN", "O", "O", "B-VALUE", "B-TABLE", "I-TABLE", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
9,816
tracking_orders
spider:train_spider.json:6939
Find the name of the customers who have at most two orders.
SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) <= 2
[ "Find", "the", "name", "of", "the", "customers", "who", "have", "at", "most", "two", "orders", "." ]
[ { "id": 1, "type": "column", "value": "customer_name" }, { "id": 0, "type": "column", "value": "customer_id" }, { "id": 3, "type": "table", "value": "customers" }, { "id": 2, "type": "table", "value": "orders" }, { "id": 4, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "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", "B-TABLE", "O" ]
9,817
retail_world
bird:train.json:6637
What is the name of product with the ID of 77?
SELECT ProductName FROM Products WHERE ProductID = 77
[ "What", "is", "the", "name", "of", "product", "with", "the", "ID", "of", "77", "?" ]
[ { "id": 1, "type": "column", "value": "productname" }, { "id": 2, "type": "column", "value": "productid" }, { "id": 0, "type": "table", "value": "products" }, { "id": 3, "type": "value", "value": "77" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs":...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-VALUE", "O" ]
9,818
address
bird:train.json:5187
What is the number of households in the "FL-10" district?
SELECT SUM(CASE WHEN T2.district = 'FL-10' THEN 1 ELSE 0 END) FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code
[ "What", "is", "the", "number", "of", "households", "in", "the", "\"", "FL-10", "\"", "district", "?" ]
[ { "id": 1, "type": "table", "value": "zip_congress" }, { "id": 0, "type": "table", "value": "zip_data" }, { "id": 2, "type": "column", "value": "zip_code" }, { "id": 5, "type": "column", "value": "district" }, { "id": 6, "type": "value", "v...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 11 ] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O", "B-COLUMN", "O" ]
9,819
products_gen_characteristics
spider:train_spider.json:5558
What are all the characteristic names of product "sesame"?
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame"
[ "What", "are", "all", "the", "characteristic", "names", "of", "product", "\"", "sesame", "\"", "?" ]
[ { "id": 5, "type": "table", "value": "product_characteristics" }, { "id": 0, "type": "column", "value": "characteristic_name" }, { "id": 6, "type": "column", "value": "characteristic_id" }, { "id": 1, "type": "table", "value": "characteristics" }, { ...
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 4 ] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 7 ] }, {...
[ "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "B-TABLE", "B-COLUMN", "B-COLUMN", "O", "O" ]
9,820
chinook_1
spider:train_spider.json:807
How many albums are there?
SELECT count(*) FROM ALBUM
[ "How", "many", "albums", "are", "there", "?" ]
[ { "id": 0, "type": "table", "value": "album" } ]
[ { "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,821
student_loan
bird:train.json:4565
How many bankrupt students are there in the Marines?
SELECT COUNT(T1.name) FROM filed_for_bankrupcy AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'marines'
[ "How", "many", "bankrupt", "students", "are", "there", "in", "the", "Marines", "?" ]
[ { "id": 0, "type": "table", "value": "filed_for_bankrupcy" }, { "id": 3, "type": "value", "value": "marines" }, { "id": 1, "type": "table", "value": "enlist" }, { "id": 2, "type": "column", "value": "organ" }, { "id": 4, "type": "column", "...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 8 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [] }, { ...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-VALUE", "O" ]
9,822
inn_1
spider:train_spider.json:2645
What are the name of rooms booked by customers whose first name has "ROY" in part?
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'
[ "What", "are", "the", "name", "of", "rooms", "booked", "by", "customers", "whose", "first", "name", "has", "\"", "ROY", "\"", "in", "part", "?" ]
[ { "id": 1, "type": "table", "value": "reservations" }, { "id": 3, "type": "column", "value": "firstname" }, { "id": 0, "type": "column", "value": "roomname" }, { "id": 6, "type": "column", "value": "roomid" }, { "id": 2, "type": "table", "v...
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 10 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "O" ]
9,823
music_platform_2
bird:train.json:7942
Of the arts-books and arts-design categories, which one has more podcasts and what is the numerical difference between them?
SELECT ( SELECT category FROM categories WHERE category = 'arts-books' OR category = 'arts-design' GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 ) "has more podcasts" , ( SELECT SUM(CASE WHEN category = 'arts-books' THEN 1 ELSE 0 END) - SUM(CASE WHEN category = 'arts-design' THEN 1 ELSE 0 END) FROM categori...
[ "Of", "the", "arts", "-", "books", "and", "arts", "-", "design", "categories", ",", "which", "one", "has", "more", "podcasts", "and", "what", "is", "the", "numerical", "difference", "between", "them", "?" ]
[ { "id": 3, "type": "value", "value": "arts-design" }, { "id": 0, "type": "table", "value": "categories" }, { "id": 2, "type": "value", "value": "arts-books" }, { "id": 4, "type": "column", "value": "podcast_id" }, { "id": 1, "type": "column", ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 9 ] }, { "entity_id": 2, "token_idxs": [ 2, 3, 4 ] }, { "entity_id": 3, "token_idxs": [ 6, 7, 8 ] }, { "entity_id": 4, "token_idxs": [...
[ "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "O", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "O", "O", "O", "O", "O", "O" ]
9,824
region_building
bird:test.json:320
Sort the buildings in descending order of building completion year, and return the building addresses.
SELECT Address FROM building ORDER BY Completed_Year DESC
[ "Sort", "the", "buildings", "in", "descending", "order", "of", "building", "completion", "year", ",", "and", "return", "the", "building", "addresses", "." ]
[ { "id": 2, "type": "column", "value": "completed_year" }, { "id": 0, "type": "table", "value": "building" }, { "id": 1, "type": "column", "value": "address" } ]
[ { "entity_id": 0, "token_idxs": [ 14 ] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 8, 9 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id...
[ "O", "O", "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "O", "O", "O", "O", "B-TABLE", "B-COLUMN", "O" ]
9,825
retail_world
bird:train.json:6391
Find and list the full name of employees who are from the territory, Wilton.
SELECT 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 WHERE T3.TerritoryDescription = 'Wilton'
[ "Find", "and", "list", "the", "full", "name", "of", "employees", "who", "are", "from", "the", "territory", ",", "Wilton", "." ]
[ { "id": 3, "type": "column", "value": "territorydescription" }, { "id": 6, "type": "table", "value": "employeeterritories" }, { "id": 2, "type": "table", "value": "territories" }, { "id": 7, "type": "column", "value": "territoryid" }, { "id": 8, ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 13 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-COLUMN", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "B-COLUMN", "B-VALUE", "O" ]
9,826
world_development_indicators
bird:train.json:2118
What is the topic of the series when the Total reserves minus gold (current US$) indicator of Haiti hit the value of 3,000,000 in 1961? Please include its series code and license type.
SELECT T2.Topic, T2.Seriescode, T2.LicenseType FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.Year = 1961 AND T1.CountryName = 'Haiti' AND T1.IndicatorName = 'Total reserves minus gold (current US$)' AND T1.Value = 3000000
[ "What", "is", "the", "topic", "of", "the", "series", "when", "the", "Total", "reserves", "minus", "gold", "(", "current", "US$", ")", "indicator", "of", "Haiti", "hit", "the", "value", "of", "3,000,000", "in", "1961", "?", "Please", "include", "its", "se...
[ { "id": 10, "type": "value", "value": "Total reserves minus gold (current US$)" }, { "id": 5, "type": "column", "value": "indicatorname" }, { "id": 2, "type": "column", "value": "licensetype" }, { "id": 8, "type": "column", "value": "countryname" }, { ...
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 31, 32 ] }, { "entity_id": 2, "token_idxs": [ 34, 35 ] }, { "entity_id": 3, "token_idxs": [ 17 ] }, { "entity_id": 4, "token_idxs": [...
[ "O", "O", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O", "B-VALUE", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-VALUE", "O", "O", "O", "O", "B-COLU...
9,827
codebase_community
bird:dev.json:622
State the name of badge that the user whose display name is "Sharpie" obtained.
SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Sharpie'
[ "State", "the", "name", "of", "badge", "that", "the", "user", "whose", "display", "name", "is", "\"", "Sharpie", "\"", "obtained", "." ]
[ { "id": 3, "type": "column", "value": "displayname" }, { "id": 4, "type": "value", "value": "Sharpie" }, { "id": 2, "type": "table", "value": "badges" }, { "id": 6, "type": "column", "value": "userid" }, { "id": 1, "type": "table", "value":...
[ { "entity_id": 0, "token_idxs": [ 10 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 13 ] }, ...
[ "O", "O", "O", "O", "B-TABLE", "O", "O", "B-TABLE", "O", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "O", "O", "O" ]
9,828
public_review_platform
bird:train.json:3779
What is the number of reviews from user No. "21679"?
SELECT COUNT(review_length) FROM Reviews WHERE user_id = 21679
[ "What", "is", "the", "number", "of", "reviews", "from", "user", "No", ".", "\"", "21679", "\"", "?" ]
[ { "id": 3, "type": "column", "value": "review_length" }, { "id": 0, "type": "table", "value": "reviews" }, { "id": 1, "type": "column", "value": "user_id" }, { "id": 2, "type": "value", "value": "21679" } ]
[ { "entity_id": 0, "token_idxs": [ 5 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 11 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "B-TABLE", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "O" ]
9,829
address_1
bird:test.json:794
How many students live in each country?
SELECT T1.country , count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.country
[ "How", "many", "students", "live", "in", "each", "country", "?" ]
[ { "id": 3, "type": "column", "value": "city_code" }, { "id": 0, "type": "column", "value": "country" }, { "id": 2, "type": "table", "value": "student" }, { "id": 1, "type": "table", "value": "city" } ]
[ { "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": [] }, { "entity_id": 5, "token_idxs": ...
[ "O", "O", "B-TABLE", "O", "O", "O", "B-COLUMN", "O" ]
9,830
olympics
bird:train.json:4961
What is the name of all the sports Chin Eei Hui has competed in?
SELECT DISTINCT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id INNER JOIN competitor_event AS T3 ON T2.id = T3.event_id INNER JOIN games_competitor AS T4 ON T3.competitor_id = T4.id INNER JOIN person AS T5 ON T4.person_id = T5.id WHERE T5.full_name = 'Chin Eei Hui'
[ "What", "is", "the", "name", "of", "all", "the", "sports", "Chin", "Eei", "Hui", "has", "competed", "in", "?" ]
[ { "id": 4, "type": "table", "value": "games_competitor" }, { "id": 7, "type": "table", "value": "competitor_event" }, { "id": 8, "type": "column", "value": "competitor_id" }, { "id": 3, "type": "value", "value": "Chin Eei Hui" }, { "id": 0, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 3 ] }, { "entity_id": 3, "token_idxs": [ 8, 9, 10 ] }, { "entity_id": 4, "token_idxs": [ 11 ] }, { "...
[ "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-TABLE", "B-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "B-COLUMN", "B-TABLE", "O" ]
9,831
professional_basketball
bird:train.json:2809
Which coach of the Chicago Bulls during the year 1981 won the NBA Coach of the Year award in the 1970s?
SELECT DISTINCT T2.coachID FROM coaches AS T1 INNER JOIN awards_coaches AS T2 ON T1.coachID = T2.coachID INNER JOIN teams AS T3 ON T3.tmID = T1.tmID WHERE T2.award = 'NBA Coach of the Year' AND T2.year BETWEEN 1970 AND 1979 AND T1.year = 1981 AND T3.name = 'Chicago Bulls'
[ "Which", "coach", "of", "the", "Chicago", "Bulls", "during", "the", "year", "1981", "won", "the", "NBA", "Coach", "of", "the", "Year", "award", "in", "the", "1970s", "?" ]
[ { "id": 6, "type": "value", "value": "NBA Coach of the Year" }, { "id": 3, "type": "table", "value": "awards_coaches" }, { "id": 12, "type": "value", "value": "Chicago Bulls" }, { "id": 0, "type": "column", "value": "coachid" }, { "id": 2, "typ...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 1 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "token_idxs": [ 17 ...
[ "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "O", "O", "O", "B-VALUE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "I-VALUE", "B-COLUMN", "B-COLUMN", "O", "O", "B-VALUE", "O" ]
9,832
movies_4
bird:train.json:498
List down the movie titles that were produced in Canada.
SELECT T1.title FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE T3.COUNTry_name = 'Canada'
[ "List", "down", "the", "movie", "titles", "that", "were", "produced", "in", "Canada", "." ]
[ { "id": 5, "type": "table", "value": "production_country" }, { "id": 2, "type": "column", "value": "country_name" }, { "id": 6, "type": "column", "value": "country_id" }, { "id": 7, "type": "column", "value": "movie_id" }, { "id": 1, "type": "t...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [ 9 ] }, { "entity_id": 4, "token_idxs": [ 3 ] }, { "entity_id": 5, "...
[ "O", "O", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
9,833
allergy_1
spider:train_spider.json:483
Show the minimum, average, and maximum age of all students.
SELECT min(age) , avg(age) , max(age) FROM Student
[ "Show", "the", "minimum", ",", "average", ",", "and", "maximum", "age", "of", "all", "students", "." ]
[ { "id": 0, "type": "table", "value": "student" }, { "id": 1, "type": "column", "value": "age" } ]
[ { "entity_id": 0, "token_idxs": [ 11 ] }, { "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-COLUMN", "O", "O", "B-TABLE", "O" ]
9,834
cs_semester
bird:train.json:918
Name the students of the Advanced Database Systems course with the highest satisfaction.
SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Advanced Database Systems' ORDER BY T2.sat DESC LIMIT 1
[ "Name", "the", "students", "of", "the", "Advanced", "Database", "Systems", "course", "with", "the", "highest", "satisfaction", "." ]
[ { "id": 4, "type": "value", "value": "Advanced Database Systems" }, { "id": 7, "type": "table", "value": "registration" }, { "id": 9, "type": "column", "value": "student_id" }, { "id": 8, "type": "column", "value": "course_id" }, { "id": 6, "ty...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 0 ] }, { "entity_id": 4, "token_idxs": [ 5, 6, 7 ] }, { "en...
[ "B-COLUMN", "O", "B-TABLE", "O", "O", "B-VALUE", "I-VALUE", "I-VALUE", "B-TABLE", "O", "O", "O", "B-TABLE", "O" ]
9,835
car_racing
bird:test.json:1638
Find the manager and sponsor of the team that has the most drivers.
SELECT t1.manager , t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id ORDER BY count(*) DESC LIMIT 1
[ "Find", "the", "manager", "and", "sponsor", "of", "the", "team", "that", "has", "the", "most", "drivers", "." ]
[ { "id": 4, "type": "table", "value": "team_driver" }, { "id": 0, "type": "column", "value": "team_id" }, { "id": 1, "type": "column", "value": "manager" }, { "id": 2, "type": "column", "value": "sponsor" }, { "id": 3, "type": "table", "valu...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [ 7 ] }, { "entity_id": 4, "token_idxs": [ 12 ] }, { "entity...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]
9,836
candidate_poll
spider:train_spider.json:2428
list all female (sex is F) candidate names in the alphabetical order.
SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name
[ "list", "all", "female", "(", "sex", "is", "F", ")", "candidate", "names", "in", "the", "alphabetical", "order", "." ]
[ { "id": 2, "type": "table", "value": "candidate" }, { "id": 5, "type": "column", "value": "people_id" }, { "id": 1, "type": "table", "value": "people" }, { "id": 0, "type": "column", "value": "name" }, { "id": 3, "type": "column", "value": ...
[ { "entity_id": 0, "token_idxs": [ 9 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 8 ] }, { "entity_id": 3, "token_idxs": [ 4 ] }, { "entity_id": 4, "token_idxs": [ 6 ] }, { "entity_...
[ "O", "O", "O", "O", "B-COLUMN", "O", "B-VALUE", "O", "B-TABLE", "B-COLUMN", "O", "O", "O", "O", "O" ]
9,837
railway
spider:train_spider.json:5634
List the wheels and locations of the railways.
SELECT Wheels , LOCATION FROM railway
[ "List", "the", "wheels", "and", "locations", "of", "the", "railways", "." ]
[ { "id": 2, "type": "column", "value": "location" }, { "id": 0, "type": "table", "value": "railway" }, { "id": 1, "type": "column", "value": "wheels" } ]
[ { "entity_id": 0, "token_idxs": [ 7 ] }, { "entity_id": 1, "token_idxs": [ 2 ] }, { "entity_id": 2, "token_idxs": [ 4 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "...
[ "O", "O", "B-COLUMN", "O", "B-COLUMN", "O", "O", "B-TABLE", "O" ]
9,838
chicago_crime
bird:train.json:8617
Give the FBI code description of case No.JB134191.
SELECT description FROM Crime AS T1 INNER JOIN FBI_Code AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T1.case_number = 'JB134191'
[ "Give", "the", "FBI", "code", "description", "of", "case", "No", ".", "JB134191", "." ]
[ { "id": 0, "type": "column", "value": "description" }, { "id": 3, "type": "column", "value": "case_number" }, { "id": 5, "type": "column", "value": "fbi_code_no" }, { "id": 2, "type": "table", "value": "fbi_code" }, { "id": 4, "type": "value", ...
[ { "entity_id": 0, "token_idxs": [ 4 ] }, { "entity_id": 1, "token_idxs": [] }, { "entity_id": 2, "token_idxs": [ 2, 3 ] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [ 9 ] }, { "entity_id":...
[ "O", "O", "B-TABLE", "I-TABLE", "B-COLUMN", "O", "O", "O", "O", "B-VALUE", "O" ]
9,839
simpson_episodes
bird:train.json:4284
What are the episodes that have the average rating with more than 20 of 2-star votes?
SELECT DISTINCT T1.episode_id FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 2 AND T2.votes > 20 AND T1.rating > 5.0 AND T1.rating <= 7.0;
[ "What", "are", "the", "episodes", "that", "have", "the", "average", "rating", "with", "more", "than", "20", "of", "2", "-", "star", "votes", "?" ]
[ { "id": 0, "type": "column", "value": "episode_id" }, { "id": 1, "type": "table", "value": "episode" }, { "id": 7, "type": "column", "value": "rating" }, { "id": 3, "type": "column", "value": "stars" }, { "id": 5, "type": "column", "value":...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 3 ] }, { "entity_id": 2, "token_idxs": [ 17 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [ 14 ] }, { "enti...
[ "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-COLUMN", "O", "O", "O", "B-VALUE", "O", "B-VALUE", "O", "B-COLUMN", "B-TABLE", "O" ]
9,840
address_1
bird:test.json:782
Which states have at least two cities?
SELECT state FROM City GROUP BY state HAVING count(*) >= 2
[ "Which", "states", "have", "at", "least", "two", "cities", "?" ]
[ { "id": 1, "type": "column", "value": "state" }, { "id": 0, "type": "table", "value": "city" }, { "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,841
insurance_policies
spider:train_spider.json:3882
What is the total amount of payment?
SELECT sum(Amount_Payment) FROM Payments
[ "What", "is", "the", "total", "amount", "of", "payment", "?" ]
[ { "id": 1, "type": "column", "value": "amount_payment" }, { "id": 0, "type": "table", "value": "payments" } ]
[ { "entity_id": 0, "token_idxs": [ 6 ] }, { "entity_id": 1, "token_idxs": [ 4, 5 ] }, { "entity_id": 2, "token_idxs": [] }, { "entity_id": 3, "token_idxs": [] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, "toke...
[ "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "B-TABLE", "O" ]
9,842
book_publishing_company
bird:train.json:228
For the quantities, what percent more did the store in Fremont sell than the store in Portland in 1993?
SELECT CAST(SUM(CASE WHEN T2.city = 'Fremont' THEN qty END) - SUM(CASE WHEN T2.city = 'Portland' THEN qty END) AS REAL) * 100 / SUM(CASE WHEN T2.city = 'Fremont' THEN qty END) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE STRFTIME('%Y', T1.ord_date) = '1993'
[ "For", "the", "quantities", ",", "what", "percent", "more", "did", "the", "store", "in", "Fremont", "sell", "than", "the", "store", "in", "Portland", "in", "1993", "?" ]
[ { "id": 5, "type": "column", "value": "ord_date" }, { "id": 10, "type": "value", "value": "Portland" }, { "id": 3, "type": "column", "value": "stor_id" }, { "id": 9, "type": "value", "value": "Fremont" }, { "id": 1, "type": "table", "value"...
[ { "entity_id": 0, "token_idxs": [] }, { "entity_id": 1, "token_idxs": [ 15 ] }, { "entity_id": 2, "token_idxs": [ 19 ] }, { "entity_id": 3, "token_idxs": [ 16 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity_id": 5, ...
[ "O", "O", "O", "O", "O", "O", "B-COLUMN", "I-COLUMN", "I-COLUMN", "O", "O", "B-VALUE", "O", "O", "O", "B-TABLE", "B-COLUMN", "B-VALUE", "O", "B-VALUE", "O" ]
9,843
hr_1
spider:train_spider.json:3525
display the department name and number of employees in each of the department.
SELECT department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name
[ "display", "the", "department", "name", "and", "number", "of", "employees", "in", "each", "of", "the", "department", "." ]
[ { "id": 0, "type": "column", "value": "department_name" }, { "id": 3, "type": "column", "value": "department_id" }, { "id": 2, "type": "table", "value": "departments" }, { "id": 1, "type": "table", "value": "employees" } ]
[ { "entity_id": 0, "token_idxs": [ 3 ] }, { "entity_id": 1, "token_idxs": [ 7 ] }, { "entity_id": 2, "token_idxs": [ 12 ] }, { "entity_id": 3, "token_idxs": [ 2 ] }, { "entity_id": 4, "token_idxs": [] }, { "entity...
[ "O", "O", "B-COLUMN", "B-COLUMN", "O", "O", "O", "B-TABLE", "O", "O", "O", "O", "B-TABLE", "O" ]