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 |
|---|---|---|---|---|---|---|---|---|
11,345 | regional_sales | bird:train.json:2671 | List the order numbers and product names which were ordered on 6th June, 2018. | SELECT DISTINCT OrderNumber, `Product Name` FROM ( SELECT IIF(T2.OrderDate = '6/6/18', T2.OrderNumber, NULL) AS "OrderNumber" , IIF(T2.OrderDate = '6/6/18', T1.`Product Name`, NULL) AS "Product Name" FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE OrderNumber IS NOT NULL AND `Produ... | [
"List",
"the",
"order",
"numbers",
"and",
"product",
"names",
"which",
"were",
"ordered",
"on",
"6th",
"June",
",",
"2018",
"."
] | [
{
"id": 1,
"type": "column",
"value": "Product Name"
},
{
"id": 3,
"type": "table",
"value": "Sales Orders"
},
{
"id": 0,
"type": "column",
"value": "ordernumber"
},
{
"id": 4,
"type": "column",
"value": "_productid"
},
{
"id": 5,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,346 | aircraft | spider:train_spider.json:4807 | What are the maximum and minimum number of transit passengers of all aiports. | SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport | [
"What",
"are",
"the",
"maximum",
"and",
"minimum",
"number",
"of",
"transit",
"passengers",
"of",
"all",
"aiports",
"."
] | [
{
"id": 1,
"type": "column",
"value": "transit_passengers"
},
{
"id": 0,
"type": "table",
"value": "airport"
}
] | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
8,
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
11,347 | movie_3 | bird:train.json:9427 | What is the average amount of money spent by a customer in Italy on a single film rental? | SELECT AVG(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy' | [
"What",
"is",
"the",
"average",
"amount",
"of",
"money",
"spent",
"by",
"a",
"customer",
"in",
"Italy",
"on",
"a",
"single",
"film",
"rental",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "customer_id"
},
{
"id": 7,
"type": "column",
"value": "address_id"
},
{
"id": 10,
"type": "column",
"value": "country_id"
},
{
"id": 4,
"type": "table",
"value": "customer"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,348 | movie_3 | bird:train.json:9417 | Among all the active customers, how many of them live in Arlington? | SELECT COUNT(T2.customer_id) FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T1.city_id = T3.city_id WHERE T2.active = 1 AND T3.city = 'Arlington' | [
"Among",
"all",
"the",
"active",
"customers",
",",
"how",
"many",
"of",
"them",
"live",
"in",
"Arlington",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "customer_id"
},
{
"id": 9,
"type": "column",
"value": "address_id"
},
{
"id": 8,
"type": "value",
"value": "Arlington"
},
{
"id": 3,
"type": "table",
"value": "customer"
},
{
"id": 2,
"type": "table",
... | [
{
"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": [
3
... | [
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,349 | restaurant | bird:train.json:1764 | What is the restaurant's name and ID located at Ocean Avenue, San Francisco? | SELECT T2.label, T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'ocean avenue' | [
"What",
"is",
"the",
"restaurant",
"'s",
"name",
"and",
"ID",
"located",
"at",
"Ocean",
"Avenue",
",",
"San",
"Francisco",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "id_restaurant"
},
{
"id": 5,
"type": "value",
"value": "san francisco"
},
{
"id": 7,
"type": "value",
"value": "ocean avenue"
},
{
"id": 3,
"type": "table",
"value": "generalinfo"
},
{
"id": 6,
"type": "co... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
11,350 | student_loan | bird:train.json:4552 | Calculate the average number of disabled female students enrolled in UCI. | SELECT CAST(SUM(IIF(T1.school = 'uci' AND T4.name IS NULL, 1, 0)) AS REAL) / COUNT(T1.name) FROM enrolled AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name INNER JOIN person AS T3 ON T1.name = T3.name LEFT JOIN male AS T4 ON T3.name = T4.name | [
"Calculate",
"the",
"average",
"number",
"of",
"disabled",
"female",
"students",
"enrolled",
"in",
"UCI",
"."
] | [
{
"id": 3,
"type": "table",
"value": "enrolled"
},
{
"id": 4,
"type": "table",
"value": "disabled"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 7,
"type": "column",
"value": "school"
},
{
"id": 0,
"type": "table",
"value": "m... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-TABLE",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
11,351 | codebase_comments | bird:train.json:607 | How many stars does the repository of the solution No. 45997 have? | SELECT T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 45997 | [
"How",
"many",
"stars",
"does",
"the",
"repository",
"of",
"the",
"solution",
"No",
".",
"45997",
"have",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "solution"
},
{
"id": 5,
"type": "column",
"value": "repoid"
},
{
"id": 0,
"type": "column",
"value": "stars"
},
{
"id": 4,
"type": "value",
"value": "45997"
},
{
"id": 1,
"type": "table",
"value": "repo... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
11,352 | college_3 | spider:train_spider.json:4645 | What are the phones of departments in Room 268? | SELECT DPhone FROM DEPARTMENT WHERE Room = 268 | [
"What",
"are",
"the",
"phones",
"of",
"departments",
"in",
"Room",
"268",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "department"
},
{
"id": 1,
"type": "column",
"value": "dphone"
},
{
"id": 2,
"type": "column",
"value": "room"
},
{
"id": 3,
"type": "value",
"value": "268"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
11,353 | cre_Drama_Workshop_Groups | spider:train_spider.json:5096 | How many customers do we have? | SELECT count(*) FROM CUSTOMERS | [
"How",
"many",
"customers",
"do",
"we",
"have",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "customers"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
11,354 | tracking_share_transactions | spider:train_spider.json:5850 | Show all transaction ids with transaction code 'PUR'. | SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' | [
"Show",
"all",
"transaction",
"ids",
"with",
"transaction",
"code",
"'",
"PUR",
"'",
"."
] | [
{
"id": 2,
"type": "column",
"value": "transaction_type_code"
},
{
"id": 1,
"type": "column",
"value": "transaction_id"
},
{
"id": 0,
"type": "table",
"value": "transactions"
},
{
"id": 3,
"type": "value",
"value": "PUR"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
11,355 | donor | bird:train.json:3217 | In the schools donated by the project of the resources provided by ABC School Supply, how many schools are public magnet schools? | SELECT COUNT(T2.schoolid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_magnet = 't' AND T1.vendor_name = 'ABC School Supply' | [
"In",
"the",
"schools",
"donated",
"by",
"the",
"project",
"of",
"the",
"resources",
"provided",
"by",
"ABC",
"School",
"Supply",
",",
"how",
"many",
"schools",
"are",
"public",
"magnet",
"schools",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "ABC School Supply"
},
{
"id": 4,
"type": "column",
"value": "school_magnet"
},
{
"id": 6,
"type": "column",
"value": "vendor_name"
},
{
"id": 0,
"type": "table",
"value": "resources"
},
{
"id": 3,
"type": "... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
18,
19
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O"
] |
11,356 | language_corpus | bird:train.json:5737 | How many times did the word number 8 appear? | SELECT occurrences FROM words WHERE wid = 8 | [
"How",
"many",
"times",
"did",
"the",
"word",
"number",
"8",
"appear",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "occurrences"
},
{
"id": 0,
"type": "table",
"value": "words"
},
{
"id": 2,
"type": "column",
"value": "wid"
},
{
"id": 3,
"type": "value",
"value": "8"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O"
] |
11,357 | mondial_geo | bird:train.json:8479 | What is the newest established organization where Singapore is a member of? | SELECT T3.Name FROM country AS T1 INNER JOIN isMember AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country WHERE T1.Name = 'Singapore' ORDER BY T3.Established DESC LIMIT 1 | [
"What",
"is",
"the",
"newest",
"established",
"organization",
"where",
"Singapore",
"is",
"a",
"member",
"of",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "organization"
},
{
"id": 3,
"type": "column",
"value": "established"
},
{
"id": 2,
"type": "value",
"value": "Singapore"
},
{
"id": 5,
"type": "table",
"value": "ismember"
},
{
"id": 4,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
11,358 | music_tracker | bird:train.json:2053 | How many releases are tagged "1980s"? | SELECT COUNT(id) FROM tags WHERE tag LIKE '1980s' | [
"How",
"many",
"releases",
"are",
"tagged",
"\"",
"1980s",
"\"",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "1980s"
},
{
"id": 0,
"type": "table",
"value": "tags"
},
{
"id": 1,
"type": "column",
"value": "tag"
},
{
"id": 3,
"type": "column",
"value": "id"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
11,359 | bike_1 | spider:train_spider.json:196 | What are all the different zip codes that have a maximum dew point that was always below 70? | SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70 | [
"What",
"are",
"all",
"the",
"different",
"zip",
"codes",
"that",
"have",
"a",
"maximum",
"dew",
"point",
"that",
"was",
"always",
"below",
"70",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "max_dew_point_f"
},
{
"id": 1,
"type": "column",
"value": "zip_code"
},
{
"id": 0,
"type": "table",
"value": "weather"
},
{
"id": 3,
"type": "value",
"value": "70"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
10,
11,
12
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,360 | donor | bird:train.json:3164 | How many donations from teachers were done in the state of Colorado? | SELECT COUNT(donationid) FROM donations WHERE is_teacher_acct = 't' AND donor_state = 'CO' | [
"How",
"many",
"donations",
"from",
"teachers",
"were",
"done",
"in",
"the",
"state",
"of",
"Colorado",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "is_teacher_acct"
},
{
"id": 4,
"type": "column",
"value": "donor_state"
},
{
"id": 1,
"type": "column",
"value": "donationid"
},
{
"id": 0,
"type": "table",
"value": "donations"
},
{
"id": 5,
"type": "valu... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
11,361 | cars | bird:train.json:3075 | What is the average price of cars with 8 cylinders? | SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.cylinders = 8 | [
"What",
"is",
"the",
"average",
"price",
"of",
"cars",
"with",
"8",
"cylinders",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "cylinders"
},
{
"id": 1,
"type": "table",
"value": "price"
},
{
"id": 4,
"type": "column",
"value": "price"
},
{
"id": 0,
"type": "table",
"value": "data"
},
{
"id": 5,
"type": "column",
"value": "id"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
11,362 | retails | bird:train.json:6763 | List the order key of the orders with a total price between 200000 and 300000. | SELECT o_orderkey FROM orders WHERE o_totalprice BETWEEN 200000 AND 300000 | [
"List",
"the",
"order",
"key",
"of",
"the",
"orders",
"with",
"a",
"total",
"price",
"between",
"200000",
"and",
"300000",
"."
] | [
{
"id": 2,
"type": "column",
"value": "o_totalprice"
},
{
"id": 1,
"type": "column",
"value": "o_orderkey"
},
{
"id": 0,
"type": "table",
"value": "orders"
},
{
"id": 3,
"type": "value",
"value": "200000"
},
{
"id": 4,
"type": "value",
"val... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
11,363 | app_store | bird:train.json:2541 | What is the rating for "Garden Coloring Book"? List all of its reviews. | SELECT T1.Rating, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Garden Coloring Book' | [
"What",
"is",
"the",
"rating",
"for",
"\"",
"Garden",
"Coloring",
"Book",
"\"",
"?",
"List",
"all",
"of",
"its",
"reviews",
"."
] | [
{
"id": 5,
"type": "value",
"value": "Garden Coloring Book"
},
{
"id": 1,
"type": "column",
"value": "translated_review"
},
{
"id": 3,
"type": "table",
"value": "user_reviews"
},
{
"id": 2,
"type": "table",
"value": "playstore"
},
{
"id": 0,
"t... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,364 | car_retails | bird:train.json:1657 | How many motorcycles have been ordered in 2004? | SELECT SUM(t2.quantityOrdered) FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN products AS t3 ON t2.productCode = t3.productCode WHERE t3.productLine = 'motorcycles' AND STRFTIME('%Y', t1.orderDate) = '2004' | [
"How",
"many",
"motorcycles",
"have",
"been",
"ordered",
"in",
"2004",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "quantityordered"
},
{
"id": 3,
"type": "table",
"value": "orderdetails"
},
{
"id": 4,
"type": "column",
"value": "productcode"
},
{
"id": 5,
"type": "column",
"value": "productline"
},
{
"id": 6,
"type": "... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"B-TABLE",
"B-VALUE",
"O"
] |
11,365 | country_language | bird:test.json:1360 | List the name of languages in ascending alphabetical order. | SELECT name FROM languages ORDER BY name ASC | [
"List",
"the",
"name",
"of",
"languages",
"in",
"ascending",
"alphabetical",
"order",
"."
] | [
{
"id": 0,
"type": "table",
"value": "languages"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
11,366 | university | bird:train.json:8069 | Please list the IDs of the universities with a student staff ratio of over 15 in 2011. | SELECT university_id FROM university_year WHERE year = 2011 AND student_staff_ratio > 15 | [
"Please",
"list",
"the",
"IDs",
"of",
"the",
"universities",
"with",
"a",
"student",
"staff",
"ratio",
"of",
"over",
"15",
"in",
"2011",
"."
] | [
{
"id": 4,
"type": "column",
"value": "student_staff_ratio"
},
{
"id": 0,
"type": "table",
"value": "university_year"
},
{
"id": 1,
"type": "column",
"value": "university_id"
},
{
"id": 2,
"type": "column",
"value": "year"
},
{
"id": 3,
"type":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
9,
10,
11
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
11,367 | car_road_race | bird:test.json:1349 | What are names of drivers who did not take part in a race? | SELECT Driver_Name FROM driver WHERE Driver_ID NOT IN (SELECT Driver_ID FROM race) | [
"What",
"are",
"names",
"of",
"drivers",
"who",
"did",
"not",
"take",
"part",
"in",
"a",
"race",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "driver_name"
},
{
"id": 2,
"type": "column",
"value": "driver_id"
},
{
"id": 0,
"type": "table",
"value": "driver"
},
{
"id": 3,
"type": "table",
"value": "race"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,368 | chicago_crime | bird:train.json:8644 | List down the titles and descriptions of the crimes cases against persons. | SELECT title, description FROM FBI_Code WHERE crime_against = 'Persons' | [
"List",
"down",
"the",
"titles",
"and",
"descriptions",
"of",
"the",
"crimes",
"cases",
"against",
"persons",
"."
] | [
{
"id": 3,
"type": "column",
"value": "crime_against"
},
{
"id": 2,
"type": "column",
"value": "description"
},
{
"id": 0,
"type": "table",
"value": "fbi_code"
},
{
"id": 4,
"type": "value",
"value": "Persons"
},
{
"id": 1,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
11,370 | retail_world | bird:train.json:6316 | What is the quantity of Ikura ordered in order no. 10273? | SELECT T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura' | [
"What",
"is",
"the",
"quantity",
"of",
"Ikura",
"ordered",
"in",
"order",
"no",
".",
"10273",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "Order Details"
},
{
"id": 6,
"type": "column",
"value": "productname"
},
{
"id": 3,
"type": "column",
"value": "productid"
},
{
"id": 0,
"type": "column",
"value": "quantity"
},
{
"id": 1,
"type": "table",
... | [
{
"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": [
6
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,371 | image_and_language | bird:train.json:7549 | Count the image numbers that contain the "paint" object. | SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'paint' | [
"Count",
"the",
"image",
"numbers",
"that",
"contain",
"the",
"\"",
"paint",
"\"",
"object",
"."
] | [
{
"id": 5,
"type": "column",
"value": "obj_class_id"
},
{
"id": 1,
"type": "table",
"value": "obj_classes"
},
{
"id": 2,
"type": "column",
"value": "obj_class"
},
{
"id": 0,
"type": "table",
"value": "img_obj"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
11,372 | simpson_episodes | bird:train.json:4266 | How many recipients of the Primetime Emmy Award category that were born in the USA? Find the percentage of Americans in the total number of the country. | SELECT SUM(CASE WHEN T1.birth_country = 'USA' THEN 1 ELSE 0 END) AS num , CAST(SUM(CASE WHEN T1.birth_country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.award_category = 'Primetime Emmy' AND T2.person = 'Dan Castellaneta'; | [
"How",
"many",
"recipients",
"of",
"the",
"Primetime",
"Emmy",
"Award",
"category",
"that",
"were",
"born",
"in",
"the",
"USA",
"?",
"Find",
"the",
"percentage",
"of",
"Americans",
"in",
"the",
"total",
"number",
"of",
"the",
"country",
"."
] | [
{
"id": 6,
"type": "value",
"value": "Dan Castellaneta"
},
{
"id": 4,
"type": "column",
"value": "award_category"
},
{
"id": 5,
"type": "value",
"value": "Primetime Emmy"
},
{
"id": 10,
"type": "column",
"value": "birth_country"
},
{
"id": 0,
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
24
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
11,373 | address_1 | bird:test.json:840 | Give the state that the student with first name Linda lives in. | SELECT state FROM Student AS T1 JOIN City AS T2 ON T1.city_code = T2.city_code WHERE T1.Fname = "Linda" | [
"Give",
"the",
"state",
"that",
"the",
"student",
"with",
"first",
"name",
"Linda",
"lives",
"in",
"."
] | [
{
"id": 5,
"type": "column",
"value": "city_code"
},
{
"id": 1,
"type": "table",
"value": "student"
},
{
"id": 0,
"type": "column",
"value": "state"
},
{
"id": 3,
"type": "column",
"value": "fname"
},
{
"id": 4,
"type": "column",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O"
] |
11,374 | retails | bird:train.json:6715 | How many orders shipped via ship have a medium priority? | SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'SHIP' AND T1.o_orderpriority = '3-MEDIUM' | [
"How",
"many",
"orders",
"shipped",
"via",
"ship",
"have",
"a",
"medium",
"priority",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "o_orderpriority"
},
{
"id": 2,
"type": "column",
"value": "o_orderkey"
},
{
"id": 3,
"type": "column",
"value": "l_orderkey"
},
{
"id": 4,
"type": "column",
"value": "l_shipmode"
},
{
"id": 1,
"type": "tab... | [
{
"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": [
3
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
11,375 | movies_4 | bird:train.json:422 | Give the name of the movie with a revenue of 559852396. | SELECT title FROM movie WHERE revenue = 559852396 | [
"Give",
"the",
"name",
"of",
"the",
"movie",
"with",
"a",
"revenue",
"of",
"559852396",
"."
] | [
{
"id": 3,
"type": "value",
"value": "559852396"
},
{
"id": 2,
"type": "column",
"value": "revenue"
},
{
"id": 0,
"type": "table",
"value": "movie"
},
{
"id": 1,
"type": "column",
"value": "title"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
11,376 | department_management | spider:train_spider.json:10 | How many acting statuses are there? | SELECT count(DISTINCT temporary_acting) FROM management | [
"How",
"many",
"acting",
"statuses",
"are",
"there",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "temporary_acting"
},
{
"id": 0,
"type": "table",
"value": "management"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O"
] |
11,377 | beer_factory | bird:train.json:5316 | What brands of beers are manufactured at coordinates 38,566,129, -121,426,432? | SELECT DISTINCT T2.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN geolocation AS T3 ON T1.LocationID = T3.LocationID WHERE T3.Latitude = '38.566129' AND T3.Longitude = '-121.426432' | [
"What",
"brands",
"of",
"beers",
"are",
"manufactured",
"at",
"coordinates",
"38,566,129",
",",
"-121,426,432",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "rootbeerbrand"
},
{
"id": 1,
"type": "table",
"value": "geolocation"
},
{
"id": 8,
"type": "value",
"value": "-121.426432"
},
{
"id": 4,
"type": "column",
"value": "locationid"
},
{
"id": 0,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2,
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
11,378 | club_1 | spider:train_spider.json:4255 | Count the total number of students. | SELECT count(*) FROM student | [
"Count",
"the",
"total",
"number",
"of",
"students",
"."
] | [
{
"id": 0,
"type": "table",
"value": "student"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,379 | food_inspection | bird:train.json:8849 | Among the owners from Cameron Park, what is the business name of the business with a score of 100? | SELECT DISTINCT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_city = 'Cameron Park' AND T1.score = 100 | [
"Among",
"the",
"owners",
"from",
"Cameron",
"Park",
",",
"what",
"is",
"the",
"business",
"name",
"of",
"the",
"business",
"with",
"a",
"score",
"of",
"100",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Cameron Park"
},
{
"id": 1,
"type": "table",
"value": "inspections"
},
{
"id": 3,
"type": "column",
"value": "business_id"
},
{
"id": 2,
"type": "table",
"value": "businesses"
},
{
"id": 4,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
11,380 | car_racing | bird:test.json:1630 | Which team does not have drivers? | SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver) | [
"Which",
"team",
"does",
"not",
"have",
"drivers",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "team_driver"
},
{
"id": 2,
"type": "column",
"value": "team_id"
},
{
"id": 0,
"type": "table",
"value": "team"
},
{
"id": 1,
"type": "column",
"value": "team"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"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"
] |
11,381 | toxicology | bird:dev.json:245 | What is the average number of bonds the atoms with the element iodine have? | SELECT CAST(COUNT(T2.bond_id) AS REAL) / COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'i' | [
"What",
"is",
"the",
"average",
"number",
"of",
"bonds",
"the",
"atoms",
"with",
"the",
"element",
"iodine",
"have",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "connected"
},
{
"id": 2,
"type": "column",
"value": "element"
},
{
"id": 4,
"type": "column",
"value": "atom_id"
},
{
"id": 5,
"type": "column",
"value": "bond_id"
},
{
"id": 0,
"type": "table",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
11,382 | professional_basketball | bird:train.json:2845 | Please list the last names and first names of all-star players who are higher than 75 inch. | SELECT DISTINCT T1.lastName, T1.firstName FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.height > 75 | [
"Please",
"list",
"the",
"last",
"names",
"and",
"first",
"names",
"of",
"all",
"-",
"star",
"players",
"who",
"are",
"higher",
"than",
"75",
"inch",
"."
] | [
{
"id": 3,
"type": "table",
"value": "player_allstar"
},
{
"id": 1,
"type": "column",
"value": "firstname"
},
{
"id": 0,
"type": "column",
"value": "lastname"
},
{
"id": 6,
"type": "column",
"value": "playerid"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
15
]
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
11,383 | public_review_platform | bird:train.json:4066 | Which businesses with the category name Accessories have opening hours before 7AM? | SELECT T1.business_id FROM Business_Hours AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Accessories' AND SUBSTR(T1.opening_time, -4, 2) * 1 < 7 AND T1.opening_time LIKE '%AM' | [
"Which",
"businesses",
"with",
"the",
"category",
"name",
"Accessories",
"have",
"opening",
"hours",
"before",
"7AM",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "business_categories"
},
{
"id": 2,
"type": "table",
"value": "business_hours"
},
{
"id": 5,
"type": "column",
"value": "category_name"
},
{
"id": 8,
"type": "column",
"value": "opening_time"
},
{
"id": 0,
"... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
11,384 | headphone_store | bird:test.json:961 | Which neighborhood does not have any headphone in stock? | SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id = t2.store_id | [
"Which",
"neighborhood",
"does",
"not",
"have",
"any",
"headphone",
"in",
"stock",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "neighborhood"
},
{
"id": 3,
"type": "column",
"value": "store_id"
},
{
"id": 0,
"type": "table",
"value": "store"
},
{
"id": 2,
"type": "table",
"value": "stock"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"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-TABLE",
"O"
] |
11,385 | store_1 | spider:train_spider.json:614 | What are the different names of the genres? | SELECT DISTINCT name FROM genres; | [
"What",
"are",
"the",
"different",
"names",
"of",
"the",
"genres",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "genres"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
11,386 | beer_factory | bird:train.json:5244 | How many root beers of the Bulldog were purchased in August, 2014? | SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T2.TransactionDate LIKE '2014-08%' AND T3.BrandName = 'Bulldog' | [
"How",
"many",
"root",
"beers",
"of",
"the",
"Bulldog",
"were",
"purchased",
"in",
"August",
",",
"2014",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "transactiondate"
},
{
"id": 0,
"type": "table",
"value": "rootbeerbrand"
},
{
"id": 3,
"type": "table",
"value": "transaction"
},
{
"id": 8,
"type": "column",
"value": "rootbeerid"
},
{
"id": 6,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2,
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,387 | computer_student | bird:train.json:1001 | What is the ratio of professors and students? | SELECT CAST(SUM(CASE WHEN professor = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN student = 1 THEN 1 ELSE 0 END) AS per FROM person | [
"What",
"is",
"the",
"ratio",
"of",
"professors",
"and",
"students",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "professor"
},
{
"id": 4,
"type": "column",
"value": "student"
},
{
"id": 0,
"type": "table",
"value": "person"
},
{
"id": 1,
"type": "value",
"value": "100"
},
{
"id": 2,
"type": "value",
"value": "0"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": [
5
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
11,388 | simpson_episodes | bird:train.json:4198 | Among the episode that get more than 950 votes, how many of the episodes were nominated for the 'Outstanding Voice-Over Performance Award in 2009'? Find the percentage of the episodes. | SELECT CAST(SUM(CASE WHEN T1.award = 'Outstanding Voice-Over Performance' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.episode_id) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.votes > 950 AND T1.year = 2009; | [
"Among",
"the",
"episode",
"that",
"get",
"more",
"than",
"950",
"votes",
",",
"how",
"many",
"of",
"the",
"episodes",
"were",
"nominated",
"for",
"the",
"'",
"Outstanding",
"Voice",
"-",
"Over",
"Performance",
"Award",
"in",
"2009",
"'",
"?",
"Find",
"t... | [
{
"id": 11,
"type": "value",
"value": "Outstanding Voice-Over Performance"
},
{
"id": 2,
"type": "column",
"value": "episode_id"
},
{
"id": 1,
"type": "table",
"value": "episode"
},
{
"id": 0,
"type": "table",
"value": "award"
},
{
"id": 3,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O... |
11,389 | superstore | bird:train.json:2418 | Among the customers in South superstore, which customers ordered more than 3 times in 2015? State the name of the customers. | SELECT DISTINCT T2.`Customer Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE STRFTIME('%Y', T1.`Order Date`) = '2015' GROUP BY T2.`Customer Name` HAVING COUNT(T2.`Customer Name`) > 3 | [
"Among",
"the",
"customers",
"in",
"South",
"superstore",
",",
"which",
"customers",
"ordered",
"more",
"than",
"3",
"times",
"in",
"2015",
"?",
"State",
"the",
"name",
"of",
"the",
"customers",
"."
] | [
{
"id": 1,
"type": "table",
"value": "south_superstore"
},
{
"id": 0,
"type": "column",
"value": "Customer Name"
},
{
"id": 5,
"type": "column",
"value": "Customer ID"
},
{
"id": 7,
"type": "column",
"value": "Order Date"
},
{
"id": 2,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,390 | flight_4 | spider:train_spider.json:6869 | Find the number of routes with destination airports in Italy. | SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy' | [
"Find",
"the",
"number",
"of",
"routes",
"with",
"destination",
"airports",
"in",
"Italy",
"."
] | [
{
"id": 1,
"type": "table",
"value": "airports"
},
{
"id": 4,
"type": "column",
"value": "dst_apid"
},
{
"id": 2,
"type": "column",
"value": "country"
},
{
"id": 0,
"type": "table",
"value": "routes"
},
{
"id": 3,
"type": "value",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
11,391 | authors | bird:train.json:3575 | Identify by publication year in the paper database all journals that don't have short name. | SELECT DISTINCT T2.Year, FullName FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = '' | [
"Identify",
"by",
"publication",
"year",
"in",
"the",
"paper",
"database",
"all",
"journals",
"that",
"do",
"n't",
"have",
"short",
"name",
"."
] | [
{
"id": 4,
"type": "column",
"value": "shortname"
},
{
"id": 6,
"type": "column",
"value": "journalid"
},
{
"id": 1,
"type": "column",
"value": "fullname"
},
{
"id": 2,
"type": "table",
"value": "journal"
},
{
"id": 3,
"type": "table",
"val... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
11,392 | retails | bird:train.json:6726 | Calculate the percentage of customers' accounts in debt. | SELECT CAST(SUM(IIF(c_acctbal < 0, 1, 0)) AS REAL) * 100 / COUNT(c_custkey) FROM customer | [
"Calculate",
"the",
"percentage",
"of",
"customers",
"'",
"accounts",
"in",
"debt",
"."
] | [
{
"id": 2,
"type": "column",
"value": "c_custkey"
},
{
"id": 5,
"type": "column",
"value": "c_acctbal"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 1,
"type": "value",
"value": "100"
},
{
"id": 3,
"type": "value",
"value": ... | [
{
"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",
"O",
"O",
"O",
"O"
] |
11,393 | public_review_platform | bird:train.json:3847 | How many reviews made by user whose ID is 3 are long? | SELECT COUNT(review_length) FROM Reviews WHERE user_id = 3 AND review_length LIKE 'Long' | [
"How",
"many",
"reviews",
"made",
"by",
"user",
"whose",
"ID",
"is",
"3",
"are",
"long",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "review_length"
},
{
"id": 0,
"type": "table",
"value": "reviews"
},
{
"id": 2,
"type": "column",
"value": "user_id"
},
{
"id": 4,
"type": "value",
"value": "Long"
},
{
"id": 3,
"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": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
11,394 | cs_semester | bird:train.json:961 | What is the salary range of the student with an email of grosellg@hku.hk? | SELECT T1.salary FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.email = 'grosellg@hku.hk' | [
"What",
"is",
"the",
"salary",
"range",
"of",
"the",
"student",
"with",
"an",
"email",
"of",
"grosellg@hku.hk",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "grosellg@hku.hk"
},
{
"id": 5,
"type": "column",
"value": "student_id"
},
{
"id": 2,
"type": "table",
"value": "student"
},
{
"id": 0,
"type": "column",
"value": "salary"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
11,396 | soccer_2 | spider:train_spider.json:4956 | Find the name and training hours of players whose hours are below 1500. | SELECT pName , HS FROM Player WHERE HS < 1500 | [
"Find",
"the",
"name",
"and",
"training",
"hours",
"of",
"players",
"whose",
"hours",
"are",
"below",
"1500",
"."
] | [
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 1,
"type": "column",
"value": "pname"
},
{
"id": 3,
"type": "value",
"value": "1500"
},
{
"id": 2,
"type": "column",
"value": "hs"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,397 | soccer_2 | spider:train_spider.json:5046 | What is the number of states that has some college whose enrollment is larger than the average enrollment? | SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college) | [
"What",
"is",
"the",
"number",
"of",
"states",
"that",
"has",
"some",
"college",
"whose",
"enrollment",
"is",
"larger",
"than",
"the",
"average",
"enrollment",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "college"
},
{
"id": 2,
"type": "column",
"value": "state"
},
{
"id": 1,
"type": "column",
"value": "enr"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,398 | formula_1 | bird:dev.json:970 | List out top 3 German drivers who were born from 1980-1990 and have the earliest lap time. | SELECT T2.driverId FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.nationality = 'German' AND STRFTIME('%Y', T2.dob) BETWEEN '1980' AND '1990' ORDER BY T1.time LIMIT 3 | [
"List",
"out",
"top",
"3",
"German",
"drivers",
"who",
"were",
"born",
"from",
"1980",
"-",
"1990",
"and",
"have",
"the",
"earliest",
"lap",
"time",
"."
] | [
{
"id": 4,
"type": "column",
"value": "nationality"
},
{
"id": 0,
"type": "column",
"value": "driverid"
},
{
"id": 1,
"type": "table",
"value": "pitstops"
},
{
"id": 2,
"type": "table",
"value": "drivers"
},
{
"id": 5,
"type": "value",
"val... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
18
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,399 | debate | spider:train_spider.json:1496 | Show the names of people aged either 35 or 36. | SELECT Name FROM people WHERE Age = 35 OR Age = 36 | [
"Show",
"the",
"names",
"of",
"people",
"aged",
"either",
"35",
"or",
"36",
"."
] | [
{
"id": 0,
"type": "table",
"value": "people"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "age"
},
{
"id": 3,
"type": "value",
"value": "35"
},
{
"id": 4,
"type": "value",
"value": "36"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
11,400 | public_review_platform | bird:train.json:3854 | How many Yelp_Business falls under the category of "Shopping"? | SELECT COUNT(T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name LIKE 'Shopping' | [
"How",
"many",
"Yelp_Business",
"falls",
"under",
"the",
"category",
"of",
"\"",
"Shopping",
"\"",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "business_categories"
},
{
"id": 2,
"type": "column",
"value": "category_name"
},
{
"id": 4,
"type": "column",
"value": "category_id"
},
{
"id": 0,
"type": "table",
"value": "categories"
},
{
"id": 3,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
11,402 | college_2 | spider:train_spider.json:1461 | What are the names of students who have taken Statistics courses? | SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics' | [
"What",
"are",
"the",
"names",
"of",
"students",
"who",
"have",
"taken",
"Statistics",
"courses",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Statistics"
},
{
"id": 2,
"type": "column",
"value": "dept_name"
},
{
"id": 7,
"type": "column",
"value": "course_id"
},
{
"id": 1,
"type": "table",
"value": "student"
},
{
"id": 4,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-VALUE",
"B-TABLE",
"O"
] |
11,403 | movie | bird:train.json:757 | What is the percentage of the USA actors that showed up in the credit list of movie "Mrs. Doubtfire"? | SELECT CAST(SUM(CASE WHEN T3.`Birth Country` = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.`Birth Country`) 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 T1.Title = 'Mrs. Doubtfire' | [
"What",
"is",
"the",
"percentage",
"of",
"the",
"USA",
"actors",
"that",
"showed",
"up",
"in",
"the",
"credit",
"list",
"of",
"movie",
"\"",
"Mrs.",
"Doubtfire",
"\"",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "Mrs. Doubtfire"
},
{
"id": 7,
"type": "column",
"value": "Birth Country"
},
{
"id": 4,
"type": "table",
"value": "characters"
},
{
"id": 5,
"type": "column",
"value": "actorid"
},
{
"id": 8,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
18,
19
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
11,404 | pilot_record | spider:train_spider.json:2096 | Show names of pilots that have more than one record. | SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1 | [
"Show",
"names",
"of",
"pilots",
"that",
"have",
"more",
"than",
"one",
"record",
"."
] | [
{
"id": 1,
"type": "table",
"value": "pilot_record"
},
{
"id": 0,
"type": "column",
"value": "pilot_name"
},
{
"id": 4,
"type": "column",
"value": "pilot_id"
},
{
"id": 2,
"type": "table",
"value": "pilot"
},
{
"id": 3,
"type": "value",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,405 | cre_Students_Information_Systems | bird:test.json:446 | Which students never had a detention or student loan ? Find their biographical data . | select bio_data from students where student_id not in (select t1.student_id from students as t1 join detention as t2 on t1.student_id = t2.student_id union select t1.student_id from students as t1 join student_loans as t2 on t1.student_id = t2.student_id) | [
"Which",
"students",
"never",
"had",
"a",
"detention",
"or",
"student",
"loan",
"?",
"Find",
"their",
"biographical",
"data",
"."
] | [
{
"id": 4,
"type": "table",
"value": "student_loans"
},
{
"id": 2,
"type": "column",
"value": "student_id"
},
{
"id": 3,
"type": "table",
"value": "detention"
},
{
"id": 0,
"type": "table",
"value": "students"
},
{
"id": 1,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,406 | beer_factory | bird:train.json:5313 | At what latitude is the Thomas Kemper brand beer consumed the most? | SELECT T3.Latitude FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN geolocation AS T3 ON T1.LocationID = T3.LocationID WHERE T2.BrandName = 'Thomas Kemper' GROUP BY T3.Latitude ORDER BY COUNT(T1.BrandID) DESC LIMIT 1 | [
"At",
"what",
"latitude",
"is",
"the",
"Thomas",
"Kemper",
"brand",
"beer",
"consumed",
"the",
"most",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Thomas Kemper"
},
{
"id": 5,
"type": "table",
"value": "rootbeerbrand"
},
{
"id": 1,
"type": "table",
"value": "geolocation"
},
{
"id": 6,
"type": "column",
"value": "locationid"
},
{
"id": 2,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
11,407 | movielens | bird:train.json:2284 | For different directors who direct well, how many of them have directed an action film? | SELECT COUNT(DISTINCT T2.directorid) FROM movies2directors AS T2 INNER JOIN directors AS T3 ON T2.directorid = T3.directorid WHERE T2.genre = 'Action' AND T3.d_quality = 4 | [
"For",
"different",
"directors",
"who",
"direct",
"well",
",",
"how",
"many",
"of",
"them",
"have",
"directed",
"an",
"action",
"film",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "movies2directors"
},
{
"id": 2,
"type": "column",
"value": "directorid"
},
{
"id": 1,
"type": "table",
"value": "directors"
},
{
"id": 5,
"type": "column",
"value": "d_quality"
},
{
"id": 4,
"type": "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": [
14
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
11,408 | book_1 | bird:test.json:515 | List all the author names. | SELECT name FROM Author | [
"List",
"all",
"the",
"author",
"names",
"."
] | [
{
"id": 0,
"type": "table",
"value": "author"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"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",
"B-TABLE",
"B-COLUMN",
"O"
] |
11,410 | club_leader | bird:test.json:644 | How many members are there? | SELECT count(*) FROM member | [
"How",
"many",
"members",
"are",
"there",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "member"
}
] | [
{
"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"
] |
11,411 | election | spider:train_spider.json:2737 | What are the name and population of each county? | SELECT County_name , Population FROM county | [
"What",
"are",
"the",
"name",
"and",
"population",
"of",
"each",
"county",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "county_name"
},
{
"id": 2,
"type": "column",
"value": "population"
},
{
"id": 0,
"type": "table",
"value": "county"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
11,413 | college_1 | spider:train_spider.json:3261 | Find the first names and offices of all professors sorted by alphabetical order of their first name. | SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname | [
"Find",
"the",
"first",
"names",
"and",
"offices",
"of",
"all",
"professors",
"sorted",
"by",
"alphabetical",
"order",
"of",
"their",
"first",
"name",
"."
] | [
{
"id": 1,
"type": "column",
"value": "prof_office"
},
{
"id": 0,
"type": "column",
"value": "emp_fname"
},
{
"id": 2,
"type": "table",
"value": "professor"
},
{
"id": 3,
"type": "table",
"value": "employee"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,414 | legislator | bird:train.json:4827 | What is the total number of legislators with "John" as their first name? | SELECT COUNT(*) FROM current WHERE first_name = 'John' | [
"What",
"is",
"the",
"total",
"number",
"of",
"legislators",
"with",
"\"",
"John",
"\"",
"as",
"their",
"first",
"name",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 0,
"type": "table",
"value": "current"
},
{
"id": 2,
"type": "value",
"value": "John"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
13,
14
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"to... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
11,415 | activity_1 | spider:train_spider.json:6799 | Find the first names of the faculty members who participate in Canoeing and Kayaking. | SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T... | [
"Find",
"the",
"first",
"names",
"of",
"the",
"faculty",
"members",
"who",
"participate",
"in",
"Canoeing",
"and",
"Kayaking",
"."
] | [
{
"id": 6,
"type": "table",
"value": "faculty_participates_in"
},
{
"id": 2,
"type": "column",
"value": "activity_name"
},
{
"id": 1,
"type": "table",
"value": "activity"
},
{
"id": 3,
"type": "value",
"value": "Canoeing"
},
{
"id": 4,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
... | [
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"I-TABLE",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
11,416 | mondial_geo | bird:train.json:8378 | What's the percentage of people in Cayman Islands speak English? | SELECT T1.Percentage FROM language AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Cayman Islands' AND T1.Name = 'English' | [
"What",
"'s",
"the",
"percentage",
"of",
"people",
"in",
"Cayman",
"Islands",
"speak",
"English",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "Cayman Islands"
},
{
"id": 0,
"type": "column",
"value": "percentage"
},
{
"id": 1,
"type": "table",
"value": "language"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 3,
"type": "column",
... | [
{
"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",
"B-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"O"
] |
11,417 | social_media | bird:train.json:807 | What is the gender of the user whose tweet got 535 retweets? | SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.RetweetCount = 535 | [
"What",
"is",
"the",
"gender",
"of",
"the",
"user",
"whose",
"tweet",
"got",
"535",
"retweets",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "retweetcount"
},
{
"id": 1,
"type": "table",
"value": "twitter"
},
{
"id": 0,
"type": "column",
"value": "gender"
},
{
"id": 4,
"type": "column",
"value": "userid"
},
{
"id": 3,
"type": "value",
"value... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
11,418 | public_review_platform | bird:train.json:3907 | What is the ratio of having the best to worse elite user in 2013? | SELECT CAST(SUM(CASE WHEN T1.user_average_stars = 1 THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.user_id) , SUM(CASE WHEN T1.user_average_stars = 5 THEN 1 ELSE 0 END) * 1.0 / COUNT(T2.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T2.year_id = 2013 | [
"What",
"is",
"the",
"ratio",
"of",
"having",
"the",
"best",
"to",
"worse",
"elite",
"user",
"in",
"2013",
"?"
] | [
{
"id": 8,
"type": "column",
"value": "user_average_stars"
},
{
"id": 2,
"type": "column",
"value": "year_id"
},
{
"id": 4,
"type": "column",
"value": "user_id"
},
{
"id": 0,
"type": "table",
"value": "users"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
11,419 | sports_competition | spider:train_spider.json:3371 | List the names of clubs that do not have any players. | SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player) | [
"List",
"the",
"names",
"of",
"clubs",
"that",
"do",
"not",
"have",
"any",
"players",
"."
] | [
{
"id": 2,
"type": "column",
"value": "club_id"
},
{
"id": 3,
"type": "table",
"value": "player"
},
{
"id": 0,
"type": "table",
"value": "club"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,420 | music_2 | spider:train_spider.json:5191 | What are the first and last names of the performer who was in the back stage position for the song "Badlands"? | SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Badlands" AND T1.StagePosition = "back" | [
"What",
"are",
"the",
"first",
"and",
"last",
"names",
"of",
"the",
"performer",
"who",
"was",
"in",
"the",
"back",
"stage",
"position",
"for",
"the",
"song",
"\"",
"Badlands",
"\"",
"?"
] | [
{
"id": 8,
"type": "column",
"value": "stageposition"
},
{
"id": 3,
"type": "table",
"value": "performance"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 1,
"type": "column",
"value": "lastname"
},
{
"id": 7,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
19
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O"
] |
11,421 | small_bank_1 | spider:train_spider.json:1788 | What is the checking balance of the account whose owner’s name contains the substring ‘ee’? | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%' | [
"What",
"is",
"the",
"checking",
"balance",
"of",
"the",
"account",
"whose",
"owner",
"’s",
"name",
"contains",
"the",
"substring",
"‘",
"ee",
"’",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "accounts"
},
{
"id": 2,
"type": "table",
"value": "checking"
},
{
"id": 0,
"type": "column",
"value": "balance"
},
{
"id": 5,
"type": "column",
"value": "custid"
},
{
"id": 3,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
11,422 | works_cycles | bird:train.json:7023 | List the name and calculate its profit for product with the highest rating in review. | SELECT T1.Name, T1.ListPrice - T1.StandardCost FROM Product AS T1 INNER JOIN ProductReview AS T2 ON T1.ProductID = T2.ProductID ORDER BY T2.Rating DESC LIMIT 1 | [
"List",
"the",
"name",
"and",
"calculate",
"its",
"profit",
"for",
"product",
"with",
"the",
"highest",
"rating",
"in",
"review",
"."
] | [
{
"id": 2,
"type": "table",
"value": "productreview"
},
{
"id": 5,
"type": "column",
"value": "standardcost"
},
{
"id": 4,
"type": "column",
"value": "listprice"
},
{
"id": 6,
"type": "column",
"value": "productid"
},
{
"id": 1,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
0
]
},
{
"entity... | [
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
11,424 | thrombosis_prediction | bird:dev.json:1209 | Please provide the diagnosis of patients with ALT glutamic pylvic transaminase beyond the normal range by ascending order of their date of birth. | SELECT DISTINCT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT > 60 ORDER BY T1.Birthday ASC | [
"Please",
"provide",
"the",
"diagnosis",
"of",
"patients",
"with",
"ALT",
"glutamic",
"pylvic",
"transaminase",
"beyond",
"the",
"normal",
"range",
"by",
"ascending",
"order",
"of",
"their",
"date",
"of",
"birth",
"."
] | [
{
"id": 2,
"type": "table",
"value": "laboratory"
},
{
"id": 0,
"type": "column",
"value": "diagnosis"
},
{
"id": 5,
"type": "column",
"value": "birthday"
},
{
"id": 1,
"type": "table",
"value": "patient"
},
{
"id": 3,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,425 | movie_3 | bird:train.json:9343 | What is the language for film titled "CHILL LUCK"? | SELECT T2.`name` FROM film AS T1 INNER JOIN `language` AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'CHILL LUCK' | [
"What",
"is",
"the",
"language",
"for",
"film",
"titled",
"\"",
"CHILL",
"LUCK",
"\"",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "language_id"
},
{
"id": 4,
"type": "value",
"value": "CHILL LUCK"
},
{
"id": 2,
"type": "table",
"value": "language"
},
{
"id": 3,
"type": "column",
"value": "title"
},
{
"id": 0,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
8,
9
]
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
11,426 | cre_Doc_Tracking_DB | spider:train_spider.json:4199 | What are the name, role code, and date of birth of the employee named 'Armani'? | SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani' | [
"What",
"are",
"the",
"name",
",",
"role",
"code",
",",
"and",
"date",
"of",
"birth",
"of",
"the",
"employee",
"named",
"'",
"Armani",
"'",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "employee_name"
},
{
"id": 3,
"type": "column",
"value": "date_of_birth"
},
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 2,
"type": "column",
"value": "role_code"
},
{
"id": 4,
"type": "value... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10,
11
]
},
{
"entity_id": 4,
"token_... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
11,427 | apartment_rentals | spider:train_spider.json:1267 | Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts. | SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC | [
"Sort",
"the",
"gender",
"codes",
"in",
"descending",
"order",
"of",
"their",
"corresponding",
"number",
"of",
"guests",
".",
"Return",
"both",
"the",
"gender",
"codes",
"and",
"counts",
"."
] | [
{
"id": 1,
"type": "column",
"value": "gender_code"
},
{
"id": 0,
"type": "table",
"value": "guests"
}
] | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
17,
18
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"t... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O"
] |
11,428 | allergy_1 | spider:train_spider.json:442 | How many distinct allergies are there? | SELECT count(DISTINCT allergytype) FROM Allergy_type | [
"How",
"many",
"distinct",
"allergies",
"are",
"there",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "allergy_type"
},
{
"id": 1,
"type": "column",
"value": "allergytype"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
11,429 | works_cycles | bird:train.json:7331 | List all product only MOQ of 1,000 and with standard cost more than 17. | SELECT T2.Name FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Vendor AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T1.MaxOrderQty = 1000 AND T2.StandardCost > 17 | [
"List",
"all",
"product",
"only",
"MOQ",
"of",
"1,000",
"and",
"with",
"standard",
"cost",
"more",
"than",
"17",
"."
] | [
{
"id": 4,
"type": "column",
"value": "businessentityid"
},
{
"id": 2,
"type": "table",
"value": "productvendor"
},
{
"id": 7,
"type": "column",
"value": "standardcost"
},
{
"id": 5,
"type": "column",
"value": "maxorderqty"
},
{
"id": 9,
"type"... | [
{
"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": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
11,430 | customers_and_orders | bird:test.json:235 | List all address ids and address details. | SELECT address_id , address_details FROM Addresses | [
"List",
"all",
"address",
"ids",
"and",
"address",
"details",
"."
] | [
{
"id": 2,
"type": "column",
"value": "address_details"
},
{
"id": 1,
"type": "column",
"value": "address_id"
},
{
"id": 0,
"type": "table",
"value": "addresses"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
11,431 | superstore | bird:train.json:2402 | Provide the shipping dates and products of the orders by Gene Hale. | SELECT DISTINCT T2.`Ship Date`, T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Gene Hale' | [
"Provide",
"the",
"shipping",
"dates",
"and",
"products",
"of",
"the",
"orders",
"by",
"Gene",
"Hale",
"."
] | [
{
"id": 6,
"type": "table",
"value": "central_superstore"
},
{
"id": 3,
"type": "column",
"value": "Customer Name"
},
{
"id": 1,
"type": "column",
"value": "Product Name"
},
{
"id": 8,
"type": "column",
"value": "Customer ID"
},
{
"id": 7,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11
]
},
{
"... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
11,432 | address | bird:train.json:5184 | What is the code of the area with the largest Asian population? | SELECT T1.zip_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.asian_population ORDER BY T2.asian_population DESC LIMIT 1 | [
"What",
"is",
"the",
"code",
"of",
"the",
"area",
"with",
"the",
"largest",
"Asian",
"population",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "asian_population"
},
{
"id": 2,
"type": "table",
"value": "area_code"
},
{
"id": 1,
"type": "column",
"value": "zip_code"
},
{
"id": 3,
"type": "table",
"value": "zip_data"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10,
11
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
11,433 | talkingdata | bird:train.json:1073 | Calculate the percentage of the app user IDs under Industry tag category. | SELECT SUM(IIF(T1.category = 'Industry tag', 1, 0)) * 100 / COUNT(T2.app_id) AS per FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T2.label_id = T1.label_id | [
"Calculate",
"the",
"percentage",
"of",
"the",
"app",
"user",
"IDs",
"under",
"Industry",
"tag",
"category",
"."
] | [
{
"id": 0,
"type": "table",
"value": "label_categories"
},
{
"id": 8,
"type": "value",
"value": "Industry tag"
},
{
"id": 1,
"type": "table",
"value": "app_labels"
},
{
"id": 2,
"type": "column",
"value": "label_id"
},
{
"id": 7,
"type": "colum... | [
{
"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": [
5
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
11,434 | program_share | spider:train_spider.json:3736 | list all the names of programs, ordering by launch time. | SELECT name FROM program ORDER BY launch | [
"list",
"all",
"the",
"names",
"of",
"programs",
",",
"ordering",
"by",
"launch",
"time",
"."
] | [
{
"id": 0,
"type": "table",
"value": "program"
},
{
"id": 2,
"type": "column",
"value": "launch"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
11,435 | city_record | spider:train_spider.json:6288 | Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct? | SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct | [
"Give",
"me",
"a",
"list",
"of",
"cities",
"whose",
"temperature",
"in",
"March",
"is",
"lower",
"than",
"that",
"in",
"July",
"or",
"higher",
"than",
"that",
"in",
"Oct",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "temperature"
},
{
"id": 3,
"type": "column",
"value": "city_id"
},
{
"id": 0,
"type": "column",
"value": "city"
},
{
"id": 1,
"type": "table",
"value": "city"
},
{
"id": 4,
"type": "column",
"value": "m... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,436 | college_2 | spider:train_spider.json:1470 | Find the names of all instructors in the Art department who have taught some course and the course_id. | SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art' | [
"Find",
"the",
"names",
"of",
"all",
"instructors",
"in",
"the",
"Art",
"department",
"who",
"have",
"taught",
"some",
"course",
"and",
"the",
"course_id",
"."
] | [
{
"id": 2,
"type": "table",
"value": "instructor"
},
{
"id": 1,
"type": "column",
"value": "course_id"
},
{
"id": 4,
"type": "column",
"value": "dept_name"
},
{
"id": 3,
"type": "table",
"value": "teaches"
},
{
"id": 0,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
... | [
"B-COLUMN",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,437 | retail_world | bird:train.json:6524 | Which products are being supplied by "G'day, Mate"? List all of their names. | SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName LIKE 'G%day, Mate' | [
"Which",
"products",
"are",
"being",
"supplied",
"by",
"\"",
"G'day",
",",
"Mate",
"\"",
"?",
"List",
"all",
"of",
"their",
"names",
"."
] | [
{
"id": 0,
"type": "column",
"value": "productname"
},
{
"id": 3,
"type": "column",
"value": "companyname"
},
{
"id": 4,
"type": "value",
"value": "G%day, Mate"
},
{
"id": 5,
"type": "column",
"value": "supplierid"
},
{
"id": 2,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7,
8,
9
]
}... | [
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,439 | art_1 | bird:test.json:1294 | Find the death year of all artists who have at most 3 paintings? | SELECT T1.deathYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID GROUP BY T2.painterID HAVING count(*) <= 3 | [
"Find",
"the",
"death",
"year",
"of",
"all",
"artists",
"who",
"have",
"at",
"most",
"3",
"paintings",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "painterid"
},
{
"id": 1,
"type": "column",
"value": "deathyear"
},
{
"id": 3,
"type": "table",
"value": "paintings"
},
{
"id": 5,
"type": "column",
"value": "artistid"
},
{
"id": 2,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
11,440 | movie_2 | bird:test.json:1840 | How many movies have a rating that is not null? | SELECT count(*) , rating FROM movies WHERE rating != 'null' GROUP BY rating | [
"How",
"many",
"movies",
"have",
"a",
"rating",
"that",
"is",
"not",
"null",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "movies"
},
{
"id": 1,
"type": "column",
"value": "rating"
},
{
"id": 2,
"type": "value",
"value": "null"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,441 | formula_1 | bird:dev.json:855 | Where can I find the information about the races held on Sepang International Circuit? | SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit' | [
"Where",
"can",
"I",
"find",
"the",
"information",
"about",
"the",
"races",
"held",
"on",
"Sepang",
"International",
"Circuit",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "Sepang International Circuit"
},
{
"id": 5,
"type": "column",
"value": "circuitid"
},
{
"id": 1,
"type": "table",
"value": "circuits"
},
{
"id": 2,
"type": "table",
"value": "races"
},
{
"id": 3,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11,
12
]
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
11,442 | gymnast | spider:train_spider.json:1757 | Return the average age across all gymnasts. | SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | [
"Return",
"the",
"average",
"age",
"across",
"all",
"gymnasts",
"."
] | [
{
"id": 3,
"type": "column",
"value": "gymnast_id"
},
{
"id": 4,
"type": "column",
"value": "people_id"
},
{
"id": 0,
"type": "table",
"value": "gymnast"
},
{
"id": 1,
"type": "table",
"value": "people"
},
{
"id": 2,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"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-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
11,443 | advertising_agencies | bird:test.json:2141 | What are the ids and details of the staff who have attended at least 1 meetings and have the detail with letter 's'? | SELECT staff_id , staff_details FROM staff WHERE staff_details LIKE "%s%" GROUP BY staff_id HAVING count(*) >= 1 | [
"What",
"are",
"the",
"ids",
"and",
"details",
"of",
"the",
"staff",
"who",
"have",
"attended",
"at",
"least",
"1",
"meetings",
"and",
"have",
"the",
"detail",
"with",
"letter",
"'s",
"'",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "staff_details"
},
{
"id": 1,
"type": "column",
"value": "staff_id"
},
{
"id": 0,
"type": "table",
"value": "staff"
},
{
"id": 3,
"type": "column",
"value": "%s%"
},
{
"id": 4,
"type": "value",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
11,444 | university | bird:train.json:8095 | Which university had the most students in 2011? Show its name. | SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 ORDER BY T1.num_students DESC LIMIT 1 | [
"Which",
"university",
"had",
"the",
"most",
"students",
"in",
"2011",
"?",
"Show",
"its",
"name",
"."
] | [
{
"id": 0,
"type": "column",
"value": "university_name"
},
{
"id": 1,
"type": "table",
"value": "university_year"
},
{
"id": 6,
"type": "column",
"value": "university_id"
},
{
"id": 5,
"type": "column",
"value": "num_students"
},
{
"id": 2,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
11,445 | card_games | bird:dev.json:462 | What's the Italian name of the set of cards with "Ancestor's Chosen" is in? | SELECT translation FROM set_translations WHERE setCode IN ( SELECT setCode FROM cards WHERE name = 'Ancestor''s Chosen' ) AND language = 'Italian' | [
"What",
"'s",
"the",
"Italian",
"name",
"of",
"the",
"set",
"of",
"cards",
"with",
"\"",
"Ancestor",
"'s",
"Chosen",
"\"",
"is",
"in",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "Ancestor's Chosen"
},
{
"id": 0,
"type": "table",
"value": "set_translations"
},
{
"id": 1,
"type": "column",
"value": "translation"
},
{
"id": 3,
"type": "column",
"value": "language"
},
{
"id": 2,
"type":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O"
] |
11,446 | car_retails | bird:train.json:1635 | Which product did Cruz & Sons Co. ask for the biggest amount in a single order? | SELECT t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode WHERE t3.customerName = 'Cruz & Sons Co.' ORDER BY t1.priceEach * t1.quantityOrdered D... | [
"Which",
"product",
"did",
"Cruz",
"&",
"Sons",
"Co.",
"ask",
"for",
"the",
"biggest",
"amount",
"in",
"a",
"single",
"order",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Cruz & Sons Co."
},
{
"id": 7,
"type": "column",
"value": "quantityordered"
},
{
"id": 10,
"type": "column",
"value": "customernumber"
},
{
"id": 2,
"type": "column",
"value": "customername"
},
{
"id": 8,
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3,
4,
5,
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
11,447 | cre_Students_Information_Systems | bird:test.json:502 | For each student, find the student id and the total amount of loan he or she has. | SELECT student_id , sum(amount_of_loan) FROM Student_Loans GROUP BY student_id | [
"For",
"each",
"student",
",",
"find",
"the",
"student",
"i",
"d",
"and",
"the",
"total",
"amount",
"of",
"loan",
"he",
"or",
"she",
"has",
"."
] | [
{
"id": 2,
"type": "column",
"value": "amount_of_loan"
},
{
"id": 0,
"type": "table",
"value": "student_loans"
},
{
"id": 1,
"type": "column",
"value": "student_id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 2,
"token_idxs": [
12,
13,
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
11,448 | codebase_community | bird:dev.json:702 | How many posts have a score less than 20? | SELECT COUNT(id) FROM posts WHERE Score < 20 | [
"How",
"many",
"posts",
"have",
"a",
"score",
"less",
"than",
"20",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "posts"
},
{
"id": 1,
"type": "column",
"value": "score"
},
{
"id": 2,
"type": "value",
"value": "20"
},
{
"id": 3,
"type": "column",
"value": "id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
11,449 | shooting | bird:train.json:2466 | Among the 'Handgun' weapon used by subject, how many percent were 'Shoot and Miss'? | SELECT CAST(SUM(subject_statuses = 'Shoot and Miss') AS REAL) * 100 / COUNT(case_number) FROM incidents WHERE subject_weapon = 'Handgun' | [
"Among",
"the",
"'",
"Handgun",
"'",
"weapon",
"used",
"by",
"subject",
",",
"how",
"many",
"percent",
"were",
"'",
"Shoot",
"and",
"Miss",
"'",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "subject_statuses"
},
{
"id": 1,
"type": "column",
"value": "subject_weapon"
},
{
"id": 6,
"type": "value",
"value": "Shoot and Miss"
},
{
"id": 4,
"type": "column",
"value": "case_number"
},
{
"id": 0,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
11,450 | image_and_language | bird:train.json:7504 | How many samples of "wall" are there in image no.2353079? | SELECT SUM(CASE WHEN T1.OBJ_CLASS = 'wall' THEN 1 ELSE 0 END) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2353079 | [
"How",
"many",
"samples",
"of",
"\"",
"wall",
"\"",
"are",
"there",
"in",
"image",
"no.2353079",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "obj_class_id"
},
{
"id": 0,
"type": "table",
"value": "obj_classes"
},
{
"id": 7,
"type": "column",
"value": "obj_class"
},
{
"id": 1,
"type": "table",
"value": "img_obj"
},
{
"id": 3,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,451 | thrombosis_prediction | bird:dev.json:1230 | List all outpatient within normal range of creatinine phosphokinase. Give me the distinct ids. | SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CPK < 250 AND T1.Admission = '-' | [
"List",
"all",
"outpatient",
"within",
"normal",
"range",
"of",
"creatinine",
"phosphokinase",
".",
"Give",
"me",
"the",
"distinct",
"ids",
"."
] | [
{
"id": 2,
"type": "table",
"value": "laboratory"
},
{
"id": 5,
"type": "column",
"value": "admission"
},
{
"id": 1,
"type": "table",
"value": "patient"
},
{
"id": 3,
"type": "column",
"value": "cpk"
},
{
"id": 4,
"type": "value",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"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",
"B-COLUMN",
"B-COLUMN",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.