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 |
|---|---|---|---|---|---|---|---|---|
744 | voter_2 | spider:train_spider.json:5464 | What are the distinct secretary votes in the fall election cycle? | SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = "Fall" | [
"What",
"are",
"the",
"distinct",
"secretary",
"votes",
"in",
"the",
"fall",
"election",
"cycle",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "secretary_vote"
},
{
"id": 2,
"type": "column",
"value": "election_cycle"
},
{
"id": 0,
"type": "table",
"value": "voting_record"
},
{
"id": 3,
"type": "column",
"value": "Fall"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"e... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O"
] |
745 | language_corpus | bird:train.json:5758 | List out the title of Catalan language Wikipedia page that has wikipedia revision page id as 106601. | SELECT title FROM pages WHERE revision = 106601 | [
"List",
"out",
"the",
"title",
"of",
"Catalan",
"language",
"Wikipedia",
"page",
"that",
"has",
"wikipedia",
"revision",
"page",
"i",
"d",
"as",
"106601",
"."
] | [
{
"id": 2,
"type": "column",
"value": "revision"
},
{
"id": 3,
"type": "value",
"value": "106601"
},
{
"id": 0,
"type": "table",
"value": "pages"
},
{
"id": 1,
"type": "column",
"value": "title"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
746 | mondial_geo | bird:train.json:8319 | Which island is city Balikpapan located on? How big is the island? | SELECT T3.Name, T3.Area FROM city AS T1 INNER JOIN locatedOn AS T2 ON T1.Name = T2.City INNER JOIN island AS T3 ON T3.Name = T2.Island WHERE T1.Name = 'Balikpapan' | [
"Which",
"island",
"is",
"city",
"Balikpapan",
"located",
"on",
"?",
"How",
"big",
"is",
"the",
"island",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Balikpapan"
},
{
"id": 5,
"type": "table",
"value": "locatedon"
},
{
"id": 2,
"type": "table",
"value": "island"
},
{
"id": 6,
"type": "column",
"value": "island"
},
{
"id": 0,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
5,
... | [
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-VALUE",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
747 | driving_school | spider:train_spider.json:6644 | Which country and state does staff with first name as Janessa and last name as Sawayn lived? | SELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; | [
"Which",
"country",
"and",
"state",
"does",
"staff",
"with",
"first",
"name",
"as",
"Janessa",
"and",
"last",
"name",
"as",
"Sawayn",
"lived",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "state_province_county"
},
{
"id": 5,
"type": "column",
"value": "staff_address_id"
},
{
"id": 4,
"type": "column",
"value": "address_id"
},
{
"id": 6,
"type": "column",
"value": "first_name"
},
{
"id": 2,
... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
748 | talkingdata | bird:train.json:1053 | What is the gender of the majority of Vivo phone users? | SELECT T.gender FROM ( SELECT T2.gender, COUNT(T2.gender) AS num FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'vivo' GROUP BY T2.gender ) AS T ORDER BY T.num DESC LIMIT 1 | [
"What",
"is",
"the",
"gender",
"of",
"the",
"majority",
"of",
"Vivo",
"phone",
"users",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 4,
"type": "column",
"value": "phone_brand"
},
{
"id": 3,
"type": "table",
"value": "gender_age"
},
{
"id": 6,
"type": "column",
"value": "device_id"
},
{
"id": 0,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O"
] |
749 | movie_3 | bird:train.json:9198 | What is the full name of the actor who has the highest number of restricted films? | SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.film_id) AS num FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'R' GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1 | [
"What",
"is",
"the",
"full",
"name",
"of",
"the",
"actor",
"who",
"has",
"the",
"highest",
"number",
"of",
"restricted",
"films",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 8,
"type": "table",
"value": "film_actor"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 9,
"type": "column",
"value": "actor_id"
},
{
"id": 6,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
751 | bakery_1 | bird:test.json:1533 | On which date did some customer buy a good that costs more than 15 dollars? | SELECT DISTINCT T1.date FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber = T2.receipt JOIN goods AS T3 ON T2.item = T3.id WHERE T3.price > 15 | [
"On",
"which",
"date",
"did",
"some",
"customer",
"buy",
"a",
"good",
"that",
"costs",
"more",
"than",
"15",
"dollars",
"?"
] | [
{
"id": 8,
"type": "column",
"value": "receiptnumber"
},
{
"id": 4,
"type": "table",
"value": "receipts"
},
{
"id": 9,
"type": "column",
"value": "receipt"
},
{
"id": 1,
"type": "table",
"value": "goods"
},
{
"id": 2,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
752 | assets_maintenance | spider:train_spider.json:3144 | Which kind of part has the least number of faults? List the part name. | SELECT T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY count(*) ASC LIMIT 1 | [
"Which",
"kind",
"of",
"part",
"has",
"the",
"least",
"number",
"of",
"faults",
"?",
"List",
"the",
"part",
"name",
"."
] | [
{
"id": 2,
"type": "table",
"value": "part_faults"
},
{
"id": 0,
"type": "column",
"value": "part_name"
},
{
"id": 3,
"type": "column",
"value": "part_id"
},
{
"id": 1,
"type": "table",
"value": "parts"
}
] | [
{
"entity_id": 0,
"token_idxs": [
13,
14
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
753 | customers_and_orders | bird:test.json:296 | Give the id, name, phone, and email corresponding to the customer who made the most orders. | SELECT T1.customer_id , T2.customer_name , T2.customer_phone , T2.customer_email FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1 | [
"Give",
"the",
"i",
"d",
",",
"name",
",",
"phone",
",",
"and",
"email",
"corresponding",
"to",
"the",
"customer",
"who",
"made",
"the",
"most",
"orders",
"."
] | [
{
"id": 4,
"type": "table",
"value": "customer_orders"
},
{
"id": 2,
"type": "column",
"value": "customer_phone"
},
{
"id": 3,
"type": "column",
"value": "customer_email"
},
{
"id": 1,
"type": "column",
"value": "customer_name"
},
{
"id": 0,
"t... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
14
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
754 | coinmarketcap | bird:train.json:6293 | When is the highest price of Terracoin? | SELECT T2.date FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Terracoin' ORDER BY T2.price DESC LIMIT 1 | [
"When",
"is",
"the",
"highest",
"price",
"of",
"Terracoin",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "historical"
},
{
"id": 4,
"type": "value",
"value": "Terracoin"
},
{
"id": 7,
"type": "column",
"value": "coin_id"
},
{
"id": 1,
"type": "table",
"value": "coins"
},
{
"id": 5,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
755 | books | bird:train.json:6087 | What is the title of the first book that was written by A.J. Ayer? | SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'A.J. Ayer' ORDER BY T1.publication_date ASC LIMIT 1 | [
"What",
"is",
"the",
"title",
"of",
"the",
"first",
"book",
"that",
"was",
"written",
"by",
"A.J.",
"Ayer",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "publication_date"
},
{
"id": 2,
"type": "column",
"value": "author_name"
},
{
"id": 6,
"type": "table",
"value": "book_author"
},
{
"id": 3,
"type": "value",
"value": "A.J. Ayer"
},
{
"id": 7,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"to... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
756 | professional_basketball | bird:train.json:2807 | What is the percentage of player who won "All-Defensive First Team" from 1980 - 2000 is from 'NY'. | SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T1.birthState = 'NY' AND T2.award = 'All-Defensive First Team' AND T2.year BETWEEN 1980 AND 2000 | [
"What",
"is",
"the",
"percentage",
"of",
"player",
"who",
"won",
"\"",
"All",
"-",
"Defensive",
"First",
"Team",
"\"",
"from",
"1980",
"-",
"2000",
"is",
"from",
"'",
"NY",
"'",
"."
] | [
{
"id": 6,
"type": "value",
"value": "All-Defensive First Team"
},
{
"id": 1,
"type": "table",
"value": "awards_players"
},
{
"id": 3,
"type": "column",
"value": "birthstate"
},
{
"id": 2,
"type": "column",
"value": "playerid"
},
{
"id": 0,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": [
22
]
},
{
"entity_id": 5,
"t... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
758 | hockey | bird:train.json:7726 | Which country produced the most number of hockey players? Identify which year was most of the hockey players are born. | SELECT DISTINCT birthCountry, birthYear FROM Master GROUP BY birthCountry, birthYear ORDER BY COUNT(birthCountry) DESC LIMIT 1 | [
"Which",
"country",
"produced",
"the",
"most",
"number",
"of",
"hockey",
"players",
"?",
"Identify",
"which",
"year",
"was",
"most",
"of",
"the",
"hockey",
"players",
"are",
"born",
"."
] | [
{
"id": 1,
"type": "column",
"value": "birthcountry"
},
{
"id": 2,
"type": "column",
"value": "birthyear"
},
{
"id": 0,
"type": "table",
"value": "master"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
11,
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
759 | storm_record | spider:train_spider.json:2691 | Count the number of regions. | SELECT count(*) FROM region | [
"Count",
"the",
"number",
"of",
"regions",
"."
] | [
{
"id": 0,
"type": "table",
"value": "region"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
760 | retail_complains | bird:train.json:304 | What is the name of the state in which there have been the largest number of complaints with priority 0? | SELECT T2.state FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id INNER JOIN state AS T4 ON T3.state_abbrev = T4.StateCode WHERE T1.priority = 0 GROUP BY T2.state ORDER BY COUNT(T2.state) DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"state",
"in",
"which",
"there",
"have",
"been",
"the",
"largest",
"number",
"of",
"complaints",
"with",
"priority",
"0",
"?"
] | [
{
"id": 7,
"type": "table",
"value": "callcenterlogs"
},
{
"id": 5,
"type": "column",
"value": "state_abbrev"
},
{
"id": 9,
"type": "column",
"value": "district_id"
},
{
"id": 10,
"type": "column",
"value": "rand client"
},
{
"id": 6,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": [
19
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
761 | thrombosis_prediction | bird:dev.json:1217 | For all patient born in 1982, state if their albumin is within normal range. | SELECT CASE WHEN T2.ALB >= 3.5 AND T2.ALB <= 5.5 THEN 'normal' ELSE 'abnormal' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1982' | [
"For",
"all",
"patient",
"born",
"in",
"1982",
",",
"state",
"if",
"their",
"albumin",
"is",
"within",
"normal",
"range",
"."
] | [
{
"id": 1,
"type": "table",
"value": "laboratory"
},
{
"id": 3,
"type": "value",
"value": "abnormal"
},
{
"id": 6,
"type": "column",
"value": "birthday"
},
{
"id": 0,
"type": "table",
"value": "patient"
},
{
"id": 7,
"type": "value",
"value... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
762 | beer_factory | bird:train.json:5348 | What is the percentage difference of River City sale compare to Frostie? | SELECT CAST((SUM(CASE WHEN T3.BrandName = 'River City' THEN T2.PurchasePrice ELSE 0 END) - SUM(CASE WHEN T3.BrandName = 'Frostie' THEN T2.PurchasePrice ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T3.BrandName = 'Frostie' THEN T2.PurchasePrice ELSE 0 END) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeer... | [
"What",
"is",
"the",
"percentage",
"difference",
"of",
"River",
"City",
"sale",
"compare",
"to",
"Frostie",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "rootbeerbrand"
},
{
"id": 7,
"type": "column",
"value": "purchaseprice"
},
{
"id": 2,
"type": "table",
"value": "transaction"
},
{
"id": 5,
"type": "column",
"value": "rootbeerid"
},
{
"id": 10,
"type": "va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
763 | manufactory_1 | spider:train_spider.json:5274 | Where is the headquarter of the company founded by James? | SELECT headquarter FROM manufacturers WHERE founder = 'James' | [
"Where",
"is",
"the",
"headquarter",
"of",
"the",
"company",
"founded",
"by",
"James",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "manufacturers"
},
{
"id": 1,
"type": "column",
"value": "headquarter"
},
{
"id": 2,
"type": "column",
"value": "founder"
},
{
"id": 3,
"type": "value",
"value": "James"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
764 | olympics | bird:train.json:4982 | Which summer Olympic have the highest and lowest number of participants? | SELECT ( SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' GROUP BY T1.games_year ORDER BY COUNT(T2.person_id) DESC LIMIT 1 ) AS HIGHEST , ( SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.sea... | [
"Which",
"summer",
"Olympic",
"have",
"the",
"highest",
"and",
"lowest",
"number",
"of",
"participants",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "games_competitor"
},
{
"id": 0,
"type": "column",
"value": "games_year"
},
{
"id": 1,
"type": "column",
"value": "games_name"
},
{
"id": 8,
"type": "column",
"value": "person_id"
},
{
"id": 7,
"type": "colu... | [
{
"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": [
1
]
},
{
... | [
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
765 | dorm_1 | spider:train_spider.json:5685 | How many students exist? | SELECT count(*) FROM student | [
"How",
"many",
"students",
"exist",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "student"
}
] | [
{
"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"
] |
766 | party_people | spider:train_spider.json:2056 | What are the names of members and their corresponding parties? | SELECT T1.member_name , T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id | [
"What",
"are",
"the",
"names",
"of",
"members",
"and",
"their",
"corresponding",
"parties",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "member_name"
},
{
"id": 1,
"type": "column",
"value": "party_name"
},
{
"id": 4,
"type": "column",
"value": "party_id"
},
{
"id": 2,
"type": "table",
"value": "member"
},
{
"id": 3,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1,
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"en... | [
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
767 | theme_gallery | spider:train_spider.json:1671 | Show names for artists without any exhibition. | SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition) | [
"Show",
"names",
"for",
"artists",
"without",
"any",
"exhibition",
"."
] | [
{
"id": 3,
"type": "table",
"value": "exhibition"
},
{
"id": 2,
"type": "column",
"value": "artist_id"
},
{
"id": 0,
"type": "table",
"value": "artist"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O"
] |
768 | retail_complains | bird:train.json:252 | Among the clients who did receive a timely response for their complaint, how many of them are from New York? | SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No' AND T1.city = 'New York City' | [
"Among",
"the",
"clients",
"who",
"did",
"receive",
"a",
"timely",
"response",
"for",
"their",
"complaint",
",",
"how",
"many",
"of",
"them",
"are",
"from",
"New",
"York",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "Timely response?"
},
{
"id": 6,
"type": "value",
"value": "New York City"
},
{
"id": 3,
"type": "column",
"value": "client_id"
},
{
"id": 0,
"type": "table",
"value": "client"
},
{
"id": 1,
"type": "table"... | [
{
"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": [
7,
8
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
769 | movies_4 | bird:train.json:511 | Are there any post-production movies in Nederlands? | SELECT DISTINCT CASE WHEN T1.movie_status = 'Post Production' THEN 'YES' ELSE 'NO' END AS YORN FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Nederlands' | [
"Are",
"there",
"any",
"post",
"-",
"production",
"movies",
"in",
"Nederlands",
"?"
] | [
{
"id": 5,
"type": "table",
"value": "movie_languages"
},
{
"id": 10,
"type": "value",
"value": "Post Production"
},
{
"id": 1,
"type": "column",
"value": "language_name"
},
{
"id": 9,
"type": "column",
"value": "movie_status"
},
{
"id": 6,
"ty... | [
{
"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": [
6
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O"
] |
770 | gas_company | spider:train_spider.json:2026 | What are the main industries of the companies without gas stations and what are the companies? | SELECT company , main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company) | [
"What",
"are",
"the",
"main",
"industries",
"of",
"the",
"companies",
"without",
"gas",
"stations",
"and",
"what",
"are",
"the",
"companies",
"?"
] | [
{
"id": 4,
"type": "table",
"value": "station_company"
},
{
"id": 2,
"type": "column",
"value": "main_industry"
},
{
"id": 3,
"type": "column",
"value": "company_id"
},
{
"id": 0,
"type": "table",
"value": "company"
},
{
"id": 1,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
3,
4
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
10,
11
]
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
772 | tracking_software_problems | spider:train_spider.json:5392 | Find the top 3 products which have the largest number of problems? | SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY count(*) DESC LIMIT 3 | [
"Find",
"the",
"top",
"3",
"products",
"which",
"have",
"the",
"largest",
"number",
"of",
"problems",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "product_name"
},
{
"id": 3,
"type": "column",
"value": "product_id"
},
{
"id": 1,
"type": "table",
"value": "problems"
},
{
"id": 2,
"type": "table",
"value": "product"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
773 | books | bird:train.json:6013 | What are the city addresses of the customers located in the United States of America? | SELECT DISTINCT T2.city FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T1.country_name = 'United States of America' | [
"What",
"are",
"the",
"city",
"addresses",
"of",
"the",
"customers",
"located",
"in",
"the",
"United",
"States",
"of",
"America",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "United States of America"
},
{
"id": 3,
"type": "column",
"value": "country_name"
},
{
"id": 5,
"type": "column",
"value": "country_id"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 2,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11,
12,
13,
14
]
}... | [
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
774 | cre_Doc_and_collections | bird:test.json:666 | What are the document subset names? | SELECT Document_Subset_Name FROM Document_Subsets; | [
"What",
"are",
"the",
"document",
"subset",
"names",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "document_subset_name"
},
{
"id": 0,
"type": "table",
"value": "document_subsets"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O"
] |
775 | california_schools | bird:dev.json:38 | What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers? | SELECT T2.Website FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.NumTstTakr BETWEEN 2000 AND 3000 AND T2.County = 'Los Angeles' | [
"What",
"are",
"the",
"webpages",
"for",
"the",
"Los",
"Angeles",
"County",
"school",
"that",
"has",
"between",
"2,000",
"and",
"3,000",
"test",
"takers",
"?"
] | [
{
"id": 9,
"type": "value",
"value": "Los Angeles"
},
{
"id": 5,
"type": "column",
"value": "numtsttakr"
},
{
"id": 1,
"type": "table",
"value": "satscores"
},
{
"id": 0,
"type": "column",
"value": "website"
},
{
"id": 2,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
16,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
776 | mondial_geo | bird:train.json:8253 | How many lakes in the Canary Islands cover an area of over 1000000? | SELECT COUNT(T2.Name) FROM located AS T1 INNER JOIN lake AS T2 ON T1.Lake = T2.Name WHERE T1.Province = 'Canary Islands' AND T2.Area > 1000000 | [
"How",
"many",
"lakes",
"in",
"the",
"Canary",
"Islands",
"cover",
"an",
"area",
"of",
"over",
"1000000",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Canary Islands"
},
{
"id": 4,
"type": "column",
"value": "province"
},
{
"id": 0,
"type": "table",
"value": "located"
},
{
"id": 7,
"type": "value",
"value": "1000000"
},
{
"id": 1,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
777 | insurance_fnol | spider:train_spider.json:918 | Count the total number of available services. | SELECT count(*) FROM services | [
"Count",
"the",
"total",
"number",
"of",
"available",
"services",
"."
] | [
{
"id": 0,
"type": "table",
"value": "services"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
778 | movie | bird:train.json:750 | When is the birthday of the actor who played "Sully"? | SELECT T2.`Date of Birth` FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T1.`Character Name` = 'Sully' | [
"When",
"is",
"the",
"birthday",
"of",
"the",
"actor",
"who",
"played",
"\"",
"Sully",
"\"",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "Character Name"
},
{
"id": 0,
"type": "column",
"value": "Date of Birth"
},
{
"id": 1,
"type": "table",
"value": "characters"
},
{
"id": 5,
"type": "column",
"value": "actorid"
},
{
"id": 2,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id"... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
779 | music_2 | spider:train_spider.json:5172 | How many bands are there? | SELECT count(*) FROM Band | [
"How",
"many",
"bands",
"are",
"there",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "band"
}
] | [
{
"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"
] |
780 | codebase_community | bird:dev.json:646 | Describe the post title which got positive comments and display names of the users who posted those comments. | SELECT T1.Title, T2.UserDisplayName FROM posts AS T1 INNER JOIN comments AS T2 ON T2.PostId = T2.Id WHERE T1.Score > 60 | [
"Describe",
"the",
"post",
"title",
"which",
"got",
"positive",
"comments",
"and",
"display",
"names",
"of",
"the",
"users",
"who",
"posted",
"those",
"comments",
"."
] | [
{
"id": 1,
"type": "column",
"value": "userdisplayname"
},
{
"id": 3,
"type": "table",
"value": "comments"
},
{
"id": 6,
"type": "column",
"value": "postid"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
9,
10
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": [
0
... | [
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
781 | movie | bird:train.json:742 | What is the average rating of all the movies starring Tom Cruise? | SELECT AVG(T1.Rating) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T3.Name = 'Tom Cruise' | [
"What",
"is",
"the",
"average",
"rating",
"of",
"all",
"the",
"movies",
"starring",
"Tom",
"Cruise",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "Tom Cruise"
},
{
"id": 5,
"type": "table",
"value": "characters"
},
{
"id": 6,
"type": "column",
"value": "actorid"
},
{
"id": 7,
"type": "column",
"value": "movieid"
},
{
"id": 3,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10,
11
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
782 | bakery_1 | bird:test.json:1510 | What are the average, minimum and maximum prices for each food? | SELECT food , avg(price) , max(price) , min(price) FROM goods GROUP BY food | [
"What",
"are",
"the",
"average",
",",
"minimum",
"and",
"maximum",
"prices",
"for",
"each",
"food",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "goods"
},
{
"id": 2,
"type": "column",
"value": "price"
},
{
"id": 1,
"type": "column",
"value": "food"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"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-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
783 | book_publishing_company | bird:train.json:176 | List all titles with sales of quantity more than 20 and store located in the CA state. | SELECT T1.title, T2.qty FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id INNER JOIN stores AS T3 ON T2.stor_id = T3.stor_id WHERE T2.qty > 20 AND T3.state = 'CA' | [
"List",
"all",
"titles",
"with",
"sales",
"of",
"quantity",
"more",
"than",
"20",
"and",
"store",
"located",
"in",
"the",
"CA",
"state",
"."
] | [
{
"id": 9,
"type": "column",
"value": "title_id"
},
{
"id": 5,
"type": "column",
"value": "stor_id"
},
{
"id": 2,
"type": "table",
"value": "stores"
},
{
"id": 3,
"type": "table",
"value": "titles"
},
{
"id": 0,
"type": "column",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
784 | flight_1 | spider:train_spider.json:368 | What is the number of employees that have a salary between 100000 and 200000? | SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000 | [
"What",
"is",
"the",
"number",
"of",
"employees",
"that",
"have",
"a",
"salary",
"between",
"100000",
"and",
"200000",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "column",
"value": "salary"
},
{
"id": 2,
"type": "value",
"value": "100000"
},
{
"id": 3,
"type": "value",
"value": "200000"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
785 | college_3 | spider:train_spider.json:4659 | List all information about courses sorted by credits in the ascending order. | SELECT * FROM COURSE ORDER BY Credits | [
"List",
"all",
"information",
"about",
"courses",
"sorted",
"by",
"credits",
"in",
"the",
"ascending",
"order",
"."
] | [
{
"id": 1,
"type": "column",
"value": "credits"
},
{
"id": 0,
"type": "table",
"value": "course"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
786 | products_gen_characteristics | spider:train_spider.json:5551 | What are the names of products with 'white' as their color description? | SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "white" | [
"What",
"are",
"the",
"names",
"of",
"products",
"with",
"'",
"white",
"'",
"as",
"their",
"color",
"description",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "color_description"
},
{
"id": 0,
"type": "column",
"value": "product_name"
},
{
"id": 2,
"type": "table",
"value": "ref_colors"
},
{
"id": 5,
"type": "column",
"value": "color_code"
},
{
"id": 1,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
788 | tracking_grants_for_research | spider:train_spider.json:4363 | For each staff id, what is the description of the role that is involved with the most number of projects? | SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1 | [
"For",
"each",
"staff",
"i",
"d",
",",
"what",
"is",
"the",
"description",
"of",
"the",
"role",
"that",
"is",
"involved",
"with",
"the",
"most",
"number",
"of",
"projects",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "role_description"
},
{
"id": 2,
"type": "table",
"value": "project_outcomes"
},
{
"id": 4,
"type": "table",
"value": "project_staff"
},
{
"id": 3,
"type": "table",
"value": "staff_roles"
},
{
"id": 5,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
789 | toxicology | bird:dev.json:260 | Calculate the total atoms with triple-bond molecules containing the element phosphorus or bromine. | SELECT COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T1.element IN ('p', 'br') | [
"Calculate",
"the",
"total",
"atoms",
"with",
"triple",
"-",
"bond",
"molecules",
"containing",
"the",
"element",
"phosphorus",
"or",
"bromine",
"."
] | [
{
"id": 4,
"type": "column",
"value": "molecule_id"
},
{
"id": 5,
"type": "column",
"value": "bond_type"
},
{
"id": 3,
"type": "table",
"value": "molecule"
},
{
"id": 1,
"type": "column",
"value": "atom_id"
},
{
"id": 7,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
790 | mondial_geo | bird:train.json:8241 | How much is her GDP in agriculture for the country with the least area? | SELECT T2.GDP * T2.Agriculture FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T1.Area ASC LIMIT 1 | [
"How",
"much",
"is",
"her",
"GDP",
"in",
"agriculture",
"for",
"the",
"country",
"with",
"the",
"least",
"area",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "agriculture"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 1,
"type": "table",
"value": "economy"
},
{
"id": 6,
"type": "column",
"value": "country"
},
{
"id": 2,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
791 | legislator | bird:train.json:4807 | State the number of female legislators in the list. | SELECT COUNT(*) FROM current WHERE gender_bio = 'F' | [
"State",
"the",
"number",
"of",
"female",
"legislators",
"in",
"the",
"list",
"."
] | [
{
"id": 1,
"type": "column",
"value": "gender_bio"
},
{
"id": 0,
"type": "table",
"value": "current"
},
{
"id": 2,
"type": "value",
"value": "F"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
792 | university | bird:train.json:8122 | List down all universities that scored below 50. | SELECT DISTINCT T2.university_name FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.score < 50 | [
"List",
"down",
"all",
"universities",
"that",
"scored",
"below",
"50",
"."
] | [
{
"id": 1,
"type": "table",
"value": "university_ranking_year"
},
{
"id": 0,
"type": "column",
"value": "university_name"
},
{
"id": 5,
"type": "column",
"value": "university_id"
},
{
"id": 2,
"type": "table",
"value": "university"
},
{
"id": 3,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
793 | superstore | bird:train.json:2390 | Who is the customer from the West region that received the highest discount? | SELECT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'West' ORDER BY T1.Discount DESC LIMIT 1 | [
"Who",
"is",
"the",
"customer",
"from",
"the",
"West",
"region",
"that",
"received",
"the",
"highest",
"discount",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "west_superstore"
},
{
"id": 0,
"type": "column",
"value": "Customer Name"
},
{
"id": 6,
"type": "column",
"value": "Customer ID"
},
{
"id": 5,
"type": "column",
"value": "discount"
},
{
"id": 2,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
794 | wine_1 | spider:train_spider.json:6548 | Find the white grape used to produce wines with scores above 90. | SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" AND T2.score > 90 | [
"Find",
"the",
"white",
"grape",
"used",
"to",
"produce",
"wines",
"with",
"scores",
"above",
"90",
"."
] | [
{
"id": 1,
"type": "table",
"value": "grapes"
},
{
"id": 0,
"type": "column",
"value": "grape"
},
{
"id": 3,
"type": "column",
"value": "color"
},
{
"id": 4,
"type": "column",
"value": "White"
},
{
"id": 5,
"type": "column",
"value": "score... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
795 | aan_1 | bird:test.json:1001 | How many papers cite paper with id A00-1002? | SELECT count(*) FROM Citation WHERE cited_paper_id = "A00-1002" | [
"How",
"many",
"papers",
"cite",
"paper",
"with",
"i",
"d",
"A00",
"-",
"1002",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "cited_paper_id"
},
{
"id": 0,
"type": "table",
"value": "citation"
},
{
"id": 2,
"type": "column",
"value": "A00-1002"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
796 | retail_complains | bird:train.json:381 | Which city in the Midwest region has the least number of clients? | SELECT T2.city FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T3.Region = 'Midwest' GROUP BY T2.city ORDER BY COUNT(T2.city) LIMIT 1 | [
"Which",
"city",
"in",
"the",
"Midwest",
"region",
"has",
"the",
"least",
"number",
"of",
"clients",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "state_abbrev"
},
{
"id": 8,
"type": "column",
"value": "district_id"
},
{
"id": 7,
"type": "column",
"value": "statecode"
},
{
"id": 5,
"type": "table",
"value": "district"
},
{
"id": 3,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity... | [
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
797 | hospital_1 | spider:train_spider.json:3950 | Find the names of all patients who have an undergoing treatment and are staying in room 111. | SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111 | [
"Find",
"the",
"names",
"of",
"all",
"patients",
"who",
"have",
"an",
"undergoing",
"treatment",
"and",
"are",
"staying",
"in",
"room",
"111",
"."
] | [
{
"id": 4,
"type": "table",
"value": "undergoes"
},
{
"id": 5,
"type": "table",
"value": "patient"
},
{
"id": 8,
"type": "column",
"value": "patient"
},
{
"id": 7,
"type": "column",
"value": "stayid"
},
{
"id": 0,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entit... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
798 | movie_3 | bird:train.json:9162 | Give the address location of Heather Morris. | SELECT T1.address FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'HEATHER' AND T2.last_name = 'MORRIS' | [
"Give",
"the",
"address",
"location",
"of",
"Heather",
"Morris",
"."
] | [
{
"id": 3,
"type": "column",
"value": "address_id"
},
{
"id": 4,
"type": "column",
"value": "first_name"
},
{
"id": 6,
"type": "column",
"value": "last_name"
},
{
"id": 2,
"type": "table",
"value": "customer"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
5
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
799 | food_inspection_2 | bird:train.json:6202 | State the name of dbas with verified quality. | SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.results LIKE '%Pass%' | [
"State",
"the",
"name",
"of",
"dbas",
"with",
"verified",
"quality",
"."
] | [
{
"id": 1,
"type": "table",
"value": "establishment"
},
{
"id": 2,
"type": "table",
"value": "inspection"
},
{
"id": 5,
"type": "column",
"value": "license_no"
},
{
"id": 0,
"type": "column",
"value": "dba_name"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
800 | sales | bird:train.json:5418 | List the first names of customers who have purchased products from sale person id 1. | SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesPersonID = 1 | [
"List",
"the",
"first",
"names",
"of",
"customers",
"who",
"have",
"purchased",
"products",
"from",
"sale",
"person",
"i",
"d",
"1",
"."
] | [
{
"id": 3,
"type": "column",
"value": "salespersonid"
},
{
"id": 5,
"type": "column",
"value": "customerid"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 1,
"type": "table",
"value": "customers"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13,
14
]
},
{
"entity_id": 4,
"token_... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
801 | music_platform_2 | bird:train.json:7947 | What is the percentage of reviews added each year of the total reviews added? | SELECT CAST((SUM(CASE WHEN run_at LIKE '2022-%' THEN reviews_added ELSE 0 END) - SUM(CASE WHEN run_at LIKE '2021-%' THEN reviews_added ELSE 0 END)) AS REAL) * 100 / SUM(reviews_added) OR '%' "percentage" FROM runs | [
"What",
"is",
"the",
"percentage",
"of",
"reviews",
"added",
"each",
"year",
"of",
"the",
"total",
"reviews",
"added",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "reviews_added"
},
{
"id": 5,
"type": "column",
"value": "run_at"
},
{
"id": 6,
"type": "value",
"value": "2022-%"
},
{
"id": 7,
"type": "value",
"value": "2021-%"
},
{
"id": 0,
"type": "table",
"value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
802 | department_store | spider:train_spider.json:4740 | What are the ids and names of department stores with both marketing and managing departments? | SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = "marketing" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id W... | [
"What",
"are",
"the",
"ids",
"and",
"names",
"of",
"department",
"stores",
"with",
"both",
"marketing",
"and",
"managing",
"departments",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "department_stores"
},
{
"id": 4,
"type": "column",
"value": "department_name"
},
{
"id": 0,
"type": "column",
"value": "dept_store_id"
},
{
"id": 2,
"type": "table",
"value": "departments"
},
{
"id": 1,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
803 | art_1 | bird:test.json:1283 | What are the locations that have works painted before 1885 and after 1930? | SELECT DISTINCT LOCATION FROM paintings WHERE YEAR < 1885 INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE YEAR > 1930 | [
"What",
"are",
"the",
"locations",
"that",
"have",
"works",
"painted",
"before",
"1885",
"and",
"after",
"1930",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "paintings"
},
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "column",
"value": "year"
},
{
"id": 3,
"type": "value",
"value": "1885"
},
{
"id": 4,
"type": "value",
"value": "193... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
804 | art_1 | bird:test.json:1307 | Order all of the oil paintings by date of creation and list their ids, locations, and titles. | SELECT paintingID , title , LOCATION FROM paintings WHERE medium = "oil" ORDER BY YEAR | [
"Order",
"all",
"of",
"the",
"oil",
"paintings",
"by",
"date",
"of",
"creation",
"and",
"list",
"their",
"ids",
",",
"locations",
",",
"and",
"titles",
"."
] | [
{
"id": 1,
"type": "column",
"value": "paintingid"
},
{
"id": 0,
"type": "table",
"value": "paintings"
},
{
"id": 3,
"type": "column",
"value": "location"
},
{
"id": 4,
"type": "column",
"value": "medium"
},
{
"id": 2,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
805 | hockey | bird:train.json:7683 | Which team did player Id "roypa01" play in 1992? Give the team id. | SELECT tmID FROM Goalies WHERE playerID = 'roypa01' AND year = 1992 | [
"Which",
"team",
"did",
"player",
"I",
"d",
"\"",
"roypa01",
"\"",
"play",
"in",
"1992",
"?",
"Give",
"the",
"team",
"i",
"d."
] | [
{
"id": 2,
"type": "column",
"value": "playerid"
},
{
"id": 0,
"type": "table",
"value": "goalies"
},
{
"id": 3,
"type": "value",
"value": "roypa01"
},
{
"id": 1,
"type": "column",
"value": "tmid"
},
{
"id": 4,
"type": "column",
"value": "y... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
15,
16,
17
]
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN"
] |
806 | movie_3 | bird:train.json:9264 | To which country does the address '1386 Nakhon Sawan Boulevard' belong? | SELECT T1.country FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id INNER JOIN address AS T3 ON T2.city_id = T3.city_id WHERE T3.address = '1386 Nakhon Sawan Boulevard' | [
"To",
"which",
"country",
"does",
"the",
"address",
"'",
"1386",
"Nakhon",
"Sawan",
"Boulevard",
"'",
"belong",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "1386 Nakhon Sawan Boulevard"
},
{
"id": 7,
"type": "column",
"value": "country_id"
},
{
"id": 0,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "table",
"value": "address"
},
{
"id": 2,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
7,
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O"
] |
807 | soccer_2 | spider:train_spider.json:5012 | Find the average hours for the students whose tryout decision is no. | SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no' | [
"Find",
"the",
"average",
"hours",
"for",
"the",
"students",
"whose",
"tryout",
"decision",
"is",
"no",
"."
] | [
{
"id": 2,
"type": "column",
"value": "decision"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 1,
"type": "table",
"value": "tryout"
},
{
"id": 5,
"type": "column",
"value": "pid"
},
{
"id": 3,
"type": "value",
"value": "no"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
808 | card_games | bird:dev.json:463 | How many translations are there for the set of cards with "Angel of Mercy" in it? | SELECT COUNT(DISTINCT translation) FROM set_translations WHERE setCode IN ( SELECT setCode FROM cards WHERE name = 'Angel of Mercy' ) AND translation IS NOT NULL | [
"How",
"many",
"translations",
"are",
"there",
"for",
"the",
"set",
"of",
"cards",
"with",
"\"",
"Angel",
"of",
"Mercy",
"\"",
"in",
"it",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "set_translations"
},
{
"id": 5,
"type": "value",
"value": "Angel of Mercy"
},
{
"id": 1,
"type": "column",
"value": "translation"
},
{
"id": 2,
"type": "column",
"value": "setcode"
},
{
"id": 3,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O"
] |
809 | legislator | bird:train.json:4842 | Provide the type and end date of the term of the legislator named John Vining. | SELECT T2.type, T2.end FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'John' AND T1.last_name = 'Vining' | [
"Provide",
"the",
"type",
"and",
"end",
"date",
"of",
"the",
"term",
"of",
"the",
"legislator",
"named",
"John",
"Vining",
"."
] | [
{
"id": 3,
"type": "table",
"value": "historical-terms"
},
{
"id": 4,
"type": "column",
"value": "bioguide_id"
},
{
"id": 2,
"type": "table",
"value": "historical"
},
{
"id": 6,
"type": "column",
"value": "first_name"
},
{
"id": 8,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"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",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
810 | cre_Theme_park | spider:train_spider.json:5946 | Which transportation method is used the most often to get to tourist attractions? | SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1 | [
"Which",
"transportation",
"method",
"is",
"used",
"the",
"most",
"often",
"to",
"get",
"to",
"tourist",
"attractions",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "tourist_attractions"
},
{
"id": 1,
"type": "column",
"value": "how_to_get_there"
}
] | [
{
"entity_id": 0,
"token_idxs": [
11,
12
]
},
{
"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",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
811 | computer_student | bird:train.json:984 | How many people teaches course no.11? | SELECT COUNT(*) FROM taughtBy WHERE course_id = 11 | [
"How",
"many",
"people",
"teaches",
"course",
"no.11",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "course_id"
},
{
"id": 0,
"type": "table",
"value": "taughtby"
},
{
"id": 2,
"type": "value",
"value": "11"
}
] | [
{
"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"
] |
812 | movies_4 | bird:train.json:439 | When was the first movie released? | SELECT MIN(release_date) FROM movie WHERE movie_status = 'Released' | [
"When",
"was",
"the",
"first",
"movie",
"released",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "movie_status"
},
{
"id": 3,
"type": "column",
"value": "release_date"
},
{
"id": 2,
"type": "value",
"value": "Released"
},
{
"id": 0,
"type": "table",
"value": "movie"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
813 | mondial_geo | bird:train.json:8496 | What is the name of the country with the smallest population, and what is its gross domestic product? | SELECT T1.Name, T2.GDP FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T1.Population ASC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"country",
"with",
"the",
"smallest",
"population",
",",
"and",
"what",
"is",
"its",
"gross",
"domestic",
"product",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "population"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 3,
"type": "table",
"value": "economy"
},
{
"id": 6,
"type": "column",
"value": "country"
},
{
"id": 0,
"type": "column",
"value... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
814 | public_review_platform | bird:train.json:3781 | Which closed/not running Yelp business in "Sun City" has got the most reviews? Give the business id. | SELECT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Sun City' AND T1.active LIKE 'FALSE' GROUP BY T1.business_id ORDER BY COUNT(T2.review_length) DESC LIMIT 1 | [
"Which",
"closed",
"/",
"not",
"running",
"Yelp",
"business",
"in",
"\"",
"Sun",
"City",
"\"",
"has",
"got",
"the",
"most",
"reviews",
"?",
"Give",
"the",
"business",
"i",
"d."
] | [
{
"id": 7,
"type": "column",
"value": "review_length"
},
{
"id": 0,
"type": "column",
"value": "business_id"
},
{
"id": 1,
"type": "table",
"value": "business"
},
{
"id": 4,
"type": "value",
"value": "Sun City"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
20,
21,
22
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN"
] |
815 | address | bird:train.json:5168 | Provide the zip code, city, and congress representative's full names of the area which has highest population in 2020. | SELECT T1.zip_code, T1.city, T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id GROUP BY T2.district ORDER BY T1.population_2020 DESC LIMIT 1 | [
"Provide",
"the",
"zip",
"code",
",",
"city",
",",
"and",
"congress",
"representative",
"'s",
"full",
"names",
"of",
"the",
"area",
"which",
"has",
"highest",
"population",
"in",
"2020",
"."
] | [
{
"id": 6,
"type": "column",
"value": "population_2020"
},
{
"id": 9,
"type": "column",
"value": "cognress_rep_id"
},
{
"id": 8,
"type": "table",
"value": "zip_congress"
},
{
"id": 3,
"type": "column",
"value": "first_name"
},
{
"id": 4,
"type"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
816 | flight_4 | spider:train_spider.json:6851 | Return the cities with more than 3 airports in the United States. | SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING count(*) > 3 | [
"Return",
"the",
"cities",
"with",
"more",
"than",
"3",
"airports",
"in",
"the",
"United",
"States",
"."
] | [
{
"id": 3,
"type": "value",
"value": "United States"
},
{
"id": 0,
"type": "table",
"value": "airports"
},
{
"id": 2,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "column",
"value": "city"
},
{
"id": 4,
"type": "value",
"value... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
817 | sakila_1 | spider:train_spider.json:2970 | How many languages are in these films? | SELECT count(DISTINCT language_id) FROM film | [
"How",
"many",
"languages",
"are",
"in",
"these",
"films",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "language_id"
},
{
"id": 0,
"type": "table",
"value": "film"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
818 | shipping | bird:train.json:5601 | What is the area of the destination city of shipment No.1346? | SELECT T2.area FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1346' | [
"What",
"is",
"the",
"area",
"of",
"the",
"destination",
"city",
"of",
"shipment",
"No.1346",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "shipment"
},
{
"id": 3,
"type": "column",
"value": "ship_id"
},
{
"id": 5,
"type": "column",
"value": "city_id"
},
{
"id": 0,
"type": "column",
"value": "area"
},
{
"id": 2,
"type": "table",
"value": "c... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
819 | voter_2 | spider:train_spider.json:5503 | Which advisors have more than two students? | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2 | [
"Which",
"advisors",
"have",
"more",
"than",
"two",
"students",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 1,
"type": "column",
"value": "advisor"
},
{
"id": 2,
"type": "value",
"value": "2"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
820 | olympics | bird:train.json:4949 | Which region do most of the athletes are from? | SELECT T2.region_name FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id GROUP BY T2.region_name ORDER BY COUNT(T1.person_id) DESC LIMIT 1 | [
"Which",
"region",
"do",
"most",
"of",
"the",
"athletes",
"are",
"from",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "person_region"
},
{
"id": 0,
"type": "column",
"value": "region_name"
},
{
"id": 2,
"type": "table",
"value": "noc_region"
},
{
"id": 3,
"type": "column",
"value": "region_id"
},
{
"id": 5,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
824 | retails | bird:train.json:6813 | Which region has the lowest number of countries? | SELECT T.r_name FROM ( SELECT T1.r_name, COUNT(T2.n_name) AS num FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey GROUP BY T1.r_name ) AS T ORDER BY T.num LIMIT 1 | [
"Which",
"region",
"has",
"the",
"lowest",
"number",
"of",
"countries",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "r_regionkey"
},
{
"id": 6,
"type": "column",
"value": "n_regionkey"
},
{
"id": 0,
"type": "column",
"value": "r_name"
},
{
"id": 2,
"type": "table",
"value": "region"
},
{
"id": 3,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O"
] |
825 | talkingdata | bird:train.json:1226 | Which behavior category does user number 5902120154267990000 belong to? | SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T2.app_id = 5902120154267990000 | [
"Which",
"behavior",
"category",
"does",
"user",
"number",
"5902120154267990000",
"belong",
"to",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "5902120154267990000"
},
{
"id": 1,
"type": "table",
"value": "label_categories"
},
{
"id": 2,
"type": "table",
"value": "app_labels"
},
{
"id": 0,
"type": "column",
"value": "category"
},
{
"id": 5,
"type":... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
826 | insurance_fnol | spider:train_spider.json:898 | Find the phone numbers of customers using the most common policy type among the available policies. | SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1) | [
"Find",
"the",
"phone",
"numbers",
"of",
"customers",
"using",
"the",
"most",
"common",
"policy",
"type",
"among",
"the",
"available",
"policies",
"."
] | [
{
"id": 0,
"type": "table",
"value": "available_policies"
},
{
"id": 2,
"type": "column",
"value": "policy_type_code"
},
{
"id": 1,
"type": "column",
"value": "customer_phone"
}
] | [
{
"entity_id": 0,
"token_idxs": [
14,
15
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
10,
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
827 | formula_1 | bird:dev.json:940 | Among the drivers that finished the race in the 2008 Chinese Grand Prix, how many of them have participated in Formula_1 races? | SELECT COUNT(*) FROM ( SELECT T1.driverId FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.name = 'Chinese Grand Prix' AND T2.year = 2008 AND T1.time IS NOT NULL GROUP BY T1.driverId HAVING COUNT(T2.raceId) > 0 ) | [
"Among",
"the",
"drivers",
"that",
"finished",
"the",
"race",
"in",
"the",
"2008",
"Chinese",
"Grand",
"Prix",
",",
"how",
"many",
"of",
"them",
"have",
"participated",
"in",
"Formula_1",
"races",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "Chinese Grand Prix"
},
{
"id": 0,
"type": "column",
"value": "driverid"
},
{
"id": 1,
"type": "table",
"value": "results"
},
{
"id": 4,
"type": "column",
"value": "raceid"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
22
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
829 | e_commerce | bird:test.json:91 | What is the number of products that have not been ordered yet? | SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items ) | [
"What",
"is",
"the",
"number",
"of",
"products",
"that",
"have",
"not",
"been",
"ordered",
"yet",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "order_items"
},
{
"id": 1,
"type": "column",
"value": "product_id"
},
{
"id": 0,
"type": "table",
"value": "products"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
830 | cs_semester | bird:train.json:903 | What is the average number of students who registered for the courses with a difficulty of 4? | SELECT CAST(COUNT(T1.student_id) AS REAL) / COUNT(DISTINCT T2.course_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.diff = 4 | [
"What",
"is",
"the",
"average",
"number",
"of",
"students",
"who",
"registered",
"for",
"the",
"courses",
"with",
"a",
"difficulty",
"of",
"4",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "registration"
},
{
"id": 5,
"type": "column",
"value": "student_id"
},
{
"id": 4,
"type": "column",
"value": "course_id"
},
{
"id": 1,
"type": "table",
"value": "course"
},
{
"id": 2,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
831 | codebase_community | bird:dev.json:542 | What is the total number of comments of all the posts owned by csgillespie? | SELECT SUM(T1.CommentCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' | [
"What",
"is",
"the",
"total",
"number",
"of",
"comments",
"of",
"all",
"the",
"posts",
"owned",
"by",
"csgillespie",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "commentcount"
},
{
"id": 2,
"type": "column",
"value": "displayname"
},
{
"id": 3,
"type": "value",
"value": "csgillespie"
},
{
"id": 5,
"type": "column",
"value": "owneruserid"
},
{
"id": 0,
"type": "tabl... | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
833 | hospital_1 | spider:train_spider.json:3959 | Find the physician who prescribed the highest dose. What is his or her name? | SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1 | [
"Find",
"the",
"physician",
"who",
"prescribed",
"the",
"highest",
"dose",
".",
"What",
"is",
"his",
"or",
"her",
"name",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "prescribes"
},
{
"id": 4,
"type": "column",
"value": "employeeid"
},
{
"id": 1,
"type": "table",
"value": "physician"
},
{
"id": 5,
"type": "column",
"value": "physician"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
834 | legislator | bird:train.json:4881 | What is the party of the oldest legislator? | SELECT T1.party FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide ORDER BY T2.birthday_bio LIMIT 1 | [
"What",
"is",
"the",
"party",
"of",
"the",
"oldest",
"legislator",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "historical-terms"
},
{
"id": 3,
"type": "column",
"value": "birthday_bio"
},
{
"id": 4,
"type": "column",
"value": "bioguide_id"
},
{
"id": 2,
"type": "table",
"value": "historical"
},
{
"id": 5,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
835 | thrombosis_prediction | bird:dev.json:1281 | Among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born? | SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT >= 60 ORDER BY T1.Birthday DESC LIMIT 1 | [
"Among",
"the",
"patients",
"who",
"have",
"an",
"abnormal",
"level",
"of",
"glutamic",
"oxaloacetic",
"transaminase",
",",
"when",
"was",
"the",
"youngest",
"of",
"them",
"born",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "laboratory"
},
{
"id": 0,
"type": "column",
"value": "birthday"
},
{
"id": 1,
"type": "table",
"value": "patient"
},
{
"id": 3,
"type": "column",
"value": "got"
},
{
"id": 4,
"type": "value",
"value": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
836 | bakery_1 | bird:test.json:1531 | List distinct receipt numbers for which someone bought a good that costs more than 13 dollars. | SELECT DISTINCT T1.ReceiptNumber FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber = T2.receipt JOIN goods AS T3 ON T2.item = T3.id WHERE T3.price > 13 | [
"List",
"distinct",
"receipt",
"numbers",
"for",
"which",
"someone",
"bought",
"a",
"good",
"that",
"costs",
"more",
"than",
"13",
"dollars",
"."
] | [
{
"id": 0,
"type": "column",
"value": "receiptnumber"
},
{
"id": 4,
"type": "table",
"value": "receipts"
},
{
"id": 8,
"type": "column",
"value": "receipt"
},
{
"id": 1,
"type": "table",
"value": "goods"
},
{
"id": 2,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
837 | retail_complains | bird:train.json:366 | Between 1/1/2017 and 4/1/2017, what is the average server time of calls under the server DARMON? | SELECT AVG(CAST(SUBSTR(ser_time, 4, 2) AS REAL)) FROM callcenterlogs WHERE `Date received` BETWEEN '2017-01-01' AND '2017-04-01' | [
"Between",
"1/1/2017",
"and",
"4/1/2017",
",",
"what",
"is",
"the",
"average",
"server",
"time",
"of",
"calls",
"under",
"the",
"server",
"DARMON",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "callcenterlogs"
},
{
"id": 1,
"type": "column",
"value": "Date received"
},
{
"id": 2,
"type": "value",
"value": "2017-01-01"
},
{
"id": 3,
"type": "value",
"value": "2017-04-01"
},
{
"id": 4,
"type": "colu... | [
{
"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": [
9,
10
]
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
838 | party_host | spider:train_spider.json:2671 | Which party had the most hosts? Give me the party location. | SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1 | [
"Which",
"party",
"had",
"the",
"most",
"hosts",
"?",
"Give",
"me",
"the",
"party",
"location",
"."
] | [
{
"id": 2,
"type": "column",
"value": "number_of_hosts"
},
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 0,
"type": "table",
"value": "party"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
839 | cars | bird:train.json:3079 | What are the miles per gallon of the most expensive car? | SELECT T1.mpg FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1 | [
"What",
"are",
"the",
"miles",
"per",
"gallon",
"of",
"the",
"most",
"expensive",
"car",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "price"
},
{
"id": 3,
"type": "column",
"value": "price"
},
{
"id": 1,
"type": "table",
"value": "data"
},
{
"id": 0,
"type": "column",
"value": "mpg"
},
{
"id": 4,
"type": "column",
"value": "id"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
840 | advertising_agencies | bird:test.json:2143 | What are the id, sic code and agency id of the client who has attended 1 meeting and has any invoice. | SELECT T1.client_id , T1.sic_code , T1.agency_id FROM clients AS T1 JOIN meetings AS T2 ON T1.client_id = T2.client_id GROUP BY T1.client_id HAVING count(*) = 1 INTERSECT SELECT T1.client_id , T1.sic_code , T1.agency_id FROM clients AS T1 JOIN invoices AS T2 ON T1.client_id = T2.client_id | [
"What",
"are",
"the",
"i",
"d",
",",
"sic",
"code",
"and",
"agency",
"i",
"d",
"of",
"the",
"client",
"who",
"has",
"attended",
"1",
"meeting",
"and",
"has",
"any",
"invoice",
"."
] | [
{
"id": 0,
"type": "column",
"value": "client_id"
},
{
"id": 2,
"type": "column",
"value": "agency_id"
},
{
"id": 1,
"type": "column",
"value": "sic_code"
},
{
"id": 4,
"type": "table",
"value": "meetings"
},
{
"id": 6,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10,
11
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
841 | shakespeare | bird:train.json:3016 | List the character names and descriptions of chapter ID 18710. | SELECT DISTINCT T1.CharName, T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.Chapter_id = 18710 | [
"List",
"the",
"character",
"names",
"and",
"descriptions",
"of",
"chapter",
"ID",
"18710",
"."
] | [
{
"id": 7,
"type": "column",
"value": "character_id"
},
{
"id": 1,
"type": "column",
"value": "description"
},
{
"id": 2,
"type": "table",
"value": "characters"
},
{
"id": 3,
"type": "table",
"value": "paragraphs"
},
{
"id": 4,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-COLUMN",
"B-VALUE",
"O"
] |
842 | bike_share_1 | bird:train.json:9066 | What is the location coordinates of the bike station from which the bike for the trip that last the longest was borrowed? | SELECT T2.lat, T2.long FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.duration = ( SELECT MAX(T1.duration) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name ) | [
"What",
"is",
"the",
"location",
"coordinates",
"of",
"the",
"bike",
"station",
"from",
"which",
"the",
"bike",
"for",
"the",
"trip",
"that",
"last",
"the",
"longest",
"was",
"borrowed",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "start_station_name"
},
{
"id": 4,
"type": "column",
"value": "duration"
},
{
"id": 3,
"type": "table",
"value": "station"
},
{
"id": 1,
"type": "column",
"value": "long"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
17
]
},
{
"entity_id": 1,
"token_idxs": [
19
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"enti... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
843 | shipping | bird:train.json:5671 | Where does the driver of ship ID 1127 live? | SELECT T2.address FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = '1127' | [
"Where",
"does",
"the",
"driver",
"of",
"ship",
"ID",
"1127",
"live",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "driver_id"
},
{
"id": 1,
"type": "table",
"value": "shipment"
},
{
"id": 0,
"type": "column",
"value": "address"
},
{
"id": 3,
"type": "column",
"value": "ship_id"
},
{
"id": 2,
"type": "table",
"value... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
5,
6
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id":... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O"
] |
844 | student_club | bird:dev.json:1440 | List emails of people who paid more than 20 dollars from 9/10/2019 to 11/19/2019. | SELECT DISTINCT T1.email FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE date(SUBSTR(T2.expense_date, 1, 10)) BETWEEN '2019-09-10' AND '2019-11-19' AND T2.cost > 20 | [
"List",
"emails",
"of",
"people",
"who",
"paid",
"more",
"than",
"20",
"dollars",
"from",
"9/10/2019",
"to",
"11/19/2019",
"."
] | [
{
"id": 4,
"type": "column",
"value": "link_to_member"
},
{
"id": 9,
"type": "column",
"value": "expense_date"
},
{
"id": 5,
"type": "value",
"value": "2019-09-10"
},
{
"id": 6,
"type": "value",
"value": "2019-11-19"
},
{
"id": 3,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
845 | car_retails | bird:train.json:1653 | Please list the top three product names with the highest unit price. | SELECT t1.productName FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode ORDER BY t2.priceEach DESC LIMIT 3 | [
"Please",
"list",
"the",
"top",
"three",
"product",
"names",
"with",
"the",
"highest",
"unit",
"price",
"."
] | [
{
"id": 2,
"type": "table",
"value": "orderdetails"
},
{
"id": 0,
"type": "column",
"value": "productname"
},
{
"id": 4,
"type": "column",
"value": "productcode"
},
{
"id": 3,
"type": "column",
"value": "priceeach"
},
{
"id": 1,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
846 | medicine_enzyme_interaction | spider:train_spider.json:971 | How many distinct FDA approval statuses are there for the medicines? | SELECT count(DISTINCT FDA_approved) FROM medicine | [
"How",
"many",
"distinct",
"FDA",
"approval",
"statuses",
"are",
"there",
"for",
"the",
"medicines",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "fda_approved"
},
{
"id": 0,
"type": "table",
"value": "medicine"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
847 | video_games | bird:train.json:3422 | How many times did other regions make positive sales in DS platform? | SELECT COUNT(DISTINCT T2.id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T1.id = T3.game_platform_id INNER JOIN region AS T4 ON T3.region_id = T4.id WHERE T1.platform_name = 'DS' AND T4.region_name = 'Other' AND T3.num_sales > 0 | [
"How",
"many",
"times",
"did",
"other",
"regions",
"make",
"positive",
"sales",
"in",
"DS",
"platform",
"?"
] | [
{
"id": 12,
"type": "column",
"value": "game_platform_id"
},
{
"id": 4,
"type": "column",
"value": "platform_name"
},
{
"id": 11,
"type": "table",
"value": "game_platform"
},
{
"id": 2,
"type": "table",
"value": "region_sales"
},
{
"id": 6,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
848 | movie_1 | spider:train_spider.json:2491 | What are the names of all directors who made one movie? | SELECT director FROM Movie GROUP BY director HAVING count(*) = 1 | [
"What",
"are",
"the",
"names",
"of",
"all",
"directors",
"who",
"made",
"one",
"movie",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "director"
},
{
"id": 0,
"type": "table",
"value": "movie"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
849 | menu | bird:train.json:5549 | Provide the menu page ids of all the menu that includes mashed potatoes. | SELECT T2.menu_page_id FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Mashed potatoes' | [
"Provide",
"the",
"menu",
"page",
"ids",
"of",
"all",
"the",
"menu",
"that",
"includes",
"mashed",
"potatoes",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Mashed potatoes"
},
{
"id": 0,
"type": "column",
"value": "menu_page_id"
},
{
"id": 2,
"type": "table",
"value": "menuitem"
},
{
"id": 6,
"type": "column",
"value": "dish_id"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11,
12
]
},
{
"... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
850 | driving_school | spider:train_spider.json:6655 | In which city do the most employees live and how many of them live there? | SELECT T1.city , count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1; | [
"In",
"which",
"city",
"do",
"the",
"most",
"employees",
"live",
"and",
"how",
"many",
"of",
"them",
"live",
"there",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "staff_address_id"
},
{
"id": 3,
"type": "column",
"value": "address_id"
},
{
"id": 1,
"type": "table",
"value": "addresses"
},
{
"id": 2,
"type": "table",
"value": "staff"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
851 | student_club | bird:dev.json:1363 | List all of the College of Humanities and Social Sciences' departments. | SELECT department FROM major WHERE college = 'College of Humanities and Social Sciences' | [
"List",
"all",
"of",
"the",
"College",
"of",
"Humanities",
"and",
"Social",
"Sciences",
"'",
"departments",
"."
] | [
{
"id": 3,
"type": "value",
"value": "College of Humanities and Social Sciences"
},
{
"id": 1,
"type": "column",
"value": "department"
},
{
"id": 2,
"type": "column",
"value": "college"
},
{
"id": 0,
"type": "table",
"value": "major"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
5,
6,
7,
8,
9
]
},
{
"entity_id": 4,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-COLUMN",
"O"
] |
852 | talkingdata | bird:train.json:1206 | Identify by their id all the apps that belong to the game-stress reliever category. | SELECT T2.app_id FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T1.category = 'game-stress reliever' | [
"Identify",
"by",
"their",
"i",
"d",
"all",
"the",
"apps",
"that",
"belong",
"to",
"the",
"game",
"-",
"stress",
"reliever",
"category",
"."
] | [
{
"id": 4,
"type": "value",
"value": "game-stress reliever"
},
{
"id": 1,
"type": "table",
"value": "label_categories"
},
{
"id": 2,
"type": "table",
"value": "app_labels"
},
{
"id": 3,
"type": "column",
"value": "category"
},
{
"id": 5,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
12,
13,
14,
15
]
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.