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
|
|---|---|---|---|---|---|---|---|---|
13,479
|
book_1
|
bird:test.json:549
|
What is the name of the client with the most number of orders?
|
SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient GROUP BY T1.idClient ORDER BY count(*) DESC LIMIT 1
|
[
"What",
"is",
"the",
"name",
"of",
"the",
"client",
"with",
"the",
"most",
"number",
"of",
"orders",
"?"
] |
[
{
"id": 0,
"type": "column",
"value": "idclient"
},
{
"id": 2,
"type": "table",
"value": "orders"
},
{
"id": 3,
"type": "table",
"value": "client"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,480
|
legislator
|
bird:train.json:4912
|
Among the female legislators, what is the percentage of the senators in Maine?
|
SELECT CAST(SUM(CASE WHEN T2.type = 'sen' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.type) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'ME' AND T1.gender_bio = 'F'
|
[
"Among",
"the",
"female",
"legislators",
",",
"what",
"is",
"the",
"percentage",
"of",
"the",
"senators",
"in",
"Maine",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "current-terms"
},
{
"id": 2,
"type": "column",
"value": "bioguide_id"
},
{
"id": 6,
"type": "column",
"value": "gender_bio"
},
{
"id": 3,
"type": "column",
"value": "bioguide"
},
{
"id": 0,
"type": "table",
"value": "current"
},
{
"id": 4,
"type": "column",
"value": "state"
},
{
"id": 9,
"type": "column",
"value": "type"
},
{
"id": 8,
"type": "value",
"value": "100"
},
{
"id": 12,
"type": "value",
"value": "sen"
},
{
"id": 5,
"type": "value",
"value": "ME"
},
{
"id": 7,
"type": "value",
"value": "F"
},
{
"id": 10,
"type": "value",
"value": "0"
},
{
"id": 11,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
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",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
13,481
|
icfp_1
|
spider:train_spider.json:2898
|
What is the last name of the author that has published the most papers?
|
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname , t1.lname ORDER BY count(*) DESC LIMIT 1
|
[
"What",
"is",
"the",
"last",
"name",
"of",
"the",
"author",
"that",
"has",
"published",
"the",
"most",
"papers",
"?"
] |
[
{
"id": 4,
"type": "table",
"value": "authorship"
},
{
"id": 3,
"type": "table",
"value": "authors"
},
{
"id": 5,
"type": "column",
"value": "paperid"
},
{
"id": 2,
"type": "table",
"value": "papers"
},
{
"id": 6,
"type": "column",
"value": "authid"
},
{
"id": 0,
"type": "column",
"value": "fname"
},
{
"id": 1,
"type": "column",
"value": "lname"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,482
|
sales
|
bird:train.json:5463
|
What is the average price of products that cost between 100 and 200?
|
SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200
|
[
"What",
"is",
"the",
"average",
"price",
"of",
"products",
"that",
"cost",
"between",
"100",
"and",
"200",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 1,
"type": "column",
"value": "price"
},
{
"id": 2,
"type": "value",
"value": "100"
},
{
"id": 3,
"type": "value",
"value": "200"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
13,483
|
menu
|
bird:train.json:5482
|
Which dish has the highest price on the menu "Zentral Theater Terrace"? Please give its name.
|
SELECT T4.name FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.name = 'Zentral Theater Terrace' ORDER BY T1.price DESC LIMIT 1
|
[
"Which",
"dish",
"has",
"the",
"highest",
"price",
"on",
"the",
"menu",
"\"",
"Zentral",
"Theater",
"Terrace",
"\"",
"?",
"Please",
"give",
"its",
"name",
"."
] |
[
{
"id": 2,
"type": "value",
"value": "Zentral Theater Terrace"
},
{
"id": 10,
"type": "column",
"value": "menu_page_id"
},
{
"id": 7,
"type": "table",
"value": "menuitem"
},
{
"id": 8,
"type": "table",
"value": "menupage"
},
{
"id": 5,
"type": "column",
"value": "dish_id"
},
{
"id": 9,
"type": "column",
"value": "menu_id"
},
{
"id": 3,
"type": "column",
"value": "price"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 1,
"type": "table",
"value": "dish"
},
{
"id": 4,
"type": "table",
"value": "menu"
},
{
"id": 6,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
18
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
10,
11,
12
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,484
|
wedding
|
spider:train_spider.json:1643
|
Show all church names that have hosted least two weddings.
|
SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id GROUP BY T1.church_id HAVING count(*) >= 2
|
[
"Show",
"all",
"church",
"names",
"that",
"have",
"hosted",
"least",
"two",
"weddings",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "church_id"
},
{
"id": 3,
"type": "table",
"value": "wedding"
},
{
"id": 2,
"type": "table",
"value": "church"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "value",
"value": "2"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,485
|
vehicle_rent
|
bird:test.json:436
|
What are the names and powertrain types of cars that have more than 30 total rental hours?
|
SELECT T2.name , T2.Type_of_powertrain FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T1.vehicles_id HAVING sum(T1.total_hours) > 30
|
[
"What",
"are",
"the",
"names",
"and",
"powertrain",
"types",
"of",
"cars",
"that",
"have",
"more",
"than",
"30",
"total",
"rental",
"hours",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "type_of_powertrain"
},
{
"id": 3,
"type": "table",
"value": "renting_history"
},
{
"id": 0,
"type": "column",
"value": "vehicles_id"
},
{
"id": 7,
"type": "column",
"value": "total_hours"
},
{
"id": 4,
"type": "table",
"value": "vehicles"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "value",
"value": "30"
},
{
"id": 6,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"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": [
13
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
15,
16
]
},
{
"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",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
13,486
|
public_review_platform
|
bird:train.json:3828
|
Please state any three business numbers in AZ state that have received the "Great experience" review stars.
|
SELECT DISTINCT T2.business_id FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T2.state LIKE 'AZ' AND T1.review_stars = 5 LIMIT 3
|
[
"Please",
"state",
"any",
"three",
"business",
"numbers",
"in",
"AZ",
"state",
"that",
"have",
"received",
"the",
"\"",
"Great",
"experience",
"\"",
"review",
"stars",
"."
] |
[
{
"id": 5,
"type": "column",
"value": "review_stars"
},
{
"id": 0,
"type": "column",
"value": "business_id"
},
{
"id": 2,
"type": "table",
"value": "business"
},
{
"id": 1,
"type": "table",
"value": "reviews"
},
{
"id": 3,
"type": "column",
"value": "state"
},
{
"id": 4,
"type": "value",
"value": "AZ"
},
{
"id": 6,
"type": "value",
"value": "5"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
13,487
|
online_exams
|
bird:test.json:228
|
Which student answer texts were given both "Normal" and "Absent" as comments?
|
SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = "Normal" INTERSECT SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = "Absent"
|
[
"Which",
"student",
"answer",
"texts",
"were",
"given",
"both",
"\"",
"Normal",
"\"",
"and",
"\"",
"Absent",
"\"",
"as",
"comments",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "student_answer_text"
},
{
"id": 0,
"type": "table",
"value": "student_answers"
},
{
"id": 2,
"type": "column",
"value": "comments"
},
{
"id": 3,
"type": "column",
"value": "Normal"
},
{
"id": 4,
"type": "column",
"value": "Absent"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1,
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"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",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
13,488
|
disney
|
bird:train.json:4697
|
Among the movies released from 1991 to 2000, calculate the percentage of comedy movies. Provide any five movie titles and directors.
|
SELECT CAST(COUNT(CASE WHEN T1.genre = 'Comedy' THEN T1.movie_title ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_title), group_concat(T1.movie_title), group_concat(T2.director) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE SUBSTR(T1.release_date, LENGTH(T1.release_date) - 3, LENGTH(T1.release_date)) BETWEEN '1991' AND '2000'
|
[
"Among",
"the",
"movies",
"released",
"from",
"1991",
"to",
"2000",
",",
"calculate",
"the",
"percentage",
"of",
"comedy",
"movies",
".",
"Provide",
"any",
"five",
"movie",
"titles",
"and",
"directors",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "movies_total_gross"
},
{
"id": 7,
"type": "column",
"value": "release_date"
},
{
"id": 4,
"type": "column",
"value": "movie_title"
},
{
"id": 1,
"type": "table",
"value": "director"
},
{
"id": 5,
"type": "column",
"value": "director"
},
{
"id": 11,
"type": "value",
"value": "Comedy"
},
{
"id": 10,
"type": "column",
"value": "genre"
},
{
"id": 2,
"type": "value",
"value": "1991"
},
{
"id": 3,
"type": "value",
"value": "2000"
},
{
"id": 6,
"type": "column",
"value": "name"
},
{
"id": 8,
"type": "value",
"value": "100"
},
{
"id": 9,
"type": "value",
"value": "3"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
19,
20
]
},
{
"entity_id": 5,
"token_idxs": [
22
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
3
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": [
13
]
},
{
"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-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O"
] |
13,489
|
cre_Doc_Tracking_DB
|
spider:train_spider.json:4238
|
Show the employee ids and the number of documents destroyed by each employee.
|
SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
|
[
"Show",
"the",
"employee",
"ids",
"and",
"the",
"number",
"of",
"documents",
"destroyed",
"by",
"each",
"employee",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "documents_to_be_destroyed"
},
{
"id": 1,
"type": "column",
"value": "destroyed_by_employee_id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
9,
10,
11,
12
]
},
{
"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",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
13,490
|
olympics
|
bird:train.json:4987
|
Which region is Yao Ming from?
|
SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Yao Ming'
|
[
"Which",
"region",
"is",
"Yao",
"Ming",
"from",
"?"
] |
[
{
"id": 5,
"type": "table",
"value": "person_region"
},
{
"id": 0,
"type": "column",
"value": "region_name"
},
{
"id": 4,
"type": "table",
"value": "noc_region"
},
{
"id": 2,
"type": "column",
"value": "full_name"
},
{
"id": 6,
"type": "column",
"value": "person_id"
},
{
"id": 8,
"type": "column",
"value": "region_id"
},
{
"id": 3,
"type": "value",
"value": "Yao Ming"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 7,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3,
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": [
1
]
},
{
"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",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
13,491
|
disney
|
bird:train.json:4650
|
Who is the most productive director?
|
SELECT director FROM director GROUP BY director ORDER BY COUNT(name) DESC LIMIT 1
|
[
"Who",
"is",
"the",
"most",
"productive",
"director",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "director"
},
{
"id": 1,
"type": "column",
"value": "director"
},
{
"id": 2,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"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"
] |
13,492
|
formula_1
|
bird:dev.json:860
|
For the driver who had the Q2 time as 0:01:40 in the qualifying race No. 355, what is his nationality?
|
SELECT DISTINCT T2.nationality FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 355 AND T1.q2 LIKE '1:40%'
|
[
"For",
"the",
"driver",
"who",
"had",
"the",
"Q2",
"time",
"as",
"0:01:40",
"in",
"the",
"qualifying",
"race",
"No",
".",
"355",
",",
"what",
"is",
"his",
"nationality",
"?"
] |
[
{
"id": 0,
"type": "column",
"value": "nationality"
},
{
"id": 1,
"type": "table",
"value": "qualifying"
},
{
"id": 3,
"type": "column",
"value": "driverid"
},
{
"id": 2,
"type": "table",
"value": "drivers"
},
{
"id": 4,
"type": "column",
"value": "raceid"
},
{
"id": 7,
"type": "value",
"value": "1:40%"
},
{
"id": 5,
"type": "value",
"value": "355"
},
{
"id": 6,
"type": "column",
"value": "q2"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
21
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
"token_idxs": [
16
]
},
{
"entity_id": 6,
"token_idxs": [
6
]
},
{
"entity_id": 7,
"token_idxs": [
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-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,493
|
retails
|
bird:train.json:6796
|
How many products shipped on 19/11/1994 were ordered on 21/09/1994?
|
SELECT COUNT(T2.l_partkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1994-09-21' AND T2.l_shipdate = '1994-11-19'
|
[
"How",
"many",
"products",
"shipped",
"on",
"19/11/1994",
"were",
"ordered",
"on",
"21/09/1994",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "o_orderdate"
},
{
"id": 3,
"type": "column",
"value": "o_orderkey"
},
{
"id": 4,
"type": "column",
"value": "l_orderkey"
},
{
"id": 6,
"type": "value",
"value": "1994-09-21"
},
{
"id": 7,
"type": "column",
"value": "l_shipdate"
},
{
"id": 8,
"type": "value",
"value": "1994-11-19"
},
{
"id": 2,
"type": "column",
"value": "l_partkey"
},
{
"id": 1,
"type": "table",
"value": "lineitem"
},
{
"id": 0,
"type": "table",
"value": "orders"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
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": [
3
]
},
{
"entity_id": 8,
"token_idxs": [
5
]
},
{
"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-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
13,494
|
language_corpus
|
bird:train.json:5808
|
How many Wikipedia pages with over 4000 different words are there on the Catalan language?
|
SELECT COUNT(lid) FROM pages WHERE lid = 1 AND words > 4000
|
[
"How",
"many",
"Wikipedia",
"pages",
"with",
"over",
"4000",
"different",
"words",
"are",
"there",
"on",
"the",
"Catalan",
"language",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "pages"
},
{
"id": 3,
"type": "column",
"value": "words"
},
{
"id": 4,
"type": "value",
"value": "4000"
},
{
"id": 1,
"type": "column",
"value": "lid"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"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-TABLE",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,495
|
sales
|
bird:train.json:5410
|
Name the most expensive and the least expensive products available, excluding free gifts.
|
SELECT Name FROM Products WHERE Price IN (( SELECT MAX(Price) FROM Products ), ( SELECT MIN(Price) FROM Products ))
|
[
"Name",
"the",
"most",
"expensive",
"and",
"the",
"least",
"expensive",
"products",
"available",
",",
"excluding",
"free",
"gifts",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 2,
"type": "column",
"value": "price"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
0
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,496
|
mondial_geo
|
bird:train.json:8333
|
Name all the volcano mountains between the height of 2000 to 4000.
|
SELECT Name FROM mountain WHERE Type = 'volcano' AND Height BETWEEN 2000 AND 4000
|
[
"Name",
"all",
"the",
"volcano",
"mountains",
"between",
"the",
"height",
"of",
"2000",
"to",
"4000",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "mountain"
},
{
"id": 3,
"type": "value",
"value": "volcano"
},
{
"id": 4,
"type": "column",
"value": "height"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "type"
},
{
"id": 5,
"type": "value",
"value": "2000"
},
{
"id": 6,
"type": "value",
"value": "4000"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
0
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": [
9
]
},
{
"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": []
}
] |
[
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
13,497
|
professional_basketball
|
bird:train.json:2800
|
What is the percentage of the teams who had post season (playoff) were ranked number 1?
|
SELECT CAST(SUM(CASE WHEN rank = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(name) FROM teams
|
[
"What",
"is",
"the",
"percentage",
"of",
"the",
"teams",
"who",
"had",
"post",
"season",
"(",
"playoff",
")",
"were",
"ranked",
"number",
"1",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "teams"
},
{
"id": 2,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "column",
"value": "rank"
},
{
"id": 1,
"type": "value",
"value": "100"
},
{
"id": 3,
"type": "value",
"value": "0"
},
{
"id": 4,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
{
"entity_id": 5,
"token_idxs": [
15
]
},
{
"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",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-VALUE",
"O"
] |
13,498
|
card_games
|
bird:dev.json:408
|
How many unknown power cards contain info about the triggered ability
|
SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE (T1.power IS NULL OR T1.power = '*') AND T2.text LIKE '%triggered ability%'
|
[
"How",
"many",
"unknown",
"power",
"cards",
"contain",
"info",
"about",
"the",
"triggered",
"ability"
] |
[
{
"id": 4,
"type": "value",
"value": "%triggered ability%"
},
{
"id": 2,
"type": "table",
"value": "rulings"
},
{
"id": 1,
"type": "table",
"value": "cards"
},
{
"id": 5,
"type": "column",
"value": "power"
},
{
"id": 0,
"type": "column",
"value": "text"
},
{
"id": 3,
"type": "column",
"value": "uuid"
},
{
"id": 6,
"type": "value",
"value": "*"
}
] |
[
{
"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": [
9,
10
]
},
{
"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",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE"
] |
13,499
|
formula_1
|
bird:dev.json:904
|
State the race and year of race in which Michael Schumacher had his fastest lap.
|
SELECT T1.name, T1.year FROM races AS T1 INNER JOIN lapTimes AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Michael' AND T3.surname = 'Schumacher' ORDER BY T2.milliseconds ASC LIMIT 1
|
[
"State",
"the",
"race",
"and",
"year",
"of",
"race",
"in",
"which",
"Michael",
"Schumacher",
"had",
"his",
"fastest",
"lap",
"."
] |
[
{
"id": 3,
"type": "column",
"value": "milliseconds"
},
{
"id": 10,
"type": "value",
"value": "Schumacher"
},
{
"id": 5,
"type": "table",
"value": "laptimes"
},
{
"id": 6,
"type": "column",
"value": "driverid"
},
{
"id": 7,
"type": "column",
"value": "forename"
},
{
"id": 2,
"type": "table",
"value": "drivers"
},
{
"id": 8,
"type": "value",
"value": "Michael"
},
{
"id": 9,
"type": "column",
"value": "surname"
},
{
"id": 11,
"type": "column",
"value": "raceid"
},
{
"id": 4,
"type": "table",
"value": "races"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 1,
"type": "column",
"value": "year"
}
] |
[
{
"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": [
2
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
9
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": [
10
]
},
{
"entity_id": 11,
"token_idxs": [
6
]
},
{
"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-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
13,500
|
gymnast
|
spider:train_spider.json:1766
|
List the names of gymnasts in ascending order by their heights.
|
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC
|
[
"List",
"the",
"names",
"of",
"gymnasts",
"in",
"ascending",
"order",
"by",
"their",
"heights",
"."
] |
[
{
"id": 4,
"type": "column",
"value": "gymnast_id"
},
{
"id": 5,
"type": "column",
"value": "people_id"
},
{
"id": 1,
"type": "table",
"value": "gymnast"
},
{
"id": 2,
"type": "table",
"value": "people"
},
{
"id": 3,
"type": "column",
"value": "height"
},
{
"id": 0,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"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",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,501
|
news_report
|
spider:train_spider.json:2816
|
List the names of journalists who have not reported any event.
|
SELECT Name FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report)
|
[
"List",
"the",
"names",
"of",
"journalists",
"who",
"have",
"not",
"reported",
"any",
"event",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "journalist_id"
},
{
"id": 3,
"type": "table",
"value": "news_report"
},
{
"id": 0,
"type": "table",
"value": "journalist"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
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",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
13,502
|
hockey
|
bird:train.json:7815
|
What are the total weights of players for team 'ANA' as per year 1997?
|
SELECT SUM(T1.weight) FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1997 AND T2.tmID = 'ANA'
|
[
"What",
"are",
"the",
"total",
"weights",
"of",
"players",
"for",
"team",
"'",
"ANA",
"'",
"as",
"per",
"year",
"1997",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "playerid"
},
{
"id": 1,
"type": "table",
"value": "scoring"
},
{
"id": 0,
"type": "table",
"value": "master"
},
{
"id": 2,
"type": "column",
"value": "weight"
},
{
"id": 4,
"type": "column",
"value": "year"
},
{
"id": 5,
"type": "value",
"value": "1997"
},
{
"id": 6,
"type": "column",
"value": "tmid"
},
{
"id": 7,
"type": "value",
"value": "ANA"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
12,
13
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
"token_idxs": [
15
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
10
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"B-VALUE",
"O"
] |
13,503
|
student_loan
|
bird:train.json:4378
|
What is the longest time for a student from the navy department to be absent from school?
|
SELECT T1.month FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'navy' ORDER BY T1.`month` DESC LIMIT 1
|
[
"What",
"is",
"the",
"longest",
"time",
"for",
"a",
"student",
"from",
"the",
"navy",
"department",
"to",
"be",
"absent",
"from",
"school",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "longest_absense_from_school"
},
{
"id": 2,
"type": "table",
"value": "enlist"
},
{
"id": 0,
"type": "column",
"value": "month"
},
{
"id": 3,
"type": "column",
"value": "organ"
},
{
"id": 4,
"type": "value",
"value": "navy"
},
{
"id": 5,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12,
13,
14,
15,
16
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5,
6
]
},
{
"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",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"I-TABLE",
"I-TABLE",
"O"
] |
13,504
|
cookbook
|
bird:train.json:8921
|
What is the average vitamin C amount of all cakes?
|
SELECT AVG(T1.vitamin_c) FROM Nutrition AS T1 INNER JOIN Recipe AS T2 ON T2.recipe_id = T1.recipe_id WHERE T2.title LIKE '%cake%'
|
[
"What",
"is",
"the",
"average",
"vitamin",
"C",
"amount",
"of",
"all",
"cakes",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "nutrition"
},
{
"id": 4,
"type": "column",
"value": "vitamin_c"
},
{
"id": 5,
"type": "column",
"value": "recipe_id"
},
{
"id": 1,
"type": "table",
"value": "recipe"
},
{
"id": 3,
"type": "value",
"value": "%cake%"
},
{
"id": 2,
"type": "column",
"value": "title"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
4,
5
]
},
{
"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",
"O",
"B-VALUE",
"O"
] |
13,505
|
retails
|
bird:train.json:6716
|
Among the customers from the United States, which market segment has the highest number of customers?
|
SELECT T.c_mktsegment FROM ( SELECT T1.c_mktsegment, COUNT(T1.c_custkey) AS num FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'UNITED STATES' GROUP BY T1.c_mktsegment ) AS T ORDER BY T.num DESC LIMIT 1
|
[
"Among",
"the",
"customers",
"from",
"the",
"United",
"States",
",",
"which",
"market",
"segment",
"has",
"the",
"highest",
"number",
"of",
"customers",
"?"
] |
[
{
"id": 5,
"type": "value",
"value": "UNITED STATES"
},
{
"id": 0,
"type": "column",
"value": "c_mktsegment"
},
{
"id": 7,
"type": "column",
"value": "c_nationkey"
},
{
"id": 8,
"type": "column",
"value": "n_nationkey"
},
{
"id": 6,
"type": "column",
"value": "c_custkey"
},
{
"id": 2,
"type": "table",
"value": "customer"
},
{
"id": 3,
"type": "table",
"value": "nation"
},
{
"id": 4,
"type": "column",
"value": "n_name"
},
{
"id": 1,
"type": "column",
"value": "num"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9,
10
]
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
5,
6
]
},
{
"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-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
13,506
|
movielens
|
bird:train.json:2261
|
What is the ID of audiences that gave the most rating of 5?
|
SELECT userid FROM u2base WHERE rating = 5 GROUP BY userid ORDER BY COUNT(movieid) DESC LIMIT 1
|
[
"What",
"is",
"the",
"ID",
"of",
"audiences",
"that",
"gave",
"the",
"most",
"rating",
"of",
"5",
"?"
] |
[
{
"id": 4,
"type": "column",
"value": "movieid"
},
{
"id": 0,
"type": "table",
"value": "u2base"
},
{
"id": 1,
"type": "column",
"value": "userid"
},
{
"id": 2,
"type": "column",
"value": "rating"
},
{
"id": 3,
"type": "value",
"value": "5"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"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",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
13,507
|
works_cycles
|
bird:train.json:7429
|
How many products from the Clothing category were on the LL Road Frame Sale?
|
SELECT COUNT(T2.ProductID) FROM SpecialOffer AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID INNER JOIN Product AS T3 ON T2.ProductID = T3.ProductID INNER JOIN ProductSubcategory AS T4 ON T3.ProductSubcategoryID = T4.ProductSubcategoryID INNER JOIN ProductCategory AS T5 ON T4.ProductCategoryID = T5.ProductCategoryID WHERE T1.Description = 'LL Road Frame Sale' AND T4.Name = 'Clothing'
|
[
"How",
"many",
"products",
"from",
"the",
"Clothing",
"category",
"were",
"on",
"the",
"LL",
"Road",
"Frame",
"Sale",
"?"
] |
[
{
"id": 9,
"type": "column",
"value": "productsubcategoryid"
},
{
"id": 11,
"type": "table",
"value": "specialofferproduct"
},
{
"id": 2,
"type": "table",
"value": "productsubcategory"
},
{
"id": 5,
"type": "value",
"value": "LL Road Frame Sale"
},
{
"id": 3,
"type": "column",
"value": "productcategoryid"
},
{
"id": 0,
"type": "table",
"value": "productcategory"
},
{
"id": 12,
"type": "column",
"value": "specialofferid"
},
{
"id": 10,
"type": "table",
"value": "specialoffer"
},
{
"id": 4,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "column",
"value": "productid"
},
{
"id": 7,
"type": "value",
"value": "Clothing"
},
{
"id": 8,
"type": "table",
"value": "product"
},
{
"id": 6,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
10,
11,
13
]
},
{
"entity_id": 6,
"token_idxs": [
12
]
},
{
"entity_id": 7,
"token_idxs": [
5
]
},
{
"entity_id": 8,
"token_idxs": [
2
]
},
{
"entity_id": 9,
"token_idxs": [
3,
4
]
},
{
"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",
"I-COLUMN",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"B-VALUE",
"O"
] |
13,508
|
movie_3
|
bird:train.json:9302
|
How many films in English are for adults only?
|
SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.name = 'English' AND T1.rating = 'NC-17'
|
[
"How",
"many",
"films",
"in",
"English",
"are",
"for",
"adults",
"only",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "language_id"
},
{
"id": 1,
"type": "table",
"value": "language"
},
{
"id": 2,
"type": "column",
"value": "film_id"
},
{
"id": 5,
"type": "value",
"value": "English"
},
{
"id": 6,
"type": "column",
"value": "rating"
},
{
"id": 7,
"type": "value",
"value": "NC-17"
},
{
"id": 0,
"type": "table",
"value": "film"
},
{
"id": 4,
"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": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
4
]
},
{
"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",
"B-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
13,509
|
pilot_1
|
bird:test.json:1128
|
Count the number of planes Smith owns.
|
SELECT count(plane_name) FROM pilotskills WHERE pilot_name = 'Smith'
|
[
"Count",
"the",
"number",
"of",
"planes",
"Smith",
"owns",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 1,
"type": "column",
"value": "pilot_name"
},
{
"id": 3,
"type": "column",
"value": "plane_name"
},
{
"id": 2,
"type": "value",
"value": "Smith"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"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",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O"
] |
13,510
|
book_2
|
spider:train_spider.json:228
|
List the writers who have written more than one book.
|
SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1
|
[
"List",
"the",
"writers",
"who",
"have",
"written",
"more",
"than",
"one",
"book",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "writer"
},
{
"id": 0,
"type": "table",
"value": "book"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"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",
"O",
"O",
"B-TABLE",
"O"
] |
13,511
|
soccer_2016
|
bird:train.json:2007
|
How old is SC Ganguly in 2008?
|
SELECT 2008 - strftime('%Y', DOB) FROM Player WHERE Player_Name = 'SC Ganguly'
|
[
"How",
"old",
"is",
"SC",
"Ganguly",
"in",
"2008",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "player_name"
},
{
"id": 2,
"type": "value",
"value": "SC Ganguly"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 3,
"type": "value",
"value": "2008"
},
{
"id": 5,
"type": "column",
"value": "dob"
},
{
"id": 4,
"type": "value",
"value": "%Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3,
4
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"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-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"O"
] |
13,512
|
book_publishing_company
|
bird:train.json:193
|
List all the titles and year to date sales by author who are not on contract.
|
SELECT T1.title_id, T1.ytd_sales FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T3.contract = 0
|
[
"List",
"all",
"the",
"titles",
"and",
"year",
"to",
"date",
"sales",
"by",
"author",
"who",
"are",
"not",
"on",
"contract",
"."
] |
[
{
"id": 6,
"type": "table",
"value": "titleauthor"
},
{
"id": 1,
"type": "column",
"value": "ytd_sales"
},
{
"id": 0,
"type": "column",
"value": "title_id"
},
{
"id": 3,
"type": "column",
"value": "contract"
},
{
"id": 2,
"type": "table",
"value": "authors"
},
{
"id": 5,
"type": "table",
"value": "titles"
},
{
"id": 7,
"type": "column",
"value": "au_id"
},
{
"id": 4,
"type": "value",
"value": "0"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"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",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,513
|
restaurant_1
|
spider:train_spider.json:2841
|
Which student visited restaurant most often? List student's first name and last name.
|
SELECT Student.Fname , Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY count(*) DESC LIMIT 1;
|
[
"Which",
"student",
"visited",
"restaurant",
"most",
"often",
"?",
"List",
"student",
"'s",
"first",
"name",
"and",
"last",
"name",
"."
] |
[
{
"id": 4,
"type": "table",
"value": "visits_restaurant"
},
{
"id": 3,
"type": "table",
"value": "student"
},
{
"id": 0,
"type": "column",
"value": "stuid"
},
{
"id": 1,
"type": "column",
"value": "fname"
},
{
"id": 2,
"type": "column",
"value": "lname"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
2,
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",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
13,514
|
conference
|
bird:test.json:1054
|
What is the total number of conferences?
|
SELECT count(*) FROM conference
|
[
"What",
"is",
"the",
"total",
"number",
"of",
"conferences",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "conference"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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"
] |
13,515
|
chicago_crime
|
bird:train.json:8770
|
Please list the blocks where all the incidents in the district commanded by Robert A. Rubio took place.
|
SELECT T2.block FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.commander = 'Robert A. Rubio'
|
[
"Please",
"list",
"the",
"blocks",
"where",
"all",
"the",
"incidents",
"in",
"the",
"district",
"commanded",
"by",
"Robert",
"A.",
"Rubio",
"took",
"place",
"."
] |
[
{
"id": 4,
"type": "value",
"value": "Robert A. Rubio"
},
{
"id": 5,
"type": "column",
"value": "district_no"
},
{
"id": 3,
"type": "column",
"value": "commander"
},
{
"id": 1,
"type": "table",
"value": "district"
},
{
"id": 0,
"type": "column",
"value": "block"
},
{
"id": 2,
"type": "table",
"value": "crime"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
13,
14,
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",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O"
] |
13,516
|
manufactory_1
|
spider:train_spider.json:5338
|
Select all the data from the products and each product's manufacturer.
|
SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code
|
[
"Select",
"all",
"the",
"data",
"from",
"the",
"products",
"and",
"each",
"product",
"'s",
"manufacturer",
"."
] |
[
{
"id": 1,
"type": "table",
"value": "manufacturers"
},
{
"id": 2,
"type": "column",
"value": "manufacturer"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 3,
"type": "column",
"value": "code"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"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": []
},
{
"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",
"O",
"O",
"B-COLUMN",
"O"
] |
13,517
|
movie
|
bird:train.json:771
|
Find the actor's name that played as Don Altobello in a drama movie that has a gross of 136766062.
|
SELECT T3.Name FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Gross = 136766062 AND T2.`Character Name` = 'Don Altobello' AND T1.Genre = 'Drama'
|
[
"Find",
"the",
"actor",
"'s",
"name",
"that",
"played",
"as",
"Don",
"Altobello",
"in",
"a",
"drama",
"movie",
"that",
"has",
"a",
"gross",
"of",
"136766062",
"."
] |
[
{
"id": 7,
"type": "column",
"value": "Character Name"
},
{
"id": 8,
"type": "value",
"value": "Don Altobello"
},
{
"id": 3,
"type": "table",
"value": "characters"
},
{
"id": 6,
"type": "value",
"value": "136766062"
},
{
"id": 4,
"type": "column",
"value": "actorid"
},
{
"id": 11,
"type": "column",
"value": "movieid"
},
{
"id": 1,
"type": "table",
"value": "actor"
},
{
"id": 2,
"type": "table",
"value": "movie"
},
{
"id": 5,
"type": "column",
"value": "gross"
},
{
"id": 9,
"type": "column",
"value": "genre"
},
{
"id": 10,
"type": "value",
"value": "Drama"
},
{
"id": 0,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
17
]
},
{
"entity_id": 6,
"token_idxs": [
19
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
8,
9
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": [
12
]
},
{
"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-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
13,518
|
thrombosis_prediction
|
bird:dev.json:1159
|
For patient with albumin level lower than 3.5, list their ID, sex and diagnosis.
|
SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALB < 3.5
|
[
"For",
"patient",
"with",
"albumin",
"level",
"lower",
"than",
"3.5",
",",
"list",
"their",
"ID",
",",
"sex",
"and",
"diagnosis",
"."
] |
[
{
"id": 4,
"type": "table",
"value": "laboratory"
},
{
"id": 2,
"type": "column",
"value": "diagnosis"
},
{
"id": 3,
"type": "table",
"value": "patient"
},
{
"id": 1,
"type": "column",
"value": "sex"
},
{
"id": 5,
"type": "column",
"value": "alb"
},
{
"id": 6,
"type": "value",
"value": "3.5"
},
{
"id": 0,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
3
]
},
{
"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",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
13,519
|
debate
|
spider:train_spider.json:1504
|
Show the names of people and the number of times they have been on the affirmative side of debates.
|
SELECT T2.Name , COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name
|
[
"Show",
"the",
"names",
"of",
"people",
"and",
"the",
"number",
"of",
"times",
"they",
"have",
"been",
"on",
"the",
"affirmative",
"side",
"of",
"debates",
"."
] |
[
{
"id": 1,
"type": "table",
"value": "debate_people"
},
{
"id": 3,
"type": "column",
"value": "affirmative"
},
{
"id": 4,
"type": "column",
"value": "people_id"
},
{
"id": 2,
"type": "table",
"value": "people"
},
{
"id": 0,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"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",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
13,520
|
e_commerce
|
bird:test.json:72
|
List all the distinct product names, price and descriptions which are bought by female customers.
|
SELECT DISTINCT T1.product_name , T1.product_price , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T2.order_id = T3.order_id JOIN Customers AS T4 ON T3.customer_id = T4.customer_id WHERE T4.gender_code = 'Female'
|
[
"List",
"all",
"the",
"distinct",
"product",
"names",
",",
"price",
"and",
"descriptions",
"which",
"are",
"bought",
"by",
"female",
"customers",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "product_description"
},
{
"id": 1,
"type": "column",
"value": "product_price"
},
{
"id": 0,
"type": "column",
"value": "product_name"
},
{
"id": 4,
"type": "column",
"value": "gender_code"
},
{
"id": 7,
"type": "column",
"value": "customer_id"
},
{
"id": 9,
"type": "table",
"value": "order_items"
},
{
"id": 11,
"type": "column",
"value": "product_id"
},
{
"id": 3,
"type": "table",
"value": "customers"
},
{
"id": 8,
"type": "table",
"value": "products"
},
{
"id": 10,
"type": "column",
"value": "order_id"
},
{
"id": 5,
"type": "value",
"value": "Female"
},
{
"id": 6,
"type": "table",
"value": "orders"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
14
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
4
]
},
{
"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",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
13,521
|
hospital_1
|
spider:train_spider.json:3906
|
what are name and phone number of patients who had more than one appointment?
|
SELECT name , phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING count(*) > 1
|
[
"what",
"are",
"name",
"and",
"phone",
"number",
"of",
"patients",
"who",
"had",
"more",
"than",
"one",
"appointment",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "appointment"
},
{
"id": 0,
"type": "column",
"value": "patient"
},
{
"id": 4,
"type": "table",
"value": "patient"
},
{
"id": 2,
"type": "column",
"value": "phone"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 6,
"type": "column",
"value": "ssn"
},
{
"id": 5,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"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",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,522
|
music_1
|
spider:train_spider.json:3605
|
Find the names and number of works of all artists who have at least one English songs.
|
SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english" GROUP BY T2.artist_name HAVING count(*) >= 1
|
[
"Find",
"the",
"names",
"and",
"number",
"of",
"works",
"of",
"all",
"artists",
"who",
"have",
"at",
"least",
"one",
"English",
"songs",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "artist_name"
},
{
"id": 3,
"type": "column",
"value": "languages"
},
{
"id": 4,
"type": "column",
"value": "english"
},
{
"id": 1,
"type": "table",
"value": "artist"
},
{
"id": 2,
"type": "table",
"value": "song"
},
{
"id": 5,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
13,523
|
workshop_paper
|
spider:train_spider.json:5827
|
For each college, return the college name and the count of authors with submissions from that college.
|
SELECT College , COUNT(*) FROM submission GROUP BY College
|
[
"For",
"each",
"college",
",",
"return",
"the",
"college",
"name",
"and",
"the",
"count",
"of",
"authors",
"with",
"submissions",
"from",
"that",
"college",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "submission"
},
{
"id": 1,
"type": "column",
"value": "college"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
13,524
|
planet_1
|
bird:test.json:1870
|
What are all of the package numbers received by Leo Wong?
|
SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient = T2.AccountNumber WHERE T2.Name = "Leo Wong";
|
[
"What",
"are",
"all",
"of",
"the",
"package",
"numbers",
"received",
"by",
"Leo",
"Wong",
"?"
] |
[
{
"id": 0,
"type": "column",
"value": "packagenumber"
},
{
"id": 6,
"type": "column",
"value": "accountnumber"
},
{
"id": 5,
"type": "column",
"value": "recipient"
},
{
"id": 4,
"type": "column",
"value": "Leo Wong"
},
{
"id": 1,
"type": "table",
"value": "package"
},
{
"id": 2,
"type": "table",
"value": "client"
},
{
"id": 3,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
},
{
"entity_id": 5,
"token_idxs": [
7
]
},
{
"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": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
13,525
|
codebase_community
|
bird:dev.json:660
|
What is the owner user id of the most valuable post?
|
SELECT OwnerUserId FROM posts WHERE FavoriteCount = ( SELECT MAX(FavoriteCount) FROM posts )
|
[
"What",
"is",
"the",
"owner",
"user",
"i",
"d",
"of",
"the",
"most",
"valuable",
"post",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "favoritecount"
},
{
"id": 1,
"type": "column",
"value": "owneruserid"
},
{
"id": 0,
"type": "table",
"value": "posts"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
5,
6
]
},
{
"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",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,526
|
cre_Theme_park
|
spider:train_spider.json:5948
|
Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.
|
SELECT T1.Attraction_Type_Description , T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
|
[
"Which",
"attraction",
"type",
"does",
"the",
"most",
"tourist",
"attractions",
"belong",
"to",
"?",
"Tell",
"me",
"its",
" ",
"attraction",
"type",
"description",
"and",
"code",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "attraction_type_description"
},
{
"id": 0,
"type": "column",
"value": "attraction_type_code"
},
{
"id": 2,
"type": "table",
"value": "ref_attraction_types"
},
{
"id": 3,
"type": "table",
"value": "tourist_attractions"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
15,
16
]
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": [
1,
2
]
},
{
"entity_id": 3,
"token_idxs": [
6,
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",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O",
"O",
"O"
] |
13,527
|
retail_world
|
bird:train.json:6317
|
What is the total price of Ikura ordered in order no. 10273?
|
SELECT T2.UnitPrice * T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura'
|
[
"What",
"is",
"the",
"total",
"price",
"of",
"Ikura",
"ordered",
"in",
"order",
"no",
".",
"10273",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "Order Details"
},
{
"id": 7,
"type": "column",
"value": "productname"
},
{
"id": 2,
"type": "column",
"value": "unitprice"
},
{
"id": 4,
"type": "column",
"value": "productid"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 3,
"type": "column",
"value": "quantity"
},
{
"id": 5,
"type": "column",
"value": "orderid"
},
{
"id": 6,
"type": "value",
"value": "10273"
},
{
"id": 8,
"type": "value",
"value": "Ikura"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
7
]
},
{
"entity_id": 6,
"token_idxs": [
12
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
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",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
13,528
|
chinook_1
|
spider:train_spider.json:889
|
What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?
|
SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'
|
[
"What",
"are",
"the",
"album",
"titles",
"for",
"albums",
"containing",
"both",
"'",
"Reggae",
"'",
"and",
"'",
"Rock",
"'",
"genre",
"tracks",
"?"
] |
[
{
"id": 7,
"type": "column",
"value": "genreid"
},
{
"id": 8,
"type": "column",
"value": "albumid"
},
{
"id": 3,
"type": "value",
"value": "Reggae"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 1,
"type": "table",
"value": "genre"
},
{
"id": 5,
"type": "table",
"value": "album"
},
{
"id": 6,
"type": "table",
"value": "track"
},
{
"id": 2,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "value",
"value": "Rock"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
"token_idxs": [
3
]
},
{
"entity_id": 6,
"token_idxs": [
17
]
},
{
"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",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"B-TABLE",
"O"
] |
13,529
|
retail_world
|
bird:train.json:6581
|
What products are no longer sold by Northwind?
|
SELECT ProductName FROM Products WHERE Discontinued = 1
|
[
"What",
"products",
"are",
"no",
"longer",
"sold",
"by",
"Northwind",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "discontinued"
},
{
"id": 1,
"type": "column",
"value": "productname"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 3,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"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",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,530
|
synthea
|
bird:train.json:1447
|
How many of the patients who underwent a 'bone immobilization' procedure have a driver's license?
|
SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Bone immobilization' AND T1.drivers IS NOT NULL
|
[
"How",
"many",
"of",
"the",
"patients",
"who",
"underwent",
"a",
"'",
"bone",
"immobilization",
"'",
"procedure",
"have",
"a",
"driver",
"'s",
"license",
"?"
] |
[
{
"id": 4,
"type": "value",
"value": "Bone immobilization"
},
{
"id": 3,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "procedures"
},
{
"id": 0,
"type": "table",
"value": "patients"
},
{
"id": 2,
"type": "column",
"value": "patient"
},
{
"id": 5,
"type": "column",
"value": "drivers"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
},
{
"entity_id": 5,
"token_idxs": [
15,
16
]
},
{
"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",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
13,531
|
retail_complains
|
bird:train.json:342
|
Calculate the percentage of male clients from Indianapolis City.
|
SELECT CAST(SUM(CASE WHEN sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(client_id) FROM client WHERE city = 'Indianapolis'
|
[
"Calculate",
"the",
"percentage",
"of",
"male",
"clients",
"from",
"Indianapolis",
"City",
"."
] |
[
{
"id": 2,
"type": "value",
"value": "Indianapolis"
},
{
"id": 4,
"type": "column",
"value": "client_id"
},
{
"id": 0,
"type": "table",
"value": "client"
},
{
"id": 1,
"type": "column",
"value": "city"
},
{
"id": 8,
"type": "value",
"value": "Male"
},
{
"id": 3,
"type": "value",
"value": "100"
},
{
"id": 7,
"type": "column",
"value": "sex"
},
{
"id": 5,
"type": "value",
"value": "0"
},
{
"id": 6,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"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": [
4
]
},
{
"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-VALUE",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
13,532
|
csu_1
|
spider:train_spider.json:2357
|
how many degrees were conferred between 1998 and 2002?
|
SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus
|
[
"how",
"many",
"degrees",
"were",
"conferred",
"between",
"1998",
"and",
"2002",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "campuses"
},
{
"id": 2,
"type": "table",
"value": "degrees"
},
{
"id": 3,
"type": "column",
"value": "degrees"
},
{
"id": 0,
"type": "column",
"value": "campus"
},
{
"id": 5,
"type": "column",
"value": "year"
},
{
"id": 6,
"type": "value",
"value": "1998"
},
{
"id": 7,
"type": "value",
"value": "2002"
},
{
"id": 4,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
6
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
13,533
|
flight_1
|
spider:train_spider.json:366
|
What is the id of every employee who has at least a salary of 100000?
|
SELECT eid FROM Employee WHERE salary > 100000
|
[
"What",
"is",
"the",
"i",
"d",
"of",
"every",
"employee",
"who",
"has",
"at",
"least",
"a",
"salary",
"of",
" ",
"100000",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 2,
"type": "column",
"value": "salary"
},
{
"id": 3,
"type": "value",
"value": "100000"
},
{
"id": 1,
"type": "column",
"value": "eid"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"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",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
13,534
|
music_4
|
spider:train_spider.json:6149
|
What are the famous titles of the artist "Triumfall"?
|
SELECT Famous_Title FROM artist WHERE Artist = "Triumfall"
|
[
"What",
"are",
"the",
"famous",
"titles",
"of",
"the",
"artist",
"\"",
"Triumfall",
"\"",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "famous_title"
},
{
"id": 3,
"type": "column",
"value": "Triumfall"
},
{
"id": 0,
"type": "table",
"value": "artist"
},
{
"id": 2,
"type": "column",
"value": "artist"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"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-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
13,535
|
movie_3
|
bird:train.json:9168
|
Give the name of the film for inventory No.3479.
|
SELECT T1.title FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.inventory_id = 3479
|
[
"Give",
"the",
"name",
"of",
"the",
"film",
"for",
"inventory",
"No.3479",
"."
] |
[
{
"id": 3,
"type": "column",
"value": "inventory_id"
},
{
"id": 2,
"type": "table",
"value": "inventory"
},
{
"id": 5,
"type": "column",
"value": "film_id"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 1,
"type": "table",
"value": "film"
},
{
"id": 4,
"type": "value",
"value": "3479"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
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",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
13,536
|
district_spokesman
|
bird:test.json:1188
|
Find the average points and average ages of all spokesmen whose rank position is 1.
|
SELECT avg(points) , avg(age) FROM spokesman WHERE rank_position = 1
|
[
"Find",
"the",
"average",
"points",
"and",
"average",
"ages",
"of",
"all",
"spokesmen",
"whose",
"rank",
"position",
"is",
"1",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "rank_position"
},
{
"id": 0,
"type": "table",
"value": "spokesman"
},
{
"id": 3,
"type": "column",
"value": "points"
},
{
"id": 4,
"type": "column",
"value": "age"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
11,
12
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"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",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
13,537
|
works_cycles
|
bird:train.json:7368
|
What is the name of the product with the almost highest review score?
|
SELECT T1.Name FROM Product AS T1 INNER JOIN ProductReview AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Rating = ( SELECT Rating FROM ProductReview ORDER BY Rating DESC LIMIT 1 )
|
[
"What",
"is",
"the",
"name",
"of",
"the",
"product",
"with",
"the",
"almost",
"highest",
"review",
"score",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "productreview"
},
{
"id": 4,
"type": "column",
"value": "productid"
},
{
"id": 1,
"type": "table",
"value": "product"
},
{
"id": 3,
"type": "column",
"value": "rating"
},
{
"id": 0,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"O"
] |
13,538
|
soccer_2016
|
bird:train.json:2044
|
Among the matches of Delhi Daredevils in 2009, what is the percentage of their matches won by wickets?
|
SELECT CAST(SUM(CASE WHEN T3.Win_Type = 'wickets' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.Win_Type) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner INNER JOIN Win_By AS T3 ON T2.Win_Type = T3.Win_Id WHERE T1.Team_Name = 'Delhi Daredevils'
|
[
"Among",
"the",
"matches",
"of",
"Delhi",
"Daredevils",
"in",
"2009",
",",
"what",
"is",
"the",
"percentage",
"of",
"their",
"matches",
"won",
"by",
"wickets",
"?"
] |
[
{
"id": 2,
"type": "value",
"value": "Delhi Daredevils"
},
{
"id": 9,
"type": "column",
"value": "match_winner"
},
{
"id": 1,
"type": "column",
"value": "team_name"
},
{
"id": 5,
"type": "column",
"value": "win_type"
},
{
"id": 8,
"type": "column",
"value": "team_id"
},
{
"id": 12,
"type": "value",
"value": "wickets"
},
{
"id": 0,
"type": "table",
"value": "win_by"
},
{
"id": 6,
"type": "column",
"value": "win_id"
},
{
"id": 4,
"type": "table",
"value": "match"
},
{
"id": 3,
"type": "table",
"value": "team"
},
{
"id": 7,
"type": "value",
"value": "100"
},
{
"id": 10,
"type": "value",
"value": "0"
},
{
"id": 11,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
16,
17
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"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": [
18
]
},
{
"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",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-VALUE",
"O"
] |
13,539
|
works_cycles
|
bird:train.json:7156
|
For the on going assembly item Component ID No. 494, what's the Unit measure for it?
|
SELECT T2.Name FROM BillOfMaterials AS T1 INNER JOIN UnitMeasure AS T2 ON T1.UnitMeasureCode = T2.UnitMeasureCode WHERE T1.ComponentID = 494 AND T1.EndDate IS NULL GROUP BY T2.name
|
[
"For",
"the",
"on",
"going",
"assembly",
"item",
"Component",
"ID",
"No",
".",
"494",
",",
"what",
"'s",
"the",
"Unit",
"measure",
"for",
"it",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "billofmaterials"
},
{
"id": 3,
"type": "column",
"value": "unitmeasurecode"
},
{
"id": 2,
"type": "table",
"value": "unitmeasure"
},
{
"id": 4,
"type": "column",
"value": "componentid"
},
{
"id": 6,
"type": "column",
"value": "enddate"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "value",
"value": "494"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
15,
16
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6,
7
]
},
{
"entity_id": 5,
"token_idxs": [
10
]
},
{
"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",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O"
] |
13,540
|
manufactory_1
|
spider:train_spider.json:5326
|
Select the name of the products with a price less than or equal to $200.
|
SELECT name FROM products WHERE price <= 200
|
[
"Select",
"the",
"name",
"of",
"the",
"products",
"with",
"a",
"price",
"less",
"than",
"or",
"equal",
"to",
"$",
"200",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 2,
"type": "column",
"value": "price"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": "200"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
13,541
|
world
|
bird:train.json:7851
|
Among the countries that have GNP greater than 1500, what is the percentage of the countries have English as its language?
|
SELECT CAST(SUM(IIF(T2.Language = 'English', 1, 0)) AS REAL) * 100 / COUNT(T1.Code) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GNP > 1500
|
[
"Among",
"the",
"countries",
"that",
"have",
"GNP",
"greater",
"than",
"1500",
",",
"what",
"is",
"the",
"percentage",
"of",
"the",
"countries",
"have",
"English",
"as",
"its",
"language",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "countrylanguage"
},
{
"id": 5,
"type": "column",
"value": "countrycode"
},
{
"id": 9,
"type": "column",
"value": "language"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 10,
"type": "value",
"value": "English"
},
{
"id": 3,
"type": "value",
"value": "1500"
},
{
"id": 4,
"type": "column",
"value": "code"
},
{
"id": 2,
"type": "column",
"value": "gnp"
},
{
"id": 6,
"type": "value",
"value": "100"
},
{
"id": 7,
"type": "value",
"value": "1"
},
{
"id": 8,
"type": "value",
"value": "0"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"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": [
8
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": [
21
]
},
{
"entity_id": 10,
"token_idxs": [
18
]
},
{
"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-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O"
] |
13,542
|
superhero
|
bird:dev.json:750
|
What is the average weight of all female superheroes?
|
SELECT AVG(T1.weight_kg) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T2.gender = 'Female'
|
[
"What",
"is",
"the",
"average",
"weight",
"of",
"all",
"female",
"superheroes",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "superhero"
},
{
"id": 4,
"type": "column",
"value": "weight_kg"
},
{
"id": 5,
"type": "column",
"value": "gender_id"
},
{
"id": 1,
"type": "table",
"value": "gender"
},
{
"id": 2,
"type": "column",
"value": "gender"
},
{
"id": 3,
"type": "value",
"value": "Female"
},
{
"id": 6,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"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-VALUE",
"B-TABLE",
"O"
] |
13,543
|
body_builder
|
spider:train_spider.json:1170
|
How many persons are not body builders?
|
SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder)
|
[
"How",
"many",
"persons",
"are",
"not",
"body",
"builders",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "body_builder"
},
{
"id": 1,
"type": "column",
"value": "people_id"
},
{
"id": 0,
"type": "table",
"value": "people"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"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",
"I-TABLE",
"O"
] |
13,544
|
local_govt_mdm
|
spider:train_spider.json:2653
|
How many different source system code for the cmi cross references are there?
|
SELECT count(DISTINCT source_system_code) FROM CMI_cross_references
|
[
"How",
"many",
"different",
"source",
"system",
"code",
"for",
"the",
"cmi",
"cross",
"references",
"are",
"there",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "cmi_cross_references"
},
{
"id": 1,
"type": "column",
"value": "source_system_code"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
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",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O",
"O",
"O"
] |
13,545
|
customers_and_addresses
|
spider:train_spider.json:6082
|
What are the names of customers who live in Colorado state?
|
SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = "Colorado"
|
[
"What",
"are",
"the",
"names",
"of",
"customers",
"who",
"live",
"in",
"Colorado",
"state",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "state_province_county"
},
{
"id": 5,
"type": "table",
"value": "customer_addresses"
},
{
"id": 0,
"type": "column",
"value": "customer_name"
},
{
"id": 7,
"type": "column",
"value": "customer_id"
},
{
"id": 6,
"type": "column",
"value": "address_id"
},
{
"id": 1,
"type": "table",
"value": "addresses"
},
{
"id": 4,
"type": "table",
"value": "customers"
},
{
"id": 3,
"type": "column",
"value": "Colorado"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"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",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
13,546
|
synthea
|
bird:train.json:1492
|
How many patients on average receive combined chemotherapy and radiation therapy procedures each year?
|
SELECT CAST(COUNT(PATIENT) AS REAL) / COUNT(DISTINCT strftime('%Y', DATE)) FROM procedures WHERE DESCRIPTION = 'Combined chemotherapy and radiation therapy (procedure)'
|
[
"How",
"many",
"patients",
"on",
"average",
"receive",
"combined",
"chemotherapy",
"and",
"radiation",
"therapy",
"procedures",
"each",
"year",
"?"
] |
[
{
"id": 2,
"type": "value",
"value": "Combined chemotherapy and radiation therapy (procedure)"
},
{
"id": 1,
"type": "column",
"value": "description"
},
{
"id": 0,
"type": "table",
"value": "procedures"
},
{
"id": 3,
"type": "column",
"value": "patient"
},
{
"id": 5,
"type": "column",
"value": "date"
},
{
"id": 4,
"type": "value",
"value": "%Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7,
8,
10
]
},
{
"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",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O"
] |
13,547
|
social_media
|
bird:train.json:778
|
How many tweets are seen by more than 1000 unique users?
|
SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Reach > 1000
|
[
"How",
"many",
"tweets",
"are",
"seen",
"by",
"more",
"than",
"1000",
"unique",
"users",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "twitter"
},
{
"id": 3,
"type": "column",
"value": "tweetid"
},
{
"id": 1,
"type": "column",
"value": "reach"
},
{
"id": 2,
"type": "value",
"value": "1000"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
13,548
|
card_games
|
bird:dev.json:457
|
Please list the websites where I can purchase the cards that have the promotional type of "bundle".
|
SELECT DISTINCT purchaseUrls FROM cards WHERE promoTypes = 'bundle'
|
[
"Please",
"list",
"the",
"websites",
"where",
"I",
"can",
"purchase",
"the",
"cards",
"that",
"have",
"the",
"promotional",
"type",
"of",
"\"",
"bundle",
"\"",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "purchaseurls"
},
{
"id": 2,
"type": "column",
"value": "promotypes"
},
{
"id": 3,
"type": "value",
"value": "bundle"
},
{
"id": 0,
"type": "table",
"value": "cards"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
13,
14
]
},
{
"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",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
13,549
|
movie_3
|
bird:train.json:9277
|
What is the name of the client who has the largest quantity of rented material without returning it?
|
SELECT T.first_name FROM ( SELECT T2.first_name, COUNT(T1.rental_date) AS num FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.first_name ) AS T ORDER BY T.num DESC LIMIT 1
|
[
"What",
"is",
"the",
"name",
"of",
"the",
"client",
"who",
"has",
"the",
"largest",
"quantity",
"of",
"rented",
"material",
"without",
"returning",
"it",
"?"
] |
[
{
"id": 4,
"type": "column",
"value": "rental_date"
},
{
"id": 5,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type": "table",
"value": "customer"
},
{
"id": 2,
"type": "table",
"value": "rental"
},
{
"id": 1,
"type": "column",
"value": "num"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1,
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"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",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
13,550
|
app_store
|
bird:train.json:2524
|
List apps whose rating is 3.9 and state the translated review of each app.
|
SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Rating = 3.9
|
[
"List",
"apps",
"whose",
"rating",
"is",
"3.9",
"and",
"state",
"the",
"translated",
"review",
"of",
"each",
"app",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "translated_review"
},
{
"id": 3,
"type": "table",
"value": "user_reviews"
},
{
"id": 2,
"type": "table",
"value": "playstore"
},
{
"id": 4,
"type": "column",
"value": "rating"
},
{
"id": 0,
"type": "column",
"value": "app"
},
{
"id": 5,
"type": "value",
"value": "3.9"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"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",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O"
] |
13,551
|
sales
|
bird:train.json:5374
|
List down the first name of customers who placed order for product id 1.
|
SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T2.ProductID = 1
|
[
"List",
"down",
"the",
"first",
"name",
"of",
"customers",
"who",
"placed",
"order",
"for",
"product",
"i",
"d",
"1",
"."
] |
[
{
"id": 6,
"type": "column",
"value": "customerid"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"type": "column",
"value": "productid"
},
{
"id": 4,
"type": "table",
"value": "customers"
},
{
"id": 1,
"type": "table",
"value": "products"
},
{
"id": 5,
"type": "table",
"value": "sales"
},
{
"id": 3,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
12,
13
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"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",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
13,552
|
art_1
|
bird:test.json:1262
|
List the names of all distinct paintings in alphabetical order.
|
SELECT DISTINCT title FROM paintings ORDER BY title
|
[
"List",
"the",
"names",
"of",
"all",
"distinct",
"paintings",
"in",
"alphabetical",
"order",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "paintings"
},
{
"id": 1,
"type": "column",
"value": "title"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"O",
"O"
] |
13,553
|
music_2
|
spider:train_spider.json:5270
|
Find the number of songs in all the studio albums.
|
SELECT count(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = "Studio"
|
[
"Find",
"the",
"number",
"of",
"songs",
"in",
"all",
"the",
"studio",
"albums",
"."
] |
[
{
"id": 5,
"type": "table",
"value": "tracklists"
},
{
"id": 8,
"type": "column",
"value": "albumid"
},
{
"id": 2,
"type": "column",
"value": "Studio"
},
{
"id": 4,
"type": "table",
"value": "albums"
},
{
"id": 6,
"type": "column",
"value": "songid"
},
{
"id": 0,
"type": "table",
"value": "songs"
},
{
"id": 3,
"type": "column",
"value": "title"
},
{
"id": 1,
"type": "column",
"value": "type"
},
{
"id": 7,
"type": "column",
"value": "aid"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
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",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
13,554
|
insurance_policies
|
spider:train_spider.json:3887
|
Find the policy type the most customers choose.
|
SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1
|
[
"Find",
"the",
"policy",
"type",
"the",
"most",
"customers",
"choose",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "customer_policies"
},
{
"id": 1,
"type": "column",
"value": "policy_type_code"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"B-TABLE",
"O",
"O"
] |
13,555
|
cre_Docs_and_Epenses
|
spider:train_spider.json:6409
|
Show the document name and the document date for all documents on project with details 'Graph Database project'.
|
SELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project'
|
[
"Show",
"the",
"document",
"name",
"and",
"the",
"document",
"date",
"for",
"all",
"documents",
"on",
"project",
"with",
"details",
"'",
"Graph",
"Database",
"project",
"'",
"."
] |
[
{
"id": 5,
"type": "value",
"value": "Graph Database project"
},
{
"id": 4,
"type": "column",
"value": "project_details"
},
{
"id": 0,
"type": "column",
"value": "document_name"
},
{
"id": 1,
"type": "column",
"value": "document_date"
},
{
"id": 6,
"type": "column",
"value": "project_id"
},
{
"id": 2,
"type": "table",
"value": "documents"
},
{
"id": 3,
"type": "table",
"value": "projects"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
18
]
},
{
"entity_id": 4,
"token_idxs": [
13,
14
]
},
{
"entity_id": 5,
"token_idxs": [
16,
17
]
},
{
"entity_id": 6,
"token_idxs": [
12
]
},
{
"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",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O",
"O"
] |
13,556
|
mondial_geo
|
bird:train.json:8259
|
Among the countries with over 3 organizations, how many of them have an inflation rate of over 5%?
|
SELECT COUNT(T2.Country) FROM economy AS T1 INNER JOIN organization AS T2 ON T1.Country = T2.Country WHERE T2.Country IN ( SELECT Country FROM organization GROUP BY Country HAVING COUNT(Country) > 3 ) AND T1.Inflation > 5
|
[
"Among",
"the",
"countries",
"with",
"over",
"3",
"organizations",
",",
"how",
"many",
"of",
"them",
"have",
"an",
"inflation",
"rate",
"of",
"over",
"5",
"%",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "organization"
},
{
"id": 3,
"type": "column",
"value": "inflation"
},
{
"id": 0,
"type": "table",
"value": "economy"
},
{
"id": 2,
"type": "column",
"value": "country"
},
{
"id": 4,
"type": "value",
"value": "5"
},
{
"id": 5,
"type": "value",
"value": "3"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
18
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
13,557
|
e_commerce
|
bird:test.json:114
|
List the invoice dates and ids of the invoices causing at least 2 shipments.
|
SELECT T1.invoice_date , T1.invoice_number FROM Invoices AS T1 JOIN Shipments AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number HAVING count(*) >= 2
|
[
"List",
"the",
"invoice",
"dates",
"and",
"ids",
"of",
"the",
"invoices",
"causing",
"at",
"least",
"2",
"shipments",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "invoice_number"
},
{
"id": 1,
"type": "column",
"value": "invoice_date"
},
{
"id": 3,
"type": "table",
"value": "shipments"
},
{
"id": 2,
"type": "table",
"value": "invoices"
},
{
"id": 4,
"type": "value",
"value": "2"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"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",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
13,558
|
movie_platform
|
bird:train.json:40
|
How many directors have directed atleast 10 movies between 1960 to 1985? Indicate the name of the movie in those years of each director that received the highest amount of 5 rating score.
|
SELECT T2.director_name FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1960 AND 1985 GROUP BY T2.director_name HAVING COUNT(T2.movie_id) > 10
|
[
"How",
"many",
"directors",
"have",
"directed",
"atleast",
"10",
"movies",
"between",
"1960",
"to",
"1985",
"?",
"Indicate",
"the",
"name",
"of",
"the",
"movie",
"in",
"those",
"years",
"of",
"each",
"director",
"that",
"received",
"the",
"highest",
"amount",
"of",
"5",
"rating",
"score",
"."
] |
[
{
"id": 3,
"type": "column",
"value": "movie_release_year"
},
{
"id": 0,
"type": "column",
"value": "director_name"
},
{
"id": 7,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"type": "table",
"value": "ratings"
},
{
"id": 2,
"type": "table",
"value": "movies"
},
{
"id": 4,
"type": "value",
"value": "1960"
},
{
"id": 5,
"type": "value",
"value": "1985"
},
{
"id": 6,
"type": "value",
"value": "10"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
24
]
},
{
"entity_id": 1,
"token_idxs": [
32
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
19,
20,
21
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": [
11
]
},
{
"entity_id": 6,
"token_idxs": [
6
]
},
{
"entity_id": 7,
"token_idxs": [
18
]
},
{
"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",
"B-TABLE",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
13,559
|
twitter_1
|
spider:train_spider.json:278
|
Find the number of followers for each user.
|
SELECT count(*) FROM follows GROUP BY f1
|
[
"Find",
"the",
"number",
"of",
"followers",
"for",
"each",
"user",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "follows"
},
{
"id": 1,
"type": "column",
"value": "f1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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"
] |
13,560
|
cre_Students_Information_Systems
|
bird:test.json:444
|
Which teachers teach a class that has the substring 'data' in its detail but do not teach a class that has prefix 'net' in its detail? Give me the teacher details.
|
SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.class_details LIKE '%data%' EXCEPT SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.class_details LIKE 'net%'
|
[
"Which",
"teachers",
"teach",
"a",
"class",
"that",
"has",
"the",
"substring",
"'",
"data",
"'",
"in",
"its",
"detail",
"but",
"do",
"not",
"teach",
"a",
"class",
"that",
"has",
"prefix",
"'",
"net",
"'",
"in",
"its",
"detail",
"?",
"Give",
"me",
"the",
"teacher",
"details",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "teacher_details"
},
{
"id": 3,
"type": "column",
"value": "class_details"
},
{
"id": 6,
"type": "column",
"value": "teacher_id"
},
{
"id": 1,
"type": "table",
"value": "teachers"
},
{
"id": 2,
"type": "table",
"value": "classes"
},
{
"id": 4,
"type": "value",
"value": "%data%"
},
{
"id": 5,
"type": "value",
"value": "net%"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
35
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
20
]
},
{
"entity_id": 3,
"token_idxs": [
29
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs": [
25
]
},
{
"entity_id": 6,
"token_idxs": [
34
]
},
{
"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",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
13,561
|
hr_1
|
spider:train_spider.json:3462
|
What are all the employee ids and the names of the countries in which they work?
|
SELECT T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id
|
[
"What",
"are",
"all",
"the",
"employee",
"ids",
"and",
"the",
"names",
"of",
"the",
"countries",
"in",
"which",
"they",
"work",
"?"
] |
[
{
"id": 8,
"type": "column",
"value": "department_id"
},
{
"id": 1,
"type": "column",
"value": "country_name"
},
{
"id": 0,
"type": "column",
"value": "employee_id"
},
{
"id": 6,
"type": "table",
"value": "departments"
},
{
"id": 7,
"type": "column",
"value": "location_id"
},
{
"id": 4,
"type": "column",
"value": "country_id"
},
{
"id": 2,
"type": "table",
"value": "countries"
},
{
"id": 3,
"type": "table",
"value": "locations"
},
{
"id": 5,
"type": "table",
"value": "employees"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"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": [
4
]
},
{
"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",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
13,562
|
customers_card_transactions
|
spider:train_spider.json:677
|
Show all customer ids and the number of accounts for each customer.
|
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id
|
[
"Show",
"all",
"customer",
"ids",
"and",
"the",
"number",
"of",
"accounts",
"for",
"each",
"customer",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "table",
"value": "accounts"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"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",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
13,563
|
retails
|
bird:train.json:6816
|
Which nation and region does the Customer#000000008 come from?
|
SELECT T1.n_name, T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_name = 'Customer#000000008'
|
[
"Which",
"nation",
"and",
"region",
"does",
"the",
"Customer#000000008",
"come",
"from",
"?"
] |
[
{
"id": 4,
"type": "value",
"value": "Customer#000000008"
},
{
"id": 7,
"type": "column",
"value": "n_regionkey"
},
{
"id": 8,
"type": "column",
"value": "r_regionkey"
},
{
"id": 9,
"type": "column",
"value": "n_nationkey"
},
{
"id": 10,
"type": "column",
"value": "c_nationkey"
},
{
"id": 6,
"type": "table",
"value": "customer"
},
{
"id": 0,
"type": "column",
"value": "n_name"
},
{
"id": 1,
"type": "column",
"value": "r_name"
},
{
"id": 2,
"type": "table",
"value": "region"
},
{
"id": 3,
"type": "column",
"value": "c_name"
},
{
"id": 5,
"type": "table",
"value": "nation"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": [
1
]
},
{
"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",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O"
] |
13,564
|
activity_1
|
spider:train_spider.json:6720
|
What buildings have faculty offices?
|
SELECT DISTINCT building FROM Faculty
|
[
"What",
"buildings",
"have",
"faculty",
"offices",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "building"
},
{
"id": 0,
"type": "table",
"value": "faculty"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"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-COLUMN",
"O",
"B-TABLE",
"O",
"O"
] |
13,565
|
customers_and_orders
|
bird:test.json:238
|
Count the number of products.
|
SELECT count(*) FROM Products
|
[
"Count",
"the",
"number",
"of",
"products",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "products"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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"
] |
13,566
|
thrombosis_prediction
|
bird:dev.json:1276
|
For the patients who have an abnormal level of anti-DNA, please list the diseases they are diagnosed with.
|
SELECT DISTINCT(T1.Diagnosis) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.DNA >= 8
|
[
"For",
"the",
"patients",
"who",
"have",
"an",
"abnormal",
"level",
"of",
"anti",
"-",
"DNA",
",",
"please",
"list",
"the",
"diseases",
"they",
"are",
"diagnosed",
"with",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "laboratory"
},
{
"id": 0,
"type": "column",
"value": "diagnosis"
},
{
"id": 1,
"type": "table",
"value": "patient"
},
{
"id": 3,
"type": "column",
"value": "dna"
},
{
"id": 5,
"type": "column",
"value": "id"
},
{
"id": 4,
"type": "value",
"value": "8"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
19
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
13,567
|
college_1
|
spider:train_spider.json:3178
|
What are the first and last name of all biology professors?
|
SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = "Biology"
|
[
"What",
"are",
"the",
"first",
"and",
"last",
"name",
"of",
"all",
"biology",
"professors",
"?"
] |
[
{
"id": 6,
"type": "table",
"value": "department"
},
{
"id": 0,
"type": "column",
"value": "emp_fname"
},
{
"id": 1,
"type": "column",
"value": "emp_lname"
},
{
"id": 3,
"type": "column",
"value": "dept_name"
},
{
"id": 5,
"type": "table",
"value": "professor"
},
{
"id": 8,
"type": "column",
"value": "dept_code"
},
{
"id": 2,
"type": "table",
"value": "employee"
},
{
"id": 4,
"type": "column",
"value": "Biology"
},
{
"id": 7,
"type": "column",
"value": "emp_num"
}
] |
[
{
"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": [
9
]
},
{
"entity_id": 5,
"token_idxs": [
10
]
},
{
"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",
"B-COLUMN",
"B-TABLE",
"O"
] |
13,568
|
synthea
|
bird:train.json:1460
|
Write down the Social Security numbers of patients who have latex allergies.
|
SELECT T1.ssn FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Latex allergy'
|
[
"Write",
"down",
"the",
"Social",
"Security",
"numbers",
"of",
"patients",
"who",
"have",
"latex",
"allergies",
"."
] |
[
{
"id": 4,
"type": "value",
"value": "Latex allergy"
},
{
"id": 3,
"type": "column",
"value": "description"
},
{
"id": 2,
"type": "table",
"value": "allergies"
},
{
"id": 1,
"type": "table",
"value": "patients"
},
{
"id": 5,
"type": "column",
"value": "patient"
},
{
"id": 0,
"type": "column",
"value": "ssn"
}
] |
[
{
"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": [
10
]
},
{
"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",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
13,569
|
cre_Doc_and_collections
|
bird:test.json:713
|
Which document subset has most of number of distinct documents ? List subset id , name and number of documents .
|
select t1.document_subset_id , t2.document_subset_name , count(distinct t1.document_object_id) from document_subset_members as t1 join document_subsets as t2 on t1.document_subset_id = t2.document_subset_id group by t1.document_subset_id order by count(*) desc limit 1;
|
[
"Which",
"document",
"subset",
"has",
"most",
"of",
"number",
"of",
"distinct",
"documents",
"?",
"List",
"subset",
"i",
"d",
",",
"name",
"and",
"number",
"of",
"documents",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "document_subset_members"
},
{
"id": 1,
"type": "column",
"value": "document_subset_name"
},
{
"id": 0,
"type": "column",
"value": "document_subset_id"
},
{
"id": 4,
"type": "column",
"value": "document_object_id"
},
{
"id": 3,
"type": "table",
"value": "document_subsets"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
1,
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",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,570
|
student_loan
|
bird:train.json:4493
|
How many unemployed students filed for bankruptcy?
|
SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T2.name = T1.name
|
[
"How",
"many",
"unemployed",
"students",
"filed",
"for",
"bankruptcy",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "filed_for_bankrupcy"
},
{
"id": 0,
"type": "table",
"value": "unemployed"
},
{
"id": 2,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5,
6
]
},
{
"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",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O"
] |
13,571
|
cre_Doc_Control_Systems
|
spider:train_spider.json:2112
|
How many documents have the status code done?
|
SELECT count(*) FROM Documents WHERE document_status_code = "done";
|
[
"How",
"many",
"documents",
"have",
"the",
"status",
"code",
"done",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "document_status_code"
},
{
"id": 0,
"type": "table",
"value": "documents"
},
{
"id": 2,
"type": "column",
"value": "done"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
5,
6
]
},
{
"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",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O"
] |
13,572
|
storm_record
|
spider:train_spider.json:2724
|
What are the region names affected by the storm with a number of deaths of least 10?
|
SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10
|
[
"What",
"are",
"the",
"region",
"names",
"affected",
"by",
"the",
"storm",
"with",
"a",
"number",
"of",
"deaths",
"of",
"least",
"10",
"?"
] |
[
{
"id": 4,
"type": "table",
"value": "affected_region"
},
{
"id": 2,
"type": "column",
"value": "number_deaths"
},
{
"id": 0,
"type": "column",
"value": "region_name"
},
{
"id": 7,
"type": "column",
"value": "region_id"
},
{
"id": 6,
"type": "column",
"value": "storm_id"
},
{
"id": 5,
"type": "table",
"value": "region"
},
{
"id": 1,
"type": "table",
"value": "storm"
},
{
"id": 3,
"type": "value",
"value": "10"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
11,
12,
13
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"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",
"O",
"B-TABLE",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
13,573
|
sakila_1
|
spider:train_spider.json:2985
|
Return the titles of films that include 'Deleted Scenes' in their special feature section.
|
SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
|
[
"Return",
"the",
"titles",
"of",
"films",
"that",
"include",
"'",
"Deleted",
"Scenes",
"'",
"in",
"their",
"special",
"feature",
"section",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "special_features"
},
{
"id": 3,
"type": "value",
"value": "%Deleted Scenes%"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 0,
"type": "table",
"value": "film"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
13,
14
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"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",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
13,574
|
farm
|
spider:train_spider.json:40
|
Please show the themes of competitions with host cities having populations larger than 1000.
|
SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000
|
[
"Please",
"show",
"the",
"themes",
"of",
"competitions",
"with",
"host",
"cities",
"having",
"populations",
"larger",
"than",
"1000",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "farm_competition"
},
{
"id": 6,
"type": "column",
"value": "host_city_id"
},
{
"id": 3,
"type": "column",
"value": "population"
},
{
"id": 5,
"type": "column",
"value": "city_id"
},
{
"id": 0,
"type": "column",
"value": "theme"
},
{
"id": 1,
"type": "table",
"value": "city"
},
{
"id": 4,
"type": "value",
"value": "1000"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
13,575
|
network_2
|
spider:train_spider.json:4470
|
What is the age of the friend of Zach with longest year relationship?
|
SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')
|
[
"What",
"is",
"the",
"age",
"of",
"the",
"friend",
"of",
"Zach",
"with",
"longest",
"year",
"relationship",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "personfriend"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 4,
"type": "column",
"value": "friend"
},
{
"id": 3,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "value",
"value": "Zach"
},
{
"id": 6,
"type": "column",
"value": "year"
},
{
"id": 0,
"type": "column",
"value": "age"
}
] |
[
{
"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": [
6
]
},
{
"entity_id": 5,
"token_idxs": [
8
]
},
{
"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-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
13,576
|
works_cycles
|
bird:train.json:7230
|
Which territory has the most customers as of 9/12/2014?
|
SELECT TerritoryID FROM Customer WHERE ModifiedDate < '2014-12-09' GROUP BY TerritoryID ORDER BY COUNT(TerritoryID) DESC LIMIT 1
|
[
"Which",
"territory",
"has",
"the",
"most",
"customers",
"as",
"of",
"9/12/2014",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "modifieddate"
},
{
"id": 1,
"type": "column",
"value": "territoryid"
},
{
"id": 3,
"type": "value",
"value": "2014-12-09"
},
{
"id": 0,
"type": "table",
"value": "customer"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
13,577
|
department_store
|
spider:train_spider.json:4724
|
Return the name, phone number and email address for the customer with the most orders.
|
SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1
|
[
"Return",
"the",
"name",
",",
"phone",
"number",
"and",
"email",
"address",
"for",
"the",
"customer",
"with",
"the",
"most",
"orders",
"."
] |
[
{
"id": 5,
"type": "table",
"value": "customer_orders"
},
{
"id": 2,
"type": "column",
"value": "customer_phone"
},
{
"id": 3,
"type": "column",
"value": "customer_email"
},
{
"id": 1,
"type": "column",
"value": "customer_name"
},
{
"id": 0,
"type": "column",
"value": "customer_id"
},
{
"id": 4,
"type": "table",
"value": "customers"
}
] |
[
{
"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": [
11
]
},
{
"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",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
13,578
|
formula_1
|
bird:dev.json:984
|
What is the website of the constructor who tallied the most total wins.
|
SELECT T1.url FROM constructors AS T1 INNER JOIN constructorStandings AS T2 on T1.constructorId = T2.constructorId ORDER BY T2.wins DESC LIMIT 1
|
[
"What",
"is",
"the",
"website",
"of",
"the",
"constructor",
"who",
"tallied",
"the",
"most",
"total",
"wins",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "constructorstandings"
},
{
"id": 4,
"type": "column",
"value": "constructorid"
},
{
"id": 1,
"type": "table",
"value": "constructors"
},
{
"id": 3,
"type": "column",
"value": "wins"
},
{
"id": 0,
"type": "column",
"value": "url"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"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": []
},
{
"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",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.