Datasets:
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
|
---|---|---|---|---|---|---|---|---|
1,389 |
books
|
bird:train.json:5990
|
Which year has the most customer orders?
|
SELECT strftime('%Y', order_date) FROM cust_order GROUP BY strftime('%Y', order_date) ORDER BY COUNT(strftime('%Y', order_date)) DESC LIMIT 1
|
[
"Which",
"year",
"has",
"the",
"most",
"customer",
"orders",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "cust_order"
},
{
"id": 2,
"type": "column",
"value": "order_date"
},
{
"id": 1,
"type": "value",
"value": "%Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
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",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
7,179 |
e_government
|
spider:train_spider.json:6323
|
What is the last name of the contact individual from the Labour party organization who was contacted most recently?
|
SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = "Labour Party" ORDER BY t2.date_contact_to DESC LIMIT 1
|
[
"What",
"is",
"the",
"last",
"name",
"of",
"the",
"contact",
"individual",
"from",
"the",
"Labour",
"party",
"organization",
"who",
"was",
"contacted",
"most",
"recently",
"?"
] |
[
{
"id": 6,
"type": "table",
"value": "organization_contact_individuals"
},
{
"id": 0,
"type": "column",
"value": "individual_last_name"
},
{
"id": 2,
"type": "column",
"value": "organization_name"
},
{
"id": 4,
"type": "column",
"value": "date_contact_to"
},
{
"id": 8,
"type": "column",
"value": "organization_id"
},
{
"id": 5,
"type": "table",
"value": "organizations"
},
{
"id": 7,
"type": "column",
"value": "individual_id"
},
{
"id": 3,
"type": "column",
"value": "Labour Party"
},
{
"id": 1,
"type": "table",
"value": "individuals"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11,
12
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": [
13
]
},
{
"entity_id": 6,
"token_idxs": [
16
]
},
{
"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",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
11,573 |
icfp_1
|
spider:train_spider.json:2920
|
Retrieve all the last names of authors in alphabetical order.
|
SELECT lname FROM authors ORDER BY lname
|
[
"Retrieve",
"all",
"the",
"last",
"names",
"of",
"authors",
"in",
"alphabetical",
"order",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "authors"
},
{
"id": 1,
"type": "column",
"value": "lname"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
4,892 |
soccer_2016
|
bird:train.json:1900
|
What percentage of players have Legbreak skill?
|
SELECT CAST(SUM(CASE WHEN T2.Bowling_skill = ' Legbreak' THEN 1 ELSE 0 END) AS REAL) * 100 / TOTAL(T1.Player_Id) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id
|
[
"What",
"percentage",
"of",
"players",
"have",
"Legbreak",
"skill",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "bowling_style"
},
{
"id": 2,
"type": "column",
"value": "bowling_skill"
},
{
"id": 3,
"type": "column",
"value": "bowling_id"
},
{
"id": 5,
"type": "column",
"value": "player_id"
},
{
"id": 8,
"type": "value",
"value": " Legbreak"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 4,
"type": "value",
"value": "100"
},
{
"id": 6,
"type": "value",
"value": "0"
},
{
"id": 7,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"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-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
7,359 |
european_football_2
|
bird:dev.json:1043
|
What is the short name of the football team Queens Park Rangers?
|
SELECT team_short_name FROM Team WHERE team_long_name = 'Queens Park Rangers'
|
[
"What",
"is",
"the",
"short",
"name",
"of",
"the",
"football",
"team",
"Queens",
"Park",
"Rangers",
"?"
] |
[
{
"id": 3,
"type": "value",
"value": "Queens Park Rangers"
},
{
"id": 1,
"type": "column",
"value": "team_short_name"
},
{
"id": 2,
"type": "column",
"value": "team_long_name"
},
{
"id": 0,
"type": "table",
"value": "team"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10,
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",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
15,221 |
sales_in_weather
|
bird:train.json:8162
|
Which weather station does store no.20 belong to?
|
SELECT station_nbr FROM relation WHERE store_nbr = 20
|
[
"Which",
"weather",
"station",
"does",
"store",
"no.20",
"belong",
"to",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "station_nbr"
},
{
"id": 2,
"type": "column",
"value": "store_nbr"
},
{
"id": 0,
"type": "table",
"value": "relation"
},
{
"id": 3,
"type": "value",
"value": "20"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"B-VALUE",
"I-VALUE",
"O"
] |
12,665 |
hockey
|
bird:train.json:7674
|
Among the players who were born in July and August, how many of them got in the Hall of Fame?
|
SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.birthMon IN (7, 8)
|
[
"Among",
"the",
"players",
"who",
"were",
"born",
"in",
"July",
"and",
"August",
",",
"how",
"many",
"of",
"them",
"got",
"in",
"the",
"Hall",
"of",
"Fame",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "birthmon"
},
{
"id": 5,
"type": "column",
"value": "playerid"
},
{
"id": 0,
"type": "table",
"value": "master"
},
{
"id": 6,
"type": "column",
"value": "hofid"
},
{
"id": 1,
"type": "table",
"value": "hof"
},
{
"id": 3,
"type": "value",
"value": "7"
},
{
"id": 4,
"type": "value",
"value": "8"
}
] |
[
{
"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": [
9
]
},
{
"entity_id": 5,
"token_idxs": [
2
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,653 |
donor
|
bird:train.json:3227
|
What is the number of the year round school in Los Angeles?
|
SELECT COUNT(school_year_round) FROM projects WHERE school_city = 'Los Angeles' AND school_year_round = 't'
|
[
"What",
"is",
"the",
"number",
"of",
"the",
"year",
"round",
"school",
"in",
"Los",
"Angeles",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "school_year_round"
},
{
"id": 2,
"type": "column",
"value": "school_city"
},
{
"id": 3,
"type": "value",
"value": "Los Angeles"
},
{
"id": 0,
"type": "table",
"value": "projects"
},
{
"id": 4,
"type": "value",
"value": "t"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
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",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
10,587 |
hockey
|
bird:train.json:7797
|
Which Minnesota North Stars' goalkeeper had the most Goal Againsts in his play time?
|
SELECT playerID FROM Goalies AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.name = 'Minnesota North Stars' GROUP BY T1.playerID ORDER BY SUM(T1.GA) DESC LIMIT 1
|
[
"Which",
"Minnesota",
"North",
"Stars",
"'",
"goalkeeper",
"had",
"the",
"most",
"Goal",
"Againsts",
"in",
"his",
"play",
"time",
"?"
] |
[
{
"id": 4,
"type": "value",
"value": "Minnesota North Stars"
},
{
"id": 0,
"type": "column",
"value": "playerid"
},
{
"id": 1,
"type": "table",
"value": "goalies"
},
{
"id": 2,
"type": "table",
"value": "teams"
},
{
"id": 3,
"type": "column",
"value": "name"
},
{
"id": 6,
"type": "column",
"value": "tmid"
},
{
"id": 7,
"type": "column",
"value": "year"
},
{
"id": 5,
"type": "column",
"value": "ga"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
1,
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-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
1,697 |
human_resources
|
bird:train.json:8965
|
How much is the salary of the first ever employee that was hired?
|
SELECT salary FROM employee ORDER BY hiredate ASC LIMIT 1
|
[
"How",
"much",
"is",
"the",
"salary",
"of",
"the",
"first",
"ever",
"employee",
"that",
"was",
"hired",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 2,
"type": "column",
"value": "hiredate"
},
{
"id": 1,
"type": "column",
"value": "salary"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O"
] |
1,040 |
codebase_comments
|
bird:train.json:578
|
In the "https://github.com/wallerdev/htmlsharp.git", give all the linearized sequenced of API calls.
|
SELECT T3.ApiCalls FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId INNER JOIN Method AS T3 ON T2.Id = T3.SolutionId WHERE T1.Url = 'https://github.com/wallerdev/htmlsharp.git'
|
[
"In",
"the",
"\"",
"https://github.com/wallerdev/htmlsharp.git",
"\"",
",",
"give",
"all",
"the",
"linearized",
"sequenced",
"of",
"API",
"calls",
"."
] |
[
{
"id": 3,
"type": "value",
"value": "https://github.com/wallerdev/htmlsharp.git"
},
{
"id": 7,
"type": "column",
"value": "solutionid"
},
{
"id": 0,
"type": "column",
"value": "apicalls"
},
{
"id": 5,
"type": "table",
"value": "solution"
},
{
"id": 1,
"type": "table",
"value": "method"
},
{
"id": 8,
"type": "column",
"value": "repoid"
},
{
"id": 4,
"type": "table",
"value": "repo"
},
{
"id": 2,
"type": "column",
"value": "url"
},
{
"id": 6,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
12,
13
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
6,291 |
candidate_poll
|
spider:train_spider.json:2409
|
What are the average height and weight across males (sex is M)?
|
SELECT avg(height) , avg(weight) FROM people WHERE sex = 'M'
|
[
"What",
"are",
"the",
"average",
"height",
"and",
"weight",
"across",
"males",
"(",
"sex",
"is",
"M",
")",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "people"
},
{
"id": 3,
"type": "column",
"value": "height"
},
{
"id": 4,
"type": "column",
"value": "weight"
},
{
"id": 1,
"type": "column",
"value": "sex"
},
{
"id": 2,
"type": "value",
"value": "M"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"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",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
11,770 |
university
|
bird:train.json:8100
|
Which ranking system is criteria "Total Shanghai" in?
|
SELECT T1.system_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T2.criteria_name = 'Total Shanghai'
|
[
"Which",
"ranking",
"system",
"is",
"criteria",
"\"",
"Total",
"Shanghai",
"\"",
"in",
"?"
] |
[
{
"id": 6,
"type": "column",
"value": "ranking_system_id"
},
{
"id": 2,
"type": "table",
"value": "ranking_criteria"
},
{
"id": 1,
"type": "table",
"value": "ranking_system"
},
{
"id": 4,
"type": "value",
"value": "Total Shanghai"
},
{
"id": 3,
"type": "column",
"value": "criteria_name"
},
{
"id": 0,
"type": "column",
"value": "system_name"
},
{
"id": 5,
"type": "column",
"value": "id"
}
] |
[
{
"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": [
9
]
},
{
"entity_id": 10,
"token_idxs": [
8
]
},
{
"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",
"O",
"O"
] |
14,165 |
pilot_1
|
bird:test.json:1143
|
Find pilots who own plane Piper Cub but not B-52 Bomber.
|
SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber'
|
[
"Find",
"pilots",
"who",
"own",
"plane",
"Piper",
"Cub",
"but",
"not",
"B-52",
"Bomber",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 4,
"type": "value",
"value": "B-52 Bomber"
},
{
"id": 1,
"type": "column",
"value": "pilot_name"
},
{
"id": 2,
"type": "column",
"value": "plane_name"
},
{
"id": 3,
"type": "value",
"value": "Piper Cub"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
5,
6
]
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
9,512 |
college_1
|
spider:train_spider.json:3311
|
Find the first names of all instructors who have taught some course and the course description.
|
SELECT T2.emp_fname , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code
|
[
"Find",
"the",
"first",
"names",
"of",
"all",
"instructors",
"who",
"have",
"taught",
"some",
"course",
"and",
"the",
"course",
"description",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "crs_description"
},
{
"id": 0,
"type": "column",
"value": "emp_fname"
},
{
"id": 4,
"type": "table",
"value": "employee"
},
{
"id": 5,
"type": "column",
"value": "crs_code"
},
{
"id": 6,
"type": "column",
"value": "prof_num"
},
{
"id": 7,
"type": "column",
"value": "emp_num"
},
{
"id": 2,
"type": "table",
"value": "course"
},
{
"id": 3,
"type": "table",
"value": "class"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
11
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
1,127 |
tv_shows
|
bird:test.json:145
|
List the affiliations shared by more than three city channels.
|
SELECT Affiliation FROM city_channel GROUP BY Affiliation HAVING COUNT(*) > 3
|
[
"List",
"the",
"affiliations",
"shared",
"by",
"more",
"than",
"three",
"city",
"channels",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "city_channel"
},
{
"id": 1,
"type": "column",
"value": "affiliation"
},
{
"id": 2,
"type": "value",
"value": "3"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8,
9
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"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-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"I-TABLE",
"O"
] |
9,939 |
cre_Theme_park
|
spider:train_spider.json:5935
|
Show the average price of hotels for each star rating code.
|
SELECT star_rating_code , avg(price_range) FROM HOTELS GROUP BY star_rating_code
|
[
"Show",
"the",
"average",
"price",
"of",
"hotels",
"for",
"each",
"star",
"rating",
"code",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "star_rating_code"
},
{
"id": 2,
"type": "column",
"value": "price_range"
},
{
"id": 0,
"type": "table",
"value": "hotels"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"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",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
12,509 |
student_club
|
bird:dev.json:1371
|
How many members attended the "Women's Soccer" event?
|
SELECT COUNT(T2.link_to_member) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Women''s Soccer'
|
[
"How",
"many",
"members",
"attended",
"the",
"\"",
"Women",
"'s",
"Soccer",
"\"",
"event",
"?"
] |
[
{
"id": 3,
"type": "value",
"value": "Women's Soccer"
},
{
"id": 4,
"type": "column",
"value": "link_to_member"
},
{
"id": 6,
"type": "column",
"value": "link_to_event"
},
{
"id": 1,
"type": "table",
"value": "attendance"
},
{
"id": 2,
"type": "column",
"value": "event_name"
},
{
"id": 5,
"type": "column",
"value": "event_id"
},
{
"id": 0,
"type": "table",
"value": "event"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7,
8
]
},
{
"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": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-TABLE",
"O"
] |
6,691 |
movielens
|
bird:train.json:2322
|
Please give the ids of the oldest films that got the most ratings.
|
SELECT DISTINCT T1.movieid FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T1.rating = 5 AND T2.year = 1
|
[
"Please",
"give",
"the",
"ids",
"of",
"the",
"oldest",
"films",
"that",
"got",
"the",
"most",
"ratings",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "movieid"
},
{
"id": 1,
"type": "table",
"value": "u2base"
},
{
"id": 2,
"type": "table",
"value": "movies"
},
{
"id": 3,
"type": "column",
"value": "rating"
},
{
"id": 5,
"type": "column",
"value": "year"
},
{
"id": 4,
"type": "value",
"value": "5"
},
{
"id": 6,
"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": [
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",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
12,855 |
synthea
|
bird:train.json:1380
|
How many allergies does Mrs. Saundra Monahan have?
|
SELECT COUNT(DISTINCT T2.code) FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Saundra' AND T1.last = 'Monahan'
|
[
"How",
"many",
"allergies",
"does",
"Mrs.",
"Saundra",
"Monahan",
"have",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "allergies"
},
{
"id": 0,
"type": "table",
"value": "patients"
},
{
"id": 3,
"type": "column",
"value": "patient"
},
{
"id": 7,
"type": "value",
"value": "Saundra"
},
{
"id": 9,
"type": "value",
"value": "Monahan"
},
{
"id": 4,
"type": "column",
"value": "prefix"
},
{
"id": 6,
"type": "column",
"value": "first"
},
{
"id": 2,
"type": "column",
"value": "code"
},
{
"id": 5,
"type": "value",
"value": "Mrs."
},
{
"id": 8,
"type": "column",
"value": "last"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
4
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
5
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": [
6
]
},
{
"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",
"B-VALUE",
"B-VALUE",
"O",
"O"
] |
3,853 |
app_store
|
bird:train.json:2548
|
What percentage of no comment reviews are from "Teen" content rating apps?
|
SELECT CAST(COUNT(CASE WHEN T1.`Content Rating` = 'Teen' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.App) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Translated_Review = 'nan'
|
[
"What",
"percentage",
"of",
"no",
"comment",
"reviews",
"are",
"from",
"\"",
"Teen",
"\"",
"content",
"rating",
"apps",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "translated_review"
},
{
"id": 7,
"type": "column",
"value": "Content Rating"
},
{
"id": 1,
"type": "table",
"value": "user_reviews"
},
{
"id": 0,
"type": "table",
"value": "playstore"
},
{
"id": 8,
"type": "value",
"value": "Teen"
},
{
"id": 3,
"type": "value",
"value": "nan"
},
{
"id": 4,
"type": "column",
"value": "app"
},
{
"id": 5,
"type": "value",
"value": "100"
},
{
"id": 6,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
13,214 |
club_leader
|
bird:test.json:645
|
List the names of members in ascending order of age.
|
SELECT Name FROM member ORDER BY Age ASC
|
[
"List",
"the",
"names",
"of",
"members",
"in",
"ascending",
"order",
"of",
"age",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "member"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
11,945 |
donor
|
bird:train.json:3258
|
What are the coordinates of the school where project 'Look, Look, We Need a Nook!' Was donated to and what resource type is it?
|
SELECT T2.school_latitude, T2.school_longitude, T2.resource_type FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Look, Look, We Need a Nook!'
|
[
"What",
"are",
"the",
"coordinates",
"of",
"the",
"school",
"where",
"project",
"'",
"Look",
",",
"Look",
",",
"We",
"Need",
"a",
"Nook",
"!",
"'",
"Was",
"donated",
"to",
"and",
"what",
"resource",
"type",
"is",
"it",
"?"
] |
[
{
"id": 6,
"type": "value",
"value": "Look, Look, We Need a Nook!"
},
{
"id": 1,
"type": "column",
"value": "school_longitude"
},
{
"id": 0,
"type": "column",
"value": "school_latitude"
},
{
"id": 2,
"type": "column",
"value": "resource_type"
},
{
"id": 7,
"type": "column",
"value": "projectid"
},
{
"id": 4,
"type": "table",
"value": "projects"
},
{
"id": 3,
"type": "table",
"value": "essays"
},
{
"id": 5,
"type": "column",
"value": "title"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
25,
26
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
10,
11,
12,
13,
14,
15,
16,
17,
18
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O"
] |
5,183 |
movie_platform
|
bird:train.json:144
|
For all list titles with at least 200 movies in the list, what is their average number of followers?
|
SELECT AVG(list_followers) FROM lists WHERE list_movie_number > 200
|
[
"For",
"all",
"list",
"titles",
"with",
"at",
"least",
"200",
"movies",
"in",
"the",
"list",
",",
"what",
"is",
"their",
"average",
"number",
"of",
"followers",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "list_movie_number"
},
{
"id": 3,
"type": "column",
"value": "list_followers"
},
{
"id": 0,
"type": "table",
"value": "lists"
},
{
"id": 2,
"type": "value",
"value": "200"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13,
14
]
},
{
"entity_id": 4,
"token_idxs": [
16,
17,
18
]
},
{
"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-VALUE",
"I-VALUE",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
406 |
world
|
bird:train.json:7836
|
How many percent of countries in North America use English?
|
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
|
[
"How",
"many",
"percent",
"of",
"countries",
"in",
"North",
"America",
"use",
"English",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "countrylanguage"
},
{
"id": 3,
"type": "column",
"value": "countrycode"
},
{
"id": 7,
"type": "column",
"value": "language"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 8,
"type": "value",
"value": "English"
},
{
"id": 2,
"type": "column",
"value": "code"
},
{
"id": 4,
"type": "value",
"value": "100"
},
{
"id": 5,
"type": "value",
"value": "1"
},
{
"id": 6,
"type": "value",
"value": "0"
}
] |
[
{
"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": [
9
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
6,484 |
insurance_policies
|
spider:train_spider.json:3874
|
Who are the customers that had more than 1 policy? List the customer details and id.
|
SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1
|
[
"Who",
"are",
"the",
"customers",
"that",
"had",
"more",
"than",
"1",
"policy",
"?",
"List",
"the",
"customer",
"details",
"and",
"i",
"d."
] |
[
{
"id": 3,
"type": "table",
"value": "customer_policies"
},
{
"id": 1,
"type": "column",
"value": "customer_details"
},
{
"id": 0,
"type": "column",
"value": "customer_id"
},
{
"id": 2,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
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",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,878 |
world
|
bird:train.json:7859
|
What is the official language of China?
|
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.IsOfficial = 'T'
|
[
"What",
"is",
"the",
"official",
"language",
"of",
"China",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "countrylanguage"
},
{
"id": 4,
"type": "column",
"value": "countrycode"
},
{
"id": 7,
"type": "column",
"value": "isofficial"
},
{
"id": 0,
"type": "column",
"value": "language"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 6,
"type": "value",
"value": "China"
},
{
"id": 3,
"type": "column",
"value": "code"
},
{
"id": 5,
"type": "column",
"value": "name"
},
{
"id": 8,
"type": "value",
"value": "T"
}
] |
[
{
"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": [
6
]
},
{
"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": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
15,740 |
wine_1
|
spider:train_spider.json:6570
|
What are the distinct wineries which produce wines costing between 50 and 100?
|
SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100
|
[
"What",
"are",
"the",
"distinct",
"wineries",
"which",
"produce",
"wines",
"costing",
"between",
"50",
"and",
"100",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "winery"
},
{
"id": 2,
"type": "column",
"value": "price"
},
{
"id": 0,
"type": "table",
"value": "wine"
},
{
"id": 4,
"type": "value",
"value": "100"
},
{
"id": 3,
"type": "value",
"value": "50"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
3,116 |
hockey
|
bird:train.json:7708
|
Which year was the goalie who had the most postseaon shots Against in 2008 born?
|
SELECT T1.birthYear FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 2008 ORDER BY T2.PostSA DESC LIMIT 1
|
[
"Which",
"year",
"was",
"the",
"goalie",
"who",
"had",
"the",
"most",
"postseaon",
"shots",
"Against",
"in",
"2008",
"born",
"?"
] |
[
{
"id": 0,
"type": "column",
"value": "birthyear"
},
{
"id": 6,
"type": "column",
"value": "playerid"
},
{
"id": 2,
"type": "table",
"value": "goalies"
},
{
"id": 1,
"type": "table",
"value": "master"
},
{
"id": 5,
"type": "column",
"value": "postsa"
},
{
"id": 3,
"type": "column",
"value": "year"
},
{
"id": 4,
"type": "value",
"value": "2008"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
"token_idxs": [
9
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
13,004 |
book_publishing_company
|
bird:train.json:215
|
What's the royalty for the bestseller book?
|
SELECT royalty FROM titles ORDER BY ytd_sales DESC LIMIT 1
|
[
"What",
"'s",
"the",
"royalty",
"for",
"the",
"bestseller",
"book",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "ytd_sales"
},
{
"id": 1,
"type": "column",
"value": "royalty"
},
{
"id": 0,
"type": "table",
"value": "titles"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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"
] |
13,143 |
donor
|
bird:train.json:3167
|
Who is the largest donor by amount? Give the donation id and the total amount of the donation.
|
SELECT donationid, donation_total FROM donations ORDER BY donation_total DESC LIMIT 1
|
[
"Who",
"is",
"the",
"largest",
"donor",
"by",
"amount",
"?",
"Give",
"the",
"donation",
"i",
"d",
"and",
"the",
"total",
"amount",
"of",
"the",
"donation",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "donation_total"
},
{
"id": 1,
"type": "column",
"value": "donationid"
},
{
"id": 0,
"type": "table",
"value": "donations"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
11,
12
]
},
{
"entity_id": 2,
"token_idxs": [
19
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
7,140 |
perpetrator
|
spider:train_spider.json:2318
|
List the names of perpetrators in descending order of the year.
|
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC
|
[
"List",
"the",
"names",
"of",
"perpetrators",
"in",
"descending",
"order",
"of",
"the",
"year",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "perpetrator"
},
{
"id": 4,
"type": "column",
"value": "people_id"
},
{
"id": 1,
"type": "table",
"value": "people"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "column",
"value": "year"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"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"
] |
10,015 |
epinions_1
|
spider:train_spider.json:1712
|
Find the name of the source user with the highest average trust score.
|
SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY avg(trust) DESC LIMIT 1
|
[
"Find",
"the",
"name",
"of",
"the",
"source",
"user",
"with",
"the",
"highest",
"average",
"trust",
"score",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "source_u_id"
},
{
"id": 2,
"type": "table",
"value": "useracct"
},
{
"id": 3,
"type": "table",
"value": "trust"
},
{
"id": 5,
"type": "column",
"value": "trust"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "column",
"value": "u_id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
11
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
15,680 |
bike_1
|
spider:train_spider.json:189
|
For each station, return its longitude and the average duration of trips that started from the station.
|
SELECT T1.name , T1.long , avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id
|
[
"For",
"each",
"station",
",",
"return",
"its",
"longitude",
"and",
"the",
"average",
"duration",
"of",
"trips",
"that",
"started",
"from",
"the",
"station",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "start_station_id"
},
{
"id": 5,
"type": "column",
"value": "duration"
},
{
"id": 3,
"type": "table",
"value": "station"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "long"
},
{
"id": 4,
"type": "table",
"value": "trip"
},
{
"id": 6,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13,
14
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O"
] |
6,389 |
synthea
|
bird:train.json:1426
|
Which procedures and medications were received by the patient with the third-degree burn?
|
SELECT DISTINCT T1.DESCRIPTION, T3.DESCRIPTION FROM procedures AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT INNER JOIN medications AS T3 ON T2.patient = T3.PATIENT WHERE T2.DESCRIPTION = 'Third degree burn'
|
[
"Which",
"procedures",
"and",
"medications",
"were",
"received",
"by",
"the",
"patient",
"with",
"the",
"third",
"-",
"degree",
"burn",
"?"
] |
[
{
"id": 2,
"type": "value",
"value": "Third degree burn"
},
{
"id": 0,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "medications"
},
{
"id": 3,
"type": "table",
"value": "procedures"
},
{
"id": 4,
"type": "table",
"value": "conditions"
},
{
"id": 5,
"type": "column",
"value": "patient"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
11,
12,
13,
14
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
8
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
16,070 |
olympics
|
bird:train.json:5051
|
How many Belgian men have competed in an Olympic Games?
|
SELECT COUNT(T2.person_id) 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 T1.region_name = 'Belgium' AND T3.gender = 'M'
|
[
"How",
"many",
"Belgian",
"men",
"have",
"competed",
"in",
"an",
"Olympic",
"Games",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "person_region"
},
{
"id": 5,
"type": "column",
"value": "region_name"
},
{
"id": 2,
"type": "table",
"value": "noc_region"
},
{
"id": 1,
"type": "column",
"value": "person_id"
},
{
"id": 9,
"type": "column",
"value": "region_id"
},
{
"id": 6,
"type": "value",
"value": "Belgium"
},
{
"id": 0,
"type": "table",
"value": "person"
},
{
"id": 7,
"type": "column",
"value": "gender"
},
{
"id": 4,
"type": "column",
"value": "id"
},
{
"id": 8,
"type": "value",
"value": "M"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"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",
"O",
"B-TABLE",
"I-TABLE"
] |
14,727 |
customers_card_transactions
|
spider:train_spider.json:738
|
Return the average transaction amount, as well as the total amount of all transactions.
|
SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_transactions
|
[
"Return",
"the",
"average",
"transaction",
"amount",
",",
"as",
"well",
"as",
"the",
"total",
"amount",
"of",
"all",
"transactions",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "financial_transactions"
},
{
"id": 1,
"type": "column",
"value": "transaction_amount"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,409 |
e_learning
|
spider:train_spider.json:3836
|
Find the student ID and login name of the student with the most course enrollments
|
SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
|
[
"Find",
"the",
"student",
"ID",
"and",
"login",
"name",
"of",
"the",
"student",
"with",
"the",
"most",
"course",
"enrollments"
] |
[
{
"id": 2,
"type": "table",
"value": "student_course_enrolment"
},
{
"id": 0,
"type": "column",
"value": "student_id"
},
{
"id": 1,
"type": "column",
"value": "login_name"
},
{
"id": 3,
"type": "table",
"value": "students"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
12,
13,
14
]
},
{
"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-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE"
] |
6,224 |
tracking_software_problems
|
spider:train_spider.json:5370
|
Find the ids of the problems that are reported by the staff whose last name is Bosco.
|
SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = "Bosco"
|
[
"Find",
"the",
"ids",
"of",
"the",
"problems",
"that",
"are",
"reported",
"by",
"the",
"staff",
"whose",
"last",
"name",
"is",
"Bosco",
"."
] |
[
{
"id": 5,
"type": "column",
"value": "reported_by_staff_id"
},
{
"id": 3,
"type": "column",
"value": "staff_last_name"
},
{
"id": 0,
"type": "column",
"value": "problem_id"
},
{
"id": 1,
"type": "table",
"value": "problems"
},
{
"id": 6,
"type": "column",
"value": "staff_id"
},
{
"id": 2,
"type": "table",
"value": "staff"
},
{
"id": 4,
"type": "column",
"value": "Bosco"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
13,
14
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
{
"entity_id": 5,
"token_idxs": [
8,
9
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O"
] |
12,054 |
restaurant_bills
|
bird:test.json:625
|
Find the customer with the highest membership level and return his or her card credit.
|
SELECT Card_Credit FROM customer ORDER BY Level_of_Membership DESC LIMIT 1
|
[
"Find",
"the",
"customer",
"with",
"the",
"highest",
"membership",
"level",
"and",
"return",
"his",
"or",
"her",
"card",
"credit",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "level_of_membership"
},
{
"id": 1,
"type": "column",
"value": "card_credit"
},
{
"id": 0,
"type": "table",
"value": "customer"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
9
]
},
{
"entity_id": 7,
"token_idxs": [
11,
12,
13
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,885 |
student_club
|
bird:dev.json:1347
|
Tell the hometown county for "Adela O'Gallagher".
|
SELECT T2.county FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Adela' AND T1.last_name = 'O''Gallagher'
|
[
"Tell",
"the",
"hometown",
"county",
"for",
"\"",
"Adela",
"O'Gallagher",
"\"",
"."
] |
[
{
"id": 8,
"type": "value",
"value": "O'Gallagher"
},
{
"id": 5,
"type": "column",
"value": "first_name"
},
{
"id": 7,
"type": "column",
"value": "last_name"
},
{
"id": 2,
"type": "table",
"value": "zip_code"
},
{
"id": 4,
"type": "column",
"value": "zip_code"
},
{
"id": 0,
"type": "column",
"value": "county"
},
{
"id": 1,
"type": "table",
"value": "member"
},
{
"id": 6,
"type": "value",
"value": "Adela"
},
{
"id": 3,
"type": "column",
"value": "zip"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
6
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
7
]
},
{
"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-VALUE",
"B-VALUE",
"O",
"O"
] |
1,133 |
insurance_policies
|
spider:train_spider.json:3886
|
Which kind of policy type was chosen by the most customers?
|
SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1
|
[
"Which",
"kind",
"of",
"policy",
"type",
"was",
"chosen",
"by",
"the",
"most",
"customers",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "customer_policies"
},
{
"id": 1,
"type": "column",
"value": "policy_type_code"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"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",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,042 |
trains
|
bird:train.json:719
|
How many eastbound trains have rectangular-shaped head cars?
|
SELECT COUNT(T.train_id) FROM (SELECT T1.train_id FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 1 AND T2.direction = 'east' AND T1.shape = 'rectangle' GROUP BY T1.train_id)as T
|
[
"How",
"many",
"eastbound",
"trains",
"have",
"rectangular",
"-",
"shaped",
"head",
"cars",
"?"
] |
[
{
"id": 6,
"type": "column",
"value": "direction"
},
{
"id": 9,
"type": "value",
"value": "rectangle"
},
{
"id": 0,
"type": "column",
"value": "train_id"
},
{
"id": 4,
"type": "column",
"value": "position"
},
{
"id": 2,
"type": "table",
"value": "trains"
},
{
"id": 8,
"type": "column",
"value": "shape"
},
{
"id": 1,
"type": "table",
"value": "cars"
},
{
"id": 7,
"type": "value",
"value": "east"
},
{
"id": 3,
"type": "column",
"value": "id"
},
{
"id": 5,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
2
]
},
{
"entity_id": 8,
"token_idxs": [
7
]
},
{
"entity_id": 9,
"token_idxs": [
5
]
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
6,304 |
address
|
bird:train.json:5202
|
Calculate the percentage of households in residential areas of countries over 10000.
|
SELECT CAST(COUNT(CASE WHEN T2.households > 10000 THEN T1.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T1.zip_code) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code
|
[
"Calculate",
"the",
"percentage",
"of",
"households",
"in",
"residential",
"areas",
"of",
"countries",
"over",
"10000",
"."
] |
[
{
"id": 4,
"type": "column",
"value": "households"
},
{
"id": 1,
"type": "table",
"value": "zip_data"
},
{
"id": 2,
"type": "column",
"value": "zip_code"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 5,
"type": "value",
"value": "10000"
},
{
"id": 3,
"type": "value",
"value": "100"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"token_idxs": [
11
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
8,565 |
video_game
|
bird:test.json:1967
|
Show the title of games that are played by both players from college "Oklahoma" and players from college "Auburn".
|
SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = "Oklahoma" INTERSECT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = "Auburn"
|
[
"Show",
"the",
"title",
"of",
"games",
"that",
"are",
"played",
"by",
"both",
"players",
"from",
"college",
"\"",
"Oklahoma",
"\"",
"and",
"players",
"from",
"college",
"\"",
"Auburn",
"\"",
"."
] |
[
{
"id": 6,
"type": "table",
"value": "game_player"
},
{
"id": 7,
"type": "column",
"value": "player_id"
},
{
"id": 3,
"type": "column",
"value": "Oklahoma"
},
{
"id": 2,
"type": "column",
"value": "college"
},
{
"id": 8,
"type": "column",
"value": "game_id"
},
{
"id": 1,
"type": "table",
"value": "player"
},
{
"id": 4,
"type": "column",
"value": "Auburn"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 5,
"type": "table",
"value": "game"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,680 |
restaurant
|
bird:train.json:1765
|
What is the full address of the restaurant named "Sanuki Restaurant"?
|
SELECT T2.city, T1.street_num, T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'sanuki restaurant'
|
[
"What",
"is",
"the",
"full",
"address",
"of",
"the",
"restaurant",
"named",
"\"",
"Sanuki",
"Restaurant",
"\"",
"?"
] |
[
{
"id": 6,
"type": "value",
"value": "sanuki restaurant"
},
{
"id": 7,
"type": "column",
"value": "id_restaurant"
},
{
"id": 2,
"type": "column",
"value": "street_name"
},
{
"id": 4,
"type": "table",
"value": "generalinfo"
},
{
"id": 1,
"type": "column",
"value": "street_num"
},
{
"id": 3,
"type": "table",
"value": "location"
},
{
"id": 5,
"type": "column",
"value": "label"
},
{
"id": 0,
"type": "column",
"value": "city"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
10,
11
]
},
{
"entity_id": 7,
"token_idxs": [
7
]
},
{
"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",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
771 |
food_inspection_2
|
bird:train.json:6113
|
Please list the assumed name of all the facilities inspected by Joshua Rosa.
|
SELECT DISTINCT T3.dba_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN establishment AS T3 ON T2.license_no = T3.license_no WHERE T1.first_name = 'Joshua' AND T1.last_name = 'Rosa'
|
[
"Please",
"list",
"the",
"assumed",
"name",
"of",
"all",
"the",
"facilities",
"inspected",
"by",
"Joshua",
"Rosa",
"."
] |
[
{
"id": 1,
"type": "table",
"value": "establishment"
},
{
"id": 9,
"type": "column",
"value": "employee_id"
},
{
"id": 3,
"type": "table",
"value": "inspection"
},
{
"id": 4,
"type": "column",
"value": "license_no"
},
{
"id": 5,
"type": "column",
"value": "first_name"
},
{
"id": 7,
"type": "column",
"value": "last_name"
},
{
"id": 0,
"type": "column",
"value": "dba_name"
},
{
"id": 2,
"type": "table",
"value": "employee"
},
{
"id": 6,
"type": "value",
"value": "Joshua"
},
{
"id": 8,
"type": "value",
"value": "Rosa"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
11
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
12
]
},
{
"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-TABLE",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
14,983 |
public_review_platform
|
bird:train.json:4033
|
Among the users who received high compliments from other users, which users joined Yelp earliest?
|
SELECT T2.user_id FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T2.number_of_compliments = 'High' AND T1.user_yelping_since_year = ( SELECT MIN(user_yelping_since_year) FROM Users )
|
[
"Among",
"the",
"users",
"who",
"received",
"high",
"compliments",
"from",
"other",
"users",
",",
"which",
"users",
"joined",
"Yelp",
"earliest",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "user_yelping_since_year"
},
{
"id": 3,
"type": "column",
"value": "number_of_compliments"
},
{
"id": 2,
"type": "table",
"value": "users_compliments"
},
{
"id": 0,
"type": "column",
"value": "user_id"
},
{
"id": 1,
"type": "table",
"value": "users"
},
{
"id": 4,
"type": "value",
"value": "High"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
"token_idxs": [
14
]
},
{
"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",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
10,894 |
address
|
bird:train.json:5229
|
How many postal points with unique post office types are there in Ohio?
|
SELECT COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Ohio' AND T2.type = 'Unique Post Office'
|
[
"How",
"many",
"postal",
"points",
"with",
"unique",
"post",
"office",
"types",
"are",
"there",
"in",
"Ohio",
"?"
] |
[
{
"id": 8,
"type": "value",
"value": "Unique Post Office"
},
{
"id": 3,
"type": "column",
"value": "abbreviation"
},
{
"id": 1,
"type": "table",
"value": "zip_data"
},
{
"id": 2,
"type": "column",
"value": "zip_code"
},
{
"id": 0,
"type": "table",
"value": "state"
},
{
"id": 4,
"type": "column",
"value": "state"
},
{
"id": 5,
"type": "column",
"value": "name"
},
{
"id": 6,
"type": "value",
"value": "Ohio"
},
{
"id": 7,
"type": "column",
"value": "type"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
12
]
},
{
"entity_id": 7,
"token_idxs": [
8
]
},
{
"entity_id": 8,
"token_idxs": [
5,
6,
7
]
},
{
"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",
"I-VALUE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
11,946 |
restaurant
|
bird:train.json:1695
|
Identify all the restaurants in Marin County by their id.
|
SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'marin county'
|
[
"Identify",
"all",
"the",
"restaurants",
"in",
"Marin",
"County",
"by",
"their",
"i",
"d."
] |
[
{
"id": 0,
"type": "column",
"value": "id_restaurant"
},
{
"id": 4,
"type": "value",
"value": "marin county"
},
{
"id": 1,
"type": "table",
"value": "generalinfo"
},
{
"id": 2,
"type": "table",
"value": "geographic"
},
{
"id": 3,
"type": "column",
"value": "county"
},
{
"id": 5,
"type": "column",
"value": "city"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3,
9,
10
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"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",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN"
] |
998 |
tracking_grants_for_research
|
spider:train_spider.json:4373
|
What are the details of all organizations that are described as Sponsors and sort the results in ascending order?
|
SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details
|
[
"What",
"are",
"the",
"details",
"of",
"all",
"organizations",
"that",
"are",
"described",
"as",
"Sponsors",
"and",
"sort",
"the",
"results",
"in",
"ascending",
"order",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "organisation_type_description"
},
{
"id": 0,
"type": "column",
"value": "organisation_details"
},
{
"id": 2,
"type": "table",
"value": "organisation_types"
},
{
"id": 5,
"type": "column",
"value": "organisation_type"
},
{
"id": 1,
"type": "table",
"value": "organisations"
},
{
"id": 4,
"type": "value",
"value": "Sponsor"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
13,
14
]
},
{
"entity_id": 2,
"token_idxs": [
6,
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-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
10,530 |
gymnast
|
spider:train_spider.json:1758
|
What are the distinct hometowns of gymnasts with total points more than 57.5?
|
SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5
|
[
"What",
"are",
"the",
"distinct",
"hometowns",
"of",
"gymnasts",
"with",
"total",
"points",
"more",
"than",
"57.5",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "total_points"
},
{
"id": 5,
"type": "column",
"value": "gymnast_id"
},
{
"id": 6,
"type": "column",
"value": "people_id"
},
{
"id": 0,
"type": "column",
"value": "hometown"
},
{
"id": 1,
"type": "table",
"value": "gymnast"
},
{
"id": 2,
"type": "table",
"value": "people"
},
{
"id": 4,
"type": "value",
"value": "57.5"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
488 |
mondial_geo
|
bird:train.json:8473
|
Which country has the least organization membership?
|
SELECT country FROM organization WHERE country IN ( SELECT Code FROM country ) GROUP BY country ORDER BY COUNT(NAME) LIMIT 1
|
[
"Which",
"country",
"has",
"the",
"least",
"organization",
"membership",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "organization"
},
{
"id": 1,
"type": "column",
"value": "country"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 3,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "column",
"value": "code"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
8,669 |
retail_complains
|
bird:train.json:354
|
Write down the call id of clients whose first name start with alphabet "B".
|
SELECT T2.call_id FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first LIKE 'B%'
|
[
"Write",
"down",
"the",
"call",
"i",
"d",
"of",
"clients",
"whose",
"first",
"name",
"start",
"with",
"alphabet",
"\"",
"B",
"\"",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "callcenterlogs"
},
{
"id": 6,
"type": "column",
"value": "rand client"
},
{
"id": 5,
"type": "column",
"value": "client_id"
},
{
"id": 0,
"type": "column",
"value": "call_id"
},
{
"id": 1,
"type": "table",
"value": "client"
},
{
"id": 3,
"type": "column",
"value": "first"
},
{
"id": 4,
"type": "value",
"value": "B%"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
11,968 |
address_1
|
bird:test.json:814
|
What is the distance between Boston and Newark?
|
SELECT distance FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = "Boston" AND T3.city_name = "Newark"
|
[
"What",
"is",
"the",
"distance",
"between",
"Boston",
"and",
"Newark",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "direct_distance"
},
{
"id": 3,
"type": "column",
"value": "city2_code"
},
{
"id": 8,
"type": "column",
"value": "city1_code"
},
{
"id": 4,
"type": "column",
"value": "city_code"
},
{
"id": 5,
"type": "column",
"value": "city_name"
},
{
"id": 0,
"type": "column",
"value": "distance"
},
{
"id": 6,
"type": "column",
"value": "Boston"
},
{
"id": 7,
"type": "column",
"value": "Newark"
},
{
"id": 1,
"type": "table",
"value": "city"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
5,050 |
movie_3
|
bird:train.json:9249
|
Among the movies, what percentage are horror?
|
SELECT CAST(SUM(IIF(T2.name = 'horror', 1, 0)) AS REAL) * 100 / COUNT(T2.category_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id
|
[
"Among",
"the",
"movies",
",",
"what",
"percentage",
"are",
"horror",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "film_category"
},
{
"id": 2,
"type": "column",
"value": "category_id"
},
{
"id": 1,
"type": "table",
"value": "category"
},
{
"id": 7,
"type": "value",
"value": "horror"
},
{
"id": 6,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": "100"
},
{
"id": 4,
"type": "value",
"value": "1"
},
{
"id": 5,
"type": "value",
"value": "0"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
7
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
12,670 |
mondial_geo
|
bird:train.json:8367
|
What is the difference in population between the two nations where the tallest peak is located?
|
SELECT * FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Country = T2.Country INNER JOIN country AS T4 ON T4.Code = T3.Country WHERE T1.Name = ( SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1 )
|
[
"What",
"is",
"the",
"difference",
"in",
"population",
"between",
"the",
"two",
"nations",
"where",
"the",
"tallest",
"peak",
"is",
"located",
"?"
] |
[
{
"id": 6,
"type": "table",
"value": "geo_mountain"
},
{
"id": 2,
"type": "table",
"value": "province"
},
{
"id": 5,
"type": "table",
"value": "mountain"
},
{
"id": 7,
"type": "column",
"value": "mountain"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 4,
"type": "column",
"value": "country"
},
{
"id": 8,
"type": "column",
"value": "height"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "column",
"value": "code"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
7,618 |
customers_and_orders
|
bird:test.json:300
|
Give the order status code that is most frequent across customer orders.
|
SELECT order_status_code FROM Customer_orders GROUP BY order_status_code ORDER BY count(*) DESC LIMIT 1
|
[
"Give",
"the",
"order",
"status",
"code",
"that",
"is",
"most",
"frequent",
"across",
"customer",
"orders",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "order_status_code"
},
{
"id": 0,
"type": "table",
"value": "customer_orders"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10,
11
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
14,952 |
flight_4
|
spider:train_spider.json:6808
|
What is the total number of airlines?
|
SELECT count(*) FROM airlines
|
[
"What",
"is",
"the",
"total",
"number",
"of",
"airlines",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "airlines"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"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",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
7,041 |
movies_4
|
bird:train.json:519
|
List all the keywords with "christmas" in them.
|
SELECT keyword_name FROM keyword WHERE keyword_name LIKE '%christmas%'
|
[
"List",
"all",
"the",
"keywords",
"with",
"\"",
"christmas",
"\"",
"in",
"them",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "keyword_name"
},
{
"id": 2,
"type": "value",
"value": "%christmas%"
},
{
"id": 0,
"type": "table",
"value": "keyword"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"O",
"O",
"O"
] |
13,674 |
customers_and_addresses
|
spider:train_spider.json:6091
|
Find the state and country of all cities with post code starting with 4.
|
SELECT state_province_county , country FROM addresses WHERE zip_postcode LIKE "4%"
|
[
"Find",
"the",
"state",
"and",
"country",
"of",
"all",
"cities",
"with",
"post",
"code",
"starting",
"with",
"4",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "state_province_county"
},
{
"id": 3,
"type": "column",
"value": "zip_postcode"
},
{
"id": 0,
"type": "table",
"value": "addresses"
},
{
"id": 2,
"type": "column",
"value": "country"
},
{
"id": 4,
"type": "column",
"value": "4%"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"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",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
4,061 |
retail_world
|
bird:train.json:6595
|
Provide the category name of the Chef Anton's Gumbo Mix product that New Orleans Cajun Delights company has.
|
SELECT T3.CategoryName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.CategoryID WHERE T1.CompanyName = 'New Orleans Cajun Delights' AND T2.ProductName LIKE 'Chef Anton%s Gumbo Mix'
|
[
"Provide",
"the",
"category",
"name",
"of",
"the",
"Chef",
"Anton",
"'s",
"Gumbo",
"Mix",
"product",
"that",
"New",
"Orleans",
"Cajun",
"Delights",
"company",
"has",
"."
] |
[
{
"id": 6,
"type": "value",
"value": "New Orleans Cajun Delights"
},
{
"id": 8,
"type": "value",
"value": "Chef Anton%s Gumbo Mix"
},
{
"id": 0,
"type": "column",
"value": "categoryname"
},
{
"id": 5,
"type": "column",
"value": "companyname"
},
{
"id": 7,
"type": "column",
"value": "productname"
},
{
"id": 1,
"type": "table",
"value": "categories"
},
{
"id": 4,
"type": "column",
"value": "categoryid"
},
{
"id": 9,
"type": "column",
"value": "supplierid"
},
{
"id": 2,
"type": "table",
"value": "suppliers"
},
{
"id": 3,
"type": "table",
"value": "products"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"token_idxs": [
17
]
},
{
"entity_id": 6,
"token_idxs": [
13,
14,
15,
16
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
6,
7,
8,
9,
10
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"O"
] |
12,900 |
european_football_2
|
bird:dev.json:1093
|
What is the average overall rating of the players born before the year 1986?
|
SELECT SUM(t2.overall_rating) / COUNT(t1.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t1.birthday, 1, 4) < '1986'
|
[
"What",
"is",
"the",
"average",
"overall",
"rating",
"of",
"the",
"players",
"born",
"before",
"the",
"year",
"1986",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "player_attributes"
},
{
"id": 7,
"type": "column",
"value": "overall_rating"
},
{
"id": 3,
"type": "column",
"value": "player_api_id"
},
{
"id": 4,
"type": "column",
"value": "birthday"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 2,
"type": "value",
"value": "1986"
},
{
"id": 8,
"type": "column",
"value": "id"
},
{
"id": 5,
"type": "value",
"value": "1"
},
{
"id": 6,
"type": "value",
"value": "4"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"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": []
},
{
"entity_id": 7,
"token_idxs": [
4,
5
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
13,697 |
program_share
|
spider:train_spider.json:3759
|
Count the number of distinct channel owners.
|
SELECT count(DISTINCT OWNER) FROM channel
|
[
"Count",
"the",
"number",
"of",
"distinct",
"channel",
"owners",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "channel"
},
{
"id": 1,
"type": "column",
"value": "owner"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,139 |
olympics
|
bird:train.json:4965
|
How many persons participated in the Sapporo Olympics?
|
SELECT COUNT(T1.person_id) FROM games_competitor AS T1 INNER JOIN games_city AS T2 ON T1.games_id = T2.games_id INNER JOIN city AS T3 ON T2.city_id = T3.id WHERE T3.city_name = 'Sapporo'
|
[
"How",
"many",
"persons",
"participated",
"in",
"the",
"Sapporo",
"Olympics",
"?"
] |
[
{
"id": 4,
"type": "table",
"value": "games_competitor"
},
{
"id": 5,
"type": "table",
"value": "games_city"
},
{
"id": 1,
"type": "column",
"value": "city_name"
},
{
"id": 3,
"type": "column",
"value": "person_id"
},
{
"id": 8,
"type": "column",
"value": "games_id"
},
{
"id": 2,
"type": "value",
"value": "Sapporo"
},
{
"id": 6,
"type": "column",
"value": "city_id"
},
{
"id": 0,
"type": "table",
"value": "city"
},
{
"id": 7,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"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",
"O",
"O"
] |
1,269 |
small_bank_1
|
spider:train_spider.json:1779
|
Count the number of accounts.
|
SELECT count(*) FROM accounts
|
[
"Count",
"the",
"number",
"of",
"accounts",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "accounts"
}
] |
[
{
"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"
] |
7,744 |
cre_Theme_park
|
spider:train_spider.json:5928
|
Find the details of all the markets that are accessible by walk or bus.
|
SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" OR T2.How_to_Get_There = "bus"
|
[
"Find",
"the",
"details",
"of",
"all",
"the",
"markets",
"that",
"are",
"accessible",
"by",
"walk",
"or",
"bus",
"."
] |
[
{
"id": 4,
"type": "column",
"value": "tourist_attraction_id"
},
{
"id": 2,
"type": "table",
"value": "tourist_attractions"
},
{
"id": 5,
"type": "column",
"value": "how_to_get_there"
},
{
"id": 0,
"type": "column",
"value": "market_details"
},
{
"id": 1,
"type": "table",
"value": "street_markets"
},
{
"id": 3,
"type": "column",
"value": "market_id"
},
{
"id": 6,
"type": "column",
"value": "walk"
},
{
"id": 7,
"type": "column",
"value": "bus"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"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": [
11
]
},
{
"entity_id": 7,
"token_idxs": [
13
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
6,912 |
wine_1
|
spider:train_spider.json:6589
|
List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.
|
SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR
|
[
"List",
"the",
"grape",
",",
"winery",
"and",
"year",
"of",
"the",
"wines",
"whose",
"price",
"is",
"bigger",
"than",
"100",
"ordered",
"by",
"year",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "winery"
},
{
"id": 1,
"type": "column",
"value": "grape"
},
{
"id": 4,
"type": "column",
"value": "price"
},
{
"id": 0,
"type": "table",
"value": "wine"
},
{
"id": 3,
"type": "column",
"value": "year"
},
{
"id": 5,
"type": "value",
"value": "100"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"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",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
4,371 |
thrombosis_prediction
|
bird:dev.json:1168
|
The oldest SJS patient's medical laboratory work was completed on what date, and what age was the patient when they initially arrived at the hospital?
|
SELECT T1.Date, STRFTIME('%Y', T2.`First Date`) - STRFTIME('%Y', T2.Birthday),T2.Birthday FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T2.Diagnosis = 'SJS' AND T2.Birthday IS NOT NULL ORDER BY T2.Birthday ASC LIMIT 1
|
[
"The",
"oldest",
"SJS",
"patient",
"'s",
"medical",
"laboratory",
"work",
"was",
"completed",
"on",
"what",
"date",
",",
"and",
"what",
"age",
"was",
"the",
"patient",
"when",
"they",
"initially",
"arrived",
"at",
"the",
"hospital",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "laboratory"
},
{
"id": 8,
"type": "column",
"value": "First Date"
},
{
"id": 5,
"type": "column",
"value": "diagnosis"
},
{
"id": 1,
"type": "column",
"value": "birthday"
},
{
"id": 3,
"type": "table",
"value": "patient"
},
{
"id": 0,
"type": "column",
"value": "date"
},
{
"id": 6,
"type": "value",
"value": "SJS"
},
{
"id": 4,
"type": "column",
"value": "id"
},
{
"id": 7,
"type": "value",
"value": "%Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,824 |
professional_basketball
|
bird:train.json:2918
|
Which player from Wake Forest college did the most offensive rebounds than defensive rebounds in the all-star? Please mention the full name of the player including the middle name if have any.
|
SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.college = 'Wake Forest' AND T2.o_rebounds > T2.d_rebounds
|
[
"Which",
"player",
"from",
"Wake",
"Forest",
"college",
"did",
"the",
"most",
"offensive",
"rebounds",
"than",
"defensive",
"rebounds",
"in",
"the",
"all",
"-",
"star",
"?",
"Please",
"mention",
"the",
"full",
"name",
"of",
"the",
"player",
"including",
"the",
"middle",
"name",
"if",
"have",
"any",
"."
] |
[
{
"id": 4,
"type": "table",
"value": "player_allstar"
},
{
"id": 7,
"type": "value",
"value": "Wake Forest"
},
{
"id": 1,
"type": "column",
"value": "middlename"
},
{
"id": 8,
"type": "column",
"value": "o_rebounds"
},
{
"id": 9,
"type": "column",
"value": "d_rebounds"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"type": "column",
"value": "lastname"
},
{
"id": 5,
"type": "column",
"value": "playerid"
},
{
"id": 3,
"type": "table",
"value": "players"
},
{
"id": 6,
"type": "column",
"value": "college"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
31
]
},
{
"entity_id": 1,
"token_idxs": [
30
]
},
{
"entity_id": 2,
"token_idxs": [
24
]
},
{
"entity_id": 3,
"token_idxs": [
27
]
},
{
"entity_id": 4,
"token_idxs": [
16,
17,
18
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
5
]
},
{
"entity_id": 7,
"token_idxs": [
3,
4
]
},
{
"entity_id": 8,
"token_idxs": [
9,
10
]
},
{
"entity_id": 9,
"token_idxs": [
12,
13
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
106 |
public_review_platform
|
bird:train.json:3940
|
List at least 5 active business ID that are good for groups and dancing.
|
SELECT T2.business_id FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T2.attribute_value LIKE 'TRUE' AND T1.attribute_name LIKE 'Good for Dancing' AND T1.attribute_name LIKE 'Good for Groups' LIMIT 5
|
[
"List",
"at",
"least",
"5",
"active",
"business",
"ID",
"that",
"are",
"good",
"for",
"groups",
"and",
"dancing",
"."
] |
[
{
"id": 3,
"type": "table",
"value": "business_attributes"
},
{
"id": 7,
"type": "value",
"value": "Good for Dancing"
},
{
"id": 4,
"type": "column",
"value": "attribute_value"
},
{
"id": 8,
"type": "value",
"value": "Good for Groups"
},
{
"id": 6,
"type": "column",
"value": "attribute_name"
},
{
"id": 9,
"type": "column",
"value": "attribute_id"
},
{
"id": 0,
"type": "column",
"value": "business_id"
},
{
"id": 2,
"type": "table",
"value": "attributes"
},
{
"id": 1,
"type": "table",
"value": "business"
},
{
"id": 5,
"type": "value",
"value": "TRUE"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"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": [
13
]
},
{
"entity_id": 8,
"token_idxs": [
9,
10,
11
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"O"
] |
6,537 |
shipping
|
bird:train.json:5646
|
How many customers who live in California that are retailers?
|
SELECT COUNT(*) FROM customer WHERE cust_type = 'retailer' AND state = 'CA'
|
[
"How",
"many",
"customers",
"who",
"live",
"in",
"California",
"that",
"are",
"retailers",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "cust_type"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 2,
"type": "value",
"value": "retailer"
},
{
"id": 3,
"type": "column",
"value": "state"
},
{
"id": 4,
"type": "value",
"value": "CA"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5,
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",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O"
] |
8,808 |
european_football_1
|
bird:train.json:2772
|
How many draw games happened on 2018/8/7 for National League?
|
SELECT COUNT(T1.FTR) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'National League' AND T1.Date = '2018-08-07' AND T1.FTR = 'D'
|
[
"How",
"many",
"draw",
"games",
"happened",
"on",
"2018/8/7",
"for",
"National",
"League",
"?"
] |
[
{
"id": 6,
"type": "value",
"value": "National League"
},
{
"id": 8,
"type": "value",
"value": "2018-08-07"
},
{
"id": 1,
"type": "table",
"value": "divisions"
},
{
"id": 4,
"type": "column",
"value": "division"
},
{
"id": 0,
"type": "table",
"value": "matchs"
},
{
"id": 5,
"type": "column",
"value": "name"
},
{
"id": 7,
"type": "column",
"value": "date"
},
{
"id": 2,
"type": "column",
"value": "ftr"
},
{
"id": 3,
"type": "column",
"value": "div"
},
{
"id": 9,
"type": "value",
"value": "D"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"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"
] |
15,222 |
conference
|
bird:test.json:1057
|
List all conference name, year, and location.
|
SELECT conference_name , YEAR , LOCATION FROM conference
|
[
"List",
"all",
"conference",
"name",
",",
"year",
",",
"and",
"location",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "conference_name"
},
{
"id": 0,
"type": "table",
"value": "conference"
},
{
"id": 3,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "column",
"value": "year"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"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-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
2,584 |
restaurant
|
bird:train.json:1703
|
Please list any five cities that have an unidentified county and region.
|
SELECT city FROM geographic WHERE county = 'unknown' AND region = 'unknown' LIMIT 5
|
[
"Please",
"list",
"any",
"five",
"cities",
"that",
"have",
"an",
"unidentified",
"county",
"and",
"region",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "geographic"
},
{
"id": 3,
"type": "value",
"value": "unknown"
},
{
"id": 2,
"type": "column",
"value": "county"
},
{
"id": 4,
"type": "column",
"value": "region"
},
{
"id": 1,
"type": "column",
"value": "city"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
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",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
3,505 |
activity_1
|
spider:train_spider.json:6746
|
Find the faculty rank that has the least members.
|
SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1
|
[
"Find",
"the",
"faculty",
"rank",
"that",
"has",
"the",
"least",
"members",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "faculty"
},
{
"id": 1,
"type": "column",
"value": "rank"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"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",
"O"
] |
10,987 |
machine_repair
|
spider:train_spider.json:2248
|
What are the teams with the most technicians?
|
SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1
|
[
"What",
"are",
"the",
"teams",
"with",
"the",
"most",
"technicians",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "technician"
},
{
"id": 1,
"type": "column",
"value": "team"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,788 |
image_and_language
|
bird:train.json:7547
|
How many object samples in image no.908 are in the class of tip?
|
SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'tip' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 908
|
[
"How",
"many",
"object",
"samples",
"in",
"image",
"no.908",
"are",
"in",
"the",
"class",
"of",
"tip",
"?"
] |
[
{
"id": 4,
"type": "column",
"value": "obj_class_id"
},
{
"id": 1,
"type": "table",
"value": "obj_classes"
},
{
"id": 7,
"type": "column",
"value": "obj_class"
},
{
"id": 0,
"type": "table",
"value": "img_obj"
},
{
"id": 2,
"type": "column",
"value": "img_id"
},
{
"id": 3,
"type": "value",
"value": "908"
},
{
"id": 8,
"type": "value",
"value": "tip"
},
{
"id": 5,
"type": "value",
"value": "0"
},
{
"id": 6,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
10
]
},
{
"entity_id": 8,
"token_idxs": [
12
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
14,118 |
insurance_fnol
|
spider:train_spider.json:909
|
What is the name of the customer who has the most policies listed?
|
SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1
|
[
"What",
"is",
"the",
"name",
"of",
"the",
"customer",
"who",
"has",
"the",
"most",
"policies",
"listed",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "customers_policies"
},
{
"id": 0,
"type": "column",
"value": "customer_name"
},
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "table",
"value": "customers"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
9,569 |
music_1
|
spider:train_spider.json:3571
|
What are the names of all songs that have a lower rating than some song of blues genre?
|
SELECT song_name FROM song WHERE rating < (SELECT max(rating) FROM song WHERE genre_is = "blues")
|
[
"What",
"are",
"the",
"names",
"of",
"all",
"songs",
"that",
"have",
"a",
"lower",
"rating",
"than",
"some",
"song",
"of",
"blues",
"genre",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "song_name"
},
{
"id": 3,
"type": "column",
"value": "genre_is"
},
{
"id": 2,
"type": "column",
"value": "rating"
},
{
"id": 4,
"type": "column",
"value": "blues"
},
{
"id": 0,
"type": "table",
"value": "song"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
2,414 |
superstore
|
bird:train.json:2453
|
Who is the customer with an order shipped on March 5, 2013, in the eastern region?
|
SELECT DISTINCT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Ship Date` = '2013-03-05'
|
[
"Who",
"is",
"the",
"customer",
"with",
"an",
"order",
"shipped",
"on",
"March",
"5",
",",
"2013",
",",
"in",
"the",
"eastern",
"region",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "east_superstore"
},
{
"id": 0,
"type": "column",
"value": "Customer Name"
},
{
"id": 5,
"type": "column",
"value": "Customer ID"
},
{
"id": 4,
"type": "value",
"value": "2013-03-05"
},
{
"id": 3,
"type": "column",
"value": "Ship Date"
},
{
"id": 2,
"type": "table",
"value": "people"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
16,
17
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
13,660 |
dorm_1
|
spider:train_spider.json:5686
|
Find the average age of all students living in the each city.
|
SELECT avg(age) , city_code FROM student GROUP BY city_code
|
[
"Find",
"the",
"average",
"age",
"of",
"all",
"students",
"living",
"in",
"the",
"each",
"city",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "city_code"
},
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"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",
"B-COLUMN",
"O"
] |
2,504 |
flight_4
|
spider:train_spider.json:6837
|
Find the name and city of the airport which is the source for the most number of flight routes.
|
SELECT T1.name , T1.city , T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY count(*) DESC LIMIT 1
|
[
"Find",
"the",
"name",
"and",
"city",
"of",
"the",
"airport",
"which",
"is",
"the",
"source",
"for",
"the",
"most",
"number",
"of",
"flight",
"routes",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "src_apid"
},
{
"id": 3,
"type": "table",
"value": "airports"
},
{
"id": 4,
"type": "table",
"value": "routes"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "city"
},
{
"id": 5,
"type": "column",
"value": "apid"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
18
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
8,702 |
donor
|
bird:train.json:3209
|
Is donor “22cbc920c9b5fa08dfb331422f5926b5” a teacher?
|
SELECT DISTINCT is_teacher_acct FROM donations WHERE donor_acctid = '22cbc920c9b5fa08dfb331422f5926b5'
|
[
"Is",
"donor",
"“",
"22cbc920c9b5fa08dfb331422f5926b5",
"”",
"a",
"teacher",
"?"
] |
[
{
"id": 3,
"type": "value",
"value": "22cbc920c9b5fa08dfb331422f5926b5"
},
{
"id": 1,
"type": "column",
"value": "is_teacher_acct"
},
{
"id": 2,
"type": "column",
"value": "donor_acctid"
},
{
"id": 0,
"type": "table",
"value": "donations"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"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-VALUE",
"O",
"O",
"B-COLUMN",
"O"
] |
8,797 |
works_cycles
|
bird:train.json:7194
|
How many people with the name Alex are single and occupying organization level of 1?
|
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.FirstName = 'Alex' AND T1.MaritalStatus = 'S' AND T1.OrganizationLevel = 1
|
[
"How",
"many",
"people",
"with",
"the",
"name",
"Alex",
"are",
"single",
"and",
"occupying",
"organization",
"level",
"of",
"1",
"?"
] |
[
{
"id": 7,
"type": "column",
"value": "organizationlevel"
},
{
"id": 2,
"type": "column",
"value": "businessentityid"
},
{
"id": 5,
"type": "column",
"value": "maritalstatus"
},
{
"id": 3,
"type": "column",
"value": "firstname"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 4,
"type": "value",
"value": "Alex"
},
{
"id": 6,
"type": "value",
"value": "S"
},
{
"id": 8,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
7,244 |
codebase_community
|
bird:dev.json:703
|
Among the tags with tag ID below 15, how many of them have 20 count of posts and below?
|
SELECT COUNT(id) FROM tags WHERE Count <= 20 AND Id < 15
|
[
"Among",
"the",
"tags",
"with",
"tag",
"ID",
"below",
"15",
",",
"how",
"many",
"of",
"them",
"have",
"20",
"count",
"of",
"posts",
"and",
"below",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "count"
},
{
"id": 0,
"type": "table",
"value": "tags"
},
{
"id": 1,
"type": "column",
"value": "id"
},
{
"id": 3,
"type": "value",
"value": "20"
},
{
"id": 4,
"type": "value",
"value": "15"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"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-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
14,824 |
movie_3
|
bird:train.json:9155
|
How many films did actor Daryl Wahlberg appear in?
|
SELECT COUNT(T1.film_id) FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id WHERE T2.first_name = 'DARYL' AND T2.last_name = 'WAHLBERG'
|
[
"How",
"many",
"films",
"did",
"actor",
"Daryl",
"Wahlberg",
"appear",
"in",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "film_actor"
},
{
"id": 4,
"type": "column",
"value": "first_name"
},
{
"id": 6,
"type": "column",
"value": "last_name"
},
{
"id": 3,
"type": "column",
"value": "actor_id"
},
{
"id": 7,
"type": "value",
"value": "WAHLBERG"
},
{
"id": 2,
"type": "column",
"value": "film_id"
},
{
"id": 1,
"type": "table",
"value": "actor"
},
{
"id": 5,
"type": "value",
"value": "DARYL"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
2,
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
5
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
6
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O"
] |
6,118 |
csu_1
|
spider:train_spider.json:2331
|
What campuses opened before 1800?
|
SELECT campus FROM campuses WHERE YEAR < 1800
|
[
"What",
"campuses",
"opened",
"before",
"1800",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "campuses"
},
{
"id": 1,
"type": "column",
"value": "campus"
},
{
"id": 2,
"type": "column",
"value": "year"
},
{
"id": 3,
"type": "value",
"value": "1800"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O"
] |
11,757 |
allergy_1
|
spider:train_spider.json:450
|
What is allergy type of a cat allergy?
|
SELECT allergytype FROM Allergy_type WHERE allergy = "Cat"
|
[
"What",
"is",
"allergy",
"type",
"of",
"a",
"cat",
"allergy",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "allergy_type"
},
{
"id": 1,
"type": "column",
"value": "allergytype"
},
{
"id": 2,
"type": "column",
"value": "allergy"
},
{
"id": 3,
"type": "column",
"value": "Cat"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"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",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
434 |
toxicology
|
bird:dev.json:212
|
Which element is the least numerous in non-carcinogenic molecules?
|
SELECT T.element FROM (SELECT T1.element, COUNT(DISTINCT T1.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' GROUP BY T1.element ORDER BY COUNT(DISTINCT T1.molecule_id) ASC LIMIT 1) t
|
[
"Which",
"element",
"is",
"the",
"least",
"numerous",
"in",
"non",
"-",
"carcinogenic",
"molecules",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "molecule_id"
},
{
"id": 2,
"type": "table",
"value": "molecule"
},
{
"id": 0,
"type": "column",
"value": "element"
},
{
"id": 3,
"type": "column",
"value": "label"
},
{
"id": 1,
"type": "table",
"value": "atom"
},
{
"id": 4,
"type": "value",
"value": "-"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O"
] |
8,379 |
cs_semester
|
bird:train.json:947
|
For the students with an intelligence of 5, list the full name and courses taken by them who have less than a 3 GPA.
|
SELECT T1.f_name, T1.l_name, T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.intelligence = 5 AND T1.gpa < 3
|
[
"For",
"the",
"students",
"with",
"an",
"intelligence",
"of",
"5",
",",
"list",
"the",
"full",
"name",
"and",
"courses",
"taken",
"by",
"them",
"who",
"have",
"less",
"than",
"a",
"3",
"GPA",
"."
] |
[
{
"id": 5,
"type": "table",
"value": "registration"
},
{
"id": 7,
"type": "column",
"value": "intelligence"
},
{
"id": 11,
"type": "column",
"value": "student_id"
},
{
"id": 6,
"type": "column",
"value": "course_id"
},
{
"id": 4,
"type": "table",
"value": "student"
},
{
"id": 0,
"type": "column",
"value": "f_name"
},
{
"id": 1,
"type": "column",
"value": "l_name"
},
{
"id": 3,
"type": "table",
"value": "course"
},
{
"id": 2,
"type": "column",
"value": "name"
},
{
"id": 9,
"type": "column",
"value": "gpa"
},
{
"id": 8,
"type": "value",
"value": "5"
},
{
"id": 10,
"type": "value",
"value": "3"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
5
]
},
{
"entity_id": 8,
"token_idxs": [
7
]
},
{
"entity_id": 9,
"token_idxs": [
24
]
},
{
"entity_id": 10,
"token_idxs": [
23
]
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
7,433 |
software_company
|
bird:train.json:8539
|
Among the male customers with an level of education of 4 and below, list their income K.
|
SELECT INCOME_K FROM Demog WHERE GEOID IN ( SELECT GEOID FROM Customers WHERE EDUCATIONNUM < 4 AND SEX = 'Male' )
|
[
"Among",
"the",
"male",
"customers",
"with",
"an",
"level",
"of",
"education",
"of",
"4",
"and",
"below",
",",
"list",
"their",
"income",
"K."
] |
[
{
"id": 4,
"type": "column",
"value": "educationnum"
},
{
"id": 3,
"type": "table",
"value": "customers"
},
{
"id": 1,
"type": "column",
"value": "income_k"
},
{
"id": 0,
"type": "table",
"value": "demog"
},
{
"id": 2,
"type": "column",
"value": "geoid"
},
{
"id": 7,
"type": "value",
"value": "Male"
},
{
"id": 6,
"type": "column",
"value": "sex"
},
{
"id": 5,
"type": "value",
"value": "4"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
958 |
regional_sales
|
bird:train.json:2733
|
Name the product that was registered in the sales order 'SO - 0005951'.
|
SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.OrderNumber = 'SO - 0005951' THEN T1.`Product Name` ELSE NULL END AS T FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE T IS NOT NULL
|
[
"Name",
"the",
"product",
"that",
"was",
"registered",
"in",
"the",
"sales",
"order",
"'",
"SO",
"-",
"0005951",
"'",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "Sales Orders"
},
{
"id": 5,
"type": "column",
"value": "Product Name"
},
{
"id": 7,
"type": "value",
"value": "SO - 0005951"
},
{
"id": 6,
"type": "column",
"value": "ordernumber"
},
{
"id": 3,
"type": "column",
"value": "_productid"
},
{
"id": 4,
"type": "column",
"value": "productid"
},
{
"id": 1,
"type": "table",
"value": "products"
},
{
"id": 0,
"type": "column",
"value": "t"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,891 |
cre_Doc_Tracking_DB
|
spider:train_spider.json:4220
|
Show the location name for document "Robin CV".
|
SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = "Robin CV"
|
[
"Show",
"the",
"location",
"name",
"for",
"document",
"\"",
"Robin",
"CV",
"\"",
"."
] |
[
{
"id": 5,
"type": "table",
"value": "document_locations"
},
{
"id": 0,
"type": "column",
"value": "location_name"
},
{
"id": 1,
"type": "table",
"value": "ref_locations"
},
{
"id": 2,
"type": "column",
"value": "document_name"
},
{
"id": 4,
"type": "table",
"value": "all_documents"
},
{
"id": 6,
"type": "column",
"value": "location_code"
},
{
"id": 7,
"type": "column",
"value": "document_id"
},
{
"id": 3,
"type": "column",
"value": "Robin CV"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7,
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
5
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
9,654 |
vehicle_driver
|
bird:test.json:169
|
What is the average top speed of vehicles?
|
SELECT avg(top_speed) FROM vehicle
|
[
"What",
"is",
"the",
"average",
"top",
"speed",
"of",
"vehicles",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "top_speed"
},
{
"id": 0,
"type": "table",
"value": "vehicle"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O"
] |
6,865 |
insurance_policies
|
spider:train_spider.json:3860
|
Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled.
|
SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )
|
[
"Among",
"all",
"the",
"claims",
",",
"which",
"claims",
"have",
"a",
"claimed",
"amount",
"larger",
"than",
"the",
"average",
"?",
"List",
"the",
"date",
"the",
"claim",
"was",
"made",
"and",
"the",
"date",
"it",
"was",
"settled",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "date_claim_settled"
},
{
"id": 1,
"type": "column",
"value": "date_claim_made"
},
{
"id": 3,
"type": "column",
"value": "amount_claimed"
},
{
"id": 0,
"type": "table",
"value": "claims"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
18,
19,
20,
21,
22
]
},
{
"entity_id": 2,
"token_idxs": [
25,
26,
27,
28
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
14,166 |
film_rank
|
spider:train_spider.json:4134
|
What is the average number of cities of markets with low film market estimate bigger than 10000?
|
SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000
|
[
"What",
"is",
"the",
"average",
"number",
"of",
"cities",
"of",
"markets",
"with",
"low",
"film",
"market",
"estimate",
"bigger",
"than",
"10000",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "film_market_estimation"
},
{
"id": 4,
"type": "column",
"value": "number_cities"
},
{
"id": 2,
"type": "column",
"value": "low_estimate"
},
{
"id": 5,
"type": "column",
"value": "market_id"
},
{
"id": 1,
"type": "table",
"value": "market"
},
{
"id": 3,
"type": "value",
"value": "10000"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
4,
5,
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",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
14,331 |
legislator
|
bird:train.json:4760
|
How many male legislators are Roman Catholic?
|
SELECT COUNT(*) FROM current WHERE religion_bio = 'Roman Catholic' AND gender_bio = 'M'
|
[
"How",
"many",
"male",
"legislators",
"are",
"Roman",
"Catholic",
"?"
] |
[
{
"id": 2,
"type": "value",
"value": "Roman Catholic"
},
{
"id": 1,
"type": "column",
"value": "religion_bio"
},
{
"id": 3,
"type": "column",
"value": "gender_bio"
},
{
"id": 0,
"type": "table",
"value": "current"
},
{
"id": 4,
"type": "value",
"value": "M"
}
] |
[
{
"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": [
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": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
1,982 |
sales
|
bird:train.json:5364
|
Count the total quantity for sales from id 1 to 10.
|
SELECT SUM(Quantity) FROM Sales WHERE SalesID BETWEEN 1 AND 10
|
[
"Count",
"the",
"total",
"quantity",
"for",
"sales",
"from",
"i",
"d",
"1",
"to",
"10",
"."
] |
[
{
"id": 4,
"type": "column",
"value": "quantity"
},
{
"id": 1,
"type": "column",
"value": "salesid"
},
{
"id": 0,
"type": "table",
"value": "sales"
},
{
"id": 3,
"type": "value",
"value": "10"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
7,251 |
superhero
|
bird:dev.json:790
|
Calculate the difference between Emil Blonsky's weight and Charles Chandler's weight.
|
SELECT ( SELECT weight_kg FROM superhero WHERE full_name LIKE 'Emil Blonsky' ) - ( SELECT weight_kg FROM superhero WHERE full_name LIKE 'Charles Chandler' ) AS CALCULATE
|
[
"Calculate",
"the",
"difference",
"between",
"Emil",
"Blonsky",
"'s",
"weight",
"and",
"Charles",
"Chandler",
"'s",
"weight",
"."
] |
[
{
"id": 4,
"type": "value",
"value": "Charles Chandler"
},
{
"id": 3,
"type": "value",
"value": "Emil Blonsky"
},
{
"id": 0,
"type": "table",
"value": "superhero"
},
{
"id": 1,
"type": "column",
"value": "weight_kg"
},
{
"id": 2,
"type": "column",
"value": "full_name"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4,
5
]
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-COLUMN",
"O"
] |
DB-ER — Dataset for Database Entity Recognition
Dataset Summary
DB-ER is a token-level dataset for Database Entity Recognition (DB-ER) in natural-language queries (NLQs) paired with SQL. The task is to tag each token as one of Table, Column, Value, or O (non-entity).
Each example includes: the NLQ, database identifier, a canonical dataset id, the paired SQL query, a tokenized question, a compact entity→token reverse index, an explicit entities table (typed schema/value items), and CoNLL-style DB‑ER tags.
Fields
question_id
(int) — Example iddb_id
(str) — Database identifierdber_id
(str) — Canonical id linking back to the source file/split (BIRD, SPIDER)question
(str) — NLQ textSQL
(str) — Paired SQL querytokens
(List[str]) — Tokenized NLQentities
(List[Object]) — Typed DB items referenced in the SQL; each item has:id
(int) — Local entity id (unique within the example)type
("table"|"column"|"value")value
(str) — Surface form from the DB schema or literal value
entity_to_token
(List[Object]) — Reverse index:entity_id
(int) — Refers to anentities[*].id
token_idxs
(List[int]) — Token indices composing that entity intokens
dber_tags
(List[str]) — CoNLL-style IOB2 tags overtokens
Splits
Entity token prevalence is consistent across splits: ~29% entity vs. ~71% O
.
Split | # Examples |
---|---|
human_train |
500 |
human_test |
500 |
synthetic_train |
15,026 |
synthetic_train
is produced via our auto-annotation pipeline, which aligns SQL-referenced entities to NLQ spans using string-similarity candidates (Jaccard 3-gram / Levenshtein) and a non-overlapping ILP selection objective. See Annotation below.
Example
{
"question_id": 13692,
"db_id": "retail_complains",
"dber_id": "bird:train.json:282",
"question": "Among the clients born between 1980 and 2000, list the name of male clients who complained through referral.",
"SQL": "SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year BETWEEN 1980 AND 2000 AND T1.sex = 'Male' AND T2.`Submitted via` = 'Referral'",
"tokens": ["Among","the","clients","born","between","1980","and","2000",",","list","the","name","of","male","clients","who","complained","through","referral","."],
"entities": [
{"id": 0, "type": "column", "value": "first"},
{"id": 1, "type": "column", "value": "middle"},
{"id": 2, "type": "column", "value": "last"},
{"id": 3, "type": "table", "value": "client"},
{"id": 4, "type": "table", "value": "events"},
{"id": 5, "type": "column", "value": "client_id"},
{"id": 6, "type": "column", "value": "year"},
{"id": 7, "type": "value", "value": "1980"},
{"id": 8, "type": "value", "value": "2000"},
{"id": 9, "type": "column", "value": "sex"},
{"id": 10, "type": "value", "value": "Male"},
{"id": 11, "type": "column", "value": "Submitted via"},
{"id": 12, "type": "value", "value": "Referral"}
]
"entity_to_token": [
...,
{"entity_id":3,"token_idxs":[2]},
{"entity_id":5,"token_idxs":[14]},
{"entity_id":7,"token_idxs":[5]},
{"entity_id":8,"token_idxs":[7]},
{"entity_id":10,"token_idxs":[13]},
{"entity_id":12,"token_idxs":[18]},
...
],
"dber_tags": ["O","O","B-TABLE","O","O","B-VALUE","O","B-VALUE","O","O","O","O","O","B-VALUE","B-COLUMN","O","O","O","B-VALUE","O"]
}
Annotation
- Human: collaborative web UI with schema and SQL visible during labeling.
- Synthetic: for each NLQ–SQL pair, generate candidate spans with Jaccard/Levenshtein, then solve a non-overlapping ILP to select spans maximizing similarity. Hyperparameters are validated on human data.
Data provenance
- Sources: text-to-SQL benchmarks BIRD (https://bird-bench.github.io/) and Spider (https://yale-lily.github.io/spider).
- Transform: NLQ–SQL pairs → DB-ER annotations via the synthetic pipeline; human annotations provide gold labels and validation.
Release notes
- v1.1 (2025-08-26): HF Data Viewer compatibility update
- v1.0: Initial public release
- Downloads last month
- 39