question_id int64 0 16.1k | db_id stringclasses 259
values | dber_id stringlengths 15 29 | question stringlengths 16 325 | SQL stringlengths 18 1.25k | tokens listlengths 4 62 | entities listlengths 0 21 | entity_to_token listlengths 20 20 | dber_tags listlengths 4 62 |
|---|---|---|---|---|---|---|---|---|
3,535 | books | bird:train.json:5964 | Calculate the total price of books ordered by customer named Lucas Wyldbore. | SELECT SUM(T1.price) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Lucas' AND T3.last_name = 'Wyldbore' | [
"Calculate",
"the",
"total",
"price",
"of",
"books",
"ordered",
"by",
"customer",
"named",
"Lucas",
"Wyldbore",
"."
] | [
{
"id": 4,
"type": "column",
"value": "customer_id"
},
{
"id": 2,
"type": "table",
"value": "order_line"
},
{
"id": 3,
"type": "table",
"value": "cust_order"
},
{
"id": 5,
"type": "column",
"value": "first_name"
},
{
"id": 7,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"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-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
3,536 | food_inspection_2 | bird:train.json:6247 | Among the establishments that failed the inspection in February 2010, list the names of the employees with a salary greater than 70% of the average salary of all employees. | SELECT DISTINCT T1.employee_id FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.results = 'Fail' AND strftime('%Y-%m', T2.inspection_date) = '2010-02' AND T1.salary > 0.7 * ( SELECT AVG(salary) FROM employee ) | [
"Among",
"the",
"establishments",
"that",
"failed",
"the",
"inspection",
"in",
"February",
"2010",
",",
"list",
"the",
"names",
"of",
"the",
"employees",
"with",
"a",
"salary",
"greater",
"than",
"70",
"%",
"of",
"the",
"average",
"salary",
"of",
"all",
"e... | [
{
"id": 8,
"type": "column",
"value": "inspection_date"
},
{
"id": 0,
"type": "column",
"value": "employee_id"
},
{
"id": 2,
"type": "table",
"value": "inspection"
},
{
"id": 1,
"type": "table",
"value": "employee"
},
{
"id": 3,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
3,537 | club_1 | spider:train_spider.json:4281 | Find the description of the club called "Tennis Club". | SELECT clubdesc FROM club WHERE clubname = "Tennis Club" | [
"Find",
"the",
"description",
"of",
"the",
"club",
"called",
"\"",
"Tennis",
"Club",
"\"",
"."
] | [
{
"id": 3,
"type": "column",
"value": "Tennis Club"
},
{
"id": 1,
"type": "column",
"value": "clubdesc"
},
{
"id": 2,
"type": "column",
"value": "clubname"
},
{
"id": 0,
"type": "table",
"value": "club"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O"
] |
3,538 | music_tracker | bird:train.json:2089 | From 1979 to 1982, what was the percentage of united.states albums out of total albums were released? | SELECT CAST(SUM(CASE WHEN T2.tag LIKE 'united.states' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.releaseType) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 1979 AND 1982 AND T1.releaseType LIKE 'album' | [
"From",
"1979",
"to",
"1982",
",",
"what",
"was",
"the",
"percentage",
"of",
"united.states",
"albums",
"out",
"of",
"total",
"albums",
"were",
"released",
"?"
] | [
{
"id": 12,
"type": "value",
"value": "united.states"
},
{
"id": 6,
"type": "column",
"value": "releasetype"
},
{
"id": 3,
"type": "column",
"value": "groupyear"
},
{
"id": 0,
"type": "table",
"value": "torrents"
},
{
"id": 7,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
1
]
},
{
"entity_id": 5,
"token_idxs": [
3
... | [
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,539 | aan_1 | bird:test.json:1022 | What is the name of the author with the most papers in 2009? | SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T1.year = 2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"author",
"with",
"the",
"most",
"papers",
"in",
"2009",
"?"
] | [
{
"id": 6,
"type": "table",
"value": "author_list"
},
{
"id": 0,
"type": "column",
"value": "author_id"
},
{
"id": 7,
"type": "column",
"value": "paper_id"
},
{
"id": 2,
"type": "table",
"value": "author"
},
{
"id": 5,
"type": "table",
"val... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
3,540 | shop_membership | spider:train_spider.json:5421 | What are the names of the members and branches at which they are registered sorted by year of registration? | SELECT T3.name , T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year | [
"What",
"are",
"the",
"names",
"of",
"the",
"members",
"and",
"branches",
"at",
"which",
"they",
"are",
"registered",
"sorted",
"by",
"year",
"of",
"registration",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "membership_register_branch"
},
{
"id": 2,
"type": "column",
"value": "register_year"
},
{
"id": 5,
"type": "column",
"value": "member_id"
},
{
"id": 6,
"type": "column",
"value": "branch_id"
},
{
"id": 1,
"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,541 | simpson_episodes | bird:train.json:4191 | List the name of persons who were not included in the credit for the 'How the Test Was Won' episode. | SELECT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'How the Test Was Won' AND T2.credited = 'false'; | [
"List",
"the",
"name",
"of",
"persons",
"who",
"were",
"not",
"included",
"in",
"the",
"credit",
"for",
"the",
"'",
"How",
"the",
"Test",
"Was",
"Won",
"'",
"episode",
"."
] | [
{
"id": 5,
"type": "value",
"value": "How the Test Was Won"
},
{
"id": 3,
"type": "column",
"value": "episode_id"
},
{
"id": 6,
"type": "column",
"value": "credited"
},
{
"id": 1,
"type": "table",
"value": "episode"
},
{
"id": 0,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
21
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-TABLE",
"O"
] |
3,542 | game_injury | spider:train_spider.json:1276 | List the season, home team, away team of all the games. | SELECT season , home_team , away_team FROM game | [
"List",
"the",
"season",
",",
"home",
"team",
",",
"away",
"team",
"of",
"all",
"the",
"games",
"."
] | [
{
"id": 2,
"type": "column",
"value": "home_team"
},
{
"id": 3,
"type": "column",
"value": "away_team"
},
{
"id": 1,
"type": "column",
"value": "season"
},
{
"id": 0,
"type": "table",
"value": "game"
}
] | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": [
7,
8
]
},
{
"entity_id": 4,
"token_idxs": []
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,543 | tracking_software_problems | spider:train_spider.json:5354 | What is the oldest log id and its corresponding problem id? | SELECT problem_log_id , problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1 | [
"What",
"is",
"the",
"oldest",
"log",
"i",
"d",
"and",
"its",
"corresponding",
"problem",
"i",
"d",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "problem_log_id"
},
{
"id": 3,
"type": "column",
"value": "log_entry_date"
},
{
"id": 0,
"type": "table",
"value": "problem_log"
},
{
"id": 2,
"type": "column",
"value": "problem_id"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10,
11,
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
3,544 | advertising_agencies | bird:test.json:2103 | Show all payment ids and details for invoices whose status is 'Working'. | SELECT T1.payment_id , T1.payment_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id = T2.invoice_id WHERE T2.invoice_status = 'Working' | [
"Show",
"all",
"payment",
"ids",
"and",
"details",
"for",
"invoices",
"whose",
"status",
"is",
"'",
"Working",
"'",
"."
] | [
{
"id": 1,
"type": "column",
"value": "payment_details"
},
{
"id": 4,
"type": "column",
"value": "invoice_status"
},
{
"id": 0,
"type": "column",
"value": "payment_id"
},
{
"id": 6,
"type": "column",
"value": "invoice_id"
},
{
"id": 2,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
8,
... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
3,545 | shakespeare | bird:train.json:2957 | Which work is the character Lord Abergavenny from? Please give its short or abbreviated title. | SELECT DISTINCT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.CharName = 'Lord Abergavenny' | [
"Which",
"work",
"is",
"the",
"character",
"Lord",
"Abergavenny",
"from",
"?",
"Please",
"give",
"its",
"short",
"or",
"abbreviated",
"title",
"."
] | [
{
"id": 3,
"type": "value",
"value": "Lord Abergavenny"
},
{
"id": 5,
"type": "column",
"value": "character_id"
},
{
"id": 1,
"type": "table",
"value": "characters"
},
{
"id": 4,
"type": "table",
"value": "paragraphs"
},
{
"id": 9,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5,
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,546 | book_review | bird:test.json:606 | What is the most common type of books? | SELECT TYPE FROM book GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"most",
"common",
"type",
"of",
"books",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "book"
},
{
"id": 1,
"type": "column",
"value": "type"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
3,547 | insurance_policies | spider:train_spider.json:3872 | What is the total amount of settlement made for all the settlements? | SELECT sum(Amount_Settled) FROM Settlements | [
"What",
"is",
"the",
"total",
"amount",
"of",
"settlement",
"made",
"for",
"all",
"the",
"settlements",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "amount_settled"
},
{
"id": 0,
"type": "table",
"value": "settlements"
}
] | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5,
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,548 | movies_4 | bird:train.json:433 | For all the movies which were produced by Cruel and Unusual Films, which one has the most popularity? | SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Cruel and Unusual Films' ORDER BY T3.popularity DESC LIMIT 1 | [
"For",
"all",
"the",
"movies",
"which",
"were",
"produced",
"by",
"Cruel",
"and",
"Unusual",
"Films",
",",
"which",
"one",
"has",
"the",
"most",
"popularity",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Cruel and Unusual Films"
},
{
"id": 5,
"type": "table",
"value": "production_company"
},
{
"id": 6,
"type": "table",
"value": "movie_company"
},
{
"id": 2,
"type": "column",
"value": "company_name"
},
{
"id": 4... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10,
11
]
},
{
"entity_id": 4,
"token_idxs": [
18
]
},... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,549 | authors | bird:train.json:3538 | What is the author ID and their affiliations of authors of the papers with a journal ID of 0 and published in 2009. | SELECT DISTINCT T2.AuthorId, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.JournalId = 0 AND T1.Year = 2009 AND T2.Affiliation IS NOT NULL | [
"What",
"is",
"the",
"author",
"ID",
"and",
"their",
"affiliations",
"of",
"authors",
"of",
"the",
"papers",
"with",
"a",
"journal",
"ID",
"of",
"0",
"and",
"published",
"in",
"2009",
"."
] | [
{
"id": 1,
"type": "column",
"value": "affiliation"
},
{
"id": 3,
"type": "table",
"value": "paperauthor"
},
{
"id": 6,
"type": "column",
"value": "journalid"
},
{
"id": 0,
"type": "column",
"value": "authorid"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
3,550 | talkingdata | bird:train.json:1083 | What is the device model of the device used by the oldest user? | SELECT device_model FROM phone_brand_device_model2 WHERE device_id IN ( SELECT device_id FROM gender_age WHERE age = ( SELECT MAX(age) FROM gender_age ) ) | [
"What",
"is",
"the",
"device",
"model",
"of",
"the",
"device",
"used",
"by",
"the",
"oldest",
"user",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 1,
"type": "column",
"value": "device_model"
},
{
"id": 3,
"type": "table",
"value": "gender_age"
},
{
"id": 2,
"type": "column",
"value": "device_id"
},
{
"id": 4,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,551 | retails | bird:train.json:6907 | What are the top 2 countries with the highest number of indebted suppliers? | SELECT T.n_name FROM ( SELECT T2.n_name, SUM(T1.s_acctbal) AS num FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 GROUP BY T1.s_nationkey ) AS T ORDER BY T.num LIMIT 2 | [
"What",
"are",
"the",
"top",
"2",
"countries",
"with",
"the",
"highest",
"number",
"of",
"indebted",
"suppliers",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "s_nationkey"
},
{
"id": 7,
"type": "column",
"value": "n_nationkey"
},
{
"id": 5,
"type": "column",
"value": "s_acctbal"
},
{
"id": 3,
"type": "table",
"value": "supplier"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
3,552 | department_store | spider:train_spider.json:4735 | Find the name and address of the customers who have both New and Pending orders. | SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "New" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.... | [
"Find",
"the",
"name",
"and",
"address",
"of",
"the",
"customers",
"who",
"have",
"both",
"New",
"and",
"Pending",
"orders",
"."
] | [
{
"id": 4,
"type": "column",
"value": "order_status_code"
},
{
"id": 1,
"type": "column",
"value": "customer_address"
},
{
"id": 3,
"type": "table",
"value": "customer_orders"
},
{
"id": 0,
"type": "column",
"value": "customer_name"
},
{
"id": 7,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
11
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
3,553 | movie_1 | spider:train_spider.json:2511 | What are the titles of all movies that have between 3 and 5 stars? | SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 | [
"What",
"are",
"the",
"titles",
"of",
"all",
"movies",
"that",
"have",
"between",
"3",
"and",
"5",
"stars",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "rating"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "table",
"value": "movie"
},
{
"id": 3,
"type": "column",
"value": "stars"
},
{
"id": 6,
"type": "column",
"value": "mid"
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
3,555 | public_review_platform | bird:train.json:4120 | List down the business ID with a high review count in Tempe. | SELECT business_id FROM Business WHERE review_count = 'High' AND city = 'Tempe' | [
"List",
"down",
"the",
"business",
"ID",
"with",
"a",
"high",
"review",
"count",
"in",
"Tempe",
"."
] | [
{
"id": 2,
"type": "column",
"value": "review_count"
},
{
"id": 1,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "table",
"value": "business"
},
{
"id": 5,
"type": "value",
"value": "Tempe"
},
{
"id": 3,
"type": "value",
"v... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
8,
9
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,556 | movie_3 | bird:train.json:9189 | Who is the staff manager of the store with the most non-active customers? | SELECT T.first_name, T.last_name FROM ( SELECT T3.first_name, T3.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.store_id = T3.store_id WHERE T1.active = 0 GROUP BY T3.first_name, T3.last_name ) AS T ORDER BY T.num DESC LIMIT 1 | [
"Who",
"is",
"the",
"staff",
"manager",
"of",
"the",
"store",
"with",
"the",
"most",
"non",
"-",
"active",
"customers",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 7,
"type": "table",
"value": "customer"
},
{
"id": 9,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
3,558 | online_exams | bird:test.json:194 | Count the number of exams. | SELECT count(*) FROM Exams | [
"Count",
"the",
"number",
"of",
"exams",
"."
] | [
{
"id": 0,
"type": "table",
"value": "exams"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,559 | shop_membership | spider:train_spider.json:5405 | What are the names for the 3 branches that have the most memberships? | SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3 | [
"What",
"are",
"the",
"names",
"for",
"the",
"3",
"branches",
"that",
"have",
"the",
"most",
"memberships",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "membership_amount"
},
{
"id": 0,
"type": "table",
"value": "branch"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,560 | cs_semester | bird:train.json:944 | Calculate the average satisfaction of the good students with their courses. | SELECT CAST(SUM(sat) AS REAL) / COUNT(course_id) FROM registration WHERE grade = 'B' | [
"Calculate",
"the",
"average",
"satisfaction",
"of",
"the",
"good",
"students",
"with",
"their",
"courses",
"."
] | [
{
"id": 0,
"type": "table",
"value": "registration"
},
{
"id": 3,
"type": "column",
"value": "course_id"
},
{
"id": 1,
"type": "column",
"value": "grade"
},
{
"id": 4,
"type": "column",
"value": "sat"
},
{
"id": 2,
"type": "value",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,561 | mondial_geo | bird:train.json:8369 | What are the names of the three nations where the longest river that empties into the Atlantic Ocean stretches to? | SELECT DISTINCT T1.Country FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = ( SELECT Name FROM river WHERE Sea = 'Atlantic Ocean' ORDER BY Length DESC LIMIT 1 ) | [
"What",
"are",
"the",
"names",
"of",
"the",
"three",
"nations",
"where",
"the",
"longest",
"river",
"that",
"empties",
"into",
"the",
"Atlantic",
"Ocean",
"stretches",
"to",
"?"
] | [
{
"id": 8,
"type": "value",
"value": "Atlantic Ocean"
},
{
"id": 0,
"type": "column",
"value": "country"
},
{
"id": 4,
"type": "table",
"value": "located"
},
{
"id": 9,
"type": "column",
"value": "length"
},
{
"id": 1,
"type": "table",
"val... | [
{
"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": []
},
{
"entity_id": 5,
"token_idxs": [
11
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O"
] |
3,562 | book_1 | bird:test.json:562 | Give the average purchase price and average sale price for books. | SELECT avg(purchaseprice) , avg(saleprice) FROM Book | [
"Give",
"the",
"average",
"purchase",
"price",
"and",
"average",
"sale",
"price",
"for",
"books",
"."
] | [
{
"id": 1,
"type": "column",
"value": "purchaseprice"
},
{
"id": 2,
"type": "column",
"value": "saleprice"
},
{
"id": 0,
"type": "table",
"value": "book"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"e... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O"
] |
3,563 | student_assessment | spider:train_spider.json:94 | What are the different cities where students live? | SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id | [
"What",
"are",
"the",
"different",
"cities",
"where",
"students",
"live",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "people_addresses"
},
{
"id": 5,
"type": "column",
"value": "student_id"
},
{
"id": 6,
"type": "column",
"value": "address_id"
},
{
"id": 2,
"type": "table",
"value": "addresses"
},
{
"id": 4,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"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",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O"
] |
3,564 | e_learning | spider:train_spider.json:3779 | What are all the dates of enrollment and completion in record? | SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment | [
"What",
"are",
"all",
"the",
"dates",
"of",
"enrollment",
"and",
"completion",
"in",
"record",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "student_course_enrolment"
},
{
"id": 2,
"type": "column",
"value": "date_of_completion"
},
{
"id": 1,
"type": "column",
"value": "date_of_enrolment"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4,
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
3,565 | soccer_2 | spider:train_spider.json:4974 | Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA. | SELECT cName , enr FROM College WHERE enr > 10000 AND state = "LA" | [
"Find",
"the",
"name",
",",
"enrollment",
"of",
"the",
"colleges",
"whose",
"size",
"is",
"bigger",
"than",
"10000",
"and",
"location",
"is",
"in",
"state",
"LA",
"."
] | [
{
"id": 0,
"type": "table",
"value": "college"
},
{
"id": 1,
"type": "column",
"value": "cname"
},
{
"id": 3,
"type": "value",
"value": "10000"
},
{
"id": 4,
"type": "column",
"value": "state"
},
{
"id": 2,
"type": "column",
"value": "enr"
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
18
]
},
{
"entit... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
3,567 | candidate_poll | spider:train_spider.json:2400 | Find the id of the candidate who got the lowest oppose rate. | SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1 | [
"Find",
"the",
"i",
"d",
"of",
"the",
"candidate",
"who",
"got",
"the",
"lowest",
"oppose",
"rate",
"."
] | [
{
"id": 1,
"type": "column",
"value": "candidate_id"
},
{
"id": 2,
"type": "column",
"value": "oppose_rate"
},
{
"id": 0,
"type": "table",
"value": "candidate"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11,
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"to... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
3,568 | warehouse_1 | bird:test.json:1731 | Find the total value of boxes stored in the warehouse with the largest capacity. | SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code ORDER BY T2.capacity DESC LIMIT 1 | [
"Find",
"the",
"total",
"value",
"of",
"boxes",
"stored",
"in",
"the",
"warehouse",
"with",
"the",
"largest",
"capacity",
"."
] | [
{
"id": 1,
"type": "table",
"value": "warehouses"
},
{
"id": 4,
"type": "column",
"value": "warehouse"
},
{
"id": 2,
"type": "column",
"value": "capacity"
},
{
"id": 0,
"type": "table",
"value": "boxes"
},
{
"id": 3,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,569 | car_retails | bird:train.json:1588 | What is the average actual profit by 1937 Lincoln Berline? | SELECT SUM(T1.priceEach - T2.buyPrice) / COUNT(*) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productName = '1937 Lincoln Berline' | [
"What",
"is",
"the",
"average",
"actual",
"profit",
"by",
"1937",
"Lincoln",
"Berline",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "1937 Lincoln Berline"
},
{
"id": 0,
"type": "table",
"value": "orderdetails"
},
{
"id": 2,
"type": "column",
"value": "productname"
},
{
"id": 4,
"type": "column",
"value": "productcode"
},
{
"id": 5,
"type... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7,
8,
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
3,570 | thrombosis_prediction | bird:dev.json:1247 | Among the male patients who have a normal level of white blood cells, how many of them have an abnormal fibrinogen level? | SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.FG <= 150 OR T2.FG >= 450 AND T2.WBC > 3.5 AND T2.WBC < 9.0 AND T1.SEX = 'M' | [
"Among",
"the",
"male",
"patients",
"who",
"have",
"a",
"normal",
"level",
"of",
"white",
"blood",
"cells",
",",
"how",
"many",
"of",
"them",
"have",
"an",
"abnormal",
"fibrinogen",
"level",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "laboratory"
},
{
"id": 0,
"type": "table",
"value": "patient"
},
{
"id": 4,
"type": "value",
"value": "150"
},
{
"id": 5,
"type": "value",
"value": "450"
},
{
"id": 6,
"type": "column",
"value": "wbc"
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,571 | college_1 | spider:train_spider.json:3239 | Find the name of the department that offers the largest number of credits of all classes. | SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1 | [
"Find",
"the",
"name",
"of",
"the",
"department",
"that",
"offers",
"the",
"largest",
"number",
"of",
"credits",
"of",
"all",
"classes",
"."
] | [
{
"id": 2,
"type": "table",
"value": "department"
},
{
"id": 5,
"type": "column",
"value": "crs_credit"
},
{
"id": 0,
"type": "column",
"value": "dept_code"
},
{
"id": 1,
"type": "column",
"value": "dept_name"
},
{
"id": 6,
"type": "column",
... | [
{
"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": [
15
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
3,572 | video_games | bird:train.json:3328 | What is the id of the game "Resident Evil Archives: Resident Evil"? | SELECT T.genre_id FROM game AS T WHERE T.game_name = 'Resident Evil Archives: Resident Evil' | [
"What",
"is",
"the",
"i",
"d",
"of",
"the",
"game",
"\"",
"Resident",
"Evil",
"Archives",
":",
"Resident",
"Evil",
"\"",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Resident Evil Archives: Resident Evil"
},
{
"id": 2,
"type": "column",
"value": "game_name"
},
{
"id": 1,
"type": "column",
"value": "genre_id"
},
{
"id": 0,
"type": "table",
"value": "game"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10,
11,
12,
13,
14
]
},
{
"entity_id": 4,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
3,573 | authors | bird:train.json:3638 | Which conference has the longest name? | SELECT FullName FROM Conference ORDER BY LENGTH(FullName) DESC LIMIT 1 | [
"Which",
"conference",
"has",
"the",
"longest",
"name",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "conference"
},
{
"id": 1,
"type": "column",
"value": "fullname"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,574 | body_builder | spider:train_spider.json:1171 | List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200. | SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200; | [
"List",
"the",
"weight",
"of",
"the",
"body",
"builders",
"who",
"have",
"snatch",
"score",
"higher",
"than",
"140",
"or",
"have",
"the",
"height",
"greater",
"than",
"200",
"."
] | [
{
"id": 1,
"type": "table",
"value": "body_builder"
},
{
"id": 3,
"type": "column",
"value": "people_id"
},
{
"id": 0,
"type": "column",
"value": "weight"
},
{
"id": 2,
"type": "table",
"value": "people"
},
{
"id": 4,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id":... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
3,575 | bakery_1 | bird:test.json:1501 | What is the last name of the customers who shopped at the bakery more than 10 times? | SELECT T2.LastName FROM receipts AS T1 JOIN customers AS T2 ON T1.CustomerId = T2.id GROUP BY T2.id HAVING count(*) > 10 | [
"What",
"is",
"the",
"last",
"name",
"of",
"the",
"customers",
"who",
"shopped",
"at",
"the",
"bakery",
"more",
"than",
"10",
"times",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "customerid"
},
{
"id": 3,
"type": "table",
"value": "customers"
},
{
"id": 1,
"type": "column",
"value": "lastname"
},
{
"id": 2,
"type": "table",
"value": "receipts"
},
{
"id": 0,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
3,576 | car_road_race | bird:test.json:1324 | What are the maximum and minimum age of driver? | SELECT max(Age) , min(Age) FROM driver | [
"What",
"are",
"the",
"maximum",
"and",
"minimum",
"age",
"of",
"driver",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "driver"
},
{
"id": 1,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
3,577 | retail_complains | bird:train.json:367 | How many times per year does a credit card customer complain about overlimit fees? | SELECT strftime('%Y', `Date received`), COUNT(`Date received`) FROM events WHERE product = 'Credit card' AND issue = 'Overlimit fee' GROUP BY strftime('%Y', `Date received`) HAVING COUNT(`Date received`) | [
"How",
"many",
"times",
"per",
"year",
"does",
"a",
"credit",
"card",
"customer",
"complain",
"about",
"overlimit",
"fees",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "Date received"
},
{
"id": 6,
"type": "value",
"value": "Overlimit fee"
},
{
"id": 4,
"type": "value",
"value": "Credit card"
},
{
"id": 3,
"type": "column",
"value": "product"
},
{
"id": 0,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7,
8
]
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
3,578 | codebase_community | bird:dev.json:593 | How many users from New York have a teacher and supporter badge? | SELECT COUNT(DISTINCT T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Name IN ('Supporter', 'Teacher') AND T2.Location = 'New York' | [
"How",
"many",
"users",
"from",
"New",
"York",
"have",
"a",
"teacher",
"and",
"supporter",
"badge",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Supporter"
},
{
"id": 7,
"type": "column",
"value": "location"
},
{
"id": 8,
"type": "value",
"value": "New York"
},
{
"id": 6,
"type": "value",
"value": "Teacher"
},
{
"id": 0,
"type": "table",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"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",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
3,579 | county_public_safety | spider:train_spider.json:2558 | Show the crime rate of counties with a city having white percentage more than 90. | SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90 | [
"Show",
"the",
"crime",
"rate",
"of",
"counties",
"with",
"a",
"city",
"having",
"white",
"percentage",
"more",
"than",
"90",
"."
] | [
{
"id": 2,
"type": "table",
"value": "county_public_safety"
},
{
"id": 0,
"type": "column",
"value": "crime_rate"
},
{
"id": 5,
"type": "column",
"value": "county_id"
},
{
"id": 3,
"type": "column",
"value": "white"
},
{
"id": 1,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
3,580 | chicago_crime | bird:train.json:8722 | How many violation of laws are there where no arrest has been made? | SELECT SUM(CASE WHEN T1.description LIKE '%The violation of laws%' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T2.Arrest = 'FALSE' | [
"How",
"many",
"violation",
"of",
"laws",
"are",
"there",
"where",
"no",
"arrest",
"has",
"been",
"made",
"?"
] | [
{
"id": 8,
"type": "value",
"value": "%The violation of laws%"
},
{
"id": 4,
"type": "column",
"value": "fbi_code_no"
},
{
"id": 7,
"type": "column",
"value": "description"
},
{
"id": 0,
"type": "table",
"value": "fbi_code"
},
{
"id": 2,
"type"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
3,581 | cre_Theme_park | spider:train_spider.json:5907 | What are the distinct visit dates? | SELECT DISTINCT Visit_Date FROM VISITS | [
"What",
"are",
"the",
"distinct",
"visit",
"dates",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "visit_date"
},
{
"id": 0,
"type": "table",
"value": "visits"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
3,583 | talkingdata | bird:train.json:1152 | Please list the models of all the devices with an event under the location coordinates (121, 31). | SELECT T2.device_model FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.longitude = 121 AND T1.latitude = 31 | [
"Please",
"list",
"the",
"models",
"of",
"all",
"the",
"devices",
"with",
"an",
"event",
"under",
"the",
"location",
"coordinates",
"(",
"121",
",",
"31",
")",
"."
] | [
{
"id": 2,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 0,
"type": "column",
"value": "device_model"
},
{
"id": 3,
"type": "column",
"value": "device_id"
},
{
"id": 4,
"type": "column",
"value": "longitude"
},
{
"id": 6,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O"
] |
3,584 | chinook_1 | spider:train_spider.json:885 | What are the distinct unit prices of all tracks? | SELECT distinct(UnitPrice) FROM TRACK | [
"What",
"are",
"the",
"distinct",
"unit",
"prices",
"of",
"all",
"tracks",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "unitprice"
},
{
"id": 0,
"type": "table",
"value": "track"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
3,586 | sales_in_weather | bird:train.json:8138 | How many units of item no.9 were sold in store no.1 in total in January, 2012? | SELECT SUM(units) FROM sales_in_weather WHERE SUBSTR(`date`, 6, 2) = '01' AND SUBSTR(`date`, 1, 4) = '2012' AND item_nbr = 9 AND store_nbr = 1 | [
"How",
"many",
"units",
"of",
"item",
"no.9",
"were",
"sold",
"in",
"store",
"no.1",
"in",
"total",
"in",
"January",
",",
"2012",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "sales_in_weather"
},
{
"id": 6,
"type": "column",
"value": "store_nbr"
},
{
"id": 4,
"type": "column",
"value": "item_nbr"
},
{
"id": 1,
"type": "column",
"value": "units"
},
{
"id": 3,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
3,587 | codebase_community | bird:dev.json:641 | How many users received commentator badges in 2014? | SELECT COUNT(Id) FROM badges WHERE Name = 'Commentator' AND STRFTIME('%Y', Date) = '2014' | [
"How",
"many",
"users",
"received",
"commentator",
"badges",
"in",
"2014",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Commentator"
},
{
"id": 0,
"type": "table",
"value": "badges"
},
{
"id": 2,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "value",
"value": "2014"
},
{
"id": 6,
"type": "column",
"value": "dat... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
3,588 | baseball_1 | spider:train_spider.json:3695 | How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total? | SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990; | [
"How",
"much",
"did",
"the",
"the",
"player",
"with",
"first",
"name",
"Len",
"and",
"last",
"name",
"Barker",
"earn",
"between",
"1985",
"to",
"1990",
"in",
"total",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "name_first"
},
{
"id": 3,
"type": "column",
"value": "player_id"
},
{
"id": 6,
"type": "column",
"value": "name_last"
},
{
"id": 0,
"type": "table",
"value": "salary"
},
{
"id": 1,
"type": "table",
"va... | [
{
"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",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
3,589 | simpson_episodes | bird:train.json:4313 | Write down the summary of episode whereby it has crew members that are not included in the credit list. | SELECT T1.summary FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.credited = 'false'; | [
"Write",
"down",
"the",
"summary",
"of",
"episode",
"whereby",
"it",
"has",
"crew",
"members",
"that",
"are",
"not",
"included",
"in",
"the",
"credit",
"list",
"."
] | [
{
"id": 5,
"type": "column",
"value": "episode_id"
},
{
"id": 3,
"type": "column",
"value": "credited"
},
{
"id": 0,
"type": "column",
"value": "summary"
},
{
"id": 1,
"type": "table",
"value": "episode"
},
{
"id": 2,
"type": "table",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
17
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
3,590 | coinmarketcap | bird:train.json:6274 | How much was a Bitcoin on 2013/4/28? | SELECT T2.price FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-28' AND T1.name = 'Bitcoin' | [
"How",
"much",
"was",
"a",
"Bitcoin",
"on",
"2013/4/28",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "historical"
},
{
"id": 6,
"type": "value",
"value": "2013-04-28"
},
{
"id": 4,
"type": "column",
"value": "coin_id"
},
{
"id": 8,
"type": "value",
"value": "Bitcoin"
},
{
"id": 0,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
3,591 | book_1 | bird:test.json:544 | What are the different titles of books that have been ordered in the past? | SELECT DISTINCT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn = T2.isbn | [
"What",
"are",
"the",
"different",
"titles",
"of",
"books",
"that",
"have",
"been",
"ordered",
"in",
"the",
"past",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "books_order"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 1,
"type": "table",
"value": "book"
},
{
"id": 3,
"type": "column",
"value": "isbn"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
3,592 | music_1 | spider:train_spider.json:3602 | What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language? | SELECT max(T1.duration) , max(T2.resolution) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages | [
"What",
"are",
"the",
"maximum",
"duration",
"and",
"resolution",
"of",
"all",
"songs",
",",
"for",
"each",
"language",
",",
"ordered",
"alphabetically",
"by",
"language",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "resolution"
},
{
"id": 0,
"type": "column",
"value": "languages"
},
{
"id": 3,
"type": "column",
"value": "duration"
},
{
"id": 1,
"type": "table",
"value": "files"
},
{
"id": 2,
"type": "table",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,594 | city_record | spider:train_spider.json:6303 | What are the venues of all the matches? Sort them in the descending order of match date. | SELECT venue FROM MATCH ORDER BY date DESC | [
"What",
"are",
"the",
"venues",
"of",
"all",
"the",
"matches",
"?",
"Sort",
"them",
"in",
"the",
"descending",
"order",
"of",
"match",
"date",
"."
] | [
{
"id": 0,
"type": "table",
"value": "match"
},
{
"id": 1,
"type": "column",
"value": "venue"
},
{
"id": 2,
"type": "column",
"value": "date"
}
] | [
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
17
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
3,596 | regional_sales | bird:train.json:2615 | Calculate the average net profit of bar tools which has ordered quantity exceed 5. | SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bar Tools' AND T1.`Order Quantity` > 5 | [
"Calculate",
"the",
"average",
"net",
"profit",
"of",
"bar",
"tools",
"which",
"has",
"ordered",
"quantity",
"exceed",
"5",
"."
] | [
{
"id": 6,
"type": "column",
"value": "Order Quantity"
},
{
"id": 0,
"type": "table",
"value": "Sales Orders"
},
{
"id": 4,
"type": "column",
"value": "Product Name"
},
{
"id": 8,
"type": "column",
"value": "ordernumber"
},
{
"id": 3,
"type": "... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
6,
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,597 | retails | bird:train.json:6787 | How many European suppliers are there? | SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN supplier AS T3 ON T1.n_nationkey = T3.s_nationkey WHERE T2.r_name = 'EUROPE' | [
"How",
"many",
"European",
"suppliers",
"are",
"there",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "n_nationkey"
},
{
"id": 6,
"type": "column",
"value": "s_nationkey"
},
{
"id": 7,
"type": "column",
"value": "n_regionkey"
},
{
"id": 8,
"type": "column",
"value": "r_regionkey"
},
{
"id": 0,
"type": "tabl... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"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-VALUE",
"B-TABLE",
"O",
"O",
"O"
] |
3,599 | retails | bird:train.json:6765 | Calculate the percentage of part supply that costs more than 500. | SELECT CAST(SUM(IIF(ps_supplycost > 500, 1, 0)) AS REAL) * 100 / COUNT(ps_suppkey) FROM partsupp | [
"Calculate",
"the",
"percentage",
"of",
"part",
"supply",
"that",
"costs",
"more",
"than",
"500",
"."
] | [
{
"id": 5,
"type": "column",
"value": "ps_supplycost"
},
{
"id": 2,
"type": "column",
"value": "ps_suppkey"
},
{
"id": 0,
"type": "table",
"value": "partsupp"
},
{
"id": 1,
"type": "value",
"value": "100"
},
{
"id": 6,
"type": "value",
"val... | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
3,600 | college_1 | spider:train_spider.json:3262 | What are the first names and office locations for all professors sorted alphabetically by first name? | SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname | [
"What",
"are",
"the",
"first",
"names",
"and",
"office",
"locations",
"for",
"all",
"professors",
"sorted",
"alphabetically",
"by",
"first",
"name",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "prof_office"
},
{
"id": 0,
"type": "column",
"value": "emp_fname"
},
{
"id": 2,
"type": "table",
"value": "professor"
},
{
"id": 3,
"type": "table",
"value": "employee"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,601 | professional_basketball | bird:train.json:2945 | For the players who played the most PBLA games, who was graduated from Central Missouri State college? | SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID = 'PBLA' AND T2.GP = 10 AND T1.college = 'Central Missouri State' GROUP BY T1.firstName, T1.middleName, T1.lastName ORDER BY COUNT(T2.id) DESC LIMIT 1 | [
"For",
"the",
"players",
"who",
"played",
"the",
"most",
"PBLA",
"games",
",",
"who",
"was",
"graduated",
"from",
"Central",
"Missouri",
"State",
"college",
"?"
] | [
{
"id": 11,
"type": "value",
"value": "Central Missouri State"
},
{
"id": 4,
"type": "table",
"value": "players_teams"
},
{
"id": 1,
"type": "column",
"value": "middlename"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
4
... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
3,602 | theme_gallery | spider:train_spider.json:1675 | Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009. | SELECT avg(ticket_price) , min(ticket_price) , max(ticket_price) FROM exhibition WHERE YEAR < 2009 | [
"Show",
"the",
"average",
",",
"minimum",
",",
"and",
"maximum",
"ticket",
"prices",
"for",
"exhibitions",
"for",
"all",
"years",
"before",
"2009",
"."
] | [
{
"id": 3,
"type": "column",
"value": "ticket_price"
},
{
"id": 0,
"type": "table",
"value": "exhibition"
},
{
"id": 1,
"type": "column",
"value": "year"
},
{
"id": 2,
"type": "value",
"value": "2009"
}
] | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,603 | shop_membership | spider:train_spider.json:5442 | list the card number of all members whose hometown address includes word "Kentucky". | SELECT card_number FROM member WHERE Hometown LIKE "%Kentucky%" | [
"list",
"the",
"card",
"number",
"of",
"all",
"members",
"whose",
"hometown",
"address",
"includes",
"word",
"\"",
"Kentucky",
"\"",
"."
] | [
{
"id": 1,
"type": "column",
"value": "card_number"
},
{
"id": 3,
"type": "column",
"value": "%Kentucky%"
},
{
"id": 2,
"type": "column",
"value": "hometown"
},
{
"id": 0,
"type": "table",
"value": "member"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
3,604 | codebase_community | bird:dev.json:716 | Among the comments with scores between 5 to 10, what is the percentage of the users with 0 up votes? | SELECT CAST(SUM(IIF(T1.UpVotes = 0, 1, 0)) AS REAL) * 100/ COUNT(T1.Id) AS per FROM users AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.UserId WHERE T2.Score BETWEEN 5 AND 10 | [
"Among",
"the",
"comments",
"with",
"scores",
"between",
"5",
"to",
"10",
",",
"what",
"is",
"the",
"percentage",
"of",
"the",
"users",
"with",
"0",
"up",
"votes",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "comments"
},
{
"id": 10,
"type": "column",
"value": "upvotes"
},
{
"id": 6,
"type": "column",
"value": "userid"
},
{
"id": 0,
"type": "table",
"value": "users"
},
{
"id": 2,
"type": "column",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
3,605 | college_1 | spider:train_spider.json:3285 | What are the description and credit of the course which the student whose last name is Smithson took? | SELECT T4.crs_description , T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson' | [
"What",
"are",
"the",
"description",
"and",
"credit",
"of",
"the",
"course",
"which",
"the",
"student",
"whose",
"last",
"name",
"is",
"Smithson",
"took",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "crs_description"
},
{
"id": 1,
"type": "column",
"value": "crs_credit"
},
{
"id": 10,
"type": "column",
"value": "class_code"
},
{
"id": 3,
"type": "column",
"value": "stu_lname"
},
{
"id": 4,
"type": "val... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
3,606 | manufactory_1 | spider:train_spider.json:5315 | How many different products are produced in each headquarter city? | SELECT count(DISTINCT T1.name) , T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter | [
"How",
"many",
"different",
"products",
"are",
"produced",
"in",
"each",
"headquarter",
"city",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "manufacturers"
},
{
"id": 4,
"type": "column",
"value": "manufacturer"
},
{
"id": 0,
"type": "column",
"value": "headquarter"
},
{
"id": 1,
"type": "table",
"value": "products"
},
{
"id": 3,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"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-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
3,607 | airline | bird:train.json:5860 | How many planes does Southwest Airlines Co. have? | SELECT COUNT(T3.TAIL_NUM) FROM ( SELECT T1.TAIL_NUM FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T2.Description = 'Southwest Airlines Co.: WN' GROUP BY T1.TAIL_NUM ) T3 | [
"How",
"many",
"planes",
"does",
"Southwest",
"Airlines",
"Co.",
"have",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "Southwest Airlines Co.: WN"
},
{
"id": 5,
"type": "column",
"value": "op_carrier_airline_id"
},
{
"id": 2,
"type": "table",
"value": "Air Carriers"
},
{
"id": 3,
"type": "column",
"value": "description"
},
{
"i... | [
{
"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": [
4,
6
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-VALUE",
"O",
"O"
] |
3,609 | college_completion | bird:train.json:3711 | What is the average percentage of students graduating within 100 percent of normal/expected time for Central Alabama Community College? | SELECT AVG(T2.grad_100_rate) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Central Alabama Community College' | [
"What",
"is",
"the",
"average",
"percentage",
"of",
"students",
"graduating",
"within",
"100",
"percent",
"of",
"normal",
"/",
"expected",
"time",
"for",
"Central",
"Alabama",
"Community",
"College",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Central Alabama Community College"
},
{
"id": 0,
"type": "table",
"value": "institution_details"
},
{
"id": 1,
"type": "table",
"value": "institution_grads"
},
{
"id": 4,
"type": "column",
"value": "grad_100_rate"
},... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
17,
18,
19,
20
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
3,610 | student_1 | spider:train_spider.json:4042 | Which classrooms are used by grade 4? | SELECT DISTINCT classroom FROM list WHERE grade = 4 | [
"Which",
"classrooms",
"are",
"used",
"by",
"grade",
"4",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "classroom"
},
{
"id": 2,
"type": "column",
"value": "grade"
},
{
"id": 0,
"type": "table",
"value": "list"
},
{
"id": 3,
"type": "value",
"value": "4"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
3,612 | phone_market | spider:train_spider.json:1987 | Show the names of phones and the districts of markets they are on. | SELECT T3.Name , T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID | [
"Show",
"the",
"names",
"of",
"phones",
"and",
"the",
"districts",
"of",
"markets",
"they",
"are",
"on",
"."
] | [
{
"id": 3,
"type": "table",
"value": "phone_market"
},
{
"id": 6,
"type": "column",
"value": "market_id"
},
{
"id": 1,
"type": "column",
"value": "district"
},
{
"id": 5,
"type": "column",
"value": "phone_id"
},
{
"id": 4,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
3,614 | apartment_rentals | spider:train_spider.json:1252 | Return the apartment number with the largest number of bedrooms. | SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1 | [
"Return",
"the",
"apartment",
"number",
"with",
"the",
"largest",
"number",
"of",
"bedrooms",
"."
] | [
{
"id": 2,
"type": "column",
"value": "bedroom_count"
},
{
"id": 0,
"type": "table",
"value": "apartments"
},
{
"id": 1,
"type": "column",
"value": "apt_number"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
3,615 | student_1 | spider:train_spider.json:4081 | For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade. | SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade | [
"For",
"each",
"grade",
",",
"return",
"the",
"grade",
"number",
",",
"the",
"number",
"of",
"classrooms",
"used",
"for",
"the",
"grade",
",",
"and",
"the",
"total",
"number",
"of",
"students",
"enrolled",
"in",
"the",
"grade",
"."
] | [
{
"id": 2,
"type": "column",
"value": "classroom"
},
{
"id": 1,
"type": "column",
"value": "grade"
},
{
"id": 0,
"type": "table",
"value": "list"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,616 | college_completion | bird:train.json:3694 | Calculate the percentage of Asian students among students of other races who graduated from institution in Alabama in year 2013 within 100 percent of normal / expected time. | SELECT CAST(SUM(CASE WHEN T2.race = 'A' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.year = 2013 AND T1.state = 'Alabama' | [
"Calculate",
"the",
"percentage",
"of",
"Asian",
"students",
"among",
"students",
"of",
"other",
"races",
"who",
"graduated",
"from",
"institution",
"in",
"Alabama",
"in",
"year",
"2013",
"within",
"100",
"percent",
"of",
"normal",
"/",
"expected",
"time",
"."... | [
{
"id": 0,
"type": "table",
"value": "institution_details"
},
{
"id": 1,
"type": "table",
"value": "institution_grads"
},
{
"id": 8,
"type": "column",
"value": "grad_cohort"
},
{
"id": 6,
"type": "value",
"value": "Alabama"
},
{
"id": 2,
"type"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
18
]
},
{
"entity_id": 4,
"token_idxs": [
19
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,617 | bike_racing | bird:test.json:1478 | What are the id and name of the cyclist who owns the most bikes? | SELECT T1.id , T1.name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1 | [
"What",
"are",
"the",
"i",
"d",
"and",
"name",
"of",
"the",
"cyclist",
"who",
"owns",
"the",
"most",
"bikes",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "cyclists_own_bikes"
},
{
"id": 4,
"type": "column",
"value": "cyclist_id"
},
{
"id": 2,
"type": "table",
"value": "cyclist"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": []
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O"
] |
3,618 | tracking_software_problems | spider:train_spider.json:5382 | List all the distinct product names ordered by product id? | SELECT DISTINCT product_name FROM product ORDER BY product_id | [
"List",
"all",
"the",
"distinct",
"product",
"names",
"ordered",
"by",
"product",
"i",
"d",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "product_name"
},
{
"id": 2,
"type": "column",
"value": "product_id"
},
{
"id": 0,
"type": "table",
"value": "product"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"e... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
3,619 | menu | bird:train.json:5541 | How many dishes appeared more than once on a menu? | SELECT COUNT(*) FROM Dish WHERE times_appeared > Dish.menus_appeared | [
"How",
"many",
"dishes",
"appeared",
"more",
"than",
"once",
"on",
"a",
"menu",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "times_appeared"
},
{
"id": 2,
"type": "column",
"value": "menus_appeared"
},
{
"id": 0,
"type": "table",
"value": "dish"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,620 | warehouse_1 | bird:test.json:1721 | Find the code and contents of the box with the lowest value. | SELECT code , CONTENTS FROM boxes ORDER BY value LIMIT 1 | [
"Find",
"the",
"code",
"and",
"contents",
"of",
"the",
"box",
"with",
"the",
"lowest",
"value",
"."
] | [
{
"id": 2,
"type": "column",
"value": "contents"
},
{
"id": 0,
"type": "table",
"value": "boxes"
},
{
"id": 3,
"type": "column",
"value": "value"
},
{
"id": 1,
"type": "column",
"value": "code"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,621 | student_club | bird:dev.json:1436 | Please provide links to events for members who have paid more than 50 dollar. | SELECT DISTINCT T3.link_to_event FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id INNER JOIN attendance AS T3 ON T2.member_id = T3.link_to_member WHERE T1.cost > 50 | [
"Please",
"provide",
"links",
"to",
"events",
"for",
"members",
"who",
"have",
"paid",
"more",
"than",
"50",
"dollar",
"."
] | [
{
"id": 7,
"type": "column",
"value": "link_to_member"
},
{
"id": 0,
"type": "column",
"value": "link_to_event"
},
{
"id": 1,
"type": "table",
"value": "attendance"
},
{
"id": 6,
"type": "column",
"value": "member_id"
},
{
"id": 4,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
0
]
},
{
"e... | [
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
3,622 | vehicle_driver | bird:test.json:156 | What is the id of the driver who has driven the most vehicles, and how many vehicles is this? | SELECT count(*) , driver_id FROM vehicle_driver GROUP BY driver_id ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"i",
"d",
"of",
"the",
"driver",
"who",
"has",
"driven",
"the",
"most",
"vehicles",
",",
"and",
"how",
"many",
"vehicles",
"is",
"this",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "vehicle_driver"
},
{
"id": 1,
"type": "column",
"value": "driver_id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,623 | allergy_1 | spider:train_spider.json:471 | Show student ids for all male students. | SELECT StuID FROM Student WHERE Sex = 'M' | [
"Show",
"student",
"ids",
"for",
"all",
"male",
"students",
"."
] | [
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 1,
"type": "column",
"value": "stuid"
},
{
"id": 2,
"type": "column",
"value": "sex"
},
{
"id": 3,
"type": "value",
"value": "M"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,624 | station_weather | spider:train_spider.json:3166 | Give me the maximum low temperature and average precipitation at the Amersham station. | SELECT max(t1.low_temperature) , avg(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = "Amersham" | [
"Give",
"me",
"the",
"maximum",
"low",
"temperature",
"and",
"average",
"precipitation",
"at",
"the",
"Amersham",
"station",
"."
] | [
{
"id": 4,
"type": "column",
"value": "low_temperature"
},
{
"id": 0,
"type": "table",
"value": "weekly_weather"
},
{
"id": 5,
"type": "column",
"value": "precipitation"
},
{
"id": 2,
"type": "column",
"value": "network_name"
},
{
"id": 6,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
4,
5
]
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
3,625 | network_2 | spider:train_spider.json:4444 | Find the name of the person who has friends with age above 40 and under age 30? | SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30) | [
"Find",
"the",
"name",
"of",
"the",
"person",
"who",
"has",
"friends",
"with",
"age",
"above",
"40",
"and",
"under",
"age",
"30",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "personfriend"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 3,
"type": "column",
"value": "friend"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "column",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
15
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
3,626 | codebase_comments | bird:train.json:592 | What is the github address of the repository that contains files used by solution ID12? | SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 12 | [
"What",
"is",
"the",
"github",
"address",
"of",
"the",
"repository",
"that",
"contains",
"files",
"used",
"by",
"solution",
"ID12",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "solution"
},
{
"id": 5,
"type": "column",
"value": "repoid"
},
{
"id": 1,
"type": "table",
"value": "repo"
},
{
"id": 0,
"type": "column",
"value": "url"
},
{
"id": 3,
"type": "column",
"value": "id"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
"token_idxs"... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
3,627 | music_platform_2 | bird:train.json:7920 | Provide the itunes id and url for podcast titled 'Brown Suga Diaries'. | SELECT itunes_id, itunes_url FROM podcasts WHERE title = 'Brown Suga Diaries' | [
"Provide",
"the",
"itunes",
"i",
"d",
"and",
"url",
"for",
"podcast",
"titled",
"'",
"Brown",
"Suga",
"Diaries",
"'",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Brown Suga Diaries"
},
{
"id": 2,
"type": "column",
"value": "itunes_url"
},
{
"id": 1,
"type": "column",
"value": "itunes_id"
},
{
"id": 0,
"type": "table",
"value": "podcasts"
},
{
"id": 3,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
11,
1... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
3,628 | allergy_1 | spider:train_spider.json:494 | How old is each student and how many students are each age? | SELECT age , count(*) FROM Student GROUP BY age | [
"How",
"old",
"is",
"each",
"student",
"and",
"how",
"many",
"students",
"are",
"each",
"age",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 1,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,629 | books | bird:train.json:6018 | How many customers ordered the oldest book? | SELECT COUNT(*) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id GROUP BY T1.publication_date ORDER BY T1.publication_date ASC LIMIT 1 | [
"How",
"many",
"customers",
"ordered",
"the",
"oldest",
"book",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "publication_date"
},
{
"id": 2,
"type": "table",
"value": "order_line"
},
{
"id": 3,
"type": "column",
"value": "book_id"
},
{
"id": 1,
"type": "table",
"value": "book"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O"
] |
3,630 | authors | bird:train.json:3665 | Indicate the year and a full name of the journal in which the publication named 'Area Effects in Cepaea' was published. | SELECT T1.Year, T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = 'Area Effects in Cepaea' | [
"Indicate",
"the",
"year",
"and",
"a",
"full",
"name",
"of",
"the",
"journal",
"in",
"which",
"the",
"publication",
"named",
"'",
"Area",
"Effects",
"in",
"Cepaea",
"'",
"was",
"published",
"."
] | [
{
"id": 5,
"type": "value",
"value": "Area Effects in Cepaea"
},
{
"id": 6,
"type": "column",
"value": "journalid"
},
{
"id": 1,
"type": "column",
"value": "fullname"
},
{
"id": 3,
"type": "table",
"value": "journal"
},
{
"id": 2,
"type": "tabl... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O"
] |
3,631 | computer_student | bird:train.json:1028 | How many professors teaches basic or medium undergraduate courses? | SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_300' | [
"How",
"many",
"professors",
"teaches",
"basic",
"or",
"medium",
"undergraduate",
"courses",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "courselevel"
},
{
"id": 3,
"type": "value",
"value": "Level_300"
},
{
"id": 4,
"type": "column",
"value": "course_id"
},
{
"id": 1,
"type": "table",
"value": "taughtby"
},
{
"id": 0,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": [
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_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,632 | european_football_2 | bird:dev.json:1099 | Which foot is preferred by Abdou Diallo? | SELECT DISTINCT t2.preferred_foot FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Abdou Diallo' | [
"Which",
"foot",
"is",
"preferred",
"by",
"Abdou",
"Diallo",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "player_attributes"
},
{
"id": 0,
"type": "column",
"value": "preferred_foot"
},
{
"id": 5,
"type": "column",
"value": "player_api_id"
},
{
"id": 4,
"type": "value",
"value": "Abdou Diallo"
},
{
"id": 3,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5,
6
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
3,633 | public_review_platform | bird:train.json:3925 | What is the category of the business with short review length and highest review stars within business ID from 5 t0 10? | SELECT T4.category_name FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T1.review_length LIKE 'Short' AND T2.business_id BETWEEN 5 AND 10 ORDER BY ... | [
"What",
"is",
"the",
"category",
"of",
"the",
"business",
"with",
"short",
"review",
"length",
"and",
"highest",
"review",
"stars",
"within",
"business",
"ID",
"from",
"5",
"t0",
"10",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "business_categories"
},
{
"id": 0,
"type": "column",
"value": "category_name"
},
{
"id": 5,
"type": "column",
"value": "review_length"
},
{
"id": 2,
"type": "column",
"value": "review_stars"
},
{
"id": 4,
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
3,634 | donor | bird:train.json:3162 | Name the project that costs the most. How much has been collected from donation and what is the percentage amount still lacking? | SELECT T1.title, SUM(T3.donation_to_project), CAST((T2.total_price_excluding_optional_support - SUM(T3.donation_to_project)) AS REAL) * 100 / SUM(T3.donation_to_project) FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid ORDER BY T2.total... | [
"Name",
"the",
"project",
"that",
"costs",
"the",
"most",
".",
"How",
"much",
"has",
"been",
"collected",
"from",
"donation",
"and",
"what",
"is",
"the",
"percentage",
"amount",
"still",
"lacking",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "total_price_excluding_optional_support"
},
{
"id": 3,
"type": "column",
"value": "donation_to_project"
},
{
"id": 1,
"type": "table",
"value": "donations"
},
{
"id": 6,
"type": "column",
"value": "projectid"
},
{
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
2
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,635 | language_corpus | bird:train.json:5777 | Please list the Catalan words with an occurrence of over 200000. | SELECT word FROM words WHERE occurrences > 200000 | [
"Please",
"list",
"the",
"Catalan",
"words",
"with",
"an",
"occurrence",
"of",
"over",
"200000",
"."
] | [
{
"id": 2,
"type": "column",
"value": "occurrences"
},
{
"id": 3,
"type": "value",
"value": "200000"
},
{
"id": 0,
"type": "table",
"value": "words"
},
{
"id": 1,
"type": "column",
"value": "word"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
3,636 | social_media | bird:train.json:819 | List down all of the texts posted on Twitter on Thursday. | SELECT text FROM twitter WHERE Weekday = 'Thursday' | [
"List",
"down",
"all",
"of",
"the",
"texts",
"posted",
"on",
"Twitter",
"on",
"Thursday",
"."
] | [
{
"id": 3,
"type": "value",
"value": "Thursday"
},
{
"id": 0,
"type": "table",
"value": "twitter"
},
{
"id": 2,
"type": "column",
"value": "weekday"
},
{
"id": 1,
"type": "column",
"value": "text"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
3,637 | movies_4 | bird:train.json:538 | Provide the ID and ISO code of Belgium. | SELECT COUNTry_id, COUNTry_iso_code FROM COUNTry WHERE COUNTry_name = 'Belgium' | [
"Provide",
"the",
"ID",
"and",
"ISO",
"code",
"of",
"Belgium",
"."
] | [
{
"id": 2,
"type": "column",
"value": "country_iso_code"
},
{
"id": 3,
"type": "column",
"value": "country_name"
},
{
"id": 1,
"type": "column",
"value": "country_id"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 4,
"type": "valu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,638 | university | bird:train.json:8035 | Indicate the university's name with the highest ranking score in Teaching. | SELECT T1.university_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T3.criteria_name = 'Teaching' ORDER BY T2.score DESC LIMIT 1 | [
"Indicate",
"the",
"university",
"'s",
"name",
"with",
"the",
"highest",
"ranking",
"score",
"in",
"Teaching",
"."
] | [
{
"id": 6,
"type": "table",
"value": "university_ranking_year"
},
{
"id": 8,
"type": "column",
"value": "ranking_criteria_id"
},
{
"id": 1,
"type": "table",
"value": "ranking_criteria"
},
{
"id": 0,
"type": "column",
"value": "university_name"
},
{
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
8,
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-TABLE",
"B-VALUE",
"O"
] |
3,639 | menu | bird:train.json:5562 | How many dishes are there on the menu "Zentral Theater Terrace"? | SELECT COUNT(*) FROM Menu WHERE name = 'Zentral Theater Terrace' | [
"How",
"many",
"dishes",
"are",
"there",
"on",
"the",
"menu",
"\"",
"Zentral",
"Theater",
"Terrace",
"\"",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "Zentral Theater Terrace"
},
{
"id": 0,
"type": "table",
"value": "menu"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9,
10,
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
3,640 | allergy_1 | spider:train_spider.json:502 | Give the advisor with the most students. | SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1 | [
"Give",
"the",
"advisor",
"with",
"the",
"most",
"students",
"."
] | [
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 1,
"type": "column",
"value": "advisor"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,641 | synthea | bird:train.json:1360 | By how much did Elly Koss's weight increase from the observation in 2008 to the observation in 2009? | SELECT SUM(CASE WHEN strftime('%Y', T2.date) = '2009' THEN T2.VALUE END) - SUM(CASE WHEN strftime('%Y', T2.date) = '2008' THEN T2.VALUE END) AS increase , T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Body Height' | [
"By",
"how",
"much",
"did",
"Elly",
"Koss",
"'s",
"weight",
"increase",
"from",
"the",
"observation",
"in",
"2008",
"to",
"the",
"observation",
"in",
"2009",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "observations"
},
{
"id": 8,
"type": "column",
"value": "description"
},
{
"id": 9,
"type": "value",
"value": "Body Height"
},
{
"id": 1,
"type": "table",
"value": "patients"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
4
... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
3,642 | books | bird:train.json:5950 | Which shipping method is preferred by customers the most? | SELECT T2.method_name FROM cust_order AS T1 INNER JOIN shipping_method AS T2 ON T1.shipping_method_id = T2.method_id GROUP BY T2.method_name ORDER BY COUNT(T2.method_id) DESC LIMIT 1 | [
"Which",
"shipping",
"method",
"is",
"preferred",
"by",
"customers",
"the",
"most",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "shipping_method_id"
},
{
"id": 2,
"type": "table",
"value": "shipping_method"
},
{
"id": 0,
"type": "column",
"value": "method_name"
},
{
"id": 1,
"type": "table",
"value": "cust_order"
},
{
"id": 4,
"type... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"... | [
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
3,643 | world | bird:train.json:7917 | Among the countries that use Italian as their language, what is the percentage of republic countries? | SELECT CAST(SUM(CASE WHEN T2.GovernmentForm = 'Republic' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Language = 'Italian' | [
"Among",
"the",
"countries",
"that",
"use",
"Italian",
"as",
"their",
"language",
",",
"what",
"is",
"the",
"percentage",
"of",
"republic",
"countries",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "countrylanguage"
},
{
"id": 9,
"type": "column",
"value": "governmentform"
},
{
"id": 4,
"type": "column",
"value": "countrycode"
},
{
"id": 2,
"type": "column",
"value": "language"
},
{
"id": 10,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
3,645 | railway | spider:train_spider.json:5650 | Show the distinct countries of managers. | SELECT DISTINCT Country FROM manager | [
"Show",
"the",
"distinct",
"countries",
"of",
"managers",
"."
] | [
{
"id": 0,
"type": "table",
"value": "manager"
},
{
"id": 1,
"type": "column",
"value": "country"
}
] | [
{
"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"
] |
3,646 | food_inspection | bird:train.json:8845 | Among the businesses with score that ranges from 70 to 80, list their violation type ID and risk category. | SELECT DISTINCT T1.violation_type_id, T1.risk_category FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id INNER JOIN inspections AS T3 ON T2.business_id = T3.business_id WHERE T3.score BETWEEN 70 AND 80 | [
"Among",
"the",
"businesses",
"with",
"score",
"that",
"ranges",
"from",
"70",
"to",
"80",
",",
"list",
"their",
"violation",
"type",
"ID",
"and",
"risk",
"category",
"."
] | [
{
"id": 0,
"type": "column",
"value": "violation_type_id"
},
{
"id": 1,
"type": "column",
"value": "risk_category"
},
{
"id": 2,
"type": "table",
"value": "inspections"
},
{
"id": 8,
"type": "column",
"value": "business_id"
},
{
"id": 6,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
15,
16
]
},
{
"entity_id": 1,
"token_idxs": [
18,
19
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
8
]... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.