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 |
|---|---|---|---|---|---|---|---|---|
534 | soccer_2 | spider:train_spider.json:5014 | What is the maximum training hours for the students whose training hours is greater than 1000 in different positions? | SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos | [
"What",
"is",
"the",
"maximum",
"training",
"hours",
"for",
"the",
"students",
"whose",
"training",
"hours",
"is",
"greater",
"than",
"1000",
"in",
"different",
"positions",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "player"
},
{
"id": 2,
"type": "table",
"value": "tryout"
},
{
"id": 0,
"type": "column",
"value": "ppos"
},
{
"id": 4,
"type": "value",
"value": "1000"
},
{
"id": 5,
"type": "column",
"value": "pid"
}... | [
{
"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": [
15
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
535 | document_management | spider:train_spider.json:4507 | What is the average access count of documents? | SELECT avg(access_count) FROM documents | [
"What",
"is",
"the",
"average",
"access",
"count",
"of",
"documents",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "access_count"
},
{
"id": 0,
"type": "table",
"value": "documents"
}
] | [
{
"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"
] |
536 | flight_4 | spider:train_spider.json:6833 | Find the name and city of the airport which is the destination of the most number of routes. | SELECT T1.name , T1.city , T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY count(*) DESC LIMIT 1 | [
"Find",
"the",
"name",
"and",
"city",
"of",
"the",
"airport",
"which",
"is",
"the",
"destination",
"of",
"the",
"most",
"number",
"of",
"routes",
"."
] | [
{
"id": 0,
"type": "column",
"value": "dst_apid"
},
{
"id": 3,
"type": "table",
"value": "airports"
},
{
"id": 4,
"type": "table",
"value": "routes"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "c... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
537 | authors | bird:train.json:3651 | What are the different ways the name of the author, Randall Davis, is written on their papers? | SELECT DISTINCT T1.Name FROM PaperAuthor AS T1 INNER JOIN Author AS T2 ON T1.AuthorId = T2.Id WHERE T2.Name = 'Randall Davis' AND T1.Name != 'Randall Davis' | [
"What",
"are",
"the",
"different",
"ways",
"the",
"name",
"of",
"the",
"author",
",",
"Randall",
"Davis",
",",
"is",
"written",
"on",
"their",
"papers",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Randall Davis"
},
{
"id": 1,
"type": "table",
"value": "paperauthor"
},
{
"id": 3,
"type": "column",
"value": "authorid"
},
{
"id": 2,
"type": "table",
"value": "author"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"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",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
538 | image_and_language | bird:train.json:7567 | List all the IDs of images that have objects with the attributes of 'wired'. | SELECT DISTINCT T2.IMG_ID FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'wired' | [
"List",
"all",
"the",
"IDs",
"of",
"images",
"that",
"have",
"objects",
"with",
"the",
"attributes",
"of",
"'",
"wired",
"'",
"."
] | [
{
"id": 5,
"type": "column",
"value": "att_class_id"
},
{
"id": 1,
"type": "table",
"value": "att_classes"
},
{
"id": 2,
"type": "table",
"value": "img_obj_att"
},
{
"id": 3,
"type": "column",
"value": "att_class"
},
{
"id": 0,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
539 | law_episode | bird:train.json:1255 | For how many times was Park Dietz credited? | SELECT COUNT(T3.person_id) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T2.credited = 'true' AND T3.name = 'Park Dietz' | [
"For",
"how",
"many",
"times",
"was",
"Park",
"Dietz",
"credited",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "Park Dietz"
},
{
"id": 8,
"type": "column",
"value": "episode_id"
},
{
"id": 1,
"type": "column",
"value": "person_id"
},
{
"id": 4,
"type": "column",
"value": "credited"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
540 | college_completion | bird:train.json:3684 | What is the number of female graduates between 2011 to 2013 from the state where 'Gateway Community College' is located? | SELECT COUNT(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year BETWEEN 2011 AND 2013 AND T1.chronname = 'Gateway Community College' AND T2.gender = 'F' | [
"What",
"is",
"the",
"number",
"of",
"female",
"graduates",
"between",
"2011",
"to",
"2013",
"from",
"the",
"state",
"where",
"'",
"Gateway",
"Community",
"College",
"'",
"is",
"located",
"?"
] | [
{
"id": 8,
"type": "value",
"value": "Gateway Community College"
},
{
"id": 0,
"type": "table",
"value": "institution_details"
},
{
"id": 1,
"type": "table",
"value": "state_sector_grads"
},
{
"id": 2,
"type": "column",
"value": "grad_cohort"
},
{
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
8
... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O"
] |
541 | student_club | bird:dev.json:1417 | List out the type of events which have remaining budget more than 30 USD. | SELECT T1.type FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T2.remaining > 30 | [
"List",
"out",
"the",
"type",
"of",
"events",
"which",
"have",
"remaining",
"budget",
"more",
"than",
"30",
"USD",
"."
] | [
{
"id": 6,
"type": "column",
"value": "link_to_event"
},
{
"id": 3,
"type": "column",
"value": "remaining"
},
{
"id": 5,
"type": "column",
"value": "event_id"
},
{
"id": 2,
"type": "table",
"value": "budget"
},
{
"id": 1,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
542 | roller_coaster | spider:train_spider.json:6206 | List the names of countries whose language is not "German". | SELECT Name FROM country WHERE Languages != "German" | [
"List",
"the",
"names",
"of",
"countries",
"whose",
"language",
"is",
"not",
"\"",
"German",
"\"",
"."
] | [
{
"id": 2,
"type": "column",
"value": "languages"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 3,
"type": "column",
"value": "German"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
543 | pilot_1 | bird:test.json:1123 | What are the planes owned by pilot Smith with age 41? | SELECT plane_name FROM pilotskills WHERE pilot_name = 'Smith' AND age = 41 | [
"What",
"are",
"the",
"planes",
"owned",
"by",
"pilot",
"Smith",
"with",
"age",
"41",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 1,
"type": "column",
"value": "plane_name"
},
{
"id": 2,
"type": "column",
"value": "pilot_name"
},
{
"id": 3,
"type": "value",
"value": "Smith"
},
{
"id": 4,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
544 | icfp_1 | spider:train_spider.json:2873 | What is the name of the institution the author "Katsuhiro Ueno" belongs to? | SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Katsuhiro" AND t1.lname = "Ueno" | [
"What",
"is",
"the",
"name",
"of",
"the",
"institution",
"the",
"author",
"\"",
"Katsuhiro",
"Ueno",
"\"",
"belongs",
"to",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "authorship"
},
{
"id": 6,
"type": "column",
"value": "Katsuhiro"
},
{
"id": 2,
"type": "table",
"value": "authors"
},
{
"id": 4,
"type": "column",
"value": "instid"
},
{
"id": 9,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"... | [
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
545 | shooting | bird:train.json:2481 | How many people were injured between 2006 and 2014 as a result of a handgun? | SELECT COUNT(location) FROM incidents WHERE subject_weapon = 'Handgun' AND subject_statuses = 'Injured' AND date BETWEEN '2006-01-01' AND '2013-12-31' | [
"How",
"many",
"people",
"were",
"injured",
"between",
"2006",
"and",
"2014",
"as",
"a",
"result",
"of",
"a",
"handgun",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "subject_statuses"
},
{
"id": 2,
"type": "column",
"value": "subject_weapon"
},
{
"id": 7,
"type": "value",
"value": "2006-01-01"
},
{
"id": 8,
"type": "value",
"value": "2013-12-31"
},
{
"id": 0,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
4
... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
546 | book_press | bird:test.json:2003 | Find the title, author name, and publisher name for the top 3 best sales books. | SELECT t1.name , t2.title , t3.name FROM author AS t1 JOIN book AS t2 ON t1.author_id = t2.author_id JOIN press AS t3 ON t2.press_id = t3.press_id ORDER BY t2.sale_amount DESC LIMIT 3 | [
"Find",
"the",
"title",
",",
"author",
"name",
",",
"and",
"publisher",
"name",
"for",
"the",
"top",
"3",
"best",
"sales",
"books",
"."
] | [
{
"id": 3,
"type": "column",
"value": "sale_amount"
},
{
"id": 7,
"type": "column",
"value": "author_id"
},
{
"id": 6,
"type": "column",
"value": "press_id"
},
{
"id": 4,
"type": "table",
"value": "author"
},
{
"id": 1,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
547 | world | bird:train.json:7888 | What is the GNP growth rate by the country of Shanghai? | SELECT CAST((T1.GNP - T1.GNPOld) AS REAL) / T1.GNPOld FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Shanghai' | [
"What",
"is",
"the",
"GNP",
"growth",
"rate",
"by",
"the",
"country",
"of",
"Shanghai",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "countrycode"
},
{
"id": 3,
"type": "value",
"value": "Shanghai"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 4,
"type": "column",
"value": "gnpold"
},
{
"id": 1,
"type": "table",
"value... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
548 | formula_1 | bird:dev.json:846 | Please list the reference names of the drivers who are eliminated in the first period in race number 20. | SELECT T2.driverRef FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 20 ORDER BY T1.q1 DESC LIMIT 5 | [
"Please",
"list",
"the",
"reference",
"names",
"of",
"the",
"drivers",
"who",
"are",
"eliminated",
"in",
"the",
"first",
"period",
"in",
"race",
"number",
"20",
"."
] | [
{
"id": 1,
"type": "table",
"value": "qualifying"
},
{
"id": 0,
"type": "column",
"value": "driverref"
},
{
"id": 6,
"type": "column",
"value": "driverid"
},
{
"id": 2,
"type": "table",
"value": "drivers"
},
{
"id": 3,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
18
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
549 | wine_1 | spider:train_spider.json:6538 | Count the number of wines produced at Robert Biale winery. | SELECT count(*) FROM WINE WHERE Winery = "Robert Biale" | [
"Count",
"the",
"number",
"of",
"wines",
"produced",
"at",
"Robert",
"Biale",
"winery",
"."
] | [
{
"id": 2,
"type": "column",
"value": "Robert Biale"
},
{
"id": 1,
"type": "column",
"value": "winery"
},
{
"id": 0,
"type": "table",
"value": "wine"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O"
] |
550 | social_media | bird:train.json:829 | Write down the tweet text posted from Rawang, Selangor, Malaysia. | SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.City = 'Rawang' AND T2.State = 'Selangor' AND T2.Country = 'Malaysia' | [
"Write",
"down",
"the",
"tweet",
"text",
"posted",
"from",
"Rawang",
",",
"Selangor",
",",
"Malaysia",
"."
] | [
{
"id": 3,
"type": "column",
"value": "locationid"
},
{
"id": 2,
"type": "table",
"value": "location"
},
{
"id": 7,
"type": "value",
"value": "Selangor"
},
{
"id": 9,
"type": "value",
"value": "Malaysia"
},
{
"id": 1,
"type": "table",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
0
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
551 | works_cycles | bird:train.json:7305 | What is the average selling price of different vendors of the product Hex Nut 5? | SELECT SUM(T1.StandardPrice) / COUNT(T1.BusinessEntityID) FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Hex Nut 5' | [
"What",
"is",
"the",
"average",
"selling",
"price",
"of",
"different",
"vendors",
"of",
"the",
"product",
"Hex",
"Nut",
"5",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "businessentityid"
},
{
"id": 0,
"type": "table",
"value": "productvendor"
},
{
"id": 5,
"type": "column",
"value": "standardprice"
},
{
"id": 3,
"type": "value",
"value": "Hex Nut 5"
},
{
"id": 4,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12,
13,
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
552 | car_retails | bird:train.json:1602 | To whom does the employee have to inform that is the sales representative of the French customer? | SELECT T1.reportsTo FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber WHERE T2.country = 'France' | [
"To",
"whom",
"does",
"the",
"employee",
"have",
"to",
"inform",
"that",
"is",
"the",
"sales",
"representative",
"of",
"the",
"French",
"customer",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "salesrepemployeenumber"
},
{
"id": 5,
"type": "column",
"value": "employeenumber"
},
{
"id": 0,
"type": "column",
"value": "reportsto"
},
{
"id": 1,
"type": "table",
"value": "employees"
},
{
"id": 2,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
553 | book_press | bird:test.json:2014 | Which authors have never published under the "Accor" press? Give me their names. | SELECT name FROM author EXCEPT SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id = t2.author_id JOIN press AS t3 ON t2.press_id = t3.press_id WHERE t3.name = 'Accor' | [
"Which",
"authors",
"have",
"never",
"published",
"under",
"the",
"\"",
"Accor",
"\"",
"press",
"?",
"Give",
"me",
"their",
"names",
"."
] | [
{
"id": 6,
"type": "column",
"value": "author_id"
},
{
"id": 5,
"type": "column",
"value": "press_id"
},
{
"id": 0,
"type": "table",
"value": "author"
},
{
"id": 2,
"type": "table",
"value": "press"
},
{
"id": 3,
"type": "value",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
554 | shakespeare | bird:train.json:3058 | What is the chapter description where the paragraph "What, wilt thou hear some music, my sweet love?" belongs? | SELECT T1.id, T1.Description FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id WHERE T2.PlainText = 'What, wilt thou hear some music, my sweet love?' | [
"What",
"is",
"the",
"chapter",
"description",
"where",
"the",
"paragraph",
"\"",
"What",
",",
"wilt",
"thou",
"hear",
"some",
"music",
",",
"my",
"sweet",
"love",
"?",
"\"",
"belongs",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "What, wilt thou hear some music, my sweet love?"
},
{
"id": 1,
"type": "column",
"value": "description"
},
{
"id": 3,
"type": "table",
"value": "paragraphs"
},
{
"id": 6,
"type": "column",
"value": "chapter_id"
},
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O"
] |
555 | hospital_1 | spider:train_spider.json:3935 | How many rooms are located for each block code? | SELECT count(*) , T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode | [
"How",
"many",
"rooms",
"are",
"located",
"for",
"each",
"block",
"code",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "blockfloor"
},
{
"id": 0,
"type": "column",
"value": "blockcode"
},
{
"id": 1,
"type": "table",
"value": "block"
},
{
"id": 2,
"type": "table",
"value": "room"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
556 | debit_card_specializing | bird:dev.json:1518 | For the deal happened at 2012/8/24 12:42:00, which country was it? | SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-24' AND T1.Time = '12:42:00' | [
"For",
"the",
"deal",
"happened",
"at",
"2012/8/24",
"12:42:00",
",",
"which",
"country",
"was",
"it",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "transactions_1k"
},
{
"id": 3,
"type": "column",
"value": "gasstationid"
},
{
"id": 2,
"type": "table",
"value": "gasstations"
},
{
"id": 5,
"type": "value",
"value": "2012-08-24"
},
{
"id": 7,
"type": "val... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
557 | pilot_1 | bird:test.json:1154 | Return the average age of pilots for each plane name. | SELECT avg(age) , plane_name FROM pilotskills GROUP BY plane_name | [
"Return",
"the",
"average",
"age",
"of",
"pilots",
"for",
"each",
"plane",
"name",
"."
] | [
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 1,
"type": "column",
"value": "plane_name"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
8,
9
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
558 | financial | bird:dev.json:110 | What is the disposition id of the client who made 5100 USD transaction in 1998/9/2? | SELECT T1.disp_id FROM disp AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.date='1997-08-20' AND T3.amount = 5100 | [
"What",
"is",
"the",
"disposition",
"i",
"d",
"of",
"the",
"client",
"who",
"made",
"5100",
"USD",
"transaction",
"in",
"1998/9/2",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "account_id"
},
{
"id": 6,
"type": "value",
"value": "1997-08-20"
},
{
"id": 0,
"type": "column",
"value": "disp_id"
},
{
"id": 3,
"type": "table",
"value": "account"
},
{
"id": 7,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
559 | tv_shows | bird:test.json:139 | List the station names of city channels whose affiliation is not "ABC". | SELECT Station_name FROM city_channel WHERE Affiliation != "ABC" | [
"List",
"the",
"station",
"names",
"of",
"city",
"channels",
"whose",
"affiliation",
"is",
"not",
"\"",
"ABC",
"\"",
"."
] | [
{
"id": 0,
"type": "table",
"value": "city_channel"
},
{
"id": 1,
"type": "column",
"value": "station_name"
},
{
"id": 2,
"type": "column",
"value": "affiliation"
},
{
"id": 3,
"type": "column",
"value": "ABC"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5,
6
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
560 | driving_school | spider:train_spider.json:6695 | What are the first and last names of all customers with more than 2 payments? | SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2; | [
"What",
"are",
"the",
"first",
"and",
"last",
"names",
"of",
"all",
"customers",
"with",
"more",
"than",
"2",
"payments",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "customer_payments"
},
{
"id": 0,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 2,
"type": "column",
"value": "last_name"
},
{
"id": 4,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
561 | european_football_2 | bird:dev.json:1083 | Which player has the strongest overall strength? | SELECT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t2.overall_rating DESC LIMIT 1 | [
"Which",
"player",
"has",
"the",
"strongest",
"overall",
"strength",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "player_attributes"
},
{
"id": 3,
"type": "column",
"value": "overall_rating"
},
{
"id": 4,
"type": "column",
"value": "player_api_id"
},
{
"id": 0,
"type": "column",
"value": "player_name"
},
{
"id": 1,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"en... | [
"O",
"B-TABLE",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O"
] |
562 | food_inspection | bird:train.json:8825 | Provide eateries' IDs, risk categories and descriptions with violation ID of 103101. | SELECT business_id, risk_category, description FROM violations WHERE violation_type_id = '103101' | [
"Provide",
"eateries",
"'",
"IDs",
",",
"risk",
"categories",
"and",
"descriptions",
"with",
"violation",
"ID",
"of",
"103101",
"."
] | [
{
"id": 4,
"type": "column",
"value": "violation_type_id"
},
{
"id": 2,
"type": "column",
"value": "risk_category"
},
{
"id": 1,
"type": "column",
"value": "business_id"
},
{
"id": 3,
"type": "column",
"value": "description"
},
{
"id": 0,
"type... | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
563 | body_builder | spider:train_spider.json:1173 | What is the minimum snatch score? | SELECT min(snatch) FROM body_builder | [
"What",
"is",
"the",
"minimum",
"snatch",
"score",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "body_builder"
},
{
"id": 1,
"type": "column",
"value": "snatch"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
564 | soccer_3 | bird:test.json:4 | What are the managers and captains of clubs? | SELECT Manager , Captain FROM club | [
"What",
"are",
"the",
"managers",
"and",
"captains",
"of",
"clubs",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "manager"
},
{
"id": 2,
"type": "column",
"value": "captain"
},
{
"id": 0,
"type": "table",
"value": "club"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"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",
"B-TABLE",
"O"
] |
565 | assets_maintenance | spider:train_spider.json:3146 | Which staff have contacted which engineers? List the staff name and the engineer first name and last name. | SELECT T1.staff_name , T3.first_name , T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id | [
"Which",
"staff",
"have",
"contacted",
"which",
"engineers",
"?",
"List",
"the",
"staff",
"name",
"and",
"the",
"engineer",
"first",
"name",
"and",
"last",
"name",
"."
] | [
{
"id": 3,
"type": "table",
"value": "maintenance_engineers"
},
{
"id": 8,
"type": "column",
"value": "contact_staff_id"
},
{
"id": 5,
"type": "table",
"value": "engineer_visits"
},
{
"id": 6,
"type": "column",
"value": "engineer_id"
},
{
"id": 0,
... | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
14,
15
]
},
{
"entity_id": 2,
"token_idxs": [
17,
18
]
},
{
"entity_id": 3,
"token_idxs": [
11,
12
]
},
{
"entity_id": 4,
"tok... | [
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
566 | tracking_orders | spider:train_spider.json:6935 | Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25. | SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25" | [
"Find",
"the",
"distinct",
"details",
"of",
"invoices",
"which",
"are",
"created",
"before",
"1989",
"-",
"09",
"-",
"03",
"or",
"after",
"2007",
"-",
"12",
"-",
"25",
"."
] | [
{
"id": 1,
"type": "column",
"value": "invoice_details"
},
{
"id": 2,
"type": "column",
"value": "invoice_date"
},
{
"id": 3,
"type": "column",
"value": "1989-09-03"
},
{
"id": 4,
"type": "column",
"value": "2007-12-25"
},
{
"id": 0,
"type": "t... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
11,
12,
13,
14
]
},
{
"entity_id": 4,
"token_idxs": [
1... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
567 | soccer_2016 | bird:train.json:1921 | How many games were not won by runs? | SELECT SUM(CASE WHEN T2.Win_Type != 'runs' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id | [
"How",
"many",
"games",
"were",
"not",
"won",
"by",
"runs",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "win_type"
},
{
"id": 1,
"type": "table",
"value": "win_by"
},
{
"id": 3,
"type": "column",
"value": "win_id"
},
{
"id": 0,
"type": "table",
"value": "Match"
},
{
"id": 6,
"type": "value",
"value": "run... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-VALUE",
"O"
] |
568 | musical | spider:train_spider.json:236 | List the name of actors in ascending alphabetical order. | SELECT Name FROM actor ORDER BY Name ASC | [
"List",
"the",
"name",
"of",
"actors",
"in",
"ascending",
"alphabetical",
"order",
"."
] | [
{
"id": 0,
"type": "table",
"value": "actor"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
569 | debit_card_specializing | bird:dev.json:1473 | What was the average monthly consumption of customers in SME for the year 2013? | SELECT AVG(T2.Consumption) / 12 FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE SUBSTR(T2.Date, 1, 4) = '2013' AND T1.Segment = 'SME' | [
"What",
"was",
"the",
"average",
"monthly",
"consumption",
"of",
"customers",
"in",
"SME",
"for",
"the",
"year",
"2013",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "consumption"
},
{
"id": 3,
"type": "column",
"value": "customerid"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 1,
"type": "table",
"value": "yearmonth"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
570 | movie_2 | bird:test.json:1844 | What are the names of all cinemas not showing any movies? | SELECT DISTINCT name FROM MovieTheaters WHERE Movie = 'null' | [
"What",
"are",
"the",
"names",
"of",
"all",
"cinemas",
"not",
"showing",
"any",
"movies",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "movietheaters"
},
{
"id": 2,
"type": "column",
"value": "movie"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": "null"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
571 | allergy_1 | spider:train_spider.json:481 | How many students live in HKG or CHI? | SELECT count(*) FROM Student WHERE city_code = "HKG" OR city_code = "CHI" | [
"How",
"many",
"students",
"live",
"in",
"HKG",
"or",
"CHI",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "city_code"
},
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 2,
"type": "column",
"value": "HKG"
},
{
"id": 3,
"type": "column",
"value": "CHI"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
572 | thrombosis_prediction | bird:dev.json:1149 | Are there more in-patient or outpatient who were male? What is the deviation in percentage? | SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) FROM Patient WHERE SEX = 'M' | [
"Are",
"there",
"more",
"in",
"-",
"patient",
"or",
"outpatient",
"who",
"were",
"male",
"?",
"What",
"is",
"the",
"deviation",
"in",
"percentage",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "admission"
},
{
"id": 0,
"type": "table",
"value": "patient"
},
{
"id": 1,
"type": "column",
"value": "sex"
},
{
"id": 3,
"type": "value",
"value": "100"
},
{
"id": 2,
"type": "value",
"value": "M"
}... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
573 | ship_1 | spider:train_spider.json:6235 | What are the names of captains that have either the rank Midshipman or Lieutenant? | SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant' | [
"What",
"are",
"the",
"names",
"of",
"captains",
"that",
"have",
"either",
"the",
"rank",
"Midshipman",
"or",
"Lieutenant",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Midshipman"
},
{
"id": 4,
"type": "value",
"value": "Lieutenant"
},
{
"id": 0,
"type": "table",
"value": "captain"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
574 | student_assessment | spider:train_spider.json:75 | Find id of the candidate who most recently accessed the course? | SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1 | [
"Find",
"i",
"d",
"of",
"the",
"candidate",
"who",
"most",
"recently",
"accessed",
"the",
"course",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "candidate_assessments"
},
{
"id": 2,
"type": "column",
"value": "assessment_date"
},
{
"id": 1,
"type": "column",
"value": "candidate_id"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
575 | public_review_platform | bird:train.json:3851 | How many Yelp_Businesses do not provide alcohol? | SELECT COUNT(T1.attribute_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name LIKE 'Alcohol' AND T2.attribute_value LIKE 'none' | [
"How",
"many",
"Yelp_Businesses",
"do",
"not",
"provide",
"alcohol",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "business_attributes"
},
{
"id": 5,
"type": "column",
"value": "attribute_value"
},
{
"id": 3,
"type": "column",
"value": "attribute_name"
},
{
"id": 2,
"type": "column",
"value": "attribute_id"
},
{
"id": 0,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
576 | public_review_platform | bird:train.json:3938 | What city does the business have a business hour from 10 am to 12 pm on Sunday? | SELECT T1.city FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.opening_time LIKE '10AM' AND T2.closing_time LIKE '12PM' AND T3.day_of_week LIKE 'Sunday' | [
"What",
"city",
"does",
"the",
"business",
"have",
"a",
"business",
"hour",
"from",
"10",
"am",
"to",
"12",
"pm",
"on",
"Sunday",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "business_hours"
},
{
"id": 5,
"type": "column",
"value": "opening_time"
},
{
"id": 7,
"type": "column",
"value": "closing_time"
},
{
"id": 9,
"type": "column",
"value": "day_of_week"
},
{
"id": 11,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-TABLE",
"O"
] |
577 | cre_Students_Information_Systems | bird:test.json:474 | What are the date and detail of each transcript? | SELECT date_of_transcript , transcript_details FROM Transcripts | [
"What",
"are",
"the",
"date",
"and",
"detail",
"of",
"each",
"transcript",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "date_of_transcript"
},
{
"id": 2,
"type": "column",
"value": "transcript_details"
},
{
"id": 0,
"type": "table",
"value": "transcripts"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
578 | mental_health_survey | bird:train.json:4609 | How many users answered the question "Overall, how much importance does your employer place on physical health?"? | SELECT COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext LIKE 'Overall, how much importance does your employer place on physical health?' | [
"How",
"many",
"users",
"answered",
"the",
"question",
"\"",
"Overall",
",",
"how",
"much",
"importance",
"does",
"your",
"employer",
"place",
"on",
"physical",
"health",
"?",
"\"",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Overall, how much importance does your employer place on physical health?"
},
{
"id": 2,
"type": "column",
"value": "questiontext"
},
{
"id": 5,
"type": "column",
"value": "questionid"
},
{
"id": 1,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
579 | sports_competition | spider:train_spider.json:3344 | What are the types of every competition and in which countries are they located? | SELECT Competition_type , Country FROM competition | [
"What",
"are",
"the",
"types",
"of",
"every",
"competition",
"and",
"in",
"which",
"countries",
"are",
"they",
"located",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "competition_type"
},
{
"id": 0,
"type": "table",
"value": "competition"
},
{
"id": 2,
"type": "column",
"value": "country"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
580 | network_2 | spider:train_spider.json:4426 | What is minimum age for different job title? | SELECT min(age) , job FROM Person GROUP BY job | [
"What",
"is",
"minimum",
"age",
"for",
"different",
"job",
"title",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "person"
},
{
"id": 1,
"type": "column",
"value": "job"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
581 | hospital_1 | spider:train_spider.json:3916 | What is the name of the patient who made the most recent appointment? | SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"patient",
"who",
"made",
"the",
"most",
"recent",
"appointment",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "appointment"
},
{
"id": 1,
"type": "table",
"value": "patient"
},
{
"id": 5,
"type": "column",
"value": "patient"
},
{
"id": 3,
"type": "column",
"value": "start"
},
{
"id": 0,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
582 | hr_1 | spider:train_spider.json:3528 | What are full names and salaries of employees working in the city of London? | SELECT first_name , last_name , salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London' | [
"What",
"are",
"full",
"names",
"and",
"salaries",
"of",
"employees",
"working",
"in",
"the",
"city",
"of",
"London",
"?"
] | [
{
"id": 9,
"type": "column",
"value": "department_id"
},
{
"id": 7,
"type": "table",
"value": "departments"
},
{
"id": 8,
"type": "column",
"value": "location_id"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 1,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
583 | menu | bird:train.json:5568 | Among the menu pages of "Ritz Carlton", how many of them have a width of over 1000? | SELECT SUM(CASE WHEN T1.name = 'Ritz Carlton' THEN 1 ELSE 0 END) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.full_width > 1000 | [
"Among",
"the",
"menu",
"pages",
"of",
"\"",
"Ritz",
"Carlton",
"\"",
",",
"how",
"many",
"of",
"them",
"have",
"a",
"width",
"of",
"over",
"1000",
"?"
] | [
{
"id": 9,
"type": "value",
"value": "Ritz Carlton"
},
{
"id": 2,
"type": "column",
"value": "full_width"
},
{
"id": 1,
"type": "table",
"value": "menupage"
},
{
"id": 5,
"type": "column",
"value": "menu_id"
},
{
"id": 0,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": [
19
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
584 | authors | bird:train.json:3607 | How many authors is affiliated to the organization "Otterbein University"? | SELECT COUNT(Name) FROM Author WHERE Affiliation = 'Otterbein University' | [
"How",
"many",
"authors",
"is",
"affiliated",
"to",
"the",
"organization",
"\"",
"Otterbein",
"University",
"\"",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "Otterbein University"
},
{
"id": 1,
"type": "column",
"value": "affiliation"
},
{
"id": 0,
"type": "table",
"value": "author"
},
{
"id": 3,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
585 | formula_1 | spider:train_spider.json:2170 | What is the id, first name, and last name of the driver who was in the first position for laptime at least twice? | SELECT T1.driverid , T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING count(*) >= 2 | [
"What",
"is",
"the",
"i",
"d",
",",
"first",
"name",
",",
"and",
"last",
"name",
"of",
"the",
"driver",
"who",
"was",
"in",
"the",
"first",
"position",
"for",
"laptime",
"at",
"least",
"twice",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "driverid"
},
{
"id": 1,
"type": "column",
"value": "forename"
},
{
"id": 4,
"type": "table",
"value": "laptimes"
},
{
"id": 5,
"type": "column",
"value": "position"
},
{
"id": 2,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
22
]
},
{
"enti... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
586 | law_episode | bird:train.json:1320 | Write down the organization, year, award, and award category in which Rene Balcer is the winner. | SELECT T2.organization, T2.year, T2.award, T2.award_category FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T1.name = 'Rene Balcer' AND T2.result = 'Winner' | [
"Write",
"down",
"the",
"organization",
",",
"year",
",",
"award",
",",
"and",
"award",
"category",
"in",
"which",
"Rene",
"Balcer",
"is",
"the",
"winner",
"."
] | [
{
"id": 3,
"type": "column",
"value": "award_category"
},
{
"id": 0,
"type": "column",
"value": "organization"
},
{
"id": 8,
"type": "value",
"value": "Rene Balcer"
},
{
"id": 6,
"type": "column",
"value": "person_id"
},
{
"id": 4,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
587 | protein_institute | spider:train_spider.json:1926 | How many proteins are associated with an institution founded after 1880 or an institution with type "Private"? | SELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1880 OR T1.type = 'Private' | [
"How",
"many",
"proteins",
"are",
"associated",
"with",
"an",
"institution",
"founded",
"after",
"1880",
"or",
"an",
"institution",
"with",
"type",
"\"",
"Private",
"\"",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "institution_id"
},
{
"id": 0,
"type": "table",
"value": "institution"
},
{
"id": 1,
"type": "table",
"value": "protein"
},
{
"id": 3,
"type": "column",
"value": "founded"
},
{
"id": 6,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
588 | formula_1 | spider:train_spider.json:2210 | What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races? | SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) = 11 INTERSECT SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5 | [
"What",
"are",
"the",
"last",
"names",
"and",
"ids",
"of",
"all",
"drivers",
"who",
"had",
"11",
"pit",
"stops",
"and",
"participated",
"in",
"more",
"than",
"5",
"races",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "driverid"
},
{
"id": 3,
"type": "table",
"value": "pitstops"
},
{
"id": 1,
"type": "column",
"value": "surname"
},
{
"id": 2,
"type": "table",
"value": "drivers"
},
{
"id": 5,
"type": "table",
"value":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
13,
14
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
589 | match_season | spider:train_spider.json:1094 | Return all players sorted by college in ascending alphabetical order. | SELECT player FROM match_season ORDER BY College ASC | [
"Return",
"all",
"players",
"sorted",
"by",
"college",
"in",
"ascending",
"alphabetical",
"order",
"."
] | [
{
"id": 0,
"type": "table",
"value": "match_season"
},
{
"id": 2,
"type": "column",
"value": "college"
},
{
"id": 1,
"type": "column",
"value": "player"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"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-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
591 | mondial_geo | bird:train.json:8395 | Which two countries have the border in length of 803 km? Give the full names of the countries. | SELECT T1.Name, T3.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 WHERE T2.Length = 803 | [
"Which",
"two",
"countries",
"have",
"the",
"border",
"in",
"length",
"of",
"803",
"km",
"?",
"Give",
"the",
"full",
"names",
"of",
"the",
"countries",
"."
] | [
{
"id": 6,
"type": "column",
"value": "country2"
},
{
"id": 7,
"type": "column",
"value": "country1"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 4,
"type": "table",
"value": "borders"
},
{
"id": 2,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
592 | retails | bird:train.json:6714 | How many suppliers are from Japan? | SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'JAPAN' | [
"How",
"many",
"suppliers",
"are",
"from",
"Japan",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "c_nationkey"
},
{
"id": 6,
"type": "column",
"value": "n_nationkey"
},
{
"id": 4,
"type": "column",
"value": "c_custkey"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
593 | address | bird:train.json:5216 | Among the cities with alias Ponce, what is the percentage of cities with a country level FIPS code of less than 20? | SELECT CAST(COUNT(CASE WHEN T2.county_fips < 20 THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'Ponce' | [
"Among",
"the",
"cities",
"with",
"alias",
"Ponce",
",",
"what",
"is",
"the",
"percentage",
"of",
"cities",
"with",
"a",
"country",
"level",
"FIPS",
"code",
"of",
"less",
"than",
"20",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "county_fips"
},
{
"id": 1,
"type": "table",
"value": "zip_data"
},
{
"id": 4,
"type": "column",
"value": "zip_code"
},
{
"id": 0,
"type": "table",
"value": "alias"
},
{
"id": 2,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
17,
18
]
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
594 | college_1 | spider:train_spider.json:3188 | Where is the history department? | SELECT dept_address FROM department WHERE dept_name = 'History' | [
"Where",
"is",
"the",
"history",
"department",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "dept_address"
},
{
"id": 0,
"type": "table",
"value": "department"
},
{
"id": 2,
"type": "column",
"value": "dept_name"
},
{
"id": 3,
"type": "value",
"value": "History"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
595 | cinema | spider:train_spider.json:1954 | What are the title and director of the films without any schedule? | SELECT title , directed_by FROM film WHERE film_id NOT IN (SELECT film_id FROM schedule) | [
"What",
"are",
"the",
"title",
"and",
"director",
"of",
"the",
"films",
"without",
"any",
"schedule",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "directed_by"
},
{
"id": 4,
"type": "table",
"value": "schedule"
},
{
"id": 3,
"type": "column",
"value": "film_id"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 0,
"type": "table",
"value... | [
{
"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": [
11
]
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O"
] |
596 | customers_and_orders | bird:test.json:285 | Show the id and the product type for all products, order by product name. | SELECT product_id , product_type_code FROM Products ORDER BY product_name | [
"Show",
"the",
"i",
"d",
"and",
"the",
"product",
"type",
"for",
"all",
"products",
",",
"order",
"by",
"product",
"name",
"."
] | [
{
"id": 2,
"type": "column",
"value": "product_type_code"
},
{
"id": 3,
"type": "column",
"value": "product_name"
},
{
"id": 1,
"type": "column",
"value": "product_id"
},
{
"id": 0,
"type": "table",
"value": "products"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
14,
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
597 | retail_complains | bird:train.json:398 | List the product reviewed with 1 star on March 14, 2016 from Newton, Massachusetts. | SELECT T2.Product FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T1.city = 'Newton' AND T1.state_abbrev = 'MA' AND T2.Date = '2016-03-14' AND T2.Stars = 1 | [
"List",
"the",
"product",
"reviewed",
"with",
"1",
"star",
"on",
"March",
"14",
",",
"2016",
"from",
"Newton",
",",
"Massachusetts",
"."
] | [
{
"id": 6,
"type": "column",
"value": "state_abbrev"
},
{
"id": 3,
"type": "column",
"value": "district_id"
},
{
"id": 9,
"type": "value",
"value": "2016-03-14"
},
{
"id": 1,
"type": "table",
"value": "district"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
598 | store_product | spider:train_spider.json:4938 | Find the name of the products that are not using the most frequently-used max page size. | SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1) | [
"Find",
"the",
"name",
"of",
"the",
"products",
"that",
"are",
"not",
"using",
"the",
"most",
"frequently",
"-",
"used",
"max",
"page",
"size",
"."
] | [
{
"id": 2,
"type": "column",
"value": "max_page_size"
},
{
"id": 0,
"type": "table",
"value": "product"
},
{
"id": 1,
"type": "column",
"value": "product"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
15,
16,
17
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": ... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
599 | books | bird:train.json:6002 | How many of the customer addresses are inactive? | SELECT COUNT(*) FROM customer_address AS T1 INNER JOIN address_status AS T2 ON T1.status_id = T2.status_id WHERE T2.address_status = 'Inactive' | [
"How",
"many",
"of",
"the",
"customer",
"addresses",
"are",
"inactive",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "customer_address"
},
{
"id": 1,
"type": "table",
"value": "address_status"
},
{
"id": 2,
"type": "column",
"value": "address_status"
},
{
"id": 4,
"type": "column",
"value": "status_id"
},
{
"id": 3,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
600 | movie_platform | bird:train.json:149 | Among all movies in the list, calculate the percentage of movies that were never been rated? | SELECT CAST(SUM(CASE WHEN T2.movie_id IS NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.movie_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id | [
"Among",
"all",
"movies",
"in",
"the",
"list",
",",
"calculate",
"the",
"percentage",
"of",
"movies",
"that",
"were",
"never",
"been",
"rated",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "movie_id"
},
{
"id": 0,
"type": "table",
"value": "ratings"
},
{
"id": 1,
"type": "table",
"value": "movies"
},
{
"id": 3,
"type": "value",
"value": "100"
},
{
"id": 4,
"type": "value",
"value": "0"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
601 | cars | bird:train.json:3069 | Please list the names of all the car models whose origin country is the USA. | SELECT DISTINCT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T2.country = T3.origin WHERE T3.country = 'USA' | [
"Please",
"list",
"the",
"names",
"of",
"all",
"the",
"car",
"models",
"whose",
"origin",
"country",
"is",
"the",
"USA",
"."
] | [
{
"id": 5,
"type": "table",
"value": "production"
},
{
"id": 0,
"type": "column",
"value": "car_name"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 2,
"type": "column",
"value": "country"
},
{
"id": 6,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
602 | works_cycles | bird:train.json:7270 | What is the full name of the sales person who has the the highest commission percent received per sale? | SELECT T2.FirstName, T2.MiddleName, T2.LastName FROM SalesPerson AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T1.CommissionPct DESC LIMIT 1 | [
"What",
"is",
"the",
"full",
"name",
"of",
"the",
"sales",
"person",
"who",
"has",
"the",
"the",
"highest",
"commission",
"percent",
"received",
"per",
"sale",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "businessentityid"
},
{
"id": 5,
"type": "column",
"value": "commissionpct"
},
{
"id": 3,
"type": "table",
"value": "salesperson"
},
{
"id": 1,
"type": "column",
"value": "middlename"
},
{
"id": 0,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
603 | movie_platform | bird:train.json:94 | Please list the names of the top three movies in the number of likes related to the critic made by the user rating the movie. | SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_likes DESC LIMIT 3 | [
"Please",
"list",
"the",
"names",
"of",
"the",
"top",
"three",
"movies",
"in",
"the",
"number",
"of",
"likes",
"related",
"to",
"the",
"critic",
"made",
"by",
"the",
"user",
"rating",
"the",
"movie",
"."
] | [
{
"id": 3,
"type": "column",
"value": "critic_likes"
},
{
"id": 0,
"type": "column",
"value": "movie_title"
},
{
"id": 4,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"type": "table",
"value": "ratings"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
9,
10
]
},
{
"entity_id": 1,
"token_idxs": [
22
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": [
24
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O"
] |
604 | movie_3 | bird:train.json:9409 | What are the titles of the films starred by Russell Close? | SELECT T3.title 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 T2.first_name = 'Russell' AND T2.last_name = 'Close' | [
"What",
"are",
"the",
"titles",
"of",
"the",
"films",
"starred",
"by",
"Russell",
"Close",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "film_actor"
},
{
"id": 5,
"type": "column",
"value": "first_name"
},
{
"id": 7,
"type": "column",
"value": "last_name"
},
{
"id": 9,
"type": "column",
"value": "actor_id"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
605 | retail_world | bird:train.json:6383 | What is the average price of products with more than fifty units in stock? | SELECT SUM(UnitPrice) / COUNT(UnitPrice) FROM Products WHERE UnitsInStock > 50 | [
"What",
"is",
"the",
"average",
"price",
"of",
"products",
"with",
"more",
"than",
"fifty",
"units",
"in",
"stock",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "unitsinstock"
},
{
"id": 3,
"type": "column",
"value": "unitprice"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 2,
"type": "value",
"value": "50"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
11,
12,
13
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
606 | company_employee | spider:train_spider.json:4111 | list the names of the companies with more than 200 sales in the descending order of sales and profits. | SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion , Profits_in_Billion DESC | [
"list",
"the",
"names",
"of",
"the",
"companies",
"with",
"more",
"than",
"200",
"sales",
"in",
"the",
"descending",
"order",
"of",
"sales",
"and",
"profits",
"."
] | [
{
"id": 4,
"type": "column",
"value": "profits_in_billion"
},
{
"id": 2,
"type": "column",
"value": "sales_in_billion"
},
{
"id": 0,
"type": "table",
"value": "company"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "valu... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
10,
11
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
607 | movie_1 | spider:train_spider.json:2512 | Find the names of reviewers who had given higher than 3 star ratings. | SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3 | [
"Find",
"the",
"names",
"of",
"reviewers",
"who",
"had",
"given",
"higher",
"than",
"3",
"star",
"ratings",
"."
] | [
{
"id": 2,
"type": "table",
"value": "reviewer"
},
{
"id": 1,
"type": "table",
"value": "rating"
},
{
"id": 3,
"type": "column",
"value": "stars"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "column",
"value": "rid"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"B-TABLE",
"O"
] |
608 | legislator | bird:train.json:4902 | What is the average number of terms served for a current legislator that's famous or impact? | SELECT CAST(COUNT(T2.bioguide) AS REAL) / COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.wikipedia_id IS NOT NULL | [
"What",
"is",
"the",
"average",
"number",
"of",
"terms",
"served",
"for",
"a",
"current",
"legislator",
"that",
"'s",
"famous",
"or",
"impact",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "current-terms"
},
{
"id": 2,
"type": "column",
"value": "wikipedia_id"
},
{
"id": 3,
"type": "column",
"value": "bioguide_id"
},
{
"id": 4,
"type": "column",
"value": "bioguide"
},
{
"id": 0,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
609 | phone_market | spider:train_spider.json:1992 | List the names of phones that are not on any market. | SELECT Name FROM phone WHERE Phone_id NOT IN (SELECT Phone_ID FROM phone_market) | [
"List",
"the",
"names",
"of",
"phones",
"that",
"are",
"not",
"on",
"any",
"market",
"."
] | [
{
"id": 3,
"type": "table",
"value": "phone_market"
},
{
"id": 2,
"type": "column",
"value": "phone_id"
},
{
"id": 0,
"type": "table",
"value": "phone"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
610 | synthea | bird:train.json:1496 | What condition forced Mrs. Joye Homenick to seek medical attention in 2017? | SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Joye' AND T1.last = 'Homenick' AND strftime('%Y', T2.START) = '2017' | [
"What",
"condition",
"forced",
"Mrs.",
"Joye",
"Homenick",
"to",
"seek",
"medical",
"attention",
"in",
"2017",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "description"
},
{
"id": 2,
"type": "table",
"value": "conditions"
},
{
"id": 1,
"type": "table",
"value": "patients"
},
{
"id": 7,
"type": "value",
"value": "Homenick"
},
{
"id": 3,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
611 | retails | bird:train.json:6815 | What is the name of the customer number 93697 with the total order price of 191918.92? | SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice = 191918.92 AND T1.o_custkey = 93697 | [
"What",
"is",
"the",
"name",
"of",
"the",
"customer",
"number",
"93697",
"with",
"the",
"total",
"order",
"price",
"of",
"191918.92",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "o_totalprice"
},
{
"id": 3,
"type": "column",
"value": "o_custkey"
},
{
"id": 4,
"type": "column",
"value": "c_custkey"
},
{
"id": 6,
"type": "value",
"value": "191918.92"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
612 | retail_world | bird:train.json:6392 | List the names of non-US suppliers that have discontinued. | SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country != 'USA' | [
"List",
"the",
"names",
"of",
"non",
"-",
"US",
"suppliers",
"that",
"have",
"discontinued",
"."
] | [
{
"id": 4,
"type": "column",
"value": "discontinued"
},
{
"id": 0,
"type": "column",
"value": "companyname"
},
{
"id": 3,
"type": "column",
"value": "supplierid"
},
{
"id": 2,
"type": "table",
"value": "suppliers"
},
{
"id": 1,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O"
] |
613 | company_employee | spider:train_spider.json:4097 | List the names of companies by ascending number of sales. | SELECT Name FROM company ORDER BY Sales_in_Billion ASC | [
"List",
"the",
"names",
"of",
"companies",
"by",
"ascending",
"number",
"of",
"sales",
"."
] | [
{
"id": 2,
"type": "column",
"value": "sales_in_billion"
},
{
"id": 0,
"type": "table",
"value": "company"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
614 | college_2 | spider:train_spider.json:1385 | What are the names of students and their respective departments, ordered by number of credits from least to greatest? | SELECT name , dept_name FROM student ORDER BY tot_cred | [
"What",
"are",
"the",
"names",
"of",
"students",
"and",
"their",
"respective",
"departments",
",",
"ordered",
"by",
"number",
"of",
"credits",
"from",
"least",
"to",
"greatest",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "dept_name"
},
{
"id": 3,
"type": "column",
"value": "tot_cred"
},
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
615 | aan_1 | bird:test.json:1028 | Count the number of papers Stanford University had between 2000 and 2009. | SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year >= 2000 AND T1.year <= 2009 AND T3.name LIKE "Stanford University" | [
"Count",
"the",
"number",
"of",
"papers",
"Stanford",
"University",
"had",
"between",
"2000",
"and",
"2009",
"."
] | [
{
"id": 9,
"type": "column",
"value": "Stanford University"
},
{
"id": 4,
"type": "column",
"value": "affiliation_id"
},
{
"id": 0,
"type": "table",
"value": "affiliation"
},
{
"id": 3,
"type": "table",
"value": "author_list"
},
{
"id": 1,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
616 | works_cycles | bird:train.json:7307 | Please list the top 3 house-manufactured products with the highest average rating. | SELECT T2.Name FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.MakeFlag = 1 GROUP BY T2.Name ORDER BY SUM(T1.Rating) DESC LIMIT 1 | [
"Please",
"list",
"the",
"top",
"3",
"house",
"-",
"manufactured",
"products",
"with",
"the",
"highest",
"average",
"rating",
"."
] | [
{
"id": 1,
"type": "table",
"value": "productreview"
},
{
"id": 5,
"type": "column",
"value": "productid"
},
{
"id": 3,
"type": "column",
"value": "makeflag"
},
{
"id": 2,
"type": "table",
"value": "product"
},
{
"id": 6,
"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": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
618 | cre_Doc_and_collections | bird:test.json:738 | How many different collections are related to the one named 'Best'? | SELECT count(DISTINCT T1.Related_Collection_ID) FROM Collection_Subset_Members AS T1 JOIN Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T2.Collection_Name = "Best"; | [
"How",
"many",
"different",
"collections",
"are",
"related",
"to",
"the",
"one",
"named",
"'",
"Best",
"'",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "collection_subset_members"
},
{
"id": 4,
"type": "column",
"value": "related_collection_id"
},
{
"id": 2,
"type": "column",
"value": "collection_name"
},
{
"id": 5,
"type": "column",
"value": "collection_id"
},
{
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
619 | college_completion | bird:train.json:3746 | In Harvard University, which year recorded the highest number of first-time, full-time, degree-seeking students in the cohort being tracked, minus any exclusions? | SELECT T2.year FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Harvard University' GROUP BY T2.year ORDER BY SUM(T2.grad_cohort) DESC LIMIT 1 | [
"In",
"Harvard",
"University",
",",
"which",
"year",
"recorded",
"the",
"highest",
"number",
"of",
"first",
"-",
"time",
",",
"full",
"-",
"time",
",",
"degree",
"-",
"seeking",
"students",
"in",
"the",
"cohort",
"being",
"tracked",
",",
"minus",
"any",
... | [
{
"id": 1,
"type": "table",
"value": "institution_details"
},
{
"id": 4,
"type": "value",
"value": "Harvard University"
},
{
"id": 2,
"type": "table",
"value": "institution_grads"
},
{
"id": 6,
"type": "column",
"value": "grad_cohort"
},
{
"id": 3,... | [
{
"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": [
1,
2
]
},
{
"entity_id": 5,
"toke... | [
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
620 | college_2 | spider:train_spider.json:1414 | What is the id of the instructor who advises of all students from History department? | SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History' | [
"What",
"is",
"the",
"i",
"d",
"of",
"the",
"instructor",
"who",
"advises",
"of",
"all",
"students",
"from",
"History",
"department",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "dept_name"
},
{
"id": 1,
"type": "table",
"value": "advisor"
},
{
"id": 2,
"type": "table",
"value": "student"
},
{
"id": 4,
"type": "value",
"value": "History"
},
{
"id": 0,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9,
10
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
621 | legislator | bird:train.json:4880 | How many female representatives served in the state of California for at least 10 years? | SELECT SUM(T3.result) FROM ( SELECT CASE WHEN SUM(CAST(strftime('%Y', T2.`end`) AS int) - CAST(strftime('%Y', T2.start) AS int)) > 10 THEN 1 ELSE 0 END AS result FROM current AS T1 INNER JOIN "current-terms" AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' AND T2.state = 'CA' AND T2.type = 'rep' ) AS T3 | [
"How",
"many",
"female",
"representatives",
"served",
"in",
"the",
"state",
"of",
"California",
"for",
"at",
"least",
"10",
"years",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "current-terms"
},
{
"id": 4,
"type": "column",
"value": "bioguide_id"
},
{
"id": 6,
"type": "column",
"value": "gender_bio"
},
{
"id": 5,
"type": "column",
"value": "bioguide"
},
{
"id": 1,
"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": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
622 | product_catalog | spider:train_spider.json:313 | Find the names and publication dates of all catalogs that have catalog level number greater than 5. | SELECT t1.catalog_name , t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5 | [
"Find",
"the",
"names",
"and",
"publication",
"dates",
"of",
"all",
"catalogs",
"that",
"have",
"catalog",
"level",
"number",
"greater",
"than",
"5",
"."
] | [
{
"id": 4,
"type": "column",
"value": "catalog_level_number"
},
{
"id": 1,
"type": "column",
"value": "date_of_publication"
},
{
"id": 3,
"type": "table",
"value": "catalog_structure"
},
{
"id": 0,
"type": "column",
"value": "catalog_name"
},
{
"id... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
12,
13
]
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
623 | online_exams | bird:test.json:230 | Which types of questions have 3 or more questions? Return the questions type code. | SELECT Type_of_Question_Code FROM Questions GROUP BY Type_of_Question_Code HAVING count(*) >= 3 | [
"Which",
"types",
"of",
"questions",
"have",
"3",
"or",
"more",
"questions",
"?",
"Return",
"the",
"questions",
"type",
"code",
"."
] | [
{
"id": 1,
"type": "column",
"value": "type_of_question_code"
},
{
"id": 0,
"type": "table",
"value": "questions"
},
{
"id": 2,
"type": "value",
"value": "3"
}
] | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
1,
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"e... | [
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
624 | sales | bird:train.json:5458 | How many employees sold over 20,000 quantities of "Touring-2000 Blue, 50"? | SELECT COUNT(*) FROM ( SELECT SUM(Quantity) FROM Sales WHERE ProductID IN ( SELECT ProductID FROM Products WHERE Name = 'Touring-2000 Blue, 50' ) GROUP BY Quantity, SalesPersonID HAVING SUM(Quantity) > 20000 ) | [
"How",
"many",
"employees",
"sold",
"over",
"20,000",
"quantities",
"of",
"\"",
"Touring-2000",
"Blue",
",",
"50",
"\"",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "Touring-2000 Blue, 50"
},
{
"id": 2,
"type": "column",
"value": "salespersonid"
},
{
"id": 3,
"type": "column",
"value": "productid"
},
{
"id": 1,
"type": "column",
"value": "quantity"
},
{
"id": 5,
"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": [
5
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
625 | soccer_2016 | bird:train.json:1929 | How many players were born before 10/16/1975, and have a bowling skill of less than 3? | SELECT COUNT(*) FROM Player WHERE DOB < '1975-10-16' AND Bowling_skill < 3 | [
"How",
"many",
"players",
"were",
"born",
"before",
"10/16/1975",
",",
"and",
"have",
"a",
"bowling",
"skill",
"of",
"less",
"than",
"3",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "bowling_skill"
},
{
"id": 2,
"type": "value",
"value": "1975-10-16"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 1,
"type": "column",
"value": "dob"
},
{
"id": 4,
"type": "value",
"value... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11,
12
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
{
"entity_i... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
627 | hockey | bird:train.json:7791 | Which was the dominant hand for the goaltender who played 32 games for QUN in 1973? Give the full name. | SELECT T2.shootCatch, T2.firstName, T2.lastName FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID AND T1.year = 1973 WHERE T1.tmID = 'QUN' AND T1.GP = 32 | [
"Which",
"was",
"the",
"dominant",
"hand",
"for",
"the",
"goaltender",
"who",
"played",
"32",
"games",
"for",
"QUN",
"in",
"1973",
"?",
"Give",
"the",
"full",
"name",
"."
] | [
{
"id": 0,
"type": "column",
"value": "shootcatch"
},
{
"id": 1,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"type": "column",
"value": "lastname"
},
{
"id": 9,
"type": "column",
"value": "playerid"
},
{
"id": 3,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
20
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
1,
2
]
},
{
"entity_id... | [
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"B-TABLE",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
628 | hr_1 | spider:train_spider.json:3474 | What are the full names and department ids for the lowest paid employees across all departments. | SELECT first_name , last_name , department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id) | [
"What",
"are",
"the",
"full",
"names",
"and",
"department",
"ids",
"for",
"the",
"lowest",
"paid",
"employees",
"across",
"all",
"departments",
"."
] | [
{
"id": 3,
"type": "column",
"value": "department_id"
},
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 2,
"type": "column",
"value": "last_name"
},
{
"id": 4,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
629 | soccer_2016 | bird:train.json:1967 | How many matches were held in 2011? | SELECT COUNT(Match_Id) FROM `Match` WHERE Match_Date LIKE '2011%' | [
"How",
"many",
"matches",
"were",
"held",
"in",
"2011",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "match_date"
},
{
"id": 3,
"type": "column",
"value": "match_id"
},
{
"id": 0,
"type": "table",
"value": "Match"
},
{
"id": 2,
"type": "value",
"value": "2011%"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
630 | dorm_1 | spider:train_spider.json:5734 | Find the number of students whose age is older than the average age for each gender. | SELECT count(*) , sex FROM student WHERE age > (SELECT avg(age) FROM student) GROUP BY sex | [
"Find",
"the",
"number",
"of",
"students",
"whose",
"age",
"is",
"older",
"than",
"the",
"average",
"age",
"for",
"each",
"gender",
"."
] | [
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 1,
"type": "column",
"value": "sex"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] | [
{
"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-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
631 | pilot_1 | bird:test.json:1168 | What is the location of the plane that was flown by the pilot with the lowest age? | SELECT T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T1.age = (SELECT min(age) FROM pilotskills) | [
"What",
"is",
"the",
"location",
"of",
"the",
"plane",
"that",
"was",
"flown",
"by",
"the",
"pilot",
"with",
"the",
"lowest",
"age",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "pilotskills"
},
{
"id": 4,
"type": "column",
"value": "plane_name"
},
{
"id": 0,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "table",
"value": "hangar"
},
{
"id": 3,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
632 | car_retails | bird:train.json:1634 | Which product did Cruz & Sons Co. order on 2003/3/3? | SELECT t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode WHERE t3.customerName = 'Cruz & Sons Co.' AND t2.orderDate = '2003-03-03' | [
"Which",
"product",
"did",
"Cruz",
"&",
"Sons",
"Co.",
"order",
"on",
"2003/3/3",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Cruz & Sons Co."
},
{
"id": 10,
"type": "column",
"value": "customernumber"
},
{
"id": 4,
"type": "column",
"value": "customername"
},
{
"id": 8,
"type": "table",
"value": "orderdetails"
},
{
"id": 0,
"type... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
3,
... | [
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O"
] |
633 | ship_mission | spider:train_spider.json:3998 | How many ships are there? | SELECT count(*) FROM ship | [
"How",
"many",
"ships",
"are",
"there",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "ship"
}
] | [
{
"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"
] |
635 | flight_1 | spider:train_spider.json:392 | What are the numbers of all flights that can cover a distance of more than 2000? | SELECT flno FROM Flight WHERE distance > 2000 | [
"What",
"are",
"the",
"numbers",
"of",
"all",
"flights",
"that",
"can",
"cover",
"a",
"distance",
"of",
"more",
"than",
"2000",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "distance"
},
{
"id": 0,
"type": "table",
"value": "flight"
},
{
"id": 1,
"type": "column",
"value": "flno"
},
{
"id": 3,
"type": "value",
"value": "2000"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
636 | ship_mission | spider:train_spider.json:4009 | What is the ship with the largest amount of tonnage called? | SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1 | [
"What",
"is",
"the",
"ship",
"with",
"the",
"largest",
"amount",
"of",
"tonnage",
"called",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "tonnage"
},
{
"id": 0,
"type": "table",
"value": "ship"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
637 | college_1 | spider:train_spider.json:3304 | What is the name and address of the department with the most students? | SELECT T2.dept_name , T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"and",
"address",
"of",
"the",
"department",
"with",
"the",
"most",
"students",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "dept_address"
},
{
"id": 4,
"type": "table",
"value": "department"
},
{
"id": 0,
"type": "column",
"value": "dept_code"
},
{
"id": 1,
"type": "column",
"value": "dept_name"
},
{
"id": 3,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.