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 |
|---|---|---|---|---|---|---|---|---|
4,193 | computer_student | bird:train.json:978 | State the courses and level of courses by professors who are faculty employees. | SELECT T3.course_id, T3.courseLevel FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T1.course_id WHERE T2.hasPosition = 'Faculty_eme' | [
"State",
"the",
"courses",
"and",
"level",
"of",
"courses",
"by",
"professors",
"who",
"are",
"faculty",
"employees",
"."
] | [
{
"id": 1,
"type": "column",
"value": "courselevel"
},
{
"id": 3,
"type": "column",
"value": "hasposition"
},
{
"id": 4,
"type": "value",
"value": "Faculty_eme"
},
{
"id": 0,
"type": "column",
"value": "course_id"
},
{
"id": 5,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"e... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
4,194 | chinook_1 | spider:train_spider.json:837 | What is the least common media type in all tracks? | SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC LIMIT 1 | [
"What",
"is",
"the",
"least",
"common",
"media",
"type",
"in",
"all",
"tracks",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "mediatypeid"
},
{
"id": 2,
"type": "table",
"value": "mediatype"
},
{
"id": 3,
"type": "table",
"value": "track"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"B-TABLE",
"O"
] |
4,195 | hr_1 | spider:train_spider.json:3479 | find the name of all departments that do actually have one or more employees assigned to them. | SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id | [
"find",
"the",
"name",
"of",
"all",
"departments",
"that",
"do",
"actually",
"have",
"one",
"or",
"more",
"employees",
"assigned",
"to",
"them",
"."
] | [
{
"id": 0,
"type": "column",
"value": "department_name"
},
{
"id": 3,
"type": "column",
"value": "department_id"
},
{
"id": 2,
"type": "table",
"value": "departments"
},
{
"id": 1,
"type": "table",
"value": "employees"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"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-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
4,196 | tracking_grants_for_research | spider:train_spider.json:4322 | List the project details of the project both producing patent and paper as outcomes. | SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent' | [
"List",
"the",
"project",
"details",
"of",
"the",
"project",
"both",
"producing",
"patent",
"and",
"paper",
"as",
"outcomes",
"."
] | [
{
"id": 2,
"type": "table",
"value": "project_outcomes"
},
{
"id": 0,
"type": "column",
"value": "project_details"
},
{
"id": 3,
"type": "column",
"value": "outcome_code"
},
{
"id": 6,
"type": "column",
"value": "project_id"
},
{
"id": 1,
"type... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O"
] |
4,197 | hockey | bird:train.json:7730 | How many goals were scored while the goalkeeper was on the ice in the 1924 WCHL by the goalie with the most goals scored? | SELECT SUM(PostGA) FROM Goalies WHERE lgID = 'WCHL' AND year = '1924' GROUP BY playerID ORDER BY SUM(PostGA) DESC LIMIT 1 | [
"How",
"many",
"goals",
"were",
"scored",
"while",
"the",
"goalkeeper",
"was",
"on",
"the",
"ice",
"in",
"the",
"1924",
"WCHL",
"by",
"the",
"goalie",
"with",
"the",
"most",
"goals",
"scored",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "playerid"
},
{
"id": 0,
"type": "table",
"value": "goalies"
},
{
"id": 2,
"type": "column",
"value": "postga"
},
{
"id": 3,
"type": "column",
"value": "lgid"
},
{
"id": 4,
"type": "value",
"value": "WC... | [
{
"entity_id": 0,
"token_idxs": [
18
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
21,
22
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entity_... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
4,198 | image_and_language | bird:train.json:7570 | What is the prediction class between object class 'chain' and 'label' in image 2360078? | SELECT DISTINCT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T2.PRED_CLASS_ID = T1.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID AND T1.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.IMG_ID = 2360078 AND T1.OBJ1_SAMPLE_... | [
"What",
"is",
"the",
"prediction",
"class",
"between",
"object",
"class",
"'",
"chain",
"'",
"and",
"'",
"label",
"'",
"in",
"image",
"2360078",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "obj2_sample_id"
},
{
"id": 10,
"type": "column",
"value": "obj1_sample_id"
},
{
"id": 12,
"type": "column",
"value": "pred_class_id"
},
{
"id": 13,
"type": "column",
"value": "obj_sample_id"
},
{
"id": 3,
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"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",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
4,199 | food_inspection_2 | bird:train.json:6194 | What is the inspection result for inspection done by Thomas Langley? | SELECT DISTINCT T2.results FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T1.first_name = 'Thomas' AND T1.last_name = 'Langley' | [
"What",
"is",
"the",
"inspection",
"result",
"for",
"inspection",
"done",
"by",
"Thomas",
"Langley",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "employee_id"
},
{
"id": 2,
"type": "table",
"value": "inspection"
},
{
"id": 4,
"type": "column",
"value": "first_name"
},
{
"id": 6,
"type": "column",
"value": "last_name"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
4,200 | flight_4 | spider:train_spider.json:6858 | What are the cities that have more than 2 airports sorted by number of airports? | SELECT city FROM airports GROUP BY city HAVING count(*) > 2 ORDER BY count(*) | [
"What",
"are",
"the",
"cities",
"that",
"have",
"more",
"than",
"2",
"airports",
"sorted",
"by",
"number",
"of",
"airports",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "airports"
},
{
"id": 1,
"type": "column",
"value": "city"
},
{
"id": 2,
"type": "value",
"value": "2"
}
] | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
4,201 | olympics | bird:train.json:4960 | Where is competitor Estelle Nze Minko from? | SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Estelle Nze Minko' | [
"Where",
"is",
"competitor",
"Estelle",
"Nze",
"Minko",
"from",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Estelle Nze Minko"
},
{
"id": 5,
"type": "table",
"value": "person_region"
},
{
"id": 0,
"type": "column",
"value": "region_name"
},
{
"id": 4,
"type": "table",
"value": "noc_region"
},
{
"id": 2,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_id... | [
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
4,202 | cookbook | bird:train.json:8889 | What is the average calorie count for all recipes using coarsely ground black pepper? | SELECT AVG(T3.calories) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T2.ingredient_id = T1.ingredient_id INNER JOIN Nutrition AS T3 ON T3.recipe_id = T2.recipe_id WHERE T1.name = 'coarsely ground black pepper' | [
"What",
"is",
"the",
"average",
"calorie",
"count",
"for",
"all",
"recipes",
"using",
"coarsely",
"ground",
"black",
"pepper",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "coarsely ground black pepper"
},
{
"id": 7,
"type": "column",
"value": "ingredient_id"
},
{
"id": 4,
"type": "table",
"value": "ingredient"
},
{
"id": 0,
"type": "table",
"value": "nutrition"
},
{
"id": 6,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10,
11,
12,
13
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"en... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
4,203 | bakery_1 | bird:test.json:1559 | Return the lowest and highest prices of goods grouped and ordered by food type. | SELECT min(price) , max(price) , food FROM goods GROUP BY food ORDER BY food | [
"Return",
"the",
"lowest",
"and",
"highest",
"prices",
"of",
"goods",
"grouped",
"and",
"ordered",
"by",
"food",
"type",
"."
] | [
{
"id": 0,
"type": "table",
"value": "goods"
},
{
"id": 2,
"type": "column",
"value": "price"
},
{
"id": 1,
"type": "column",
"value": "food"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
4,204 | simpson_episodes | bird:train.json:4364 | In episode with the highest votes, list the category of awards it is nominated for. | SELECT T1.award_category FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.result = 'Nominee' ORDER BY T2.votes DESC LIMIT 1; | [
"In",
"episode",
"with",
"the",
"highest",
"votes",
",",
"list",
"the",
"category",
"of",
"awards",
"it",
"is",
"nominated",
"for",
"."
] | [
{
"id": 0,
"type": "column",
"value": "award_category"
},
{
"id": 6,
"type": "column",
"value": "episode_id"
},
{
"id": 2,
"type": "table",
"value": "episode"
},
{
"id": 4,
"type": "value",
"value": "Nominee"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entit... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
4,205 | chicago_crime | bird:train.json:8665 | Among the crimes reported to the ward located at 1958 N. Milwaukee Ave., list down the report number of the crimes happened inside the apartment. | SELECT T1.case_number FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T1.location_description = 'APARTMENT' AND T2.ward_office_address = '1958 N. Milwaukee Ave.' | [
"Among",
"the",
"crimes",
"reported",
"to",
"the",
"ward",
"located",
"at",
"1958",
"N.",
"Milwaukee",
"Ave",
".",
",",
"list",
"down",
"the",
"report",
"number",
"of",
"the",
"crimes",
"happened",
"inside",
"the",
"apartment",
"."
] | [
{
"id": 7,
"type": "value",
"value": "1958 N. Milwaukee Ave."
},
{
"id": 4,
"type": "column",
"value": "location_description"
},
{
"id": 6,
"type": "column",
"value": "ward_office_address"
},
{
"id": 0,
"type": "column",
"value": "case_number"
},
{
... | [
{
"entity_id": 0,
"token_idxs": [
19
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
4,206 | aan_1 | bird:test.json:976 | What are the distinct venues for papers, ordered by year? | SELECT DISTINCT venue , YEAR FROM paper ORDER BY YEAR | [
"What",
"are",
"the",
"distinct",
"venues",
"for",
"papers",
",",
"ordered",
"by",
"year",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "paper"
},
{
"id": 1,
"type": "column",
"value": "venue"
},
{
"id": 2,
"type": "column",
"value": "year"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
4,207 | movie_3 | bird:train.json:9366 | Tally the full names of actors in the film "Alabama Devil." | SELECT T2.first_name, T2.last_name FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T3.title = 'ALABAMA DEVIL' | [
"Tally",
"the",
"full",
"names",
"of",
"actors",
"in",
"the",
"film",
"\"",
"Alabama",
"Devil",
".",
"\""
] | [
{
"id": 4,
"type": "value",
"value": "ALABAMA DEVIL"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 5,
"type": "table",
"value": "film_actor"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 8,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11
]
},
{
"entity_id": 5,
"to... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
4,208 | superhero | bird:dev.json:833 | Name the superhero, otherwise known as Charles Chandler. | SELECT superhero_name FROM superhero WHERE full_name = 'Charles Chandler' | [
"Name",
"the",
"superhero",
",",
"otherwise",
"known",
"as",
"Charles",
"Chandler",
"."
] | [
{
"id": 3,
"type": "value",
"value": "Charles Chandler"
},
{
"id": 1,
"type": "column",
"value": "superhero_name"
},
{
"id": 0,
"type": "table",
"value": "superhero"
},
{
"id": 2,
"type": "column",
"value": "full_name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
0
]
},
{
"entity_id": 3,
"token_idxs": [
7,
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
4,209 | hockey | bird:train.json:7699 | Which coach had the highest winning rates in the 2009 season? What's coach's nickname. | SELECT T2.coachID, T1.nameNick FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = 2009 ORDER BY CAST(T2.W AS REAL) / (T2.W + T2.L) DESC LIMIT 1 | [
"Which",
"coach",
"had",
"the",
"highest",
"winning",
"rates",
"in",
"the",
"2009",
"season",
"?",
"What",
"'s",
"coach",
"'s",
"nickname",
"."
] | [
{
"id": 1,
"type": "column",
"value": "namenick"
},
{
"id": 0,
"type": "column",
"value": "coachid"
},
{
"id": 3,
"type": "table",
"value": "coaches"
},
{
"id": 2,
"type": "table",
"value": "master"
},
{
"id": 4,
"type": "column",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14,
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"to... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O"
] |
4,210 | products_gen_characteristics | spider:train_spider.json:5546 | What is the color code and description of the product named "chervil"? | SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil" | [
"What",
"is",
"the",
"color",
"code",
"and",
"description",
"of",
"the",
"product",
"named",
"\"",
"chervil",
"\"",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "color_description"
},
{
"id": 4,
"type": "column",
"value": "product_name"
},
{
"id": 0,
"type": "column",
"value": "color_code"
},
{
"id": 3,
"type": "table",
"value": "ref_colors"
},
{
"id": 2,
"type": "... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
4,211 | movie_1 | spider:train_spider.json:2525 | What are the names of all movies that were made after 2000 or reviewed by Brittany Harris? | SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000 | [
"What",
"are",
"the",
"names",
"of",
"all",
"movies",
"that",
"were",
"made",
"after",
"2000",
"or",
"reviewed",
"by",
"Brittany",
"Harris",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "Brittany Harris"
},
{
"id": 1,
"type": "table",
"value": "reviewer"
},
{
"id": 2,
"type": "table",
"value": "rating"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 3,
"type": "table",
"valu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
4,212 | formula_1 | spider:train_spider.json:2215 | Find the id and location of circuits that belong to France or Belgium? | SELECT circuitid , LOCATION FROM circuits WHERE country = "France" OR country = "Belgium" | [
"Find",
"the",
"i",
"d",
"and",
"location",
"of",
"circuits",
"that",
"belong",
"to",
"France",
"or",
"Belgium",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "circuitid"
},
{
"id": 0,
"type": "table",
"value": "circuits"
},
{
"id": 2,
"type": "column",
"value": "location"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 5,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
4,213 | formula_1 | bird:dev.json:964 | List out the code for drivers who have nationality in America. | SELECT code FROM drivers WHERE Nationality = 'American' | [
"List",
"out",
"the",
"code",
"for",
"drivers",
"who",
"have",
"nationality",
"in",
"America",
"."
] | [
{
"id": 2,
"type": "column",
"value": "nationality"
},
{
"id": 3,
"type": "value",
"value": "American"
},
{
"id": 0,
"type": "table",
"value": "drivers"
},
{
"id": 1,
"type": "column",
"value": "code"
}
] | [
{
"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": []
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
4,214 | climbing | spider:train_spider.json:1148 | Show the names of mountains with height more than 5000 or prominence more than 1000. | SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000 | [
"Show",
"the",
"names",
"of",
"mountains",
"with",
"height",
"more",
"than",
"5000",
"or",
"prominence",
"more",
"than",
"1000",
"."
] | [
{
"id": 4,
"type": "column",
"value": "prominence"
},
{
"id": 0,
"type": "table",
"value": "mountain"
},
{
"id": 2,
"type": "column",
"value": "height"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
4,215 | college_1 | spider:train_spider.json:3232 | How many different departments are there? | SELECT count(DISTINCT dept_name) FROM department | [
"How",
"many",
"different",
"departments",
"are",
"there",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "department"
},
{
"id": 1,
"type": "column",
"value": "dept_name"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
4,216 | superstore | bird:train.json:2416 | What is the ratio between customers who live in Texas and customers who live in Indiana? | SELECT CAST(SUM(CASE WHEN State = 'Texas' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN State = 'Indiana' THEN 1 ELSE 0 END) FROM people | [
"What",
"is",
"the",
"ratio",
"between",
"customers",
"who",
"live",
"in",
"Texas",
"and",
"customers",
"who",
"live",
"in",
"Indiana",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Indiana"
},
{
"id": 0,
"type": "table",
"value": "people"
},
{
"id": 4,
"type": "column",
"value": "state"
},
{
"id": 6,
"type": "value",
"value": "Texas"
},
{
"id": 1,
"type": "value",
"value": "100"
... | [
{
"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": [
15
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
4,217 | csu_1 | spider:train_spider.json:2385 | How many undergraduates are there at San Jose State | SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = "San Jose State University" | [
"How",
"many",
"undergraduates",
"are",
"there",
"at",
"San",
"Jose",
"State"
] | [
{
"id": 7,
"type": "column",
"value": "San Jose State University"
},
{
"id": 0,
"type": "table",
"value": "discipline_enrollments"
},
{
"id": 2,
"type": "column",
"value": "undergraduate"
},
{
"id": 1,
"type": "table",
"value": "campuses"
},
{
"id"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN"
] |
4,218 | car_retails | bird:train.json:1614 | How much did Petit Auto pay on 2004-08-09? | SELECT t1.amount FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.customerName = 'Petit Auto' AND t1.paymentDate = '2004-08-09' | [
"How",
"much",
"did",
"Petit",
"Auto",
"pay",
"on",
"2004",
"-",
"08",
"-",
"09",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "customernumber"
},
{
"id": 4,
"type": "column",
"value": "customername"
},
{
"id": 6,
"type": "column",
"value": "paymentdate"
},
{
"id": 5,
"type": "value",
"value": "Petit Auto"
},
{
"id": 7,
"type": "va... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
3
... | [
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
4,219 | customers_and_orders | bird:test.json:291 | Show the order ids, order dates, and order status codes for all orders by customer Jeromy. | SELECT order_id , order_date , order_status_code FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_name = "Jeromy" | [
"Show",
"the",
"order",
"ids",
",",
"order",
"dates",
",",
"and",
"order",
"status",
"codes",
"for",
"all",
"orders",
"by",
"customer",
"Jeromy",
"."
] | [
{
"id": 2,
"type": "column",
"value": "order_status_code"
},
{
"id": 3,
"type": "table",
"value": "customer_orders"
},
{
"id": 5,
"type": "column",
"value": "customer_name"
},
{
"id": 7,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"t... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10,
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs":... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
4,220 | superstore | bird:train.json:2366 | How many customers in Chicago ordered at least 10 Cardinal EasyOpen D-Ring Binders in a single order? | SELECT COUNT(DISTINCT T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Cardinal EasyOpen D-Ring Binders' AND T2.City = 'Chicago' AND T1.Quantity > 10 | [
"How",
"many",
"customers",
"in",
"Chicago",
"ordered",
"at",
"least",
"10",
"Cardinal",
"EasyOpen",
"D",
"-",
"Ring",
"Binders",
"in",
"a",
"single",
"order",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "Cardinal EasyOpen D-Ring Binders"
},
{
"id": 2,
"type": "table",
"value": "west_superstore"
},
{
"id": 5,
"type": "column",
"value": "Product Name"
},
{
"id": 1,
"type": "column",
"value": "Customer ID"
},
{
"i... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"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,
"token_idxs": []
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
4,221 | mondial_geo | bird:train.json:8360 | What kind of political system is in place in the country with the highest inflation rate? | SELECT T1.Government FROM politics AS T1 INNER JOIN economy AS T2 ON T1.Country = T2.Country ORDER BY T2.Inflation DESC LIMIT 1 | [
"What",
"kind",
"of",
"political",
"system",
"is",
"in",
"place",
"in",
"the",
"country",
"with",
"the",
"highest",
"inflation",
"rate",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "government"
},
{
"id": 3,
"type": "column",
"value": "inflation"
},
{
"id": 1,
"type": "table",
"value": "politics"
},
{
"id": 2,
"type": "table",
"value": "economy"
},
{
"id": 4,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
4,222 | flight_1 | spider:train_spider.json:356 | What is the id and name of the aircraft that can cover the maximum distance? | SELECT aid , name FROM Aircraft ORDER BY distance DESC LIMIT 1 | [
"What",
"is",
"the",
"i",
"d",
"and",
"name",
"of",
"the",
"aircraft",
"that",
"can",
"cover",
"the",
"maximum",
"distance",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "aircraft"
},
{
"id": 3,
"type": "column",
"value": "distance"
},
{
"id": 2,
"type": "column",
"value": "name"
},
{
"id": 1,
"type": "column",
"value": "aid"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
4,223 | legislator | bird:train.json:4786 | List the full names of Republican legislators who have a nickname. | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T1.nickname_name IS NOT NULL GROUP BY T1.official_full_name | [
"List",
"the",
"full",
"names",
"of",
"Republican",
"legislators",
"who",
"have",
"a",
"nickname",
"."
] | [
{
"id": 0,
"type": "column",
"value": "official_full_name"
},
{
"id": 2,
"type": "table",
"value": "current-terms"
},
{
"id": 7,
"type": "column",
"value": "nickname_name"
},
{
"id": 3,
"type": "column",
"value": "bioguide_id"
},
{
"id": 6,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
4,224 | public_review_platform | bird:train.json:3996 | How many businesses in Glendale are reviewed by user with the ID of 20241? | SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Glendale' AND T2.user_id = 20241 | [
"How",
"many",
"businesses",
"in",
"Glendale",
"are",
"reviewed",
"by",
"user",
"with",
"the",
"ID",
"of",
"20241",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "table",
"value": "business"
},
{
"id": 4,
"type": "value",
"value": "Glendale"
},
{
"id": 1,
"type": "table",
"value": "reviews"
},
{
"id": 5,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
4,225 | works_cycles | bird:train.json:7074 | How many active employees do not wish to receive e-mail promotions? | SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.CurrentFlag = 1 AND T2.EmailPromotion = 1 | [
"How",
"many",
"active",
"employees",
"do",
"not",
"wish",
"to",
"receive",
"e",
"-",
"mail",
"promotions",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "businessentityid"
},
{
"id": 5,
"type": "column",
"value": "emailpromotion"
},
{
"id": 3,
"type": "column",
"value": "currentflag"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
9,
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
4,226 | image_and_language | bird:train.json:7540 | Define the bounding box of the object sample no. 7 on image no. 42. | SELECT X, Y, W, H FROM IMG_OBJ WHERE IMG_ID = 42 AND OBJ_SAMPLE_ID = 7 | [
"Define",
"the",
"bounding",
"box",
"of",
"the",
"object",
"sample",
"no",
".",
"7",
"on",
"image",
"no",
".",
"42",
"."
] | [
{
"id": 7,
"type": "column",
"value": "obj_sample_id"
},
{
"id": 0,
"type": "table",
"value": "img_obj"
},
{
"id": 5,
"type": "column",
"value": "img_id"
},
{
"id": 6,
"type": "value",
"value": "42"
},
{
"id": 1,
"type": "column",
"value": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
4,227 | authors | bird:train.json:3679 | Sate the author name and published year for paper id 2? | SELECT T1.Name, T3.Year FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id WHERE T2.PaperId = 2 | [
"Sate",
"the",
"author",
"name",
"and",
"published",
"year",
"for",
"paper",
"i",
"d",
"2",
"?"
] | [
{
"id": 6,
"type": "table",
"value": "paperauthor"
},
{
"id": 8,
"type": "column",
"value": "authorid"
},
{
"id": 3,
"type": "column",
"value": "paperid"
},
{
"id": 5,
"type": "table",
"value": "author"
},
{
"id": 2,
"type": "table",
"value... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
4,228 | vehicle_driver | bird:test.json:158 | Return the maximum and average power for the vehicles built by Zhuzhou. | SELECT max(power) , avg(power) FROM vehicle WHERE builder = 'Zhuzhou' | [
"Return",
"the",
"maximum",
"and",
"average",
"power",
"for",
"the",
"vehicles",
"built",
"by",
"Zhuzhou",
"."
] | [
{
"id": 0,
"type": "table",
"value": "vehicle"
},
{
"id": 1,
"type": "column",
"value": "builder"
},
{
"id": 2,
"type": "value",
"value": "Zhuzhou"
},
{
"id": 3,
"type": "column",
"value": "power"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
4,229 | insurance_policies | spider:train_spider.json:3851 | Find the claims that led to more than two settlements or have the maximum claim value. For each of them, return the date the claim was made and the id of the claim. | SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amou... | [
"Find",
"the",
"claims",
"that",
"led",
"to",
"more",
"than",
"two",
"settlements",
"or",
"have",
"the",
"maximum",
"claim",
"value",
".",
"For",
"each",
"of",
"them",
",",
"return",
"the",
"date",
"the",
"claim",
"was",
"made",
"and",
"the",
"i",
"d",... | [
{
"id": 1,
"type": "column",
"value": "date_claim_made"
},
{
"id": 5,
"type": "column",
"value": "amount_claimed"
},
{
"id": 3,
"type": "table",
"value": "settlements"
},
{
"id": 0,
"type": "column",
"value": "claim_id"
},
{
"id": 2,
"type": "t... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
24,
25,
26,
27,
28
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"... |
4,230 | formula_1 | bird:dev.json:873 | What is the actual finish time for Bruce McLaren in the race No.743? | SELECT T2.time FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 743 AND T1.forename = 'Bruce' AND T1.surname = 'McLaren' | [
"What",
"is",
"the",
"actual",
"finish",
"time",
"for",
"Bruce",
"McLaren",
"in",
"the",
"race",
"No.743",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "driverid"
},
{
"id": 6,
"type": "column",
"value": "forename"
},
{
"id": 1,
"type": "table",
"value": "drivers"
},
{
"id": 2,
"type": "table",
"value": "results"
},
{
"id": 8,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
4,231 | chicago_crime | bird:train.json:8732 | What is the general and specific description of incident 275? | SELECT primary_description, secondary_description FROM IUCR WHERE iucr_no = 275 | [
"What",
"is",
"the",
"general",
"and",
"specific",
"description",
"of",
"incident",
"275",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "secondary_description"
},
{
"id": 1,
"type": "column",
"value": "primary_description"
},
{
"id": 3,
"type": "column",
"value": "iucr_no"
},
{
"id": 0,
"type": "table",
"value": "iucr"
},
{
"id": 4,
"type":... | [
{
"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": [
9
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
4,232 | local_govt_and_lot | spider:train_spider.json:4849 | What is each customer's move in date, and the corresponding customer id and details? | SELECT T2.date_moved_in , T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id | [
"What",
"is",
"each",
"customer",
"'s",
"move",
"in",
"date",
",",
"and",
"the",
"corresponding",
"customer",
"i",
"d",
"and",
"details",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "customer_details"
},
{
"id": 4,
"type": "table",
"value": "customer_events"
},
{
"id": 0,
"type": "column",
"value": "date_moved_in"
},
{
"id": 1,
"type": "column",
"value": "customer_id"
},
{
"id": 3,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
5,
6
]
},
{
"entity_id": 1,
"token_idxs": [
12,
13,
14
]
},
{
"entity_id": 2,
"token_idxs": [
15,
16
]
},
{
"entity_id": 3,
"token_idxs": [
3,
4
]
},
{
"entity_... | [
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O"
] |
4,233 | e_government | spider:train_spider.json:6320 | Find the name of the youngest organization. | SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1 | [
"Find",
"the",
"name",
"of",
"the",
"youngest",
"organization",
"."
] | [
{
"id": 1,
"type": "column",
"value": "organization_name"
},
{
"id": 0,
"type": "table",
"value": "organizations"
},
{
"id": 2,
"type": "column",
"value": "date_formed"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
4,234 | human_resources | bird:train.json:8937 | Among the employees working at the office in New York, how many of them have a good job performance? | SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.state = 'NY' AND T1.performance = 'Good' | [
"Among",
"the",
"employees",
"working",
"at",
"the",
"office",
"in",
"New",
"York",
",",
"how",
"many",
"of",
"them",
"have",
"a",
"good",
"job",
"performance",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "performance"
},
{
"id": 2,
"type": "column",
"value": "locationid"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "table",
"value": "location"
},
{
"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": [
12
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O"
] |
4,235 | e_learning | spider:train_spider.json:3822 | What are the names of the courses that have exactly 1 student enrollment? | SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1 | [
"What",
"are",
"the",
"names",
"of",
"the",
"courses",
"that",
"have",
"exactly",
"1",
"student",
"enrollment",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "student_course_enrolment"
},
{
"id": 0,
"type": "column",
"value": "course_name"
},
{
"id": 4,
"type": "column",
"value": "course_id"
},
{
"id": 1,
"type": "table",
"value": "courses"
},
{
"id": 3,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
11,
12
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"I-TABLE",
"O"
] |
4,236 | cre_Docs_and_Epenses | spider:train_spider.json:6394 | What are the statement ids, statement details, and account details, for all accounts? | SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id | [
"What",
"are",
"the",
"statement",
"ids",
",",
"statement",
"details",
",",
"and",
"account",
"details",
",",
"for",
"all",
"accounts",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "statement_details"
},
{
"id": 2,
"type": "column",
"value": "account_details"
},
{
"id": 0,
"type": "column",
"value": "statement_id"
},
{
"id": 4,
"type": "table",
"value": "statements"
},
{
"id": 3,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
10,
11
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
4,237 | olympics | bird:train.json:4970 | Calculate the average age of the persons who participated in the 1992 Summer Games. | SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '1992 Summer' | [
"Calculate",
"the",
"average",
"age",
"of",
"the",
"persons",
"who",
"participated",
"in",
"the",
"1992",
"Summer",
"Games",
"."
] | [
{
"id": 5,
"type": "table",
"value": "games_competitor"
},
{
"id": 2,
"type": "value",
"value": "1992 Summer"
},
{
"id": 1,
"type": "column",
"value": "games_name"
},
{
"id": 6,
"type": "column",
"value": "person_id"
},
{
"id": 8,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11,
12
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
4,238 | menu | bird:train.json:5531 | How many dishes have appeared on the menu in less than 5 years? | SELECT COUNT(*) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.last_appeared - T1.first_appeared < 5 | [
"How",
"many",
"dishes",
"have",
"appeared",
"on",
"the",
"menu",
"in",
"less",
"than",
"5",
"years",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "first_appeared"
},
{
"id": 5,
"type": "column",
"value": "last_appeared"
},
{
"id": 1,
"type": "table",
"value": "menuitem"
},
{
"id": 4,
"type": "column",
"value": "dish_id"
},
{
"id": 0,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
4,239 | books | bird:train.json:6101 | What is the language of the book titled Zorro? | SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'Zorro' | [
"What",
"is",
"the",
"language",
"of",
"the",
"book",
"titled",
"Zorro",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "language_name"
},
{
"id": 2,
"type": "table",
"value": "book_language"
},
{
"id": 5,
"type": "column",
"value": "language_id"
},
{
"id": 3,
"type": "column",
"value": "title"
},
{
"id": 4,
"type": "value",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O"
] |
4,240 | retail_world | bird:train.json:6395 | List the name of the top ten most ordered product's names in descending order of the number of orders. | SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID GROUP BY T3.ProductName ORDER BY COUNT(*) DESC LIMIT 10 | [
"List",
"the",
"name",
"of",
"the",
"top",
"ten",
"most",
"ordered",
"product",
"'s",
"names",
"in",
"descending",
"order",
"of",
"the",
"number",
"of",
"orders",
"."
] | [
{
"id": 3,
"type": "table",
"value": "Order Details"
},
{
"id": 0,
"type": "column",
"value": "productname"
},
{
"id": 4,
"type": "column",
"value": "productid"
},
{
"id": 1,
"type": "table",
"value": "products"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
9,
10
]
},
{
"entity_id": 2,
"token_idxs": [
19
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
4,241 | food_inspection | bird:train.json:8830 | Provide eateries' IDs, names and addresses which were inspected on 30th July, 2016. | SELECT DISTINCT T2.business_id, T2.name, T2.address FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.date = '2016-07-30' | [
"Provide",
"eateries",
"'",
"IDs",
",",
"names",
"and",
"addresses",
"which",
"were",
"inspected",
"on",
"30th",
"July",
",",
"2016",
"."
] | [
{
"id": 0,
"type": "column",
"value": "business_id"
},
{
"id": 3,
"type": "table",
"value": "inspections"
},
{
"id": 4,
"type": "table",
"value": "businesses"
},
{
"id": 6,
"type": "value",
"value": "2016-07-30"
},
{
"id": 2,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
4,242 | shipping | bird:train.json:5608 | What is the full name of the driver who transported the first shipment of the company? | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.ship_date ASC LIMIT 1 | [
"What",
"is",
"the",
"full",
"name",
"of",
"the",
"driver",
"who",
"transported",
"the",
"first",
"shipment",
"of",
"the",
"company",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 4,
"type": "column",
"value": "ship_date"
},
{
"id": 5,
"type": "column",
"value": "driver_id"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
4,243 | chicago_crime | bird:train.json:8679 | Among the crimes, what percentage are severe? | SELECT CAST(COUNT(CASE WHEN index_code = 'I' THEN iucr_no ELSE NULL END) AS REAL) * 100 / COUNT(iucr_no) FROM IUCR | [
"Among",
"the",
"crimes",
",",
"what",
"percentage",
"are",
"severe",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "index_code"
},
{
"id": 2,
"type": "column",
"value": "iucr_no"
},
{
"id": 0,
"type": "table",
"value": "iucr"
},
{
"id": 1,
"type": "value",
"value": "100"
},
{
"id": 4,
"type": "value",
"value": "I"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
4,244 | university | bird:train.json:8093 | Which country is McMaster University located in? | SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.university_name = 'McMaster University' | [
"Which",
"country",
"is",
"McMaster",
"University",
"located",
"in",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "McMaster University"
},
{
"id": 3,
"type": "column",
"value": "university_name"
},
{
"id": 0,
"type": "column",
"value": "country_name"
},
{
"id": 1,
"type": "table",
"value": "university"
},
{
"id": 5,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"... | [
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O"
] |
4,245 | ship_1 | spider:train_spider.json:6242 | What is the name of the youngest captain? | SELECT name FROM captain ORDER BY age LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"youngest",
"captain",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "captain"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
4,247 | public_review_platform | bird:train.json:3804 | Which businesses are no longer in business but have a low number of votes useful? | SELECT DISTINCT T1.business_id FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T2.active LIKE 'FALSE' AND T1.review_votes_useful LIKE 'Low' | [
"Which",
"businesses",
"are",
"no",
"longer",
"in",
"business",
"but",
"have",
"a",
"low",
"number",
"of",
"votes",
"useful",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "business_categories"
},
{
"id": 6,
"type": "column",
"value": "review_votes_useful"
},
{
"id": 0,
"type": "column",
"value": "business_id"
},
{
"id": 3,
"type": "column",
"value": "category_id"
},
{
"id": 1,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
4,248 | soccer_2 | spider:train_spider.json:4949 | How many different colleges are there? | SELECT count(*) FROM College | [
"How",
"many",
"different",
"colleges",
"are",
"there",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "college"
}
] | [
{
"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"
] |
4,249 | retail_world | bird:train.json:6486 | How many employees have territories in the Eastern region? | SELECT COUNT(DISTINCT T1.FirstName) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Eastern' | [
"How",
"many",
"employees",
"have",
"territories",
"in",
"the",
"Eastern",
"region",
"?"
] | [
{
"id": 7,
"type": "table",
"value": "employeeterritories"
},
{
"id": 1,
"type": "column",
"value": "regiondescription"
},
{
"id": 4,
"type": "table",
"value": "territories"
},
{
"id": 8,
"type": "column",
"value": "territoryid"
},
{
"id": 9,
"... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
4,250 | formula_1 | bird:dev.json:923 | How many Formula_1 races took place on the circuits in Italy? | SELECT COUNT(T2.circuitId) FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Italy' | [
"How",
"many",
"Formula_1",
"races",
"took",
"place",
"on",
"the",
"circuits",
"in",
"Italy",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "circuitid"
},
{
"id": 0,
"type": "table",
"value": "circuits"
},
{
"id": 2,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "table",
"value": "races"
},
{
"id": 3,
"type": "value",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
4,251 | tracking_grants_for_research | spider:train_spider.json:4395 | List the description of the outcomes for all projects. | SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code | [
"List",
"the",
"description",
"of",
"the",
"outcomes",
"for",
"all",
"projects",
"."
] | [
{
"id": 0,
"type": "column",
"value": "outcome_description"
},
{
"id": 1,
"type": "table",
"value": "research_outcomes"
},
{
"id": 2,
"type": "table",
"value": "project_outcomes"
},
{
"id": 3,
"type": "column",
"value": "outcome_code"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1,
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
4,252 | hockey | bird:train.json:7663 | Among the coaches who have received an award after the year 1940, how many of them have already died? | SELECT COUNT(T1.coachID) FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.deathYear IS NOT NULL AND T2.year > 1940 | [
"Among",
"the",
"coaches",
"who",
"have",
"received",
"an",
"award",
"after",
"the",
"year",
"1940",
",",
"how",
"many",
"of",
"them",
"have",
"already",
"died",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "awardscoaches"
},
{
"id": 3,
"type": "column",
"value": "deathyear"
},
{
"id": 2,
"type": "column",
"value": "coachid"
},
{
"id": 0,
"type": "table",
"value": "master"
},
{
"id": 4,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
4,253 | warehouse_1 | bird:test.json:1724 | What are the different contents of boxes for which the value is higher than the average value across all boxes? | SELECT DISTINCT CONTENTS FROM boxes WHERE value > (SELECT avg(value) FROM boxes) | [
"What",
"are",
"the",
"different",
"contents",
"of",
"boxes",
"for",
"which",
"the",
"value",
"is",
"higher",
"than",
"the",
"average",
"value",
"across",
"all",
"boxes",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "contents"
},
{
"id": 0,
"type": "table",
"value": "boxes"
},
{
"id": 2,
"type": "column",
"value": "value"
}
] | [
{
"entity_id": 0,
"token_idxs": [
19
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
4,254 | mondial_geo | bird:train.json:8350 | What are the names of the rivers in Canada? | SELECT DISTINCT T1.River FROM located AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Canada' AND T1.River IS NOT NULL | [
"What",
"are",
"the",
"names",
"of",
"the",
"rivers",
"in",
"Canada",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "located"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 6,
"type": "value",
"value": "Canada"
},
{
"id": 0,
"type": "column",
"value": "r... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
3
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
4,255 | inn_1 | spider:train_spider.json:2640 | Find the names of rooms that have been reserved for more than 60 times. | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60 | [
"Find",
"the",
"names",
"of",
"rooms",
"that",
"have",
"been",
"reserved",
"for",
"more",
"than",
"60",
"times",
"."
] | [
{
"id": 2,
"type": "table",
"value": "reservations"
},
{
"id": 1,
"type": "column",
"value": "roomname"
},
{
"id": 5,
"type": "column",
"value": "roomid"
},
{
"id": 3,
"type": "table",
"value": "rooms"
},
{
"id": 0,
"type": "column",
"value... | [
{
"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": [
12
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
4,256 | image_and_language | bird:train.json:7546 | Indicate the bounding box of the image 8. | SELECT X, Y, W, H FROM IMG_OBJ WHERE IMG_ID = 8 | [
"Indicate",
"the",
"bounding",
"box",
"of",
"the",
"image",
"8",
"."
] | [
{
"id": 0,
"type": "table",
"value": "img_obj"
},
{
"id": 5,
"type": "column",
"value": "img_id"
},
{
"id": 1,
"type": "column",
"value": "x"
},
{
"id": 2,
"type": "column",
"value": "y"
},
{
"id": 3,
"type": "column",
"value": "w"
},
{... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
4,257 | formula_1 | bird:dev.json:895 | What is the average lap time for Lewis Hamilton in the 2009 Malaysian Grand Prix? | SELECT AVG(T2.milliseconds) FROM races AS T1 INNER JOIN lapTimes AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton' AND T1.year = 2009 AND T1.name = 'Malaysian Grand Prix' | [
"What",
"is",
"the",
"average",
"lap",
"time",
"for",
"Lewis",
"Hamilton",
"in",
"the",
"2009",
"Malaysian",
"Grand",
"Prix",
"?"
] | [
{
"id": 12,
"type": "value",
"value": "Malaysian Grand Prix"
},
{
"id": 1,
"type": "column",
"value": "milliseconds"
},
{
"id": 3,
"type": "table",
"value": "laptimes"
},
{
"id": 4,
"type": "column",
"value": "driverid"
},
{
"id": 5,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4,
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
4,258 | student_club | bird:dev.json:1314 | Please list the full names of the students in the Student_Club that come from the Art and Design Department. | SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.department = 'Art and Design Department' | [
"Please",
"list",
"the",
"full",
"names",
"of",
"the",
"students",
"in",
"the",
"Student_Club",
"that",
"come",
"from",
"the",
"Art",
"and",
"Design",
"Department",
"."
] | [
{
"id": 5,
"type": "value",
"value": "Art and Design Department"
},
{
"id": 6,
"type": "column",
"value": "link_to_major"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 4,
"type": "column",
"value": "department"
},
{
"id": 1,
... | [
{
"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": [
18
]
},
{
"entity_id": 5,
"token_idxs": [
15,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
4,259 | movie_3 | bird:train.json:9412 | Among the films starred by Reese West, what is the difference between the films that have store ID of 1 and store ID of 2? | SELECT SUM(IIF(T4.film_id = 1, 1, 0)) - SUM(IIF(T4.film_id = 2, 1, 0)) AS diff FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id WHERE T2.first_name = 'Reese' AND T2.last_name = 'West' | [
"Among",
"the",
"films",
"starred",
"by",
"Reese",
"West",
",",
"what",
"is",
"the",
"difference",
"between",
"the",
"films",
"that",
"have",
"store",
"ID",
"of",
"1",
"and",
"store",
"ID",
"of",
"2",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "first_name"
},
{
"id": 7,
"type": "table",
"value": "film_actor"
},
{
"id": 0,
"type": "table",
"value": "inventory"
},
{
"id": 5,
"type": "column",
"value": "last_name"
},
{
"id": 11,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O"
] |
4,260 | flight_1 | spider:train_spider.json:437 | What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000? | SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"salary",
"and",
"name",
"of",
"the",
"employee",
"who",
"has",
"the",
"most",
"number",
"of",
"certificates",
"on",
"aircrafts",
"with",
"distance",
"more",
"than",
"5000",
"?"
] | [
{
"id": 6,
"type": "table",
"value": "certificate"
},
{
"id": 2,
"type": "table",
"value": "aircraft"
},
{
"id": 3,
"type": "column",
"value": "distance"
},
{
"id": 5,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
17
]
},
{
"entity_id": 3,
"token_idxs": [
19
]
},
{
"entity_id": 4,
"token_idxs": [
22
]
},
{
"enti... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
4,261 | movie_3 | bird:train.json:9406 | In store ID 2, how many of the films are R rating?
| SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.store_id = 2 AND T1.rating = 'R' | [
"In",
"store",
"ID",
"2",
",",
"how",
"many",
"of",
"the",
"films",
"are",
"R",
"rating",
"?",
"\n"
] | [
{
"id": 1,
"type": "table",
"value": "inventory"
},
{
"id": 3,
"type": "column",
"value": "store_id"
},
{
"id": 2,
"type": "column",
"value": "film_id"
},
{
"id": 5,
"type": "column",
"value": "rating"
},
{
"id": 0,
"type": "table",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
0
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
1,
2
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
... | [
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O"
] |
4,263 | soccer_3 | bird:test.json:35 | Which country has produced both players with earnings over 1400000 and players with earnings below 1100000? | SELECT Country FROM player WHERE Earnings > 1400000 INTERSECT SELECT Country FROM player WHERE Earnings < 1100000 | [
"Which",
"country",
"has",
"produced",
"both",
"players",
"with",
"earnings",
"over",
"1400000",
"and",
"players",
"with",
"earnings",
"below",
"1100000",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "earnings"
},
{
"id": 1,
"type": "column",
"value": "country"
},
{
"id": 3,
"type": "value",
"value": "1400000"
},
{
"id": 4,
"type": "value",
"value": "1100000"
},
{
"id": 0,
"type": "table",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
4,264 | movielens | bird:train.json:2340 | How many horror movies were made by the worst directors? | SELECT COUNT(T1.movieid) FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid INNER JOIN directors AS T3 ON T1.directorid = T3.directorid WHERE T1.genre = 'horror' AND T3.d_quality = 0 | [
"How",
"many",
"horror",
"movies",
"were",
"made",
"by",
"the",
"worst",
"directors",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "movies2directors"
},
{
"id": 4,
"type": "column",
"value": "directorid"
},
{
"id": 0,
"type": "table",
"value": "directors"
},
{
"id": 7,
"type": "column",
"value": "d_quality"
},
{
"id": 1,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
4,265 | professional_basketball | bird:train.json:2913 | Among the NBA All-star players in 1996 season , which have more than 70% free throw rate? Please give their player id. | SELECT playerID FROM player_allstar WHERE season_id = 1996 AND CAST(ft_made AS REAL) * 100 / ft_attempted > 70 | [
"Among",
"the",
"NBA",
"All",
"-",
"star",
"players",
"in",
"1996",
"season",
",",
"which",
"have",
"more",
"than",
"70",
"%",
"free",
"throw",
"rate",
"?",
"Please",
"give",
"their",
"player",
"i",
"d."
] | [
{
"id": 0,
"type": "table",
"value": "player_allstar"
},
{
"id": 5,
"type": "column",
"value": "ft_attempted"
},
{
"id": 2,
"type": "column",
"value": "season_id"
},
{
"id": 1,
"type": "column",
"value": "playerid"
},
{
"id": 7,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
24,
25,
26
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN"
] |
4,266 | works_cycles | bird:train.json:7004 | For all the purchase order transactions, name all the products with low quality. | SELECT DISTINCT T1.Name FROM Product AS T1 INNER JOIN TransactionHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Class = 'L' AND T2.TransactionType = 'P' ORDER BY T1.Name | [
"For",
"all",
"the",
"purchase",
"order",
"transactions",
",",
"name",
"all",
"the",
"products",
"with",
"low",
"quality",
"."
] | [
{
"id": 2,
"type": "table",
"value": "transactionhistory"
},
{
"id": 6,
"type": "column",
"value": "transactiontype"
},
{
"id": 3,
"type": "column",
"value": "productid"
},
{
"id": 1,
"type": "table",
"value": "product"
},
{
"id": 4,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
4,267 | book_1 | bird:test.json:564 | Return the largest difference in sale price and purchase price. | SELECT max(saleprice - purchaseprice) FROM Book | [
"Return",
"the",
"largest",
"difference",
"in",
"sale",
"price",
"and",
"purchase",
"price",
"."
] | [
{
"id": 2,
"type": "column",
"value": "purchaseprice"
},
{
"id": 1,
"type": "column",
"value": "saleprice"
},
{
"id": 0,
"type": "table",
"value": "book"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
8,
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
4,268 | debit_card_specializing | bird:dev.json:1532 | Which country had the gas station that sold the most expensive product id No.2 for one unit? | SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.ProductID = 2 ORDER BY T1.Price DESC LIMIT 1 | [
"Which",
"country",
"had",
"the",
"gas",
"station",
"that",
"sold",
"the",
"most",
"expensive",
"product",
"i",
"d",
"No.2",
"for",
"one",
"unit",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "transactions_1k"
},
{
"id": 6,
"type": "column",
"value": "gasstationid"
},
{
"id": 2,
"type": "table",
"value": "gasstations"
},
{
"id": 3,
"type": "column",
"value": "productid"
},
{
"id": 0,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": [
11,
12,
13
]
},
{
"entity_id": 4,
"token_idxs": []
},... | [
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
4,269 | works_cycles | bird:train.json:7207 | How many types of credit cards are there and how many are vista? | SELECT COUNT(CardNumber) FROM CreditCard WHERE CardType = 'vista' | [
"How",
"many",
"types",
"of",
"credit",
"cards",
"are",
"there",
"and",
"how",
"many",
"are",
"vista",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "creditcard"
},
{
"id": 3,
"type": "column",
"value": "cardnumber"
},
{
"id": 1,
"type": "column",
"value": "cardtype"
},
{
"id": 2,
"type": "value",
"value": "vista"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
4,270 | craftbeer | bird:train.json:8858 | What is the average alcohol content per 12-ounce beer bottle produced by Boston Beer Company? | SELECT AVG(T1.abv) FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.name = 'Boston Beer Company' AND T1.ounces = 12 | [
"What",
"is",
"the",
"average",
"alcohol",
"content",
"per",
"12",
"-",
"ounce",
"beer",
"bottle",
"produced",
"by",
"Boston",
"Beer",
"Company",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "Boston Beer Company"
},
{
"id": 3,
"type": "column",
"value": "brewery_id"
},
{
"id": 1,
"type": "table",
"value": "breweries"
},
{
"id": 7,
"type": "column",
"value": "ounces"
},
{
"id": 0,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"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-VALUE",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-VALUE",
"O"
] |
4,271 | shooting | bird:train.json:2477 | How many incidents in which the subject's weapon was a vehicle were investigated by a female officer? | SELECT COUNT(T1.case_number) FROM incidents AS T1 INNER JOIN officers AS T2 ON T1.case_number = T2.case_number WHERE T1.subject_weapon = 'Vehicle' AND T2.gender = 'F' | [
"How",
"many",
"incidents",
"in",
"which",
"the",
"subject",
"'s",
"weapon",
"was",
"a",
"vehicle",
"were",
"investigated",
"by",
"a",
"female",
"officer",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "subject_weapon"
},
{
"id": 2,
"type": "column",
"value": "case_number"
},
{
"id": 0,
"type": "table",
"value": "incidents"
},
{
"id": 1,
"type": "table",
"value": "officers"
},
{
"id": 4,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
4,273 | climbing | spider:train_spider.json:1136 | Show the times used by climbers to climb mountains in Country Uganda. | SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda" | [
"Show",
"the",
"times",
"used",
"by",
"climbers",
"to",
"climb",
"mountains",
"in",
"Country",
"Uganda",
"."
] | [
{
"id": 5,
"type": "column",
"value": "mountain_id"
},
{
"id": 2,
"type": "table",
"value": "mountain"
},
{
"id": 1,
"type": "table",
"value": "climber"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 4,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
4,274 | e_government | spider:train_spider.json:6329 | What are the names of the services that have never been used? | SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id | [
"What",
"are",
"the",
"names",
"of",
"the",
"services",
"that",
"have",
"never",
"been",
"used",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "party_services"
},
{
"id": 1,
"type": "column",
"value": "service_name"
},
{
"id": 3,
"type": "column",
"value": "service_id"
},
{
"id": 0,
"type": "table",
"value": "services"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
4,275 | student_loan | bird:train.json:4558 | How many students have absences of no more than 3 months? | SELECT COUNT(name) FROM longest_absense_from_school WHERE month < 3 | [
"How",
"many",
"students",
"have",
"absences",
"of",
"no",
"more",
"than",
"3",
"months",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "longest_absense_from_school"
},
{
"id": 1,
"type": "column",
"value": "month"
},
{
"id": 3,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "value",
"value": "3"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
4,276 | insurance_and_eClaims | spider:train_spider.json:1529 | Find the names of customers whose name contains "Diana". | SELECT customer_details FROM customers WHERE customer_details LIKE "%Diana%" | [
"Find",
"the",
"names",
"of",
"customers",
"whose",
"name",
"contains",
"\"",
"Diana",
"\"",
"."
] | [
{
"id": 1,
"type": "column",
"value": "customer_details"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 2,
"type": "column",
"value": "%Diana%"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
4,277 | world | bird:train.json:7904 | List the names of the country that officially uses English as their language. | SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T1.Language = 'English' | [
"List",
"the",
"names",
"of",
"the",
"country",
"that",
"officially",
"uses",
"English",
"as",
"their",
"language",
"."
] | [
{
"id": 1,
"type": "table",
"value": "countrylanguage"
},
{
"id": 3,
"type": "column",
"value": "countrycode"
},
{
"id": 5,
"type": "column",
"value": "isofficial"
},
{
"id": 7,
"type": "column",
"value": "language"
},
{
"id": 2,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O"
] |
4,278 | device | spider:train_spider.json:5054 | What are the carriers of devices whose software platforms are not "Android"? | SELECT Carrier FROM device WHERE Software_Platform != 'Android' | [
"What",
"are",
"the",
"carriers",
"of",
"devices",
"whose",
"software",
"platforms",
"are",
"not",
"\"",
"Android",
"\"",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "software_platform"
},
{
"id": 1,
"type": "column",
"value": "carrier"
},
{
"id": 3,
"type": "value",
"value": "Android"
},
{
"id": 0,
"type": "table",
"value": "device"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
4,280 | cookbook | bird:train.json:8916 | Among the recipes with sea bass, how many percent of recipes can serve 10 people and above? | SELECT CAST(SUM(CASE WHEN T1.servings >= 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'sea bass steak' | [
"Among",
"the",
"recipes",
"with",
"sea",
"bass",
",",
"how",
"many",
"percent",
"of",
"recipes",
"can",
"serve",
"10",
"people",
"and",
"above",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "sea bass steak"
},
{
"id": 5,
"type": "column",
"value": "ingredient_id"
},
{
"id": 0,
"type": "table",
"value": "ingredient"
},
{
"id": 7,
"type": "column",
"value": "recipe_id"
},
{
"id": 4,
"type": "tabl... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
4,281 | works_cycles | bird:train.json:7039 | Which store sales person was reently hired? Indicate his/her full name and gender. | SELECT T2.FirstName, T2.MiddleName, T2.LastName, T1.Gender FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'SP' | [
"Which",
"store",
"sales",
"person",
"was",
"reently",
"hired",
"?",
"Indicate",
"his",
"/",
"her",
"full",
"name",
"and",
"gender",
"."
] | [
{
"id": 8,
"type": "column",
"value": "businessentityid"
},
{
"id": 1,
"type": "column",
"value": "middlename"
},
{
"id": 6,
"type": "column",
"value": "persontype"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs"... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
4,282 | codebase_community | bird:dev.json:534 | What is the display name of the user who has the most number of views? | SELECT DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users ) | [
"What",
"is",
"the",
"display",
"name",
"of",
"the",
"user",
"who",
"has",
"the",
"most",
"number",
"of",
"views",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "displayname"
},
{
"id": 0,
"type": "table",
"value": "users"
},
{
"id": 2,
"type": "column",
"value": "views"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
4,283 | books | bird:train.json:6021 | What are the languages of the first two published books? | SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id ORDER BY T1.publication_date ASC LIMIT 2 | [
"What",
"are",
"the",
"languages",
"of",
"the",
"first",
"two",
"published",
"books",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "publication_date"
},
{
"id": 0,
"type": "column",
"value": "language_name"
},
{
"id": 2,
"type": "table",
"value": "book_language"
},
{
"id": 4,
"type": "column",
"value": "language_id"
},
{
"id": 1,
"type... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
4,284 | talkingdata | bird:train.json:1126 | State the number of the "魅蓝Note 2" users who are in the "F29-32" group. | SELECT COUNT(T2.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.`group` = 'F29-32' AND T2.device_model = '魅蓝Note 2' | [
"State",
"the",
"number",
"of",
"the",
"\"",
"魅蓝Note",
"2",
"\"",
"users",
"who",
"are",
"in",
"the",
"\"",
"F29",
"-",
"32",
"\"",
"group",
"."
] | [
{
"id": 1,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 5,
"type": "column",
"value": "device_model"
},
{
"id": 0,
"type": "table",
"value": "gender_age"
},
{
"id": 2,
"type": "column",
"value": "device_id"
},
{
"id": 6,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
19
]
},
{
"entity_id": 4,
"token_idxs": [
15,
16,
17
]
},
{
"entity_id":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-COLUMN",
"O"
] |
4,285 | cre_Doc_Tracking_DB | spider:train_spider.json:4218 | What are the different location codes for documents? | SELECT DISTINCT location_code FROM Document_locations | [
"What",
"are",
"the",
"different",
"location",
"codes",
"for",
"documents",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "document_locations"
},
{
"id": 1,
"type": "column",
"value": "location_code"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"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",
"B-TABLE",
"O"
] |
4,286 | works_cycles | bird:train.json:7308 | List all the non-sales employees in ascending order of its business entitty ID. | SELECT FirstName, LastName FROM Person WHERE PersonType = 'EM' ORDER BY BusinessEntityID | [
"List",
"all",
"the",
"non",
"-",
"sales",
"employees",
"in",
"ascending",
"order",
"of",
"its",
"business",
"entitty",
"ID",
"."
] | [
{
"id": 5,
"type": "column",
"value": "businessentityid"
},
{
"id": 3,
"type": "column",
"value": "persontype"
},
{
"id": 1,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"type": "column",
"value": "lastname"
},
{
"id": 0,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
12,
13,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
4,287 | university_rank | bird:test.json:1769 | Show all home conferences and the number of universities in each conference. | SELECT home_conference , count(*) FROM University GROUP BY home_conference | [
"Show",
"all",
"home",
"conferences",
"and",
"the",
"number",
"of",
"universities",
"in",
"each",
"conference",
"."
] | [
{
"id": 1,
"type": "column",
"value": "home_conference"
},
{
"id": 0,
"type": "table",
"value": "university"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
4,288 | retail_world | bird:train.json:6634 | Which customer have the biggest purchase in one order and where does this order being ship to? | SELECT T1.CompanyName, T2.ShipCountry FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID GROUP BY T1.CompanyName, T2.ShipCountry ORDER BY COUNT(T3.ProductID) DESC LIMIT 1 | [
"Which",
"customer",
"have",
"the",
"biggest",
"purchase",
"in",
"one",
"order",
"and",
"where",
"does",
"this",
"order",
"being",
"ship",
"to",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "Order Details"
},
{
"id": 0,
"type": "column",
"value": "companyname"
},
{
"id": 1,
"type": "column",
"value": "shipcountry"
},
{
"id": 7,
"type": "column",
"value": "customerid"
},
{
"id": 3,
"type": "tabl... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13,
14
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O"
] |
4,289 | program_share | spider:train_spider.json:3745 | Which channels are broadcast in the morning? Give me the channel names. | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | [
"Which",
"channels",
"are",
"broadcast",
"in",
"the",
"morning",
"?",
"Give",
"me",
"the",
"channel",
"names",
"."
] | [
{
"id": 3,
"type": "column",
"value": "time_of_day"
},
{
"id": 5,
"type": "column",
"value": "channel_id"
},
{
"id": 2,
"type": "table",
"value": "broadcast"
},
{
"id": 1,
"type": "table",
"value": "channel"
},
{
"id": 4,
"type": "value",
"... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entit... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
4,290 | customers_card_transactions | spider:train_spider.json:737 | What is the average and total transaction amount? | SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_transactions | [
"What",
"is",
"the",
"average",
"and",
"total",
"transaction",
"amount",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "financial_transactions"
},
{
"id": 1,
"type": "column",
"value": "transaction_amount"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
4,292 | car_retails | bird:train.json:1669 | Calculate the total price of shipped orders belonging to Land of Toys Inc. under the classic car line of products. | SELECT SUM(t3.priceEach * t3.quantityOrdered) FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber INNER JOIN orderdetails AS t3 ON t2.orderNumber = t3.orderNumber INNER JOIN products AS t4 ON t3.productCode = t4.productCode WHERE t4.productLine = 'Classic Cars' AND t1.customerName = 'L... | [
"Calculate",
"the",
"total",
"price",
"of",
"shipped",
"orders",
"belonging",
"to",
"Land",
"of",
"Toys",
"Inc.",
"under",
"the",
"classic",
"car",
"line",
"of",
"products",
"."
] | [
{
"id": 6,
"type": "value",
"value": "Land of Toys Inc."
},
{
"id": 10,
"type": "column",
"value": "quantityordered"
},
{
"id": 14,
"type": "column",
"value": "customernumber"
},
{
"id": 1,
"type": "table",
"value": "orderdetails"
},
{
"id": 4,
... | [
{
"entity_id": 0,
"token_idxs": [
19
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
15,
16
]
},
{
"entity_id": 5,
"t... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-TABLE",
"O"
] |
4,293 | customers_card_transactions | spider:train_spider.json:706 | Count the number of cards the customer with the first name Art and last name Turcotte has. | SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte" | [
"Count",
"the",
"number",
"of",
"cards",
"the",
"customer",
"with",
"the",
"first",
"name",
"Art",
"and",
"last",
"name",
"Turcotte",
"has",
"."
] | [
{
"id": 3,
"type": "column",
"value": "customer_first_name"
},
{
"id": 5,
"type": "column",
"value": "customer_last_name"
},
{
"id": 0,
"type": "table",
"value": "customers_cards"
},
{
"id": 2,
"type": "column",
"value": "customer_id"
},
{
"id": 1,... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7,
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
4,294 | mondial_geo | bird:train.json:8442 | How many businesses were founded after 1960 in a nation that wasn't independent? | SELECT COUNT(T3.Name) FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country WHERE T2.Independence = NULL AND STRFTIME('%Y', T3.Established) > '1960' | [
"How",
"many",
"businesses",
"were",
"founded",
"after",
"1960",
"in",
"a",
"nation",
"that",
"was",
"n't",
"independent",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "organization"
},
{
"id": 5,
"type": "column",
"value": "independence"
},
{
"id": 9,
"type": "column",
"value": "established"
},
{
"id": 3,
"type": "table",
"value": "politics"
},
{
"id": 2,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": [
8,
9
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
4,295 | sales_in_weather | bird:train.json:8176 | For the weather station has store no.9, what was the increased percentage of the average temperature from 2012/2/2 to 2012/2/3? | SELECT CAST((SUM(CASE WHEN T1.`date` = '2012-02-03' THEN T1.tavg * 1 ELSE 0 END) - SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHE... | [
"For",
"the",
"weather",
"station",
"has",
"store",
"no.9",
",",
"what",
"was",
"the",
"increased",
"percentage",
"of",
"the",
"average",
"temperature",
"from",
"2012/2/2",
"to",
"2012/2/3",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "station_nbr"
},
{
"id": 8,
"type": "value",
"value": "2012-02-02"
},
{
"id": 11,
"type": "value",
"value": "2012-02-03"
},
{
"id": 2,
"type": "column",
"value": "store_nbr"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
4,296 | race_track | spider:train_spider.json:750 | What are the names and locations of all tracks? | SELECT name , LOCATION FROM track | [
"What",
"are",
"the",
"names",
"and",
"locations",
"of",
"all",
"tracks",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "location"
},
{
"id": 0,
"type": "table",
"value": "track"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
4,297 | cre_Docs_and_Epenses | spider:train_spider.json:6463 | How many documents do not have any expense? | SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses ) | [
"How",
"many",
"documents",
"do",
"not",
"have",
"any",
"expense",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "documents_with_expenses"
},
{
"id": 1,
"type": "column",
"value": "document_id"
},
{
"id": 0,
"type": "table",
"value": "documents"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.