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
|
|---|---|---|---|---|---|---|---|---|
2,147
|
movie_platform
|
bird:train.json:111
|
Which of the film directed by director Abbas Kiarostami has the highest average score?
|
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.director_name = 'Abbas Kiarostami' GROUP BY T2.movie_title ORDER BY SUM(T1.rating_score) / COUNT(T1.rating_id) DESC LIMIT 1
|
[
"Which",
"of",
"the",
"film",
"directed",
"by",
"director",
"Abbas",
"Kiarostami",
"has",
"the",
"highest",
"average",
"score",
"?"
] |
[
{
"id": 4,
"type": "value",
"value": "Abbas Kiarostami"
},
{
"id": 3,
"type": "column",
"value": "director_name"
},
{
"id": 6,
"type": "column",
"value": "rating_score"
},
{
"id": 0,
"type": "column",
"value": "movie_title"
},
{
"id": 7,
"type": "column",
"value": "rating_id"
},
{
"id": 5,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"type": "table",
"value": "ratings"
},
{
"id": 2,
"type": "table",
"value": "movies"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
7,
8
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
12,
13
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
2,148
|
car_retails
|
bird:train.json:1586
|
Among the German customers, how many of the them has credit limit of zero?
|
SELECT COUNT(customerNumber) FROM customers WHERE creditLimit = 0 AND country = 'Germany'
|
[
"Among",
"the",
"German",
"customers",
",",
"how",
"many",
"of",
"the",
"them",
"has",
"credit",
"limit",
"of",
"zero",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "customernumber"
},
{
"id": 2,
"type": "column",
"value": "creditlimit"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type": "column",
"value": "country"
},
{
"id": 5,
"type": "value",
"value": "Germany"
},
{
"id": 3,
"type": "value",
"value": "0"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11,
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
2
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O"
] |
2,149
|
synthea
|
bird:train.json:1395
|
How many of the patients born in 1920s had pneumonia?
|
SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE DESCRIPTION = 'Pneumonia' AND strftime('%Y', T1.birthdate) LIKE '192%'
|
[
"How",
"many",
"of",
"the",
"patients",
"born",
"in",
"1920s",
"had",
"pneumonia",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "conditions"
},
{
"id": 4,
"type": "value",
"value": "Pneumonia"
},
{
"id": 7,
"type": "column",
"value": "birthdate"
},
{
"id": 0,
"type": "table",
"value": "patients"
},
{
"id": 2,
"type": "column",
"value": "patient"
},
{
"id": 5,
"type": "value",
"value": "192%"
},
{
"id": 6,
"type": "value",
"value": "%Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": [
7
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
2,150
|
debit_card_specializing
|
bird:dev.json:1500
|
Please list the product description of the products consumed in September, 2013.
|
SELECT T3.Description FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.Date = '201309'
|
[
"Please",
"list",
"the",
"product",
"description",
"of",
"the",
"products",
"consumed",
"in",
"September",
",",
"2013",
"."
] |
[
{
"id": 4,
"type": "table",
"value": "transactions_1k"
},
{
"id": 0,
"type": "column",
"value": "description"
},
{
"id": 7,
"type": "column",
"value": "customerid"
},
{
"id": 5,
"type": "table",
"value": "yearmonth"
},
{
"id": 6,
"type": "column",
"value": "productid"
},
{
"id": 1,
"type": "table",
"value": "products"
},
{
"id": 3,
"type": "value",
"value": "201309"
},
{
"id": 2,
"type": "column",
"value": "date"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
3
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
2,151
|
flight_company
|
spider:train_spider.json:6371
|
What are the names and types of the companies that have ever operated a flight?
|
SELECT T1.name , T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id
|
[
"What",
"are",
"the",
"names",
"and",
"types",
"of",
"the",
"companies",
"that",
"have",
"ever",
"operated",
"a",
"flight",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "operate_company"
},
{
"id": 5,
"type": "column",
"value": "company_id"
},
{
"id": 3,
"type": "table",
"value": "flight"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 1,
"type": "column",
"value": "type"
},
{
"id": 4,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
12,
13
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
8
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-TABLE",
"O"
] |
2,152
|
public_review_platform
|
bird:train.json:3889
|
Count the active businesses that has an attribute of caters with low review count.
|
SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T3.attribute_name LIKE 'Caters' AND T1.review_count LIKE 'Low' AND T1.active LIKE 'TRUE'
|
[
"Count",
"the",
"active",
"businesses",
"that",
"has",
"an",
"attribute",
"of",
"caters",
"with",
"low",
"review",
"count",
"."
] |
[
{
"id": 3,
"type": "table",
"value": "business_attributes"
},
{
"id": 5,
"type": "column",
"value": "attribute_name"
},
{
"id": 4,
"type": "column",
"value": "attribute_id"
},
{
"id": 7,
"type": "column",
"value": "review_count"
},
{
"id": 1,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "table",
"value": "attributes"
},
{
"id": 2,
"type": "table",
"value": "business"
},
{
"id": 6,
"type": "value",
"value": "Caters"
},
{
"id": 9,
"type": "column",
"value": "active"
},
{
"id": 10,
"type": "value",
"value": "TRUE"
},
{
"id": 8,
"type": "value",
"value": "Low"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
9
]
},
{
"entity_id": 7,
"token_idxs": [
12,
13
]
},
{
"entity_id": 8,
"token_idxs": [
11
]
},
{
"entity_id": 9,
"token_idxs": [
2
]
},
{
"entity_id": 10,
"token_idxs": [
7
]
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
2,153
|
art_1
|
bird:test.json:1214
|
Find the names and years of all sculptures that are not located in gallery 226.
|
SELECT title , YEAR FROM sculptures WHERE LOCATION != "Gallery 226"
|
[
"Find",
"the",
"names",
"and",
"years",
"of",
"all",
"sculptures",
"that",
"are",
"not",
"located",
"in",
"gallery",
"226",
"."
] |
[
{
"id": 4,
"type": "column",
"value": "Gallery 226"
},
{
"id": 0,
"type": "table",
"value": "sculptures"
},
{
"id": 3,
"type": "column",
"value": "location"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "column",
"value": "year"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
11,
12
]
},
{
"entity_id": 4,
"token_idxs": [
13,
14
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O"
] |
2,154
|
railway
|
spider:train_spider.json:5643
|
Show the id and builder of the railway that are associated with the most trains.
|
SELECT T2.Railway_ID , T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID ORDER BY COUNT(*) DESC LIMIT 1
|
[
"Show",
"the",
"i",
"d",
"and",
"builder",
"of",
"the",
"railway",
"that",
"are",
"associated",
"with",
"the",
"most",
"trains",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "railway_id"
},
{
"id": 1,
"type": "column",
"value": "builder"
},
{
"id": 2,
"type": "table",
"value": "railway"
},
{
"id": 3,
"type": "table",
"value": "train"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
2,155
|
sakila_1
|
spider:train_spider.json:2966
|
Which film has the most copies in the inventory? List both title and id.
|
SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1
|
[
"Which",
"film",
"has",
"the",
"most",
"copies",
"in",
"the",
"inventory",
"?",
"List",
"both",
"title",
"and",
"i",
"d."
] |
[
{
"id": 3,
"type": "table",
"value": "inventory"
},
{
"id": 0,
"type": "column",
"value": "film_id"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "table",
"value": "film"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
2,156
|
shipping
|
bird:train.json:5620
|
Identify the total weight of shipments transported in 2016 by the newest Peterbilt.
|
SELECT SUM(T2.weight) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T1.make = 'Peterbilt' AND STRFTIME('%Y', T2.ship_date) = '2016' ORDER BY T1.model_year DESC LIMIT 1
|
[
"Identify",
"the",
"total",
"weight",
"of",
"shipments",
"transported",
"in",
"2016",
"by",
"the",
"newest",
"Peterbilt",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "model_year"
},
{
"id": 6,
"type": "value",
"value": "Peterbilt"
},
{
"id": 9,
"type": "column",
"value": "ship_date"
},
{
"id": 1,
"type": "table",
"value": "shipment"
},
{
"id": 4,
"type": "column",
"value": "truck_id"
},
{
"id": 3,
"type": "column",
"value": "weight"
},
{
"id": 0,
"type": "table",
"value": "truck"
},
{
"id": 5,
"type": "column",
"value": "make"
},
{
"id": 7,
"type": "value",
"value": "2016"
},
{
"id": 8,
"type": "value",
"value": "%Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
12
]
},
{
"entity_id": 7,
"token_idxs": [
8
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
2,157
|
formula_1
|
spider:train_spider.json:2186
|
What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?
|
SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20
|
[
"What",
"are",
"the",
"first",
"names",
"of",
"the",
"different",
"drivers",
"who",
"won",
"in",
"position",
"1",
"as",
"driver",
"standing",
"and",
"had",
"more",
"than",
"20",
"points",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "driverstandings"
},
{
"id": 0,
"type": "column",
"value": "forename"
},
{
"id": 3,
"type": "column",
"value": "driverid"
},
{
"id": 4,
"type": "column",
"value": "position"
},
{
"id": 1,
"type": "table",
"value": "drivers"
},
{
"id": 7,
"type": "column",
"value": "points"
},
{
"id": 6,
"type": "column",
"value": "wins"
},
{
"id": 8,
"type": "value",
"value": "20"
},
{
"id": 5,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
"token_idxs": [
13
]
},
{
"entity_id": 6,
"token_idxs": [
11
]
},
{
"entity_id": 7,
"token_idxs": [
22
]
},
{
"entity_id": 8,
"token_idxs": [
21
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-VALUE",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
2,158
|
legislator
|
bird:train.json:4851
|
What is the ratio between male and female legislators?
|
SELECT CAST(SUM(CASE WHEN gender_bio = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN gender_bio = 'F' THEN 1 ELSE 0 END) FROM historical
|
[
"What",
"is",
"the",
"ratio",
"between",
"male",
"and",
"female",
"legislators",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "historical"
},
{
"id": 3,
"type": "column",
"value": "gender_bio"
},
{
"id": 1,
"type": "value",
"value": "0"
},
{
"id": 2,
"type": "value",
"value": "1"
},
{
"id": 4,
"type": "value",
"value": "F"
},
{
"id": 5,
"type": "value",
"value": "M"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,159
|
thrombosis_prediction
|
bird:dev.json:1183
|
For the patient who was diagnosed SLE on 1997/1/27, what was his/her original diagnose when he/she came to the hospital for the first time?
|
SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = ( SELECT ID FROM Examination WHERE `Examination Date` = '1997-01-27' AND Diagnosis = 'SLE' ) AND T2.`Examination Date` = T1.`First Date`
|
[
"For",
"the",
"patient",
"who",
"was",
"diagnosed",
"SLE",
"on",
"1997/1/27",
",",
"what",
"was",
"his",
"/",
"her",
"original",
"diagnose",
"when",
"he",
"/",
"she",
"came",
"to",
"the",
"hospital",
"for",
"the",
"first",
"time",
"?"
] |
[
{
"id": 4,
"type": "column",
"value": "Examination Date"
},
{
"id": 2,
"type": "table",
"value": "examination"
},
{
"id": 5,
"type": "column",
"value": "First Date"
},
{
"id": 6,
"type": "value",
"value": "1997-01-27"
},
{
"id": 0,
"type": "column",
"value": "diagnosis"
},
{
"id": 1,
"type": "table",
"value": "patient"
},
{
"id": 7,
"type": "value",
"value": "SLE"
},
{
"id": 3,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"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": [
27,
28
]
},
{
"entity_id": 6,
"token_idxs": [
8
]
},
{
"entity_id": 7,
"token_idxs": [
6
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
2,160
|
formula_1
|
spider:train_spider.json:2226
|
What is the average fastest lap speed for races held after 2004, for each race, ordered by year?
|
SELECT avg(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year
|
[
"What",
"is",
"the",
"average",
"fastest",
"lap",
"speed",
"for",
"races",
"held",
"after",
"2004",
",",
"for",
"each",
"race",
",",
"ordered",
"by",
"year",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "fastestlapspeed"
},
{
"id": 3,
"type": "table",
"value": "results"
},
{
"id": 6,
"type": "column",
"value": "raceid"
},
{
"id": 2,
"type": "table",
"value": "races"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 1,
"type": "column",
"value": "year"
},
{
"id": 4,
"type": "value",
"value": "2014"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
19
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
"token_idxs": [
4,
5,
6
]
},
{
"entity_id": 6,
"token_idxs": [
15
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
2,161
|
department_store
|
spider:train_spider.json:4768
|
What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?
|
SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased) > 80000
|
[
"What",
"are",
"the",
"ids",
"of",
"all",
"products",
"that",
"were",
"either",
"ordered",
"more",
"than",
"3",
"times",
"or",
"have",
"a",
"cumulative",
"amount",
"purchased",
"of",
"above",
"80000",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "total_amount_purchased"
},
{
"id": 2,
"type": "table",
"value": "product_suppliers"
},
{
"id": 0,
"type": "table",
"value": "order_items"
},
{
"id": 1,
"type": "column",
"value": "product_id"
},
{
"id": 4,
"type": "value",
"value": "80000"
},
{
"id": 3,
"type": "value",
"value": "3"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
23
]
},
{
"entity_id": 5,
"token_idxs": [
19,
20
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
2,162
|
insurance_policies
|
spider:train_spider.json:3868
|
How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.
|
SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1
|
[
"How",
"many",
"settlements",
"were",
"made",
"on",
"the",
"claim",
"with",
"the",
"most",
"recent",
"claim",
"settlement",
"date",
"?",
"List",
"the",
"number",
"and",
"the",
"claim",
"i",
"d."
] |
[
{
"id": 3,
"type": "column",
"value": "date_claim_settled"
},
{
"id": 2,
"type": "table",
"value": "settlements"
},
{
"id": 0,
"type": "column",
"value": "claim_id"
},
{
"id": 1,
"type": "table",
"value": "claims"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
21,
22,
23
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN"
] |
2,163
|
student_club
|
bird:dev.json:1410
|
List out the full name and total cost that member id "rec4BLdZHS2Blfp4v" incurred?
|
SELECT T1.first_name, T1.last_name, SUM(T2.cost) FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.member_id = 'rec4BLdZHS2Blfp4v'
|
[
"List",
"out",
"the",
"full",
"name",
"and",
"total",
"cost",
"that",
"member",
"i",
"d",
"\"",
"rec4BLdZHS2Blfp4v",
"\"",
"incurred",
"?"
] |
[
{
"id": 5,
"type": "value",
"value": "rec4BLdZHS2Blfp4v"
},
{
"id": 7,
"type": "column",
"value": "link_to_member"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 4,
"type": "column",
"value": "member_id"
},
{
"id": 3,
"type": "table",
"value": "expense"
},
{
"id": 2,
"type": "table",
"value": "member"
},
{
"id": 6,
"type": "column",
"value": "cost"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11
]
},
{
"entity_id": 5,
"token_idxs": [
13
]
},
{
"entity_id": 6,
"token_idxs": [
7
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
2,164
|
legislator
|
bird:train.json:4849
|
How many districts are in Idaho?
|
SELECT COUNT(district) FROM `current-terms` WHERE state = 'ID'
|
[
"How",
"many",
"districts",
"are",
"in",
"Idaho",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "current-terms"
},
{
"id": 3,
"type": "column",
"value": "district"
},
{
"id": 1,
"type": "column",
"value": "state"
},
{
"id": 2,
"type": "value",
"value": "ID"
}
] |
[
{
"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": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
2,165
|
donor
|
bird:train.json:3299
|
List all the items from "Sax Arts & Crafts" and the zip code of the schools that received them.
|
SELECT T2.school_zip, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name = 'Sax Arts & Crafts'
|
[
"List",
"all",
"the",
"items",
"from",
"\"",
"Sax",
"Arts",
"&",
"Crafts",
"\"",
"and",
"the",
"zip",
"code",
"of",
"the",
"schools",
"that",
"received",
"them",
"."
] |
[
{
"id": 5,
"type": "value",
"value": "Sax Arts & Crafts"
},
{
"id": 4,
"type": "column",
"value": "vendor_name"
},
{
"id": 0,
"type": "column",
"value": "school_zip"
},
{
"id": 1,
"type": "column",
"value": "item_name"
},
{
"id": 2,
"type": "table",
"value": "resources"
},
{
"id": 6,
"type": "column",
"value": "projectid"
},
{
"id": 3,
"type": "table",
"value": "projects"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
17
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
6,
7,
8,
9
]
},
{
"entity_id": 6,
"token_idxs": [
19
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
2,166
|
wine_1
|
spider:train_spider.json:6528
|
What are the areas and counties for all appelations?
|
SELECT Area , County FROM APPELLATIONS
|
[
"What",
"are",
"the",
"areas",
"and",
"counties",
"for",
"all",
"appelations",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "appellations"
},
{
"id": 2,
"type": "column",
"value": "county"
},
{
"id": 1,
"type": "column",
"value": "area"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
2,168
|
image_and_language
|
bird:train.json:7497
|
What is the relationship between object sample no.12 and no.8 of image no.2345511?
|
SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 2345511 AND T2.OBJ1_SAMPLE_ID = 12 AND T2.OBJ2_SAMPLE_ID = 8
|
[
"What",
"is",
"the",
"relationship",
"between",
"object",
"sample",
"no.12",
"and",
"no.8",
"of",
"image",
"no.2345511",
"?"
] |
[
{
"id": 6,
"type": "column",
"value": "obj1_sample_id"
},
{
"id": 8,
"type": "column",
"value": "obj2_sample_id"
},
{
"id": 3,
"type": "column",
"value": "pred_class_id"
},
{
"id": 1,
"type": "table",
"value": "pred_classes"
},
{
"id": 0,
"type": "column",
"value": "pred_class"
},
{
"id": 2,
"type": "table",
"value": "img_rel"
},
{
"id": 5,
"type": "value",
"value": "2345511"
},
{
"id": 4,
"type": "column",
"value": "img_id"
},
{
"id": 7,
"type": "value",
"value": "12"
},
{
"id": 9,
"type": "value",
"value": "8"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
12
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
5,
6
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
2,169
|
student_assessment
|
spider:train_spider.json:98
|
What are the first names of the people in alphabetical order?
|
SELECT first_name FROM people ORDER BY first_name
|
[
"What",
"are",
"the",
"first",
"names",
"of",
"the",
"people",
"in",
"alphabetical",
"order",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 0,
"type": "table",
"value": "people"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
2,171
|
loan_1
|
spider:train_spider.json:3016
|
Find the city and state of the bank branch named morningside.
|
SELECT city , state FROM bank WHERE bname = 'morningside'
|
[
"Find",
"the",
"city",
"and",
"state",
"of",
"the",
"bank",
"branch",
"named",
"morningside",
"."
] |
[
{
"id": 4,
"type": "value",
"value": "morningside"
},
{
"id": 2,
"type": "column",
"value": "state"
},
{
"id": 3,
"type": "column",
"value": "bname"
},
{
"id": 0,
"type": "table",
"value": "bank"
},
{
"id": 1,
"type": "column",
"value": "city"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
2,172
|
shakespeare
|
bird:train.json:3032
|
What are the work numbers that are related to King Henry?
|
SELECT id FROM works WHERE Title LIKE '%Henry%'
|
[
"What",
"are",
"the",
"work",
"numbers",
"that",
"are",
"related",
"to",
"King",
"Henry",
"?"
] |
[
{
"id": 3,
"type": "value",
"value": "%Henry%"
},
{
"id": 0,
"type": "table",
"value": "works"
},
{
"id": 2,
"type": "column",
"value": "title"
},
{
"id": 1,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
2,173
|
public_review_platform
|
bird:train.json:3903
|
How many businesses in Phoenix, Arizona is attributed to waiter service?
|
SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.city LIKE 'Phoenix' AND T3.attribute_name LIKE 'waiter_service' AND T2.attribute_id = 2
|
[
"How",
"many",
"businesses",
"in",
"Phoenix",
",",
"Arizona",
"is",
"attributed",
"to",
"waiter",
"service",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "business_attributes"
},
{
"id": 7,
"type": "column",
"value": "attribute_name"
},
{
"id": 8,
"type": "value",
"value": "waiter_service"
},
{
"id": 4,
"type": "column",
"value": "attribute_id"
},
{
"id": 1,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "table",
"value": "attributes"
},
{
"id": 2,
"type": "table",
"value": "business"
},
{
"id": 6,
"type": "value",
"value": "Phoenix"
},
{
"id": 5,
"type": "column",
"value": "city"
},
{
"id": 9,
"type": "value",
"value": "2"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
4
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
10,
11
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
2,174
|
food_inspection_2
|
bird:train.json:6179
|
Provide the names and inspection results of the facilities located in Burnham.
|
SELECT DISTINCT T1.dba_name, T2.results FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.city = 'BURNHAM'
|
[
"Provide",
"the",
"names",
"and",
"inspection",
"results",
"of",
"the",
"facilities",
"located",
"in",
"Burnham",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "establishment"
},
{
"id": 3,
"type": "table",
"value": "inspection"
},
{
"id": 6,
"type": "column",
"value": "license_no"
},
{
"id": 0,
"type": "column",
"value": "dba_name"
},
{
"id": 1,
"type": "column",
"value": "results"
},
{
"id": 5,
"type": "value",
"value": "BURNHAM"
},
{
"id": 4,
"type": "column",
"value": "city"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
11
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
2,175
|
world_development_indicators
|
bird:train.json:2094
|
Among the countries with note on the series code SM.POP.TOTL, how many of them are in the low-income group?
|
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Seriescode = 'SM.POP.TOTL' AND T1.IncomeGroup = 'Low income'
|
[
"Among",
"the",
"countries",
"with",
"note",
"on",
"the",
"series",
"code",
"SM.POP.TOTL",
",",
"how",
"many",
"of",
"them",
"are",
"in",
"the",
"low",
"-",
"income",
"group",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "countrynotes"
},
{
"id": 2,
"type": "column",
"value": "countrycode"
},
{
"id": 4,
"type": "value",
"value": "SM.POP.TOTL"
},
{
"id": 5,
"type": "column",
"value": "incomegroup"
},
{
"id": 3,
"type": "column",
"value": "seriescode"
},
{
"id": 6,
"type": "value",
"value": "Low income"
},
{
"id": 0,
"type": "table",
"value": "country"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7,
8
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": [
21
]
},
{
"entity_id": 6,
"token_idxs": [
18,
19,
20
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
2,176
|
farm
|
spider:train_spider.json:27
|
Return the maximum and minimum number of cows across all farms.
|
SELECT max(Cows) , min(Cows) FROM farm
|
[
"Return",
"the",
"maximum",
"and",
"minimum",
"number",
"of",
"cows",
"across",
"all",
"farms",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "farm"
},
{
"id": 1,
"type": "column",
"value": "cows"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
2,177
|
toxicology
|
bird:dev.json:314
|
How many single bonds are there in the list?
|
SELECT COUNT(T.bond_id) FROM bond AS T WHERE T.bond_type = '-'
|
[
"How",
"many",
"single",
"bonds",
"are",
"there",
"in",
"the",
"list",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "bond_type"
},
{
"id": 3,
"type": "column",
"value": "bond_id"
},
{
"id": 0,
"type": "table",
"value": "bond"
},
{
"id": 2,
"type": "value",
"value": "-"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,178
|
student_loan
|
bird:train.json:4469
|
How many female students have no payment due?
|
SELECT COUNT(name) FROM no_payment_due WHERE name NOT IN ( SELECT name FROM male )
|
[
"How",
"many",
"female",
"students",
"have",
"no",
"payment",
"due",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "no_payment_due"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "table",
"value": "male"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5,
6,
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O"
] |
2,179
|
world_development_indicators
|
bird:train.json:2182
|
Which country have completed vital registration? List all the countries.
|
SELECT ShortName FROM Country WHERE VitalRegistrationComplete = 'Yes'
|
[
"Which",
"country",
"have",
"completed",
"vital",
"registration",
"?",
"List",
"all",
"the",
"countries",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "vitalregistrationcomplete"
},
{
"id": 1,
"type": "column",
"value": "shortname"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 3,
"type": "value",
"value": "Yes"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,180
|
music_2
|
spider:train_spider.json:5174
|
What are all the labels?
|
SELECT DISTINCT label FROM Albums
|
[
"What",
"are",
"all",
"the",
"labels",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "albums"
},
{
"id": 1,
"type": "column",
"value": "label"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
2,181
|
student_loan
|
bird:train.json:4459
|
Find the percentage of male students enlisted in the fire department.
|
SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM enlist AS T1 LEFT JOIN male AS T2 ON T1.name = T2.name WHERE T1.organ = 'fire_department'
|
[
"Find",
"the",
"percentage",
"of",
"male",
"students",
"enlisted",
"in",
"the",
"fire",
"department",
"."
] |
[
{
"id": 3,
"type": "value",
"value": "fire_department"
},
{
"id": 0,
"type": "table",
"value": "enlist"
},
{
"id": 2,
"type": "column",
"value": "organ"
},
{
"id": 1,
"type": "table",
"value": "male"
},
{
"id": 4,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "value",
"value": "100"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
2,182
|
vehicle_rent
|
bird:test.json:402
|
What are the names, types of powertrains, and yearly fuel costs for vehicles with model years in either 2013 2014?
|
SELECT name , type_of_powertrain , annual_fuel_cost FROM vehicles WHERE model_year = 2013 OR model_year = 2014
|
[
"What",
"are",
"the",
"names",
",",
"types",
"of",
"powertrains",
",",
"and",
"yearly",
"fuel",
"costs",
"for",
"vehicles",
"with",
"model",
"years",
"in",
"either",
"2013",
"2014",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "type_of_powertrain"
},
{
"id": 3,
"type": "column",
"value": "annual_fuel_cost"
},
{
"id": 4,
"type": "column",
"value": "model_year"
},
{
"id": 0,
"type": "table",
"value": "vehicles"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "value",
"value": "2013"
},
{
"id": 6,
"type": "value",
"value": "2014"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10,
11,
12
]
},
{
"entity_id": 4,
"token_idxs": [
16,
17
]
},
{
"entity_id": 5,
"token_idxs": [
20
]
},
{
"entity_id": 6,
"token_idxs": [
21
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
2,183
|
world
|
bird:train.json:7912
|
List down the languages of countries with an independence year between 1980 to 1995.
|
SELECT T2.Name, T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.IndepYear BETWEEN 1980 AND 1995
|
[
"List",
"down",
"the",
"languages",
"of",
"countries",
"with",
"an",
"independence",
"year",
"between",
"1980",
"to",
"1995",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "countrylanguage"
},
{
"id": 7,
"type": "column",
"value": "countrycode"
},
{
"id": 4,
"type": "column",
"value": "indepyear"
},
{
"id": 1,
"type": "column",
"value": "language"
},
{
"id": 3,
"type": "table",
"value": "country"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "value",
"value": "1980"
},
{
"id": 6,
"type": "value",
"value": "1995"
},
{
"id": 8,
"type": "column",
"value": "code"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
1,
2
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
8,
9
]
},
{
"entity_id": 5,
"token_idxs": [
11
]
},
{
"entity_id": 6,
"token_idxs": [
13
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
2,185
|
customers_card_transactions
|
spider:train_spider.json:667
|
How many accounts do we have?
|
SELECT count(*) FROM Accounts
|
[
"How",
"many",
"accounts",
"do",
"we",
"have",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "accounts"
}
] |
[
{
"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": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
2,186
|
soccer_2016
|
bird:train.json:1829
|
How many Orange Cap awards were won by CH Gayle?
|
SELECT SUM(CASE WHEN T1.Player_Name = 'CH Gayle' THEN 1 ELSE 0 END) AS cnt FROM Player AS T1 INNER JOIN Season AS T2 ON T1.Player_Id = T2.Orange_Cap
|
[
"How",
"many",
"Orange",
"Cap",
"awards",
"were",
"won",
"by",
"CH",
"Gayle",
"?"
] |
[
{
"id": 6,
"type": "column",
"value": "player_name"
},
{
"id": 3,
"type": "column",
"value": "orange_cap"
},
{
"id": 2,
"type": "column",
"value": "player_id"
},
{
"id": 7,
"type": "value",
"value": "CH Gayle"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 1,
"type": "table",
"value": "season"
},
{
"id": 4,
"type": "value",
"value": "0"
},
{
"id": 5,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2,
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
8,
9
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
2,187
|
conference
|
bird:test.json:1065
|
Show all locations where at least two conferences are located.
|
SELECT LOCATION FROM conference GROUP BY LOCATION HAVING count(*) >= 2
|
[
"Show",
"all",
"locations",
"where",
"at",
"least",
"two",
"conferences",
"are",
"located",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "conference"
},
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "value",
"value": "2"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"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": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
2,188
|
department_store
|
spider:train_spider.json:4758
|
Return the names and ids of customers who have TN in their address.
|
SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE "%TN%"
|
[
"Return",
"the",
"names",
"and",
"ids",
"of",
"customers",
"who",
"have",
"TN",
"in",
"their",
"address",
"."
] |
[
{
"id": 3,
"type": "column",
"value": "customer_address"
},
{
"id": 1,
"type": "column",
"value": "customer_name"
},
{
"id": 2,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type": "column",
"value": "%TN%"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
2,189
|
image_and_language
|
bird:train.json:7473
|
How many object samples are there in image no.1?
|
SELECT COUNT(OBJ_SAMPLE_ID) FROM IMG_OBJ WHERE IMG_ID = 1
|
[
"How",
"many",
"object",
"samples",
"are",
"there",
"in",
"image",
"no.1",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "obj_sample_id"
},
{
"id": 0,
"type": "table",
"value": "img_obj"
},
{
"id": 1,
"type": "column",
"value": "img_id"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2,
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,190
|
legislator
|
bird:train.json:4785
|
Give the Wikipedia IDs of historical legislators who are Readjuster Democrats.
|
SELECT T2.wikipedia_id FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'Readjuster Democrat'
|
[
"Give",
"the",
"Wikipedia",
"IDs",
"of",
"historical",
"legislators",
"who",
"are",
"Readjuster",
"Democrats",
"."
] |
[
{
"id": 4,
"type": "value",
"value": "Readjuster Democrat"
},
{
"id": 1,
"type": "table",
"value": "historical-terms"
},
{
"id": 0,
"type": "column",
"value": "wikipedia_id"
},
{
"id": 5,
"type": "column",
"value": "bioguide_id"
},
{
"id": 2,
"type": "table",
"value": "historical"
},
{
"id": 6,
"type": "column",
"value": "bioguide"
},
{
"id": 3,
"type": "column",
"value": "party"
}
] |
[
{
"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": [
9,
10
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
2,191
|
movie_3
|
bird:train.json:9391
|
List at least 5 customers who paid greater than $10. Provide the full name of the customers.
|
SELECT T2.first_name, T2.last_name FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T1.amount > 10
|
[
"List",
"at",
"least",
"5",
"customers",
"who",
"paid",
"greater",
"than",
"$",
"10",
".",
"Provide",
"the",
"full",
"name",
"of",
"the",
"customers",
"."
] |
[
{
"id": 6,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 3,
"type": "table",
"value": "customer"
},
{
"id": 2,
"type": "table",
"value": "payment"
},
{
"id": 4,
"type": "column",
"value": "amount"
},
{
"id": 5,
"type": "value",
"value": "10"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
10
]
},
{
"entity_id": 6,
"token_idxs": [
18
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
2,192
|
books
|
bird:train.json:6066
|
Write the full name of the customers whose address is at 55 Dorton Pass, Huangqiao.
|
SELECT DISTINCT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id WHERE T3.street_number = 55 AND T3.street_name = 'Dorton Pass' AND T3.city = 'Huangqiao'
|
[
"Write",
"the",
"full",
"name",
"of",
"the",
"customers",
"whose",
"address",
"is",
"at",
"55",
"Dorton",
"Pass",
",",
"Huangqiao",
"."
] |
[
{
"id": 4,
"type": "table",
"value": "customer_address"
},
{
"id": 6,
"type": "column",
"value": "street_number"
},
{
"id": 8,
"type": "column",
"value": "street_name"
},
{
"id": 9,
"type": "value",
"value": "Dorton Pass"
},
{
"id": 12,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 5,
"type": "column",
"value": "address_id"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 11,
"type": "value",
"value": "Huangqiao"
},
{
"id": 3,
"type": "table",
"value": "customer"
},
{
"id": 2,
"type": "table",
"value": "address"
},
{
"id": 10,
"type": "column",
"value": "city"
},
{
"id": 7,
"type": "value",
"value": "55"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
11
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": [
12,
13
]
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": [
15
]
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"O"
] |
2,193
|
game_1
|
spider:train_spider.json:6001
|
How many students play sports?
|
SELECT count(DISTINCT StuID) FROM Sportsinfo
|
[
"How",
"many",
"students",
"play",
"sports",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "sportsinfo"
},
{
"id": 1,
"type": "column",
"value": "stuid"
}
] |
[
{
"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": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
2,194
|
world_development_indicators
|
bird:train.json:2245
|
What is the percentage of increase of the indicator on Adolescent fertility rate from 1960 to 1961 in the country whose Alpha2Code is 1A?
|
SELECT (( SELECT T2.Value FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)' AND T2.Year = 1961 ) - ( SELECT T2.Value FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)' AND T2.Year = 1960 )) * 1.0 / ( SELECT SUM(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)' AND T2.Year = 1960 )
|
[
"What",
"is",
"the",
"percentage",
"of",
"increase",
"of",
"the",
"indicator",
"on",
"Adolescent",
"fertility",
"rate",
"from",
"1960",
"to",
"1961",
"in",
"the",
"country",
"whose",
"Alpha2Code",
"is",
"1A",
"?"
] |
[
{
"id": 8,
"type": "value",
"value": "Adolescent fertility rate (births per 1,000 women ages 15-19)"
},
{
"id": 7,
"type": "column",
"value": "indicatorname"
},
{
"id": 4,
"type": "column",
"value": "countrycode"
},
{
"id": 2,
"type": "table",
"value": "indicators"
},
{
"id": 5,
"type": "column",
"value": "alpha2code"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 3,
"type": "column",
"value": "value"
},
{
"id": 9,
"type": "column",
"value": "year"
},
{
"id": 10,
"type": "value",
"value": "1960"
},
{
"id": 11,
"type": "value",
"value": "1961"
},
{
"id": 0,
"type": "value",
"value": "1.0"
},
{
"id": 6,
"type": "value",
"value": "1A"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
19
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
21
]
},
{
"entity_id": 6,
"token_idxs": [
23
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
10,
11,
12,
13
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": [
14
]
},
{
"entity_id": 11,
"token_idxs": [
16
]
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
2,195
|
synthea
|
bird:train.json:1484
|
List out the procedure and medicine prescribed for drug overdose patients.
|
SELECT DISTINCT T2.DESCRIPTION, T3.DESCRIPTION FROM encounters AS T1 INNER JOIN procedures AS T2 ON T1.PATIENT = T2.PATIENT INNER JOIN medications AS T3 ON T1.PATIENT = T3.PATIENT WHERE T1.REASONDESCRIPTION = 'Drug overdose'
|
[
"List",
"out",
"the",
"procedure",
"and",
"medicine",
"prescribed",
"for",
"drug",
"overdose",
"patients",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "reasondescription"
},
{
"id": 3,
"type": "value",
"value": "Drug overdose"
},
{
"id": 0,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "medications"
},
{
"id": 4,
"type": "table",
"value": "encounters"
},
{
"id": 5,
"type": "table",
"value": "procedures"
},
{
"id": 6,
"type": "column",
"value": "patient"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
3
]
},
{
"entity_id": 6,
"token_idxs": [
10
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
2,196
|
books
|
bird:train.json:6088
|
What is the percentage of books that cost greater than $10 and were ordered by customer Ruthanne Vatini?
|
SELECT CAST(SUM(CASE WHEN T1.price > 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Ruthanne' AND T3.last_name = 'Vatini'
|
[
"What",
"is",
"the",
"percentage",
"of",
"books",
"that",
"cost",
"greater",
"than",
"$",
"10",
"and",
"were",
"ordered",
"by",
"customer",
"Ruthanne",
"Vatini",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "table",
"value": "order_line"
},
{
"id": 2,
"type": "table",
"value": "cust_order"
},
{
"id": 4,
"type": "column",
"value": "first_name"
},
{
"id": 6,
"type": "column",
"value": "last_name"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 5,
"type": "value",
"value": "Ruthanne"
},
{
"id": 9,
"type": "column",
"value": "order_id"
},
{
"id": 7,
"type": "value",
"value": "Vatini"
},
{
"id": 12,
"type": "column",
"value": "price"
},
{
"id": 8,
"type": "value",
"value": "100"
},
{
"id": 13,
"type": "value",
"value": "10"
},
{
"id": 10,
"type": "value",
"value": "0"
},
{
"id": 11,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"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": [
17
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
18
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": [
14
]
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": [
11
]
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-VALUE",
"B-VALUE",
"O"
] |
2,197
|
student_loan
|
bird:train.json:4545
|
Among all students, calculate the percentage of male students.
|
SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM person AS T1 LEFT JOIN male AS T2 ON T1.name = T2.name
|
[
"Among",
"all",
"students",
",",
"calculate",
"the",
"percentage",
"of",
"male",
"students",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "person"
},
{
"id": 1,
"type": "table",
"value": "male"
},
{
"id": 2,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": "100"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
2,198
|
election
|
spider:train_spider.json:2762
|
How many distinct delegates are from counties with population larger than 50000?
|
SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000
|
[
"How",
"many",
"distinct",
"delegates",
"are",
"from",
"counties",
"with",
"population",
"larger",
"than",
"50000",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "population"
},
{
"id": 5,
"type": "column",
"value": "county_id"
},
{
"id": 1,
"type": "table",
"value": "election"
},
{
"id": 4,
"type": "column",
"value": "delegate"
},
{
"id": 6,
"type": "column",
"value": "district"
},
{
"id": 0,
"type": "table",
"value": "county"
},
{
"id": 3,
"type": "value",
"value": "50000"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
2
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
2,199
|
bike_share_1
|
bird:train.json:9085
|
What is the ratio of customer to subscriber that making a trip inside Mountain View city?
|
SELECT CAST(SUM(CASE WHEN T1.subscription_type = 'Customer' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.subscription_type = 'Subscriber' THEN 1 ELSE 0 END) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'Mountain View'
|
[
"What",
"is",
"the",
"ratio",
"of",
"customer",
"to",
"subscriber",
"that",
"making",
"a",
"trip",
"inside",
"Mountain",
"View",
"city",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "start_station_name"
},
{
"id": 9,
"type": "column",
"value": "subscription_type"
},
{
"id": 3,
"type": "value",
"value": "Mountain View"
},
{
"id": 10,
"type": "value",
"value": "Subscriber"
},
{
"id": 11,
"type": "value",
"value": "Customer"
},
{
"id": 1,
"type": "table",
"value": "station"
},
{
"id": 0,
"type": "table",
"value": "trip"
},
{
"id": 2,
"type": "column",
"value": "city"
},
{
"id": 4,
"type": "column",
"value": "name"
},
{
"id": 6,
"type": "value",
"value": "100"
},
{
"id": 7,
"type": "value",
"value": "0"
},
{
"id": 8,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": [
13,
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": [
7
]
},
{
"entity_id": 11,
"token_idxs": [
5
]
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
2,201
|
olympics
|
bird:train.json:4929
|
How many Olympic Games has London hosted?
|
SELECT COUNT(T3.id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'London'
|
[
"How",
"many",
"Olympic",
"Games",
"has",
"London",
"hosted",
"?"
] |
[
{
"id": 4,
"type": "table",
"value": "games_city"
},
{
"id": 1,
"type": "column",
"value": "city_name"
},
{
"id": 6,
"type": "column",
"value": "games_id"
},
{
"id": 7,
"type": "column",
"value": "city_id"
},
{
"id": 2,
"type": "value",
"value": "London"
},
{
"id": 0,
"type": "table",
"value": "games"
},
{
"id": 5,
"type": "table",
"value": "city"
},
{
"id": 3,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"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": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O"
] |
2,202
|
menu
|
bird:train.json:5504
|
Who is the sponsor of menu with ID 12463?
|
SELECT sponsor FROM Menu WHERE id = 12463
|
[
"Who",
"is",
"the",
"sponsor",
"of",
"menu",
"with",
"ID",
"12463",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "sponsor"
},
{
"id": 3,
"type": "value",
"value": "12463"
},
{
"id": 0,
"type": "table",
"value": "menu"
},
{
"id": 2,
"type": "column",
"value": "id"
}
] |
[
{
"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_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
2,203
|
match_season
|
spider:train_spider.json:1065
|
What are the draft pick numbers and draft classes for players who play the Defender position?
|
SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = "Defender"
|
[
"What",
"are",
"the",
"draft",
"pick",
"numbers",
"and",
"draft",
"classes",
"for",
"players",
"who",
"play",
"the",
"Defender",
"position",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "draft_pick_number"
},
{
"id": 0,
"type": "table",
"value": "match_season"
},
{
"id": 2,
"type": "column",
"value": "draft_class"
},
{
"id": 3,
"type": "column",
"value": "position"
},
{
"id": 4,
"type": "column",
"value": "Defender"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
2,204
|
institution_sports
|
bird:test.json:1672
|
Return the years in which more than 1 institution was founded, as well as the number of institutions founded in each of those.
|
SELECT Founded , COUNT(*) FROM institution GROUP BY Founded HAVING COUNT(*) > 1
|
[
"Return",
"the",
"years",
"in",
"which",
"more",
"than",
"1",
"institution",
"was",
"founded",
",",
"as",
"well",
"as",
"the",
"number",
"of",
"institutions",
"founded",
"in",
"each",
"of",
"those",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "institution"
},
{
"id": 1,
"type": "column",
"value": "founded"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,205
|
allergy_1
|
spider:train_spider.json:489
|
Show all majors and corresponding number of students.
|
SELECT major , count(*) FROM Student GROUP BY major
|
[
"Show",
"all",
"majors",
"and",
"corresponding",
"number",
"of",
"students",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 1,
"type": "column",
"value": "major"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"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": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
2,206
|
public_review_platform
|
bird:train.json:3831
|
What are the opening hours of business number 53 on Friday?
|
SELECT T1.closing_time - T1.opening_time AS "opening hours" FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T2.day_of_week LIKE 'Friday' AND T1.business_id = 53
|
[
"What",
"are",
"the",
"opening",
"hours",
"of",
"business",
"number",
"53",
"on",
"Friday",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "business_hours"
},
{
"id": 2,
"type": "column",
"value": "closing_time"
},
{
"id": 3,
"type": "column",
"value": "opening_time"
},
{
"id": 5,
"type": "column",
"value": "day_of_week"
},
{
"id": 7,
"type": "column",
"value": "business_id"
},
{
"id": 4,
"type": "column",
"value": "day_id"
},
{
"id": 6,
"type": "value",
"value": "Friday"
},
{
"id": 1,
"type": "table",
"value": "days"
},
{
"id": 8,
"type": "value",
"value": "53"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
6
]
},
{
"entity_id": 8,
"token_idxs": [
8
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O"
] |
2,207
|
pilot_1
|
bird:test.json:1148
|
Return the average and minimum ages across all pilots.
|
SELECT avg(age) , min(age) FROM pilotskills
|
[
"Return",
"the",
"average",
"and",
"minimum",
"ages",
"across",
"all",
"pilots",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 1,
"type": "column",
"value": "age"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"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": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
2,208
|
station_weather
|
spider:train_spider.json:3159
|
Give me the times and numbers of all trains that go to Chennai, ordered by time.
|
SELECT TIME , train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME
|
[
"Give",
"me",
"the",
"times",
"and",
"numbers",
"of",
"all",
"trains",
"that",
"go",
"to",
"Chennai",
",",
"ordered",
"by",
"time",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "train_number"
},
{
"id": 3,
"type": "column",
"value": "destination"
},
{
"id": 4,
"type": "value",
"value": "Chennai"
},
{
"id": 0,
"type": "table",
"value": "train"
},
{
"id": 1,
"type": "column",
"value": "time"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
2,209
|
climbing
|
spider:train_spider.json:1145
|
What are the countries that have both mountains that are higher than 5600 and lower than 5200?
|
SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200
|
[
"What",
"are",
"the",
"countries",
"that",
"have",
"both",
"mountains",
"that",
"are",
"higher",
"than",
"5600",
"and",
"lower",
"than",
"5200",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "mountain"
},
{
"id": 1,
"type": "column",
"value": "country"
},
{
"id": 2,
"type": "column",
"value": "height"
},
{
"id": 3,
"type": "value",
"value": "5600"
},
{
"id": 4,
"type": "value",
"value": "5200"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
2,210
|
protein_institute
|
spider:train_spider.json:1917
|
Show institution types, along with the number of institutions and total enrollment for each type.
|
SELECT TYPE , count(*) , sum(enrollment) FROM institution GROUP BY TYPE
|
[
"Show",
"institution",
"types",
",",
"along",
"with",
"the",
"number",
"of",
"institutions",
"and",
"total",
"enrollment",
"for",
"each",
"type",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "institution"
},
{
"id": 2,
"type": "column",
"value": "enrollment"
},
{
"id": 1,
"type": "column",
"value": "type"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
2,211
|
company_employee
|
spider:train_spider.json:4100
|
What is the maximum and minimum market value of companies?
|
SELECT max(Market_Value_in_Billion) , min(Market_Value_in_Billion) FROM company
|
[
"What",
"is",
"the",
"maximum",
"and",
"minimum",
"market",
"value",
"of",
"companies",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "market_value_in_billion"
},
{
"id": 0,
"type": "table",
"value": "company"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-TABLE",
"O"
] |
2,212
|
csu_1
|
spider:train_spider.json:2390
|
Find the campus fee of "San Jose State University" in year 2000.
|
SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = "San Jose State University" AND t1.year = 2000
|
[
"Find",
"the",
"campus",
"fee",
"of",
"\"",
"San",
"Jose",
"State",
"University",
"\"",
"in",
"year",
"2000",
"."
] |
[
{
"id": 5,
"type": "column",
"value": "San Jose State University"
},
{
"id": 0,
"type": "column",
"value": "campusfee"
},
{
"id": 1,
"type": "table",
"value": "csu_fees"
},
{
"id": 2,
"type": "table",
"value": "campuses"
},
{
"id": 3,
"type": "column",
"value": "campus"
},
{
"id": 6,
"type": "column",
"value": "year"
},
{
"id": 7,
"type": "value",
"value": "2000"
},
{
"id": 4,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
0
]
},
{
"entity_id": 5,
"token_idxs": [
6,
7,
8,
9
]
},
{
"entity_id": 6,
"token_idxs": [
12
]
},
{
"entity_id": 7,
"token_idxs": [
13
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"B-COLUMN",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
2,213
|
olympics
|
bird:train.json:4915
|
When John Aalberg took part in the 1994 Winter Olympic Game, how old was he?
|
SELECT T2.age FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' AND T1.games_name = '1994 Winter'
|
[
"When",
"John",
"Aalberg",
"took",
"part",
"in",
"the",
"1994",
"Winter",
"Olympic",
"Game",
",",
"how",
"old",
"was",
"he",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "games_competitor"
},
{
"id": 7,
"type": "value",
"value": "John Aalberg"
},
{
"id": 9,
"type": "value",
"value": "1994 Winter"
},
{
"id": 8,
"type": "column",
"value": "games_name"
},
{
"id": 4,
"type": "column",
"value": "person_id"
},
{
"id": 6,
"type": "column",
"value": "full_name"
},
{
"id": 10,
"type": "column",
"value": "games_id"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 2,
"type": "table",
"value": "games"
},
{
"id": 0,
"type": "column",
"value": "age"
},
{
"id": 5,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
1,
2
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": [
7,
8
]
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,214
|
riding_club
|
spider:train_spider.json:1725
|
Show different occupations along with the number of players in each occupation.
|
SELECT Occupation , COUNT(*) FROM player GROUP BY Occupation
|
[
"Show",
"different",
"occupations",
"along",
"with",
"the",
"number",
"of",
"players",
"in",
"each",
"occupation",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "occupation"
},
{
"id": 0,
"type": "table",
"value": "player"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O"
] |
2,215
|
cinema
|
spider:train_spider.json:1937
|
Find the distinct locations that has a cinema.
|
SELECT DISTINCT LOCATION FROM cinema
|
[
"Find",
"the",
"distinct",
"locations",
"that",
"has",
"a",
"cinema",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 0,
"type": "table",
"value": "cinema"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
2,216
|
customer_complaints
|
spider:train_spider.json:5805
|
Count the number of different complaint type codes.
|
SELECT count(DISTINCT complaint_type_code) FROM complaints
|
[
"Count",
"the",
"number",
"of",
"different",
"complaint",
"type",
"codes",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "complaint_type_code"
},
{
"id": 0,
"type": "table",
"value": "complaints"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
2,217
|
hockey
|
bird:train.json:7682
|
How many years did player Id "healygl01" play?
|
SELECT COUNT(year) FROM Goalies WHERE playerID = 'healygl01'
|
[
"How",
"many",
"years",
"did",
"player",
"I",
"d",
"\"",
"healygl01",
"\"",
"play",
"?"
] |
[
{
"id": 2,
"type": "value",
"value": "healygl01"
},
{
"id": 1,
"type": "column",
"value": "playerid"
},
{
"id": 0,
"type": "table",
"value": "goalies"
},
{
"id": 3,
"type": "column",
"value": "year"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4,
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
2,218
|
toxicology
|
bird:dev.json:329
|
Which carcinogenic molecule have the highest number of atoms consisted in it?
|
SELECT T.molecule_id FROM ( SELECT T2.molecule_id, COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' GROUP BY T2.molecule_id ORDER BY COUNT(T1.atom_id) DESC LIMIT 1 ) t
|
[
"Which",
"carcinogenic",
"molecule",
"have",
"the",
"highest",
"number",
"of",
"atoms",
"consisted",
"in",
"it",
"?"
] |
[
{
"id": 0,
"type": "column",
"value": "molecule_id"
},
{
"id": 2,
"type": "table",
"value": "molecule"
},
{
"id": 5,
"type": "column",
"value": "atom_id"
},
{
"id": 3,
"type": "column",
"value": "label"
},
{
"id": 1,
"type": "table",
"value": "atom"
},
{
"id": 4,
"type": "value",
"value": "+"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
2,219
|
movies_4
|
bird:train.json:468
|
What is the title of the highest-budget film to date? Please include the revenue and name the country.
|
SELECT T1.title, T1.revenue, T3.COUNTry_name FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id ORDER BY T1.budget DESC LIMIT 1
|
[
"What",
"is",
"the",
"title",
"of",
"the",
"highest",
"-",
"budget",
"film",
"to",
"date",
"?",
"Please",
"include",
"the",
"revenue",
"and",
"name",
"the",
"country",
"."
] |
[
{
"id": 6,
"type": "table",
"value": "production_country"
},
{
"id": 2,
"type": "column",
"value": "country_name"
},
{
"id": 7,
"type": "column",
"value": "country_id"
},
{
"id": 8,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"type": "column",
"value": "revenue"
},
{
"id": 3,
"type": "table",
"value": "country"
},
{
"id": 4,
"type": "column",
"value": "budget"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 5,
"type": "table",
"value": "movie"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
20
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
2,220
|
movie_platform
|
bird:train.json:27
|
What is the average rating score of the movie "When Will I Be Loved" and who was its director?
|
SELECT AVG(T1.rating_score), T2.director_name FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved'
|
[
"What",
"is",
"the",
"average",
"rating",
"score",
"of",
"the",
"movie",
"\"",
"When",
"Will",
"I",
"Be",
"Loved",
"\"",
"and",
"who",
"was",
"its",
"director",
"?"
] |
[
{
"id": 4,
"type": "value",
"value": "When Will I Be Loved"
},
{
"id": 0,
"type": "column",
"value": "director_name"
},
{
"id": 5,
"type": "column",
"value": "rating_score"
},
{
"id": 3,
"type": "column",
"value": "movie_title"
},
{
"id": 6,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"type": "table",
"value": "ratings"
},
{
"id": 2,
"type": "table",
"value": "movies"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
20
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11,
12,
13,
14
]
},
{
"entity_id": 5,
"token_idxs": [
5
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
2,221
|
cre_Drama_Workshop_Groups
|
spider:train_spider.json:5094
|
Show all the planned delivery dates and actual delivery dates of bookings.
|
SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS
|
[
"Show",
"all",
"the",
"planned",
"delivery",
"dates",
"and",
"actual",
"delivery",
"dates",
"of",
"bookings",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "planned_delivery_date"
},
{
"id": 2,
"type": "column",
"value": "actual_delivery_date"
},
{
"id": 0,
"type": "table",
"value": "bookings"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
7,
8,
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O"
] |
2,222
|
network_2
|
spider:train_spider.json:4450
|
Find the person who has exactly one friend.
|
SELECT name FROM PersonFriend GROUP BY name HAVING count(*) = 1
|
[
"Find",
"the",
"person",
"who",
"has",
"exactly",
"one",
"friend",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "personfriend"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6,
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
2,224
|
store_1
|
spider:train_spider.json:547
|
List the top 10 customers by total gross sales. List customers' first and last name and total gross sales.
|
SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;
|
[
"List",
"the",
"top",
"10",
"customers",
"by",
"total",
"gross",
"sales",
".",
"List",
"customers",
"'",
"first",
"and",
"last",
"name",
"and",
"total",
"gross",
"sales",
"."
] |
[
{
"id": 6,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 2,
"type": "column",
"value": "last_name"
},
{
"id": 3,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type": "table",
"value": "invoices"
},
{
"id": 5,
"type": "column",
"value": "total"
},
{
"id": 0,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": [
15,
16
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
18
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
2,225
|
social_media
|
bird:train.json:805
|
What is the gender of the user who tweeted `tw-715909161071091712`?
|
SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.TweetID = 'tw-715909161071091712'
|
[
"What",
"is",
"the",
"gender",
"of",
"the",
"user",
"who",
"tweeted",
"`",
"tw-715909161071091712",
"`",
"?"
] |
[
{
"id": 3,
"type": "value",
"value": "tw-715909161071091712"
},
{
"id": 1,
"type": "table",
"value": "twitter"
},
{
"id": 2,
"type": "column",
"value": "tweetid"
},
{
"id": 0,
"type": "column",
"value": "gender"
},
{
"id": 4,
"type": "column",
"value": "userid"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
2,226
|
customers_and_addresses
|
spider:train_spider.json:6134
|
What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.
|
SELECT address_content FROM addresses WHERE city = "East Julianaside" AND state_province_county = "Texas" UNION SELECT address_content FROM addresses WHERE city = "Gleasonmouth" AND state_province_county = "Arizona"
|
[
"What",
"are",
"all",
"the",
"addresses",
"in",
"East",
"Julianaside",
",",
"Texas",
"or",
"in",
"Gleasonmouth",
",",
"Arizona",
"."
] |
[
{
"id": 4,
"type": "column",
"value": "state_province_county"
},
{
"id": 3,
"type": "column",
"value": "East Julianaside"
},
{
"id": 1,
"type": "column",
"value": "address_content"
},
{
"id": 6,
"type": "column",
"value": "Gleasonmouth"
},
{
"id": 0,
"type": "table",
"value": "addresses"
},
{
"id": 7,
"type": "column",
"value": "Arizona"
},
{
"id": 5,
"type": "column",
"value": "Texas"
},
{
"id": 2,
"type": "column",
"value": "city"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
9
]
},
{
"entity_id": 6,
"token_idxs": [
12
]
},
{
"entity_id": 7,
"token_idxs": [
14
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
2,227
|
movie_3
|
bird:train.json:9233
|
List the inventory ID of the film titled "African Egg".
|
SELECT T2.inventory_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.title = 'African Egg'
|
[
"List",
"the",
"inventory",
"ID",
"of",
"the",
"film",
"titled",
"\"",
"African",
"Egg",
"\"",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "inventory_id"
},
{
"id": 4,
"type": "value",
"value": "African Egg"
},
{
"id": 2,
"type": "table",
"value": "inventory"
},
{
"id": 5,
"type": "column",
"value": "film_id"
},
{
"id": 3,
"type": "column",
"value": "title"
},
{
"id": 1,
"type": "table",
"value": "film"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
2,228
|
food_inspection
|
bird:train.json:8851
|
What is the owner's name of the of the business that violates 103156 on June 12, 2014?
|
SELECT DISTINCT T2.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.violation_type_id = 103156 AND T1.`date` = '2014-06-12'
|
[
"What",
"is",
"the",
"owner",
"'s",
"name",
"of",
"the",
"of",
"the",
"business",
"that",
"violates",
"103156",
"on",
"June",
"12",
",",
"2014",
"?"
] |
[
{
"id": 4,
"type": "column",
"value": "violation_type_id"
},
{
"id": 3,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "column",
"value": "owner_name"
},
{
"id": 1,
"type": "table",
"value": "violations"
},
{
"id": 2,
"type": "table",
"value": "businesses"
},
{
"id": 7,
"type": "value",
"value": "2014-06-12"
},
{
"id": 5,
"type": "value",
"value": "103156"
},
{
"id": 6,
"type": "column",
"value": "date"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
13
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,229
|
ice_hockey_draft
|
bird:train.json:6920
|
How many players weigh more than 90 kg?
|
SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90
|
[
"How",
"many",
"players",
"weigh",
"more",
"than",
"90",
"kg",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "weight_in_kg"
},
{
"id": 1,
"type": "table",
"value": "weight_info"
},
{
"id": 0,
"type": "table",
"value": "playerinfo"
},
{
"id": 6,
"type": "column",
"value": "weight_id"
},
{
"id": 4,
"type": "column",
"value": "eliteid"
},
{
"id": 5,
"type": "column",
"value": "weight"
},
{
"id": 3,
"type": "value",
"value": "90"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
3
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
2,230
|
bike_1
|
spider:train_spider.json:191
|
For each station, find its latitude and the minimum duration of trips that ended at the station.
|
SELECT T1.name , T1.lat , min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id
|
[
"For",
"each",
"station",
",",
"find",
"its",
"latitude",
"and",
"the",
"minimum",
"duration",
"of",
"trips",
"that",
"ended",
"at",
"the",
"station",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "end_station_id"
},
{
"id": 5,
"type": "column",
"value": "duration"
},
{
"id": 3,
"type": "table",
"value": "station"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "table",
"value": "trip"
},
{
"id": 2,
"type": "column",
"value": "lat"
},
{
"id": 6,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
"token_idxs": [
10
]
},
{
"entity_id": 6,
"token_idxs": [
4
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
2,231
|
retail_world
|
bird:train.json:6550
|
What products were ordered by the customer ID "WILMK" which were required on 3/26/1998?
|
SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.RequiredDate LIKE '1998-03-26%' AND T1.CustomerID = 'WILMK'
|
[
"What",
"products",
"were",
"ordered",
"by",
"the",
"customer",
"ID",
"\"",
"WILMK",
"\"",
"which",
"were",
"required",
"on",
"3/26/1998",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "Order Details"
},
{
"id": 5,
"type": "column",
"value": "requireddate"
},
{
"id": 0,
"type": "column",
"value": "productname"
},
{
"id": 6,
"type": "value",
"value": "1998-03-26%"
},
{
"id": 7,
"type": "column",
"value": "customerid"
},
{
"id": 4,
"type": "column",
"value": "productid"
},
{
"id": 1,
"type": "table",
"value": "products"
},
{
"id": 9,
"type": "column",
"value": "orderid"
},
{
"id": 2,
"type": "table",
"value": "orders"
},
{
"id": 8,
"type": "value",
"value": "WILMK"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
13
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
6,
7
]
},
{
"entity_id": 8,
"token_idxs": [
9
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
2,232
|
talkingdata
|
bird:train.json:1143
|
For the device with an event occurring on 2016/5/1 at 0:55:25, what is the gender of its user?
|
SELECT T1.gender FROM gender_age AS T1 INNER JOIN events AS T2 ON T1.device_id = T2.device_id WHERE T2.timestamp = '2016-05-01 00:55:25'
|
[
"For",
"the",
"device",
"with",
"an",
"event",
"occurring",
"on",
"2016/5/1",
"at",
"0:55:25",
",",
"what",
"is",
"the",
"gender",
"of",
"its",
"user",
"?"
] |
[
{
"id": 4,
"type": "value",
"value": "2016-05-01 00:55:25"
},
{
"id": 1,
"type": "table",
"value": "gender_age"
},
{
"id": 3,
"type": "column",
"value": "timestamp"
},
{
"id": 5,
"type": "column",
"value": "device_id"
},
{
"id": 0,
"type": "column",
"value": "gender"
},
{
"id": 2,
"type": "table",
"value": "events"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 5,
"token_idxs": [
2
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
2,233
|
formula_1
|
bird:dev.json:847
|
What is the surname of the driver with the best lap time in race number 19 in the second qualifying period?
|
SELECT T2.surname FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 19 ORDER BY T1.q2 ASC LIMIT 1
|
[
"What",
"is",
"the",
"surname",
"of",
"the",
"driver",
"with",
"the",
"best",
"lap",
"time",
"in",
"race",
"number",
"19",
"in",
"the",
"second",
"qualifying",
"period",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "qualifying"
},
{
"id": 6,
"type": "column",
"value": "driverid"
},
{
"id": 0,
"type": "column",
"value": "surname"
},
{
"id": 2,
"type": "table",
"value": "drivers"
},
{
"id": 3,
"type": "column",
"value": "raceid"
},
{
"id": 4,
"type": "value",
"value": "19"
},
{
"id": 5,
"type": "column",
"value": "q2"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
19
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
2,234
|
regional_sales
|
bird:train.json:2737
|
What is the average household income of Glendale?
|
SELECT AVG(`Household Income`) FROM `Store Locations` WHERE `City Name` = 'Glendale'
|
[
"What",
"is",
"the",
"average",
"household",
"income",
"of",
"Glendale",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "Household Income"
},
{
"id": 0,
"type": "table",
"value": "Store Locations"
},
{
"id": 1,
"type": "column",
"value": "City Name"
},
{
"id": 2,
"type": "value",
"value": "Glendale"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
4,
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
2,235
|
college_1
|
spider:train_spider.json:3251
|
How many students are enrolled in the class taught by some professor from the accounting department?
|
SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'
|
[
"How",
"many",
"students",
"are",
"enrolled",
"in",
"the",
"class",
"taught",
"by",
"some",
"professor",
"from",
"the",
"accounting",
"department",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "department"
},
{
"id": 2,
"type": "value",
"value": "Accounting"
},
{
"id": 8,
"type": "column",
"value": "class_code"
},
{
"id": 1,
"type": "column",
"value": "dept_name"
},
{
"id": 4,
"type": "column",
"value": "dept_code"
},
{
"id": 7,
"type": "column",
"value": "crs_code"
},
{
"id": 3,
"type": "table",
"value": "course"
},
{
"id": 6,
"type": "table",
"value": "enroll"
},
{
"id": 5,
"type": "table",
"value": "class"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
7
]
},
{
"entity_id": 6,
"token_idxs": [
4
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
2,236
|
cookbook
|
bird:train.json:8915
|
Provide the title and total time of the recipe which can be made with only lima beans.
|
SELECT T1.title, T1.prep_min + T1.cook_min + T1.stnd_min FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'lima beans'
|
[
"Provide",
"the",
"title",
"and",
"total",
"time",
"of",
"the",
"recipe",
"which",
"can",
"be",
"made",
"with",
"only",
"lima",
"beans",
"."
] |
[
{
"id": 7,
"type": "column",
"value": "ingredient_id"
},
{
"id": 1,
"type": "table",
"value": "ingredient"
},
{
"id": 3,
"type": "value",
"value": "lima beans"
},
{
"id": 10,
"type": "column",
"value": "recipe_id"
},
{
"id": 4,
"type": "column",
"value": "stnd_min"
},
{
"id": 6,
"type": "table",
"value": "quantity"
},
{
"id": 8,
"type": "column",
"value": "prep_min"
},
{
"id": 9,
"type": "column",
"value": "cook_min"
},
{
"id": 5,
"type": "table",
"value": "recipe"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
15,
16
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
8
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
2,237
|
works_cycles
|
bird:train.json:7261
|
Among the vendors with maximum orders betweeen 500 to 750, which vendor has the 10th highest profit on net?
|
SELECT T2.Name FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.MaxOrderQty BETWEEN 500 AND 750 ORDER BY T1.LastReceiptCost - T1.StandardPrice DESC LIMIT 9, 1
|
[
"Among",
"the",
"vendors",
"with",
"maximum",
"orders",
"betweeen",
"500",
"to",
"750",
",",
"which",
"vendor",
"has",
"the",
"10th",
"highest",
"profit",
"on",
"net",
"?"
] |
[
{
"id": 6,
"type": "column",
"value": "businessentityid"
},
{
"id": 7,
"type": "column",
"value": "lastreceiptcost"
},
{
"id": 1,
"type": "table",
"value": "productvendor"
},
{
"id": 8,
"type": "column",
"value": "standardprice"
},
{
"id": 3,
"type": "column",
"value": "maxorderqty"
},
{
"id": 2,
"type": "table",
"value": "vendor"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "value",
"value": "500"
},
{
"id": 5,
"type": "value",
"value": "750"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
4,
5
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": [
9
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,238
|
flight_1
|
spider:train_spider.json:344
|
How many aircrafts exist in the database?
|
SELECT count(*) FROM Aircraft
|
[
"How",
"many",
"aircrafts",
"exist",
"in",
"the",
"database",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "aircraft"
}
] |
[
{
"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": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
2,239
|
sales_in_weather
|
bird:train.json:8198
|
How many days did the show fell more than 5 inches?
|
SELECT COUNT(DISTINCT `date`) FROM weather WHERE snowfall > 5
|
[
"How",
"many",
"days",
"did",
"the",
"show",
"fell",
"more",
"than",
"5",
"inches",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "snowfall"
},
{
"id": 0,
"type": "table",
"value": "weather"
},
{
"id": 3,
"type": "column",
"value": "date"
},
{
"id": 2,
"type": "value",
"value": "5"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
2,240
|
store_1
|
spider:train_spider.json:545
|
Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders.
|
SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;
|
[
"Find",
"out",
"the",
"top",
"10",
"customers",
"by",
"total",
"number",
"of",
"orders",
".",
"List",
"customers",
"'",
"first",
"and",
"last",
"name",
"and",
"the",
"number",
"of",
"total",
"orders",
"."
] |
[
{
"id": 5,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 2,
"type": "column",
"value": "last_name"
},
{
"id": 3,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type": "table",
"value": "invoices"
},
{
"id": 0,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
0
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
17,
18
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,241
|
customers_and_invoices
|
spider:train_spider.json:1567
|
What is the customer id, first and last name with most number of accounts.
|
SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
|
[
"What",
"is",
"the",
"customer",
"i",
"d",
",",
"first",
"and",
"last",
"name",
"with",
"most",
"number",
"of",
"accounts",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "customer_first_name"
},
{
"id": 2,
"type": "column",
"value": "customer_last_name"
},
{
"id": 0,
"type": "column",
"value": "customer_id"
},
{
"id": 4,
"type": "table",
"value": "customers"
},
{
"id": 3,
"type": "table",
"value": "accounts"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
2,242
|
mondial_geo
|
bird:train.json:8379
|
Which country was the source of Pjandsh River? Give the full name of the country.
|
SELECT T1.Name FROM country AS T1 INNER JOIN located AS T2 ON T1.Code = T2.Country WHERE T2.River = 'Pjandsh'
|
[
"Which",
"country",
"was",
"the",
"source",
"of",
"Pjandsh",
"River",
"?",
"Give",
"the",
"full",
"name",
"of",
"the",
"country",
"."
] |
[
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 2,
"type": "table",
"value": "located"
},
{
"id": 4,
"type": "value",
"value": "Pjandsh"
},
{
"id": 6,
"type": "column",
"value": "country"
},
{
"id": 3,
"type": "column",
"value": "river"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "column",
"value": "code"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
1
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
2,243
|
superhero
|
bird:dev.json:776
|
Provide the hero name and race of Charles Chandler.
|
SELECT T1.superhero_name, T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.full_name = 'Charles Chandler'
|
[
"Provide",
"the",
"hero",
"name",
"and",
"race",
"of",
"Charles",
"Chandler",
"."
] |
[
{
"id": 5,
"type": "value",
"value": "Charles Chandler"
},
{
"id": 0,
"type": "column",
"value": "superhero_name"
},
{
"id": 2,
"type": "table",
"value": "superhero"
},
{
"id": 4,
"type": "column",
"value": "full_name"
},
{
"id": 6,
"type": "column",
"value": "race_id"
},
{
"id": 1,
"type": "column",
"value": "race"
},
{
"id": 3,
"type": "table",
"value": "race"
},
{
"id": 7,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"token_idxs": [
7,
8
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
2,244
|
music_4
|
spider:train_spider.json:6155
|
What are the category of music festivals with result "Awarded"?
|
SELECT Category FROM music_festival WHERE RESULT = "Awarded"
|
[
"What",
"are",
"the",
"category",
"of",
"music",
"festivals",
"with",
"result",
"\"",
"Awarded",
"\"",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "music_festival"
},
{
"id": 1,
"type": "column",
"value": "category"
},
{
"id": 3,
"type": "column",
"value": "Awarded"
},
{
"id": 2,
"type": "column",
"value": "result"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5,
6
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
2,245
|
document_management
|
spider:train_spider.json:4535
|
Find the average access count of documents with the least popular structure.
|
SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1
|
[
"Find",
"the",
"average",
"access",
"count",
"of",
"documents",
"with",
"the",
"least",
"popular",
"structure",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "document_structure_code"
},
{
"id": 2,
"type": "column",
"value": "access_count"
},
{
"id": 0,
"type": "table",
"value": "documents"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": [
3,
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O"
] |
2,246
|
works_cycles
|
bird:train.json:7317
|
Other than the Chief Executive Officer, who is the employee who has the highest payrate? State the rate.
|
SELECT T2.FirstName, T2.LastName FROM EmployeePayHistory AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Employee AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T3.JobTitle NOT LIKE 'Chief Executive Officer' ORDER BY T1.Rate DESC LIMIT 1
|
[
"Other",
"than",
"the",
"Chief",
"Executive",
"Officer",
",",
"who",
"is",
"the",
"employee",
"who",
"has",
"the",
"highest",
"payrate",
"?",
"State",
"the",
"rate",
"."
] |
[
{
"id": 4,
"type": "value",
"value": "Chief Executive Officer"
},
{
"id": 6,
"type": "table",
"value": "employeepayhistory"
},
{
"id": 8,
"type": "column",
"value": "businessentityid"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 1,
"type": "column",
"value": "lastname"
},
{
"id": 2,
"type": "table",
"value": "employee"
},
{
"id": 3,
"type": "column",
"value": "jobtitle"
},
{
"id": 7,
"type": "table",
"value": "person"
},
{
"id": 5,
"type": "column",
"value": "rate"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 5,
"token_idxs": [
19
]
},
{
"entity_id": 6,
"token_idxs": [
11
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
2,247
|
railway
|
spider:train_spider.json:5640
|
Show the names of trains and locations of railways they are in.
|
SELECT T2.Name , T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID
|
[
"Show",
"the",
"names",
"of",
"trains",
"and",
"locations",
"of",
"railways",
"they",
"are",
"in",
"."
] |
[
{
"id": 4,
"type": "column",
"value": "railway_id"
},
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "table",
"value": "railway"
},
{
"id": 3,
"type": "table",
"value": "train"
},
{
"id": 0,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
2,248
|
college_completion
|
bird:train.json:3742
|
List the race of institutions in Alabama with number of students greater than the 90% of average number of students of all institutions?
|
SELECT DISTINCT T2.race FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.student_count > ( SELECT AVG(T1.student_count) * 0.9 FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.state = 'Alabama' ) AND T1.state = 'Alabama'
|
[
"List",
"the",
"race",
"of",
"institutions",
"in",
"Alabama",
"with",
"number",
"of",
"students",
"greater",
"than",
"the",
"90",
"%",
"of",
"average",
"number",
"of",
"students",
"of",
"all",
"institutions",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "institution_details"
},
{
"id": 2,
"type": "table",
"value": "institution_grads"
},
{
"id": 4,
"type": "column",
"value": "student_count"
},
{
"id": 6,
"type": "value",
"value": "Alabama"
},
{
"id": 3,
"type": "column",
"value": "unitid"
},
{
"id": 5,
"type": "column",
"value": "state"
},
{
"id": 0,
"type": "column",
"value": "race"
},
{
"id": 7,
"type": "value",
"value": "0.9"
}
] |
[
{
"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": [
10
]
},
{
"entity_id": 5,
"token_idxs": [
0,
1
]
},
{
"entity_id": 6,
"token_idxs": [
6
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
2,249
|
mondial_geo
|
bird:train.json:8377
|
What is the main spoken language in MNE?
|
SELECT Name FROM language WHERE Country = 'MNE' ORDER BY Percentage DESC LIMIT 1
|
[
"What",
"is",
"the",
"main",
"spoken",
"language",
"in",
"MNE",
"?"
] |
[
{
"id": 4,
"type": "column",
"value": "percentage"
},
{
"id": 0,
"type": "table",
"value": "language"
},
{
"id": 2,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": "MNE"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O"
] |
2,250
|
movie_platform
|
bird:train.json:83
|
How much higher is the average rating score of the movie "Innocence Unprotected" than the movie "When Will I Be Loved"?
|
SELECT SUM(CASE WHEN T2.movie_title = 'Innocence Unprotected' THEN T1.rating_score ELSE 0 END) / SUM(CASE WHEN T2.movie_title = 'Innocence Unprotected' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.movie_title = 'When Will I Be Loved' THEN T1.rating_score ELSE 0 END) / SUM(CASE WHEN T2.movie_title = 'When Will I Be Loved' THEN 1 ELSE 0 END) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id
|
[
"How",
"much",
"higher",
"is",
"the",
"average",
"rating",
"score",
"of",
"the",
"movie",
"\"",
"Innocence",
"Unprotected",
"\"",
"than",
"the",
"movie",
"\"",
"When",
"Will",
"I",
"Be",
"Loved",
"\"",
"?"
] |
[
{
"id": 7,
"type": "value",
"value": "Innocence Unprotected"
},
{
"id": 8,
"type": "value",
"value": "When Will I Be Loved"
},
{
"id": 4,
"type": "column",
"value": "rating_score"
},
{
"id": 6,
"type": "column",
"value": "movie_title"
},
{
"id": 2,
"type": "column",
"value": "movie_id"
},
{
"id": 0,
"type": "table",
"value": "ratings"
},
{
"id": 1,
"type": "table",
"value": "movies"
},
{
"id": 3,
"type": "value",
"value": "0"
},
{
"id": 5,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
17
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
12,
13
]
},
{
"entity_id": 8,
"token_idxs": [
19,
20,
21,
22,
23
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
2,251
|
cre_Doc_Control_Systems
|
spider:train_spider.json:2109
|
How many employees does each role have? List role description, id and number of employees.
|
SELECT T1.role_description , T2.role_code , count(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code;
|
[
"How",
"many",
"employees",
"does",
"each",
"role",
"have",
"?",
"List",
"role",
"description",
",",
"i",
"d",
"and",
"number",
"of",
"employees",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "role_description"
},
{
"id": 0,
"type": "column",
"value": "role_code"
},
{
"id": 3,
"type": "table",
"value": "employees"
},
{
"id": 2,
"type": "table",
"value": "roles"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.