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 |
|---|---|---|---|---|---|---|---|---|
6,428 | store_product | spider:train_spider.json:4932 | Find products with max page size as "A4" or pages per minute color smaller than 5. | SELECT product FROM product WHERE max_page_size = "A4" OR pages_per_minute_color < 5 | [
"Find",
"products",
"with",
"max",
"page",
"size",
"as",
"\"",
"A4",
"\"",
"or",
"pages",
"per",
"minute",
"color",
"smaller",
"than",
"5",
"."
] | [
{
"id": 4,
"type": "column",
"value": "pages_per_minute_color"
},
{
"id": 2,
"type": "column",
"value": "max_page_size"
},
{
"id": 0,
"type": "table",
"value": "product"
},
{
"id": 1,
"type": "column",
"value": "product"
},
{
"id": 3,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
11,
1... | [
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
6,429 | video_game | bird:test.json:1953 | What is the average number of units sold in millions of games played by players with position "Guard"? | SELECT avg(Units_sold_Millions) FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = "Guard" | [
"What",
"is",
"the",
"average",
"number",
"of",
"units",
"sold",
"in",
"millions",
"of",
"games",
"played",
"by",
"players",
"with",
"position",
"\"",
"Guard",
"\"",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "units_sold_millions"
},
{
"id": 5,
"type": "table",
"value": "game_player"
},
{
"id": 6,
"type": "column",
"value": "player_id"
},
{
"id": 1,
"type": "column",
"value": "position"
},
{
"id": 7,
"type": "co... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": [
6,
7,
8,
9
]
},
{
"entity_id": 4,
"token_i... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
6,430 | medicine_enzyme_interaction | spider:train_spider.json:955 | What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? | SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole' | [
"What",
"is",
"the",
"interaction",
"type",
"of",
"the",
"enzyme",
"named",
"'",
"ALA",
"synthase",
"'",
"and",
"the",
"medicine",
"named",
"'",
"Aripiprazole",
"'",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "medicine_enzyme_interaction"
},
{
"id": 0,
"type": "column",
"value": "interaction_type"
},
{
"id": 7,
"type": "value",
"value": "ALA synthase"
},
{
"id": 8,
"type": "value",
"value": "Aripiprazole"
},
{
"id": ... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
6,431 | cre_Students_Information_Systems | bird:test.json:449 | List the detail and id of the teacher who teaches the most courses. | SELECT T1.teacher_details , T1.teacher_id FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1 | [
"List",
"the",
"detail",
"and",
"i",
"d",
"of",
"the",
"teacher",
"who",
"teaches",
"the",
"most",
"courses",
"."
] | [
{
"id": 1,
"type": "column",
"value": "teacher_details"
},
{
"id": 0,
"type": "column",
"value": "teacher_id"
},
{
"id": 2,
"type": "table",
"value": "teachers"
},
{
"id": 3,
"type": "table",
"value": "classes"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
6,432 | talkingdata | bird:train.json:1232 | Please provide the age group of any LG Nexus 4 device users. | SELECT T1.`group` FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'LG' AND T2.device_model = 'Nexus 4' | [
"Please",
"provide",
"the",
"age",
"group",
"of",
"any",
"LG",
"Nexus",
"4",
"device",
"users",
"."
] | [
{
"id": 2,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 6,
"type": "column",
"value": "device_model"
},
{
"id": 4,
"type": "column",
"value": "phone_brand"
},
{
"id": 1,
"type": "table",
"value": "gender_age"
},
{
"id": 3,
"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"O"
] |
6,433 | county_public_safety | spider:train_spider.json:2543 | Return the names of cities, ordered alphabetically. | SELECT Name FROM city ORDER BY Name ASC | [
"Return",
"the",
"names",
"of",
"cities",
",",
"ordered",
"alphabetically",
"."
] | [
{
"id": 0,
"type": "table",
"value": "city"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
6,434 | book_2 | spider:train_spider.json:229 | List the titles of books that are not published. | SELECT Title FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM publication) | [
"List",
"the",
"titles",
"of",
"books",
"that",
"are",
"not",
"published",
"."
] | [
{
"id": 3,
"type": "table",
"value": "publication"
},
{
"id": 2,
"type": "column",
"value": "book_id"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 0,
"type": "table",
"value": "book"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
6,435 | tracking_software_problems | spider:train_spider.json:5353 | Which problem log was created most recently? Give me the log id. | SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1 | [
"Which",
"problem",
"log",
"was",
"created",
"most",
"recently",
"?",
"Give",
"me",
"the",
"log",
"i",
"d."
] | [
{
"id": 1,
"type": "column",
"value": "problem_log_id"
},
{
"id": 2,
"type": "column",
"value": "log_entry_date"
},
{
"id": 0,
"type": "table",
"value": "problem_log"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1,
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,436 | movie_3 | bird:train.json:9304 | How many of the actors are named "Dan"? | SELECT COUNT(actor_id) FROM actor WHERE first_name = 'Dan' | [
"How",
"many",
"of",
"the",
"actors",
"are",
"named",
"\"",
"Dan",
"\"",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type": "column",
"value": "actor_id"
},
{
"id": 0,
"type": "table",
"value": "actor"
},
{
"id": 2,
"type": "value",
"value": "Dan"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
6,437 | european_football_2 | bird:dev.json:1112 | What was the chance creation crossing class for "Hull City" on 2010/2/22? | SELECT t2.chanceCreationCrossingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Hull City' AND SUBSTR(t2.`date`, 1, 10) = '2010-02-22' | [
"What",
"was",
"the",
"chance",
"creation",
"crossing",
"class",
"for",
"\"",
"Hull",
"City",
"\"",
"on",
"2010/2/22",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "chancecreationcrossingclass"
},
{
"id": 2,
"type": "table",
"value": "team_attributes"
},
{
"id": 4,
"type": "column",
"value": "team_long_name"
},
{
"id": 3,
"type": "column",
"value": "team_api_id"
},
{
"id"... | [
{
"entity_id": 0,
"token_idxs": [
3,
4,
5,
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
6,438 | sakila_1 | spider:train_spider.json:2976 | Which staff handled least number of payments? List the full name and the id. | SELECT T1.first_name , T1.last_name , T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1 | [
"Which",
"staff",
"handled",
"least",
"number",
"of",
"payments",
"?",
"List",
"the",
"full",
"name",
"and",
"the",
"i",
"d."
] | [
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 2,
"type": "column",
"value": "last_name"
},
{
"id": 0,
"type": "column",
"value": "staff_id"
},
{
"id": 4,
"type": "table",
"value": "payment"
},
{
"id": 3,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3,
4
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id":... | [
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,439 | world | bird:train.json:7880 | Which country has the most crowded city in the world? | SELECT T1.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1 | [
"Which",
"country",
"has",
"the",
"most",
"crowded",
"city",
"in",
"the",
"world",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "countrycode"
},
{
"id": 3,
"type": "column",
"value": "population"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "table",
"valu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
"... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
6,440 | e_commerce | bird:test.json:74 | What are invoices status of all the orders which have not been shipped? | SELECT invoice_status_code FROM Invoices WHERE invoice_number NOT IN ( SELECT invoice_number FROM Shipments ) | [
"What",
"are",
"invoices",
"status",
"of",
"all",
"the",
"orders",
"which",
"have",
"not",
"been",
"shipped",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "invoice_status_code"
},
{
"id": 2,
"type": "column",
"value": "invoice_number"
},
{
"id": 3,
"type": "table",
"value": "shipments"
},
{
"id": 0,
"type": "table",
"value": "invoices"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,441 | address | bird:train.json:5130 | Name the county that has the bad alias of Druid Hills. | SELECT T2.county FROM avoid AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Druid Hills' | [
"Name",
"the",
"county",
"that",
"has",
"the",
"bad",
"alias",
"of",
"Druid",
"Hills",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Druid Hills"
},
{
"id": 3,
"type": "column",
"value": "bad_alias"
},
{
"id": 5,
"type": "column",
"value": "zip_code"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 0,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7
]
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
},
{
"e... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
6,442 | books | bird:train.json:5912 | Among the books published by publisher ID 1929, how many of them have over 500 pages? | SELECT COUNT(*) FROM book WHERE publisher_id = 1929 AND num_pages > 500 | [
"Among",
"the",
"books",
"published",
"by",
"publisher",
"ID",
"1929",
",",
"how",
"many",
"of",
"them",
"have",
"over",
"500",
"pages",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "publisher_id"
},
{
"id": 3,
"type": "column",
"value": "num_pages"
},
{
"id": 0,
"type": "table",
"value": "book"
},
{
"id": 2,
"type": "value",
"value": "1929"
},
{
"id": 4,
"type": "value",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
15
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
6,443 | mondial_geo | bird:train.json:8459 | What proportion of rivers have a length of more than 3,000 miles? Please provide the name of a Russian river that is more than 3,000 miles long. | SELECT CAST(SUM(CASE WHEN T1.Length > 3000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Name) FROM river AS T1 INNER JOIN located AS T2 ON T1.Name = T2.River INNER JOIN country AS T3 ON T3.Code = T2.Country | [
"What",
"proportion",
"of",
"rivers",
"have",
"a",
"length",
"of",
"more",
"than",
"3,000",
"miles",
"?",
"Please",
"provide",
"the",
"name",
"of",
"a",
"Russian",
"river",
"that",
"is",
"more",
"than",
"3,000",
"miles",
"long",
"."
] | [
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 2,
"type": "table",
"value": "located"
},
{
"id": 4,
"type": "column",
"value": "country"
},
{
"id": 10,
"type": "column",
"value": "length"
},
{
"id": 1,
"type": "table",
"value": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,444 | public_review_platform | bird:train.json:3923 | List the active business ID and its stars of the businesses fall under the category of Pets. | SELECT T1.business_id, T1.stars FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.active LIKE 'TRUE' AND T3.category_name LIKE 'Pets' | [
"List",
"the",
"active",
"business",
"ID",
"and",
"its",
"stars",
"of",
"the",
"businesses",
"fall",
"under",
"the",
"category",
"of",
"Pets",
"."
] | [
{
"id": 4,
"type": "table",
"value": "business_categories"
},
{
"id": 8,
"type": "column",
"value": "category_name"
},
{
"id": 0,
"type": "column",
"value": "business_id"
},
{
"id": 5,
"type": "column",
"value": "category_id"
},
{
"id": 2,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
6,445 | food_inspection_2 | bird:train.json:6127 | When did Wing Hung Chop Suey Restaurant have its first inspection? | SELECT MIN(T2.inspection_date) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.aka_name = 'WING HUNG CHOP SUEY RESTAURANT' | [
"When",
"did",
"Wing",
"Hung",
"Chop",
"Suey",
"Restaurant",
"have",
"its",
"first",
"inspection",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "WING HUNG CHOP SUEY RESTAURANT"
},
{
"id": 4,
"type": "column",
"value": "inspection_date"
},
{
"id": 0,
"type": "table",
"value": "establishment"
},
{
"id": 1,
"type": "table",
"value": "inspection"
},
{
"id":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2,
3,
4,
5,
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,446 | college_2 | spider:train_spider.json:1409 | What is the name of the deparment with the highest enrollment? | SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"deparment",
"with",
"the",
"highest",
"enrollment",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "dept_name"
},
{
"id": 0,
"type": "table",
"value": "student"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
6,447 | entertainment_awards | spider:train_spider.json:4619 | In which year are there festivals both inside the 'United States' and outside the 'United States'? | SELECT YEAR FROM festival_detail WHERE LOCATION = 'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION != 'United States' | [
"In",
"which",
"year",
"are",
"there",
"festivals",
"both",
"inside",
"the",
"'",
"United",
"States",
"'",
"and",
"outside",
"the",
"'",
"United",
"States",
"'",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "festival_detail"
},
{
"id": 3,
"type": "value",
"value": "United States"
},
{
"id": 2,
"type": "column",
"value": "location"
},
{
"id": 1,
"type": "column",
"value": "year"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,448 | product_catalog | spider:train_spider.json:330 | What are the names of catalog entries with level number 8? | SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" | [
"What",
"are",
"the",
"names",
"of",
"catalog",
"entries",
"with",
"level",
"number",
"8",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "catalog_contents_additional_attributes"
},
{
"id": 3,
"type": "column",
"value": "catalog_level_number"
},
{
"id": 0,
"type": "column",
"value": "catalog_entry_name"
},
{
"id": 1,
"type": "table",
"value": "catalog_con... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O"
] |
6,449 | world | bird:train.json:7819 | Which country has the shortest life expectancy? | SELECT Name FROM Country ORDER BY LifeExpectancy LIMIT 1 | [
"Which",
"country",
"has",
"the",
"shortest",
"life",
"expectancy",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "lifeexpectancy"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,450 | retail_world | bird:train.json:6507 | Which company had the most orders in 1998? | SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = '1998' GROUP BY T1.CompanyName ORDER BY COUNT(T2.OrderID) DESC LIMIT 1 | [
"Which",
"company",
"had",
"the",
"most",
"orders",
"in",
"1998",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "companyname"
},
{
"id": 4,
"type": "column",
"value": "customerid"
},
{
"id": 1,
"type": "table",
"value": "customers"
},
{
"id": 6,
"type": "column",
"value": "orderdate"
},
{
"id": 7,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_... | [
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
6,451 | car_racing | bird:test.json:1622 | Which country is the driver with the highest points from? Give me the capital of the country. | SELECT T1.Capital FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID = T2.Country ORDER BY T2.Points DESC LIMIT 1 | [
"Which",
"country",
"is",
"the",
"driver",
"with",
"the",
"highest",
"points",
"from",
"?",
"Give",
"me",
"the",
"capital",
"of",
"the",
"country",
"."
] | [
{
"id": 4,
"type": "column",
"value": "country_id"
},
{
"id": 0,
"type": "column",
"value": "capital"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 5,
"type": "column",
"value": "country"
},
{
"id": 2,
"type": "table",
"value... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
{
"entit... | [
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
6,452 | chinook_1 | spider:train_spider.json:820 | What are the titles of albums by the artist "AC/DC"? | SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "AC/DC" | [
"What",
"are",
"the",
"titles",
"of",
"albums",
"by",
"the",
"artist",
"\"",
"AC",
"/",
"DC",
"\"",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "artistid"
},
{
"id": 2,
"type": "table",
"value": "artist"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 1,
"type": "table",
"value": "album"
},
{
"id": 4,
"type": "column",
"value": "AC/... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11,
12
]
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O"
] |
6,453 | school_player | spider:train_spider.json:4889 | Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools. | SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC | [
"Order",
"denominations",
"in",
"descending",
"order",
"of",
"the",
"count",
"of",
"schools",
"with",
"the",
"denomination",
".",
"Return",
"each",
"denomination",
"with",
"the",
"count",
"of",
"schools",
"."
] | [
{
"id": 1,
"type": "column",
"value": "denomination"
},
{
"id": 0,
"type": "table",
"value": "school"
}
] | [
{
"entity_id": 0,
"token_idxs": [
21
]
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs"... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,454 | synthea | bird:train.json:1379 | Give the number of claims did Ms. Abbie Cole have in the year of 2011. | SELECT COUNT(T2.BILLABLEPERIOD) FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Abbie' AND T1.last = 'Cole' AND T2.BILLABLEPERIOD BETWEEN '2010-12-31' AND '2012-01-01' | [
"Give",
"the",
"number",
"of",
"claims",
"did",
"Ms.",
"Abbie",
"Cole",
"have",
"in",
"the",
"year",
"of",
"2011",
"."
] | [
{
"id": 2,
"type": "column",
"value": "billableperiod"
},
{
"id": 10,
"type": "value",
"value": "2010-12-31"
},
{
"id": 11,
"type": "value",
"value": "2012-01-01"
},
{
"id": 0,
"type": "table",
"value": "patients"
},
{
"id": 3,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
6
]
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,456 | college_completion | bird:train.json:3688 | List all the public institutes from the state with the least number of graduate cohort in 2013. | SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2013 AND T1.control = 'Public' ORDER BY T2.grad_cohort LIMIT 1 | [
"List",
"all",
"the",
"public",
"institutes",
"from",
"the",
"state",
"with",
"the",
"least",
"number",
"of",
"graduate",
"cohort",
"in",
"2013",
"."
] | [
{
"id": 1,
"type": "table",
"value": "institution_details"
},
{
"id": 2,
"type": "table",
"value": "state_sector_grads"
},
{
"id": 3,
"type": "column",
"value": "grad_cohort"
},
{
"id": 0,
"type": "column",
"value": "chronname"
},
{
"id": 7,
"t... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13,
14
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id... | [
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,457 | hospital_1 | spider:train_spider.json:3995 | Count how many appointments have been made in total. | SELECT count(*) FROM appointment | [
"Count",
"how",
"many",
"appointments",
"have",
"been",
"made",
"in",
"total",
"."
] | [
{
"id": 0,
"type": "table",
"value": "appointment"
}
] | [
{
"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"
] |
6,458 | legislator | bird:train.json:4759 | How many females were members of the past legislators? | SELECT COUNT(*) FROM historical WHERE gender_bio = 'F' | [
"How",
"many",
"females",
"were",
"members",
"of",
"the",
"past",
"legislators",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "historical"
},
{
"id": 1,
"type": "column",
"value": "gender_bio"
},
{
"id": 2,
"type": "value",
"value": "F"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
6,459 | school_player | spider:train_spider.json:4879 | What are the team and the location of school each player belongs to? | SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID | [
"What",
"are",
"the",
"team",
"and",
"the",
"location",
"of",
"school",
"each",
"player",
"belongs",
"to",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "school_id"
},
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "table",
"value": "player"
},
{
"id": 3,
"type": "table",
"value": "school"
},
{
"id": 0,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
6,460 | bike_1 | spider:train_spider.json:184 | For each city, list their names in decreasing order by their highest station latitude. | SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC | [
"For",
"each",
"city",
",",
"list",
"their",
"names",
"in",
"decreasing",
"order",
"by",
"their",
"highest",
"station",
"latitude",
"."
] | [
{
"id": 0,
"type": "table",
"value": "station"
},
{
"id": 1,
"type": "column",
"value": "city"
},
{
"id": 2,
"type": "column",
"value": "lat"
}
] | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
6,461 | school_finance | spider:train_spider.json:1908 | Find the number of schools that have more than one donator whose donation amount is less than 8.5. | SELECT count(*) FROM (SELECT * FROM endowment WHERE amount > 8.5 GROUP BY school_id HAVING count(*) > 1) | [
"Find",
"the",
"number",
"of",
"schools",
"that",
"have",
"more",
"than",
"one",
"donator",
"whose",
"donation",
"amount",
"is",
"less",
"than",
"8.5",
"."
] | [
{
"id": 0,
"type": "table",
"value": "endowment"
},
{
"id": 1,
"type": "column",
"value": "school_id"
},
{
"id": 2,
"type": "column",
"value": "amount"
},
{
"id": 3,
"type": "value",
"value": "8.5"
},
{
"id": 4,
"type": "value",
"value": "1... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,462 | public_review_platform | bird:train.json:3790 | How many "cute" type of compliments does user No. 57400 get? | SELECT COUNT(T1.compliment_type) FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.compliment_type LIKE 'cute' AND T2.user_id = 57400 | [
"How",
"many",
"\"",
"cute",
"\"",
"type",
"of",
"compliments",
"does",
"user",
"No",
".",
"57400",
"get",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "users_compliments"
},
{
"id": 2,
"type": "column",
"value": "compliment_type"
},
{
"id": 3,
"type": "column",
"value": "compliment_id"
},
{
"id": 0,
"type": "table",
"value": "compliments"
},
{
"id": 5,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
6,463 | food_inspection | bird:train.json:8812 | How many high risks violations did the Tiramisu Kitchen violate? | SELECT COUNT(T1.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen' AND T1.risk_category = 'High Risk' | [
"How",
"many",
"high",
"risks",
"violations",
"did",
"the",
"Tiramisu",
"Kitchen",
"violate",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "Tiramisu Kitchen"
},
{
"id": 5,
"type": "column",
"value": "risk_category"
},
{
"id": 2,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "table",
"value": "violations"
},
{
"id": 1,
"type": "... | [
{
"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": [
7,
8
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
6,464 | language_corpus | bird:train.json:5799 | In which Wikipedia page does the word ID No. 174 have the most appearances? Give the title. | SELECT title FROM pages WHERE pid = ( SELECT pid FROM pages_words WHERE wid = 174 ORDER BY occurrences DESC LIMIT 1 ) | [
"In",
"which",
"Wikipedia",
"page",
"does",
"the",
"word",
"ID",
"No",
".",
"174",
"have",
"the",
"most",
"appearances",
"?",
"Give",
"the",
"title",
"."
] | [
{
"id": 3,
"type": "table",
"value": "pages_words"
},
{
"id": 6,
"type": "column",
"value": "occurrences"
},
{
"id": 0,
"type": "table",
"value": "pages"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
18
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4,
5,
6
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
... | [
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,465 | codebase_comments | bird:train.json:652 | Please provide the id of the respository that received the most forks among the respositories that receive 21 stars. | SELECT Id FROM Repo WHERE Stars = 21 AND Forks = ( SELECT MAX(Forks) FROM Repo WHERE Stars = 21 ) | [
"Please",
"provide",
"the",
"i",
"d",
"of",
"the",
"respository",
"that",
"received",
"the",
"most",
"forks",
"among",
"the",
"respositories",
"that",
"receive",
"21",
"stars",
"."
] | [
{
"id": 2,
"type": "column",
"value": "stars"
},
{
"id": 4,
"type": "column",
"value": "forks"
},
{
"id": 0,
"type": "table",
"value": "repo"
},
{
"id": 1,
"type": "column",
"value": "id"
},
{
"id": 3,
"type": "value",
"value": "21"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
19
]
},
{
"entity_id": 3,
"token_idxs": [
18
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
6,466 | tracking_share_transactions | spider:train_spider.json:5878 | Show the id and details of the investor that has the largest number of transactions. | SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1 | [
"Show",
"the",
"i",
"d",
"and",
"details",
"of",
"the",
"investor",
"that",
"has",
"the",
"largest",
"number",
"of",
"transactions",
"."
] | [
{
"id": 1,
"type": "column",
"value": "investor_details"
},
{
"id": 3,
"type": "table",
"value": "transactions"
},
{
"id": 0,
"type": "column",
"value": "investor_id"
},
{
"id": 2,
"type": "table",
"value": "investors"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,467 | world | bird:train.json:7872 | Calculate the percentage of the surface area of all countries that uses Chinese as one of their languages. | SELECT CAST(SUM(IIF(T2.Language = 'Chinese', T1.SurfaceArea, 0)) AS REAL) * 100 / SUM(T1.SurfaceArea) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode | [
"Calculate",
"the",
"percentage",
"of",
"the",
"surface",
"area",
"of",
"all",
"countries",
"that",
"uses",
"Chinese",
"as",
"one",
"of",
"their",
"languages",
"."
] | [
{
"id": 1,
"type": "table",
"value": "countrylanguage"
},
{
"id": 3,
"type": "column",
"value": "countrycode"
},
{
"id": 5,
"type": "column",
"value": "surfacearea"
},
{
"id": 7,
"type": "column",
"value": "language"
},
{
"id": 0,
"type": "tabl... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"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",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
6,468 | region_building | bird:test.json:323 | What is the average population for all regions? | SELECT avg(Population) FROM region | [
"What",
"is",
"the",
"average",
"population",
"for",
"all",
"regions",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "population"
},
{
"id": 0,
"type": "table",
"value": "region"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
6,469 | thrombosis_prediction | bird:dev.json:1234 | List the patient ID, sex and birthday who has abnormal white blood cell count. Group them by sex and list the patient by age in ascending order. | SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC <= 3.5 OR T2.WBC >= 9.0 GROUP BY T1.SEX,T1.ID ORDER BY T1.Birthday ASC | [
"List",
"the",
"patient",
"ID",
",",
"sex",
"and",
"birthday",
"who",
"has",
"abnormal",
"white",
"blood",
"cell",
"count",
".",
"Group",
"them",
"by",
"sex",
"and",
"list",
"the",
"patient",
"by",
"age",
"in",
"ascending",
"order",
"."
] | [
{
"id": 4,
"type": "table",
"value": "laboratory"
},
{
"id": 2,
"type": "column",
"value": "birthday"
},
{
"id": 3,
"type": "table",
"value": "patient"
},
{
"id": 0,
"type": "column",
"value": "sex"
},
{
"id": 5,
"type": "column",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
23
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,470 | beer_factory | bird:train.json:5328 | What is the brand name of the root beer that gained a 1-star rating from customer ID 331115 while saying, "Yuk, more like licorice soda"? | SELECT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.CustomerID = 331115 AND T2.Review = 'Yuk, more like licorice soda.' AND T2.StarRating = 1 | [
"What",
"is",
"the",
"brand",
"name",
"of",
"the",
"root",
"beer",
"that",
"gained",
"a",
"1",
"-",
"star",
"rating",
"from",
"customer",
"ID",
"331115",
"while",
"saying",
",",
"\"",
"Yuk",
",",
"more",
"like",
"licorice",
"soda",
"\"",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "Yuk, more like licorice soda."
},
{
"id": 2,
"type": "table",
"value": "rootbeerreview"
},
{
"id": 1,
"type": "table",
"value": "rootbeerbrand"
},
{
"id": 4,
"type": "column",
"value": "customerid"
},
{
"id": 8... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
17,
18
]
... | [
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",... |
6,471 | works_cycles | bird:train.json:7219 | What is the total shipment by "cargo transport 5" cost of all purchase orders created on 12/14/2011? | SELECT SUM(t2.freight) FROM ShipMethod AS t1 INNER JOIN PurchaseOrderHeader AS t2 ON t1.shipmethodid = t2.shipmethodid WHERE t1.name = 'cargo transport 5' AND t2.orderdate = '2011-12-14' | [
"What",
"is",
"the",
"total",
"shipment",
"by",
"\"",
"cargo",
"transport",
"5",
"\"",
"cost",
"of",
"all",
"purchase",
"orders",
"created",
"on",
"12/14/2011",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "purchaseorderheader"
},
{
"id": 5,
"type": "value",
"value": "cargo transport 5"
},
{
"id": 3,
"type": "column",
"value": "shipmethodid"
},
{
"id": 0,
"type": "table",
"value": "shipmethod"
},
{
"id": 7,
"t... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O"
] |
6,472 | tracking_orders | spider:train_spider.json:6893 | List the name of all the distinct customers who have orders with status "Packing". | SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Packing" | [
"List",
"the",
"name",
"of",
"all",
"the",
"distinct",
"customers",
"who",
"have",
"orders",
"with",
"status",
"\"",
"Packing",
"\"",
"."
] | [
{
"id": 0,
"type": "column",
"value": "customer_name"
},
{
"id": 3,
"type": "column",
"value": "order_status"
},
{
"id": 5,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
11,
12
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
6,473 | customer_complaints | spider:train_spider.json:5771 | What are the emails and phone numbers of all customers, sorted by email address and phone number? | SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number | [
"What",
"are",
"the",
"emails",
"and",
"phone",
"numbers",
"of",
"all",
"customers",
",",
"sorted",
"by",
"email",
"address",
"and",
"phone",
"number",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "email_address"
},
{
"id": 2,
"type": "column",
"value": "phone_number"
},
{
"id": 0,
"type": "table",
"value": "customers"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
13,
14
]
},
{
"entity_id": 2,
"token_idxs": [
16,
17
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,474 | insurance_fnol | spider:train_spider.json:928 | Find the maximum and minimum settlement amount. | SELECT max(settlement_amount) , min(settlement_amount) FROM settlements | [
"Find",
"the",
"maximum",
"and",
"minimum",
"settlement",
"amount",
"."
] | [
{
"id": 1,
"type": "column",
"value": "settlement_amount"
},
{
"id": 0,
"type": "table",
"value": "settlements"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"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",
"B-TABLE",
"B-COLUMN",
"O"
] |
6,475 | food_inspection_2 | bird:train.json:6152 | What is the precise location of the establishment with the highest number of failed inspections? | SELECT T1.latitude, T1.longitude FROM establishment AS T1 INNER JOIN ( SELECT license_no FROM inspection WHERE results = 'Fail' GROUP BY license_no ORDER BY COUNT(results) DESC LIMIT 1 ) AS T2 ON T1.license_no = T2.license_no | [
"What",
"is",
"the",
"precise",
"location",
"of",
"the",
"establishment",
"with",
"the",
"highest",
"number",
"of",
"failed",
"inspections",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "establishment"
},
{
"id": 3,
"type": "column",
"value": "license_no"
},
{
"id": 4,
"type": "table",
"value": "inspection"
},
{
"id": 1,
"type": "column",
"value": "longitude"
},
{
"id": 0,
"type": "column",... | [
{
"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": [
14
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
6,476 | protein_institute | spider:train_spider.json:1914 | Show the number of buildings with a height above the average or a number of floors above the average. | SELECT count(*) FROM building WHERE height_feet > (SELECT avg(height_feet) FROM building) OR floors > (SELECT avg(floors) FROM building) | [
"Show",
"the",
"number",
"of",
"buildings",
"with",
"a",
"height",
"above",
"the",
"average",
"or",
"a",
"number",
"of",
"floors",
"above",
"the",
"average",
"."
] | [
{
"id": 1,
"type": "column",
"value": "height_feet"
},
{
"id": 0,
"type": "table",
"value": "building"
},
{
"id": 2,
"type": "column",
"value": "floors"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
6,477 | ship_1 | spider:train_spider.json:6233 | Give the classes that have more than two captains. | SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2 | [
"Give",
"the",
"classes",
"that",
"have",
"more",
"than",
"two",
"captains",
"."
] | [
{
"id": 0,
"type": "table",
"value": "captain"
},
{
"id": 1,
"type": "column",
"value": "class"
},
{
"id": 2,
"type": "value",
"value": "2"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,478 | theme_gallery | spider:train_spider.json:1656 | What are the names and year of joining for artists that do not have the country "United States"? | SELECT name , year_join FROM artist WHERE country != 'United States' | [
"What",
"are",
"the",
"names",
"and",
"year",
"of",
"joining",
"for",
"artists",
"that",
"do",
"not",
"have",
"the",
"country",
"\"",
"United",
"States",
"\"",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "United States"
},
{
"id": 2,
"type": "column",
"value": "year_join"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 0,
"type": "table",
"value": "artist"
},
{
"id": 1,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
6,479 | local_govt_mdm | spider:train_spider.json:2656 | How many council taxes are collected for renting arrears ? | SELECT count(*) FROM rent_arrears | [
"How",
"many",
"council",
"taxes",
"are",
"collected",
"for",
"renting",
"arrears",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "rent_arrears"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7,
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
6,480 | document_management | spider:train_spider.json:4503 | Find the types of documents with more than 4 documents. | SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 4 | [
"Find",
"the",
"types",
"of",
"documents",
"with",
"more",
"than",
"4",
"documents",
"."
] | [
{
"id": 1,
"type": "column",
"value": "document_type_code"
},
{
"id": 0,
"type": "table",
"value": "documents"
},
{
"id": 2,
"type": "value",
"value": "4"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
6,481 | musical | spider:train_spider.json:273 | Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards? | SELECT Nominee FROM musical WHERE Award = "Tony Award" OR Award = "Cleavant Derricks" | [
"Who",
"are",
"the",
"nominees",
"who",
"were",
"nominated",
"for",
"either",
"of",
"the",
"Bob",
"Fosse",
"or",
"Cleavant",
"Derricks",
"awards",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "Cleavant Derricks"
},
{
"id": 3,
"type": "column",
"value": "Tony Award"
},
{
"id": 0,
"type": "table",
"value": "musical"
},
{
"id": 1,
"type": "column",
"value": "nominee"
},
{
"id": 2,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14,
15
]
},
{
"entity_i... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O"
] |
6,483 | professional_basketball | bird:train.json:2916 | How many times have coaches who were from CHI been awarded as NBA Coach of the Year? | SELECT COUNT(DISTINCT T2.coachID) FROM coaches AS T1 INNER JOIN awards_coaches AS T2 ON T1.coachID = T2.coachID WHERE T1.tmID = 'CHI' AND T2.award = 'NBA Coach of the Year' | [
"How",
"many",
"times",
"have",
"coaches",
"who",
"were",
"from",
"CHI",
"been",
"awarded",
"as",
"NBA",
"Coach",
"of",
"the",
"Year",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "NBA Coach of the Year"
},
{
"id": 1,
"type": "table",
"value": "awards_coaches"
},
{
"id": 0,
"type": "table",
"value": "coaches"
},
{
"id": 2,
"type": "column",
"value": "coachid"
},
{
"id": 5,
"type": "co... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
6,485 | synthea | bird:train.json:1506 | State the description of the reason why Angelo Buckridge needs the care plan. | SELECT DISTINCT T1.REASONDESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.first = 'Angelo' AND T2.last = 'Buckridge' | [
"State",
"the",
"description",
"of",
"the",
"reason",
"why",
"Angelo",
"Buckridge",
"needs",
"the",
"care",
"plan",
"."
] | [
{
"id": 0,
"type": "column",
"value": "reasondescription"
},
{
"id": 1,
"type": "table",
"value": "careplans"
},
{
"id": 7,
"type": "value",
"value": "Buckridge"
},
{
"id": 2,
"type": "table",
"value": "patients"
},
{
"id": 3,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
11,
12
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"to... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
6,486 | insurance_and_eClaims | spider:train_spider.json:1527 | What is the name of the claim processing stage that most of the claims are on? | SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"claim",
"processing",
"stage",
"that",
"most",
"of",
"the",
"claims",
"are",
"on",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "claims_processing_stages"
},
{
"id": 1,
"type": "column",
"value": "claim_status_name"
},
{
"id": 2,
"type": "table",
"value": "claims_processing"
},
{
"id": 0,
"type": "column",
"value": "claim_stage_id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
13,
14
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
6,487 | world_development_indicators | bird:train.json:2130 | Please calculate the average of Arms imports (SIPRI trend indicator values) of the European & Central Asian countries. | SELECT CAST(SUM(T2.Value) AS REAL) / COUNT(T1.CountryCode) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Region = 'Europe & Central Asia' AND T2.IndicatorName = 'Arms imports (SIPRI trend indicator values)' | [
"Please",
"calculate",
"the",
"average",
"of",
"Arms",
"imports",
"(",
"SIPRI",
"trend",
"indicator",
"values",
")",
"of",
"the",
"European",
"&",
"Central",
"Asian",
"countries",
"."
] | [
{
"id": 6,
"type": "value",
"value": "Arms imports (SIPRI trend indicator values)"
},
{
"id": 4,
"type": "value",
"value": "Europe & Central Asia"
},
{
"id": 5,
"type": "column",
"value": "indicatorname"
},
{
"id": 2,
"type": "column",
"value": "countrycod... | [
{
"entity_id": 0,
"token_idxs": [
19
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
15,
16,
17,
18
]
... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
6,488 | gas_company | spider:train_spider.json:2007 | Show all main industry and total market value in each industry. | SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry | [
"Show",
"all",
"main",
"industry",
"and",
"total",
"market",
"value",
"in",
"each",
"industry",
"."
] | [
{
"id": 1,
"type": "column",
"value": "main_industry"
},
{
"id": 2,
"type": "column",
"value": "market_value"
},
{
"id": 0,
"type": "table",
"value": "company"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O"
] |
6,489 | car_retails | bird:train.json:1648 | Which customer ordered 1939 'Chevrolet Deluxe Coupe' at the highest price? | SELECT t4.customerName FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode INNER JOIN orders AS t3 ON t2.orderNumber = t3.orderNumber INNER JOIN customers AS t4 ON t3.customerNumber = t4.customerNumber WHERE t1.productName = '1939 Chevrolet Deluxe Coupe' ORDER BY t2.priceEach DESC LIMIT... | [
"Which",
"customer",
"ordered",
"1939",
"'",
"Chevrolet",
"Deluxe",
"Coupe",
"'",
"at",
"the",
"highest",
"price",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "1939 Chevrolet Deluxe Coupe"
},
{
"id": 6,
"type": "column",
"value": "customernumber"
},
{
"id": 0,
"type": "column",
"value": "customername"
},
{
"id": 8,
"type": "table",
"value": "orderdetails"
},
{
"id": 2... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3,
4,
5,
6,
7
]
},
{
"entity_id": 4,
"token_idxs": [
12
... | [
"O",
"B-TABLE",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,490 | legislator | bird:train.json:4890 | Among the current legislators who have accounts on both http://thomas.gov, how many of them have accounts on instagram? | SELECT COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.thomas_id IS NOT NULL AND T2.instagram IS NOT NULL | [
"Among",
"the",
"current",
"legislators",
"who",
"have",
"accounts",
"on",
"both",
"http://thomas.gov",
",",
"how",
"many",
"of",
"them",
"have",
"accounts",
"on",
"instagram",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "social-media"
},
{
"id": 2,
"type": "column",
"value": "bioguide_id"
},
{
"id": 4,
"type": "column",
"value": "thomas_id"
},
{
"id": 5,
"type": "column",
"value": "instagram"
},
{
"id": 3,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
18
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
6,491 | movie | bird:train.json:730 | Please list the names of the characters in the movie Look Who's Talking. | SELECT T2.`Character Name` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T1.Title = 'Look Who''s Talking' | [
"Please",
"list",
"the",
"names",
"of",
"the",
"characters",
"in",
"the",
"movie",
"Look",
"Who",
"'s",
"Talking",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Look Who's Talking"
},
{
"id": 0,
"type": "column",
"value": "Character Name"
},
{
"id": 2,
"type": "table",
"value": "characters"
},
{
"id": 5,
"type": "column",
"value": "movieid"
},
{
"id": 1,
"type": "t... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11,
12,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
6,492 | retails | bird:train.json:6766 | Find the supply key of the top ten suppliers with the most account balance, and list the supply key along with the account balance in descending order of account balance. | SELECT s_suppkey, s_acctbal FROM supplier ORDER BY s_acctbal DESC LIMIT 10 | [
"Find",
"the",
"supply",
"key",
"of",
"the",
"top",
"ten",
"suppliers",
"with",
"the",
"most",
"account",
"balance",
",",
"and",
"list",
"the",
"supply",
"key",
"along",
"with",
"the",
"account",
"balance",
"in",
"descending",
"order",
"of",
"account",
"ba... | [
{
"id": 1,
"type": "column",
"value": "s_suppkey"
},
{
"id": 2,
"type": "column",
"value": "s_acctbal"
},
{
"id": 0,
"type": "table",
"value": "supplier"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
12,
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,493 | baseball_1 | spider:train_spider.json:3630 | Find the full name and id of the college that has the most baseball players. | SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1; | [
"Find",
"the",
"full",
"name",
"and",
"i",
"d",
"of",
"the",
"college",
"that",
"has",
"the",
"most",
"baseball",
"players",
"."
] | [
{
"id": 3,
"type": "table",
"value": "player_college"
},
{
"id": 0,
"type": "column",
"value": "college_id"
},
{
"id": 1,
"type": "column",
"value": "name_full"
},
{
"id": 2,
"type": "table",
"value": "college"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,494 | gas_company | spider:train_spider.json:2003 | Show all main industry for all companies. | SELECT DISTINCT main_industry FROM company | [
"Show",
"all",
"main",
"industry",
"for",
"all",
"companies",
"."
] | [
{
"id": 1,
"type": "column",
"value": "main_industry"
},
{
"id": 0,
"type": "table",
"value": "company"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
6,495 | sales_in_weather | bird:train.json:8201 | What is the maximum and minimum temperature for station number 1 on 15 January 2012? | SELECT tmax, tmin FROM weather WHERE station_nbr = 1 AND `date` = '2012-01-15' | [
"What",
"is",
"the",
"maximum",
"and",
"minimum",
"temperature",
"for",
"station",
"number",
"1",
"on",
"15",
"January",
"2012",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "station_nbr"
},
{
"id": 6,
"type": "value",
"value": "2012-01-15"
},
{
"id": 0,
"type": "table",
"value": "weather"
},
{
"id": 1,
"type": "column",
"value": "tmax"
},
{
"id": 2,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
6,496 | conference | bird:test.json:1091 | Find the name of the conferences that have the top 2 most number of attendants. | SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id ORDER BY count(*) DESC LIMIT 2 | [
"Find",
"the",
"name",
"of",
"the",
"conferences",
"that",
"have",
"the",
"top",
"2",
"most",
"number",
"of",
"attendants",
"."
] | [
{
"id": 3,
"type": "table",
"value": "conference_participation"
},
{
"id": 1,
"type": "column",
"value": "conference_name"
},
{
"id": 0,
"type": "column",
"value": "conference_id"
},
{
"id": 2,
"type": "table",
"value": "conference"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,497 | race_track | spider:train_spider.json:773 | What are the names for tracks without a race in class 'GT'. | SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT' | [
"What",
"are",
"the",
"names",
"for",
"tracks",
"without",
"a",
"race",
"in",
"class",
"'",
"GT",
"'",
"."
] | [
{
"id": 5,
"type": "column",
"value": "track_id"
},
{
"id": 0,
"type": "table",
"value": "track"
},
{
"id": 3,
"type": "column",
"value": "class"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "table",
"value": "race"... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
6,498 | card_games | bird:dev.json:509 | What is the unique id of the set that has the highest number of cards? | SELECT id FROM sets ORDER BY baseSetSize DESC LIMIT 1 | [
"What",
"is",
"the",
"unique",
"i",
"d",
"of",
"the",
"set",
"that",
"has",
"the",
"highest",
"number",
"of",
"cards",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "basesetsize"
},
{
"id": 0,
"type": "table",
"value": "sets"
},
{
"id": 1,
"type": "column",
"value": "id"
}
] | [
{
"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",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,499 | address | bird:train.json:5221 | Who are the congress representatives of the postal points in Garfield? | SELECT T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.city = 'Garfield' | [
"Who",
"are",
"the",
"congress",
"representatives",
"of",
"the",
"postal",
"points",
"in",
"Garfield",
"?"
] | [
{
"id": 8,
"type": "column",
"value": "cognress_rep_id"
},
{
"id": 6,
"type": "table",
"value": "zip_congress"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 2,
"type": "tab... | [
{
"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": [
10
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,500 | driving_school | spider:train_spider.json:6710 | Which last names are both used by customers and by staff? | SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff | [
"Which",
"last",
"names",
"are",
"both",
"used",
"by",
"customers",
"and",
"by",
"staff",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 2,
"type": "column",
"value": "last_name"
},
{
"id": 1,
"type": "table",
"value": "staff"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
1,
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O"
] |
6,501 | regional_sales | bird:train.json:2709 | How much more is the Florida store's computer product unit price than the Texas store? | SELECT SUM(CASE WHEN T3.State = 'Florida' THEN T2.`Unit Price` ELSE 0 END) - SUM(CASE WHEN T3.State = 'Texas' THEN T2.`Unit Price` ELSE 0 END) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T1.`Product Name` = 'Com... | [
"How",
"much",
"more",
"is",
"the",
"Florida",
"store",
"'s",
"computer",
"product",
"unit",
"price",
"than",
"the",
"Texas",
"store",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "Store Locations"
},
{
"id": 1,
"type": "column",
"value": "Product Name"
},
{
"id": 4,
"type": "table",
"value": "Sales Orders"
},
{
"id": 7,
"type": "column",
"value": "_productid"
},
{
"id": 10,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"B-COLUMN",
"O"
] |
6,502 | airline | bird:train.json:5902 | What is the total number of flights that flew on August 2, 2018 with air carrier described as Horizon Air? | SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%Horizon Air%' AND T2.FL_DATE = '2018/8/2' | [
"What",
"is",
"the",
"total",
"number",
"of",
"flights",
"that",
"flew",
"on",
"August",
"2",
",",
"2018",
"with",
"air",
"carrier",
"described",
"as",
"Horizon",
"Air",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "op_carrier_airline_id"
},
{
"id": 5,
"type": "value",
"value": "%Horizon Air%"
},
{
"id": 0,
"type": "table",
"value": "Air Carriers"
},
{
"id": 4,
"type": "column",
"value": "description"
},
{
"id": 1,
"t... | [
{
"entity_id": 0,
"token_idxs": [
15,
16
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
{
"entity_id": 5,
"t... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
6,503 | theme_gallery | spider:train_spider.json:1677 | Show theme and year for all exhibitions in an descending order of ticket price. | SELECT theme , YEAR FROM exhibition ORDER BY ticket_price DESC | [
"Show",
"theme",
"and",
"year",
"for",
"all",
"exhibitions",
"in",
"an",
"descending",
"order",
"of",
"ticket",
"price",
"."
] | [
{
"id": 3,
"type": "column",
"value": "ticket_price"
},
{
"id": 0,
"type": "table",
"value": "exhibition"
},
{
"id": 1,
"type": "column",
"value": "theme"
},
{
"id": 2,
"type": "column",
"value": "year"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,504 | address_1 | bird:test.json:824 | What is the sum of distances between BAL and other cities? | SELECT sum(distance) FROM Direct_distance WHERE city1_code = "BAL" | [
"What",
"is",
"the",
"sum",
"of",
"distances",
"between",
"BAL",
"and",
"other",
"cities",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "direct_distance"
},
{
"id": 1,
"type": "column",
"value": "city1_code"
},
{
"id": 3,
"type": "column",
"value": "distance"
},
{
"id": 2,
"type": "column",
"value": "BAL"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
6,505 | boat_1 | bird:test.json:859 | Find the id and name of the sailors who reserved more than one boat. | SELECT DISTINCT T1.name , T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid = T2.sid GROUP BY T2.sid HAVING COUNT(*) > 1 | [
"Find",
"the",
"i",
"d",
"and",
"name",
"of",
"the",
"sailors",
"who",
"reserved",
"more",
"than",
"one",
"boat",
"."
] | [
{
"id": 3,
"type": "table",
"value": "reserves"
},
{
"id": 2,
"type": "table",
"value": "sailors"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 0,
"type": "column",
"value": "sid"
},
{
"id": 4,
"type": "value",
"value": "1"
}... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
6,506 | synthea | bird:train.json:1543 | What is the difference between the number of married patients and the number of single patients with diabetes? | SELECT SUM(CASE WHEN T2.marital = 'M' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.marital = 'S' THEN 1 ELSE 0 END) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Diabetes' | [
"What",
"is",
"the",
"difference",
"between",
"the",
"number",
"of",
"married",
"patients",
"and",
"the",
"number",
"of",
"single",
"patients",
"with",
"diabetes",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "description"
},
{
"id": 0,
"type": "table",
"value": "conditions"
},
{
"id": 1,
"type": "table",
"value": "patients"
},
{
"id": 3,
"type": "value",
"value": "Diabetes"
},
{
"id": 4,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entity_id": 5,
"token_idxs"... | [
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,507 | dorm_1 | spider:train_spider.json:5705 | What is the name of each dorm that has a TV Lounge but no study rooms? | SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid W... | [
"What",
"is",
"the",
"name",
"of",
"each",
"dorm",
"that",
"has",
"a",
"TV",
"Lounge",
"but",
"no",
"study",
"rooms",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "dorm_amenity"
},
{
"id": 2,
"type": "column",
"value": "amenity_name"
},
{
"id": 6,
"type": "table",
"value": "has_amenity"
},
{
"id": 4,
"type": "value",
"value": "Study Room"
},
{
"id": 0,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": [
14,
15
]
},
{
"entity_id":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
6,508 | cars | bird:train.json:3126 | Which country produced the car with the lowest price? | SELECT T3.country FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.price ASC LIMIT 1 | [
"Which",
"country",
"produced",
"the",
"car",
"with",
"the",
"lowest",
"price",
"?"
] | [
{
"id": 4,
"type": "table",
"value": "production"
},
{
"id": 0,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 5,
"type": "column",
"value": "origin"
},
{
"id": 2,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"... | [
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
6,509 | talkingdata | bird:train.json:1156 | Among the devices on which an event happened on 2016/5/1, how many of them are used by a male user? | SELECT COUNT(T1.device_id) FROM events AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T1.timestamp = '2016-05-01' AND T2.gender = 'M' | [
"Among",
"the",
"devices",
"on",
"which",
"an",
"event",
"happened",
"on",
"2016/5/1",
",",
"how",
"many",
"of",
"them",
"are",
"used",
"by",
"a",
"male",
"user",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "gender_age"
},
{
"id": 4,
"type": "value",
"value": "2016-05-01"
},
{
"id": 2,
"type": "column",
"value": "device_id"
},
{
"id": 3,
"type": "column",
"value": "timestamp"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,510 | manufactory_1 | spider:train_spider.json:5287 | How many manufacturers have headquarters in either Tokyo or Beijing? | SELECT count(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing' | [
"How",
"many",
"manufacturers",
"have",
"headquarters",
"in",
"either",
"Tokyo",
"or",
"Beijing",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "manufacturers"
},
{
"id": 1,
"type": "column",
"value": "headquarter"
},
{
"id": 3,
"type": "value",
"value": "Beijing"
},
{
"id": 2,
"type": "value",
"value": "Tokyo"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
6,511 | books | bird:train.json:5985 | How many customers are from Australia? | SELECT COUNT(*) FROM customer_address AS T1 INNER JOIN address AS T2 ON T2.address_id = T1.address_id INNER JOIN country AS T3 ON T3.country_id = T2.country_id WHERE T3.country_name = 'Australia' | [
"How",
"many",
"customers",
"are",
"from",
"Australia",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "customer_address"
},
{
"id": 1,
"type": "column",
"value": "country_name"
},
{
"id": 5,
"type": "column",
"value": "country_id"
},
{
"id": 6,
"type": "column",
"value": "address_id"
},
{
"id": 2,
"type": "v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
6,512 | movie_platform | bird:train.json:32 | What is the URL to the user profile image on Mubi of the user who gave the movie id of 1103 a 5 ratinng score on 4/19/2020? | SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN ratings_users AS T2 ON T1.user_id = T2.user_id WHERE T2.user_id = 1103 AND rating_score = 5 AND T2.rating_date_utc = '2020-04-19' | [
"What",
"is",
"the",
"URL",
"to",
"the",
"user",
"profile",
"image",
"on",
"Mubi",
"of",
"the",
"user",
"who",
"gave",
"the",
"movie",
"i",
"d",
"of",
"1103",
"a",
"5",
"ratinng",
"score",
"on",
"4/19/2020",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "user_avatar_image_url"
},
{
"id": 7,
"type": "column",
"value": "rating_date_utc"
},
{
"id": 2,
"type": "table",
"value": "ratings_users"
},
{
"id": 5,
"type": "column",
"value": "rating_score"
},
{
"id": 8,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
24
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
21
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O"
] |
6,513 | works_cycles | bird:train.json:7187 | How many male employees do not wish to receive e-mail promotion? | SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 0 AND T1.Gender = 'M' | [
"How",
"many",
"male",
"employees",
"do",
"not",
"wish",
"to",
"receive",
"e",
"-",
"mail",
"promotion",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "businessentityid"
},
{
"id": 3,
"type": "column",
"value": "emailpromotion"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 5,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10,
11,
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"ent... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
6,514 | customers_and_orders | bird:test.json:310 | Count the number of differnt customers who have made an order. | SELECT count(DISTINCT customer_id) FROM Customer_orders | [
"Count",
"the",
"number",
"of",
"differnt",
"customers",
"who",
"have",
"made",
"an",
"order",
"."
] | [
{
"id": 0,
"type": "table",
"value": "customer_orders"
},
{
"id": 1,
"type": "column",
"value": "customer_id"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,515 | driving_school | spider:train_spider.json:6672 | List all customer status codes and the number of customers having each status code. | SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code; | [
"List",
"all",
"customer",
"status",
"codes",
"and",
"the",
"number",
"of",
"customers",
"having",
"each",
"status",
"code",
"."
] | [
{
"id": 1,
"type": "column",
"value": "customer_status_code"
},
{
"id": 0,
"type": "table",
"value": "customers"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
6,516 | card_games | bird:dev.json:351 | Name all the cards which have alternative language in Japanese. | SELECT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Japanese' | [
"Name",
"all",
"the",
"cards",
"which",
"have",
"alternative",
"language",
"in",
"Japanese",
"."
] | [
{
"id": 2,
"type": "table",
"value": "foreign_data"
},
{
"id": 3,
"type": "column",
"value": "language"
},
{
"id": 4,
"type": "value",
"value": "Japanese"
},
{
"id": 1,
"type": "table",
"value": "cards"
},
{
"id": 0,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
0
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_... | [
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,517 | movie_3 | bird:train.json:9176 | List the names of the films that are more than 180 minutes long. | SELECT title FROM film WHERE length > 180 | [
"List",
"the",
"names",
"of",
"the",
"films",
"that",
"are",
"more",
"than",
"180",
"minutes",
"long",
"."
] | [
{
"id": 2,
"type": "column",
"value": "length"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 0,
"type": "table",
"value": "film"
},
{
"id": 3,
"type": "value",
"value": "180"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O"
] |
6,518 | club_1 | spider:train_spider.json:4300 | How many members of "Bootup Baltimore" are older than 18? | SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.age > 18 | [
"How",
"many",
"members",
"of",
"\"",
"Bootup",
"Baltimore",
"\"",
"are",
"older",
"than",
"18",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "Bootup Baltimore"
},
{
"id": 2,
"type": "table",
"value": "member_of_club"
},
{
"id": 4,
"type": "column",
"value": "clubname"
},
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 8,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2,
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
6,519 | retail_world | bird:train.json:6300 | How many employees have Andrew Fuller as their direct supervisor? | SELECT COUNT(EmployeeID) FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE LastName = 'Fuller' AND FirstName = 'Andrew' ) | [
"How",
"many",
"employees",
"have",
"Andrew",
"Fuller",
"as",
"their",
"direct",
"supervisor",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "employeeid"
},
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 1,
"type": "column",
"value": "reportsto"
},
{
"id": 5,
"type": "column",
"value": "firstname"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
6,520 | car_retails | bird:train.json:1610 | Who is the sales representative that made the order which was sent to 25 Maiden Lane, Floor No. 4? | SELECT T2.firstName, T2.lastName FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T1.addressLine1 = '25 Maiden Lane' AND T1.addressLine2 = 'Floor No. 4' | [
"Who",
"is",
"the",
"sales",
"representative",
"that",
"made",
"the",
"order",
"which",
"was",
"sent",
"to",
"25",
"Maiden",
"Lane",
",",
"Floor",
"No",
".",
"4",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "salesrepemployeenumber"
},
{
"id": 5,
"type": "column",
"value": "employeenumber"
},
{
"id": 7,
"type": "value",
"value": "25 Maiden Lane"
},
{
"id": 6,
"type": "column",
"value": "addressline1"
},
{
"id": 8,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
6,521 | cs_semester | bird:train.json:939 | Among students with low salary, how many of them have a gpa of 3.5? | SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.gpa = 3.5 AND T1.salary = 'low' | [
"Among",
"students",
"with",
"low",
"salary",
",",
"how",
"many",
"of",
"them",
"have",
"a",
"gpa",
"of",
"3.5",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "student_id"
},
{
"id": 1,
"type": "table",
"value": "student"
},
{
"id": 5,
"type": "column",
"value": "salary"
},
{
"id": 3,
"type": "column",
"value": "gpa"
},
{
"id": 4,
"type": "value",
"value": "3... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"enti... | [
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,522 | college_1 | spider:train_spider.json:3322 | What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach? | SELECT T2.emp_fname , T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting' | [
"What",
"are",
"the",
"first",
"names",
"of",
"all",
"Accounting",
"professors",
"who",
"teach",
"and",
"what",
"are",
"the",
"classrooms",
"of",
"the",
"courses",
"they",
"teach",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "class_room"
},
{
"id": 2,
"type": "table",
"value": "department"
},
{
"id": 4,
"type": "value",
"value": "Accounting"
},
{
"id": 0,
"type": "column",
"value": "emp_fname"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": [
8
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,523 | public_review_platform | bird:train.json:4023 | Among the users who received low compliments from other users, which users joined Yelp in 2012? | SELECT DISTINCT T2.user_id FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2012 AND T2.number_of_compliments = 'Low' | [
"Among",
"the",
"users",
"who",
"received",
"low",
"compliments",
"from",
"other",
"users",
",",
"which",
"users",
"joined",
"Yelp",
"in",
"2012",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "user_yelping_since_year"
},
{
"id": 5,
"type": "column",
"value": "number_of_compliments"
},
{
"id": 2,
"type": "table",
"value": "users_compliments"
},
{
"id": 0,
"type": "column",
"value": "user_id"
},
{
"id... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
{
"entit... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,524 | e_learning | spider:train_spider.json:3835 | On what dates did the student with family name "Zieme" and personal name "Bernie" enroll in and complete the courses? | SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = "Zieme" AND T2.personal_name = "Bernie" | [
"On",
"what",
"dates",
"did",
"the",
"student",
"with",
"family",
"name",
"\"",
"Zieme",
"\"",
"and",
"personal",
"name",
"\"",
"Bernie",
"\"",
"enroll",
"in",
"and",
"complete",
"the",
"courses",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "student_course_enrolment"
},
{
"id": 1,
"type": "column",
"value": "date_of_completion"
},
{
"id": 0,
"type": "column",
"value": "date_of_enrolment"
},
{
"id": 7,
"type": "column",
"value": "personal_name"
},
{
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
7,
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,525 | chicago_crime | bird:train.json:8749 | List down the district's commander associated with the crime that happened at the yard and has a beat of 532. | SELECT T2.address, T2.commander FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.location_description = 'YARD' AND T1.beat = 532 | [
"List",
"down",
"the",
"district",
"'s",
"commander",
"associated",
"with",
"the",
"crime",
"that",
"happened",
"at",
"the",
"yard",
"and",
"has",
"a",
"beat",
"of",
"532",
"."
] | [
{
"id": 5,
"type": "column",
"value": "location_description"
},
{
"id": 4,
"type": "column",
"value": "district_no"
},
{
"id": 1,
"type": "column",
"value": "commander"
},
{
"id": 3,
"type": "table",
"value": "district"
},
{
"id": 0,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
6,526 | movie | bird:train.json:745 | What is the MPAA rating for the movie with the character named "Peter Quill" in it? | SELECT T1.`MPAA Rating` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T2.`Character Name` = 'Peter Quill' | [
"What",
"is",
"the",
"MPAA",
"rating",
"for",
"the",
"movie",
"with",
"the",
"character",
"named",
"\"",
"Peter",
"Quill",
"\"",
"in",
"it",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "Character Name"
},
{
"id": 0,
"type": "column",
"value": "MPAA Rating"
},
{
"id": 4,
"type": "value",
"value": "Peter Quill"
},
{
"id": 2,
"type": "table",
"value": "characters"
},
{
"id": 5,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
13,
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O"
] |
6,527 | public_review_platform | bird:train.json:4083 | Calculate the percentage of business which opened on Sunday from 9AM to 9PM based on the number of business opened on Sunday. | SELECT CAST(SUM(CASE WHEN T2.opening_time = '9AM' AND T2.closing_time = '9PM' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.day_id) FROM Days AS T1 INNER JOIN Business_Hours AS T2 ON T1.day_id = T2.day_id WHERE T1.day_of_week = 'Sunday' | [
"Calculate",
"the",
"percentage",
"of",
"business",
"which",
"opened",
"on",
"Sunday",
"from",
"9AM",
"to",
"9PM",
"based",
"on",
"the",
"number",
"of",
"business",
"opened",
"on",
"Sunday",
"."
] | [
{
"id": 1,
"type": "table",
"value": "business_hours"
},
{
"id": 8,
"type": "column",
"value": "opening_time"
},
{
"id": 10,
"type": "column",
"value": "closing_time"
},
{
"id": 2,
"type": "column",
"value": "day_of_week"
},
{
"id": 3,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
21
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,529 | shipping | bird:train.json:5582 | Please list the IDs of all the shipments made by a retailer customer. | SELECT T2.ship_id FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'retailer' | [
"Please",
"list",
"the",
"IDs",
"of",
"all",
"the",
"shipments",
"made",
"by",
"a",
"retailer",
"customer",
"."
] | [
{
"id": 3,
"type": "column",
"value": "cust_type"
},
{
"id": 1,
"type": "table",
"value": "customer"
},
{
"id": 2,
"type": "table",
"value": "shipment"
},
{
"id": 4,
"type": "value",
"value": "retailer"
},
{
"id": 0,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
6,530 | professional_basketball | bird:train.json:2877 | How many players received Most Valuable Player award from 1969 to 1975? | SELECT COUNT(DISTINCT playerID) FROM awards_players WHERE year BETWEEN 1969 AND 1975 AND award = 'Most Valuable Player' | [
"How",
"many",
"players",
"received",
"Most",
"Valuable",
"Player",
"award",
"from",
"1969",
"to",
"1975",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "Most Valuable Player"
},
{
"id": 0,
"type": "table",
"value": "awards_players"
},
{
"id": 1,
"type": "column",
"value": "playerid"
},
{
"id": 5,
"type": "column",
"value": "award"
},
{
"id": 2,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
6,531 | disney | bird:train.json:4701 | List the movie titles with the voice actor Jeff Bennet | SELECT movie FROM `voice-actors` WHERE 'voice-actor' = 'Jeff Bennett' | [
"List",
"the",
"movie",
"titles",
"with",
"the",
"voice",
"actor",
"Jeff",
"Bennet"
] | [
{
"id": 0,
"type": "table",
"value": "voice-actors"
},
{
"id": 3,
"type": "value",
"value": "Jeff Bennett"
},
{
"id": 2,
"type": "value",
"value": "voice-actor"
},
{
"id": 1,
"type": "column",
"value": "movie"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"en... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-VALUE",
"I-VALUE"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.