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,182
|
movie_2
|
bird:test.json:1849
|
Show all the distinct ratings in the database.
|
SELECT DISTINCT rating FROM movies
|
[
"Show",
"all",
"the",
"distinct",
"ratings",
"in",
"the",
"database",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "movies"
},
{
"id": 1,
"type": "column",
"value": "rating"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
1,183
|
california_schools
|
bird:dev.json:74
|
What is the lowest grade for the District Special Education Consortia School with National Center for Educational Statistics school district identification number of 0613360?
|
SELECT MIN(T1.`Low Grade`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.NCESDist = '0613360' AND T2.EdOpsCode = 'SPECON'
|
[
"What",
"is",
"the",
"lowest",
"grade",
"for",
"the",
"District",
"Special",
"Education",
"Consortia",
"School",
"with",
"National",
"Center",
"for",
"Educational",
"Statistics",
"school",
"district",
"identification",
"number",
"of",
"0613360",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "Low Grade"
},
{
"id": 6,
"type": "column",
"value": "edopscode"
},
{
"id": 4,
"type": "column",
"value": "ncesdist"
},
{
"id": 1,
"type": "table",
"value": "schools"
},
{
"id": 3,
"type": "column",
"value": "cdscode"
},
{
"id": 5,
"type": "value",
"value": "0613360"
},
{
"id": 7,
"type": "value",
"value": "SPECON"
},
{
"id": 0,
"type": "table",
"value": "frpm"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
3,
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
23
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
8
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,184
|
e_commerce
|
bird:test.json:71
|
What are the names and colors of all products that have been shipped?
|
SELECT T1.product_name , T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id = T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id = T4.shipment_id
|
[
"What",
"are",
"the",
"names",
"and",
"colors",
"of",
"all",
"products",
"that",
"have",
"been",
"shipped",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "shipment_items"
},
{
"id": 1,
"type": "column",
"value": "product_color"
},
{
"id": 7,
"type": "column",
"value": "order_item_id"
},
{
"id": 0,
"type": "column",
"value": "product_name"
},
{
"id": 4,
"type": "column",
"value": "shipment_id"
},
{
"id": 6,
"type": "table",
"value": "order_items"
},
{
"id": 8,
"type": "column",
"value": "product_id"
},
{
"id": 2,
"type": "table",
"value": "shipments"
},
{
"id": 5,
"type": "table",
"value": "products"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
8
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,185
|
art_1
|
bird:test.json:1247
|
What is the average height of paintings for different medium types?
|
SELECT avg(height_mm) , medium FROM paintings GROUP BY medium
|
[
"What",
"is",
"the",
"average",
"height",
"of",
"paintings",
"for",
"different",
"medium",
"types",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "paintings"
},
{
"id": 2,
"type": "column",
"value": "height_mm"
},
{
"id": 1,
"type": "column",
"value": "medium"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
1,186
|
pilot_1
|
bird:test.json:1122
|
Count the number of pilots who have planes in Chicago.
|
SELECT count(DISTINCT T1.pilot_name) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = 'Chicago'
|
[
"Count",
"the",
"number",
"of",
"pilots",
"who",
"have",
"planes",
"in",
"Chicago",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 4,
"type": "column",
"value": "pilot_name"
},
{
"id": 5,
"type": "column",
"value": "plane_name"
},
{
"id": 2,
"type": "column",
"value": "location"
},
{
"id": 3,
"type": "value",
"value": "Chicago"
},
{
"id": 1,
"type": "table",
"value": "hangar"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"token_idxs": [
7,
8
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
1,187
|
movie_platform
|
bird:train.json:157
|
Who is the director that directed the highest number of movies in the 70s? If there are multiple directors with the same amount of movies, list all of their names and indicate the highest rating score that those movies got from the users.
|
SELECT T2.director_name, T1.rating_score FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1970 AND 1979 GROUP BY T2.director_id ORDER BY COUNT(T2.movie_id) DESC LIMIT 1
|
[
"Who",
"is",
"the",
"director",
"that",
"directed",
"the",
"highest",
"number",
"of",
"movies",
"in",
"the",
"70s",
"?",
"If",
"there",
"are",
"multiple",
"directors",
"with",
"the",
"same",
"amount",
"of",
"movies",
",",
"list",
"all",
"of",
"their",
"names",
"and",
"indicate",
"the",
"highest",
"rating",
"score",
"that",
"those",
"movies",
"got",
"from",
"the",
"users",
"."
] |
[
{
"id": 5,
"type": "column",
"value": "movie_release_year"
},
{
"id": 1,
"type": "column",
"value": "director_name"
},
{
"id": 2,
"type": "column",
"value": "rating_score"
},
{
"id": 0,
"type": "column",
"value": "director_id"
},
{
"id": 8,
"type": "column",
"value": "movie_id"
},
{
"id": 3,
"type": "table",
"value": "ratings"
},
{
"id": 4,
"type": "table",
"value": "movies"
},
{
"id": 6,
"type": "value",
"value": "1970"
},
{
"id": 7,
"type": "value",
"value": "1979"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
37
]
},
{
"entity_id": 3,
"token_idxs": [
36
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,189
|
book_publishing_company
|
bird:train.json:188
|
For each publisher, state the type of titles they published order by the publisher name.
|
SELECT DISTINCT T2.pub_name, T1.type FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id ORDER BY T2.pub_name
|
[
"For",
"each",
"publisher",
",",
"state",
"the",
"type",
"of",
"titles",
"they",
"published",
"order",
"by",
"the",
"publisher",
"name",
"."
] |
[
{
"id": 3,
"type": "table",
"value": "publishers"
},
{
"id": 0,
"type": "column",
"value": "pub_name"
},
{
"id": 2,
"type": "table",
"value": "titles"
},
{
"id": 4,
"type": "column",
"value": "pub_id"
},
{
"id": 1,
"type": "column",
"value": "type"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
1,190
|
authors
|
bird:train.json:3577
|
Indicate the name of all the journals published in the paper database in the year 2001.
|
SELECT T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Year = 2001 AND T1.ConferenceId > 0 AND T1.JournalId > 0
|
[
"Indicate",
"the",
"name",
"of",
"all",
"the",
"journals",
"published",
"in",
"the",
"paper",
"database",
"in",
"the",
"year",
"2001",
"."
] |
[
{
"id": 7,
"type": "column",
"value": "conferenceid"
},
{
"id": 3,
"type": "column",
"value": "journalid"
},
{
"id": 0,
"type": "column",
"value": "fullname"
},
{
"id": 2,
"type": "table",
"value": "journal"
},
{
"id": 1,
"type": "table",
"value": "paper"
},
{
"id": 5,
"type": "column",
"value": "year"
},
{
"id": 6,
"type": "value",
"value": "2001"
},
{
"id": 4,
"type": "column",
"value": "id"
},
{
"id": 8,
"type": "value",
"value": "0"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
14
]
},
{
"entity_id": 6,
"token_idxs": [
15
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
1,191
|
genes
|
bird:train.json:2493
|
Among the pairs of genes that are both located in the nucleus, what is the highest expression correlation score?
|
SELECT T2.Expression_Corr FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 INNER JOIN Genes AS T3 ON T3.GeneID = T2.GeneID2 WHERE T1.Localization = 'nucleus' AND T3.Localization = 'nucleus' ORDER BY T2.Expression_Corr DESC LIMIT 1
|
[
"Among",
"the",
"pairs",
"of",
"genes",
"that",
"are",
"both",
"located",
"in",
"the",
"nucleus",
",",
"what",
"is",
"the",
"highest",
"expression",
"correlation",
"score",
"?"
] |
[
{
"id": 0,
"type": "column",
"value": "expression_corr"
},
{
"id": 2,
"type": "table",
"value": "interactions"
},
{
"id": 5,
"type": "column",
"value": "localization"
},
{
"id": 4,
"type": "column",
"value": "geneid2"
},
{
"id": 6,
"type": "value",
"value": "nucleus"
},
{
"id": 7,
"type": "column",
"value": "geneid1"
},
{
"id": 3,
"type": "column",
"value": "geneid"
},
{
"id": 1,
"type": "table",
"value": "genes"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
17
]
},
{
"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": [
8,
9
]
},
{
"entity_id": 6,
"token_idxs": [
11
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
1,192
|
retail_world
|
bird:train.json:6667
|
State the shipping company of order id 10260.
|
SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260
|
[
"State",
"the",
"shipping",
"company",
"of",
"order",
"i",
"d",
"10260",
"."
] |
[
{
"id": 0,
"type": "column",
"value": "companyname"
},
{
"id": 6,
"type": "column",
"value": "shipperid"
},
{
"id": 2,
"type": "table",
"value": "shippers"
},
{
"id": 3,
"type": "column",
"value": "orderid"
},
{
"id": 5,
"type": "column",
"value": "shipvia"
},
{
"id": 1,
"type": "table",
"value": "orders"
},
{
"id": 4,
"type": "value",
"value": "10260"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"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",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
1,194
|
real_estate_rentals
|
bird:test.json:1457
|
What is the most common property type, and what is its description.
|
SELECT T1.property_type_description , T1.property_type_code FROM Ref_Property_Types AS T1 JOIN Properties AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code ORDER BY count(*) DESC LIMIT 1;
|
[
"What",
"is",
"the",
"most",
"common",
"property",
"type",
",",
"and",
"what",
"is",
"its",
"description",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "property_type_description"
},
{
"id": 0,
"type": "column",
"value": "property_type_code"
},
{
"id": 2,
"type": "table",
"value": "ref_property_types"
},
{
"id": 3,
"type": "table",
"value": "properties"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,195
|
sales
|
bird:train.json:5384
|
Among customers with the last name of Valdez, who purchased the highest quantity?
|
SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.LastName = 'Valdez' ORDER BY T2.Quantity DESC LIMIT 1
|
[
"Among",
"customers",
"with",
"the",
"last",
"name",
"of",
"Valdez",
",",
"who",
"purchased",
"the",
"highest",
"quantity",
"?"
] |
[
{
"id": 6,
"type": "column",
"value": "customerid"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 1,
"type": "table",
"value": "customers"
},
{
"id": 3,
"type": "column",
"value": "lastname"
},
{
"id": 5,
"type": "column",
"value": "quantity"
},
{
"id": 4,
"type": "value",
"value": "Valdez"
},
{
"id": 2,
"type": "table",
"value": "sales"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4,
5
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": [
13
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
1,196
|
sales_in_weather
|
bird:train.json:8192
|
How many stores belong to the station with the highest recorded heat of all time?
|
SELECT COUNT(T2.store_nbr) FROM ( SELECT station_nbr FROM weather ORDER BY heat DESC LIMIT 1 ) AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr
|
[
"How",
"many",
"stores",
"belong",
"to",
"the",
"station",
"with",
"the",
"highest",
"recorded",
"heat",
"of",
"all",
"time",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "station_nbr"
},
{
"id": 1,
"type": "column",
"value": "store_nbr"
},
{
"id": 0,
"type": "table",
"value": "relation"
},
{
"id": 3,
"type": "table",
"value": "weather"
},
{
"id": 4,
"type": "column",
"value": "heat"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
1,197
|
flight_4
|
spider:train_spider.json:6840
|
What is the number of different different airports that are destinations for American Airlines?
|
SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'
|
[
"What",
"is",
"the",
"number",
"of",
"different",
"different",
"airports",
"that",
"are",
"destinations",
"for",
"American",
"Airlines",
"?"
] |
[
{
"id": 3,
"type": "value",
"value": "American Airlines"
},
{
"id": 0,
"type": "table",
"value": "airlines"
},
{
"id": 4,
"type": "column",
"value": "dst_apid"
},
{
"id": 1,
"type": "table",
"value": "routes"
},
{
"id": 2,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "column",
"value": "alid"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"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-VALUE",
"B-TABLE",
"O"
] |
1,198
|
video_game
|
bird:test.json:1971
|
Show the title of games that are not played by any player who is in the Guard position.
|
SELECT Title FROM game EXCEPT 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.Position = "Guard"
|
[
"Show",
"the",
"title",
"of",
"games",
"that",
"are",
"not",
"played",
"by",
"any",
"player",
"who",
"is",
"in",
"the",
"Guard",
"position",
"."
] |
[
{
"id": 5,
"type": "table",
"value": "game_player"
},
{
"id": 6,
"type": "column",
"value": "player_id"
},
{
"id": 3,
"type": "column",
"value": "position"
},
{
"id": 7,
"type": "column",
"value": "game_id"
},
{
"id": 2,
"type": "table",
"value": "player"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 4,
"type": "column",
"value": "Guard"
},
{
"id": 0,
"type": "table",
"value": "game"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"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",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
1,199
|
department_store
|
spider:train_spider.json:4794
|
What is the average price of clothes?
|
SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'
|
[
"What",
"is",
"the",
"average",
"price",
"of",
"clothes",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "product_type_code"
},
{
"id": 3,
"type": "column",
"value": "product_price"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 2,
"type": "value",
"value": "Clothes"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,201
|
chinook_1
|
spider:train_spider.json:860
|
What are the different first names for customers from Brazil who have also had an invoice?
|
SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Brazil"
|
[
"What",
"are",
"the",
"different",
"first",
"names",
"for",
"customers",
"from",
"Brazil",
"who",
"have",
"also",
"had",
"an",
"invoice",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "customerid"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 1,
"type": "table",
"value": "customer"
},
{
"id": 2,
"type": "table",
"value": "invoice"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 4,
"type": "column",
"value": "Brazil"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,202
|
retail_world
|
bird:train.json:6549
|
What were the products supplied by the company in Spain?
|
SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Spain'
|
[
"What",
"were",
"the",
"products",
"supplied",
"by",
"the",
"company",
"in",
"Spain",
"?"
] |
[
{
"id": 0,
"type": "column",
"value": "productname"
},
{
"id": 5,
"type": "column",
"value": "supplierid"
},
{
"id": 2,
"type": "table",
"value": "suppliers"
},
{
"id": 1,
"type": "table",
"value": "products"
},
{
"id": 3,
"type": "column",
"value": "country"
},
{
"id": 4,
"type": "value",
"value": "Spain"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,203
|
human_resources
|
bird:train.json:8977
|
Which city and address has zip code of above 90000?
|
SELECT locationcity, address FROM location WHERE zipcode > 90000
|
[
"Which",
"city",
"and",
"address",
"has",
"zip",
"code",
"of",
"above",
"90000",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "locationcity"
},
{
"id": 0,
"type": "table",
"value": "location"
},
{
"id": 2,
"type": "column",
"value": "address"
},
{
"id": 3,
"type": "column",
"value": "zipcode"
},
{
"id": 4,
"type": "value",
"value": "90000"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
5,
6
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
1,204
|
shakespeare
|
bird:train.json:3013
|
How many number of paragraphs are there in chapter ID 18881?
|
SELECT COUNT(ParagraphNum) FROM paragraphs WHERE chapter_id = 18881
|
[
"How",
"many",
"number",
"of",
"paragraphs",
"are",
"there",
"in",
"chapter",
"ID",
"18881",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "paragraphnum"
},
{
"id": 0,
"type": "table",
"value": "paragraphs"
},
{
"id": 1,
"type": "column",
"value": "chapter_id"
},
{
"id": 2,
"type": "value",
"value": "18881"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
8,
9
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
1,205
|
european_football_2
|
bird:dev.json:1079
|
Which player is the tallest?
|
SELECT player_name FROM Player ORDER BY height DESC LIMIT 1
|
[
"Which",
"player",
"is",
"the",
"tallest",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "player_name"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 2,
"type": "column",
"value": "height"
}
] |
[
{
"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-TABLE",
"O",
"O",
"O",
"O"
] |
1,206
|
musical
|
spider:train_spider.json:268
|
List the name of musicals that do not have actors.
|
SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)
|
[
"List",
"the",
"name",
"of",
"musicals",
"that",
"do",
"not",
"have",
"actors",
"."
] |
[
{
"id": 2,
"type": "column",
"value": "musical_id"
},
{
"id": 0,
"type": "table",
"value": "musical"
},
{
"id": 3,
"type": "table",
"value": "actor"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,207
|
csu_1
|
spider:train_spider.json:2372
|
How many faculty is there in total in the year of 2002?
|
SELECT sum(faculty) FROM faculty WHERE YEAR = 2002
|
[
"How",
"many",
"faculty",
"is",
"there",
"in",
"total",
"in",
"the",
"year",
"of",
"2002",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "faculty"
},
{
"id": 3,
"type": "column",
"value": "faculty"
},
{
"id": 1,
"type": "column",
"value": "year"
},
{
"id": 2,
"type": "value",
"value": "2002"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
1,208
|
works_cycles
|
bird:train.json:7103
|
Calculate the average of the total ordered quantity of products purchased whose shipping method was Cargo Transport 5.
|
SELECT CAST(SUM(IIF(T1.ShipMethodID = 5, T3.OrderQty, 0)) AS REAL) / COUNT(T3.ProductID) FROM ShipMethod AS T1 INNER JOIN PurchaseOrderHeader AS T2 ON T1.ShipMethodID = T2.ShipMethodID INNER JOIN PurchaseOrderDetail AS T3 ON T2.PurchaseOrderID = T3.PurchaseOrderID
|
[
"Calculate",
"the",
"average",
"of",
"the",
"total",
"ordered",
"quantity",
"of",
"products",
"purchased",
"whose",
"shipping",
"method",
"was",
"Cargo",
"Transport",
"5",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "purchaseorderdetail"
},
{
"id": 2,
"type": "table",
"value": "purchaseorderheader"
},
{
"id": 3,
"type": "column",
"value": "purchaseorderid"
},
{
"id": 5,
"type": "column",
"value": "shipmethodid"
},
{
"id": 1,
"type": "table",
"value": "shipmethod"
},
{
"id": 4,
"type": "column",
"value": "productid"
},
{
"id": 6,
"type": "column",
"value": "orderqty"
},
{
"id": 7,
"type": "value",
"value": "0"
},
{
"id": 8,
"type": "value",
"value": "5"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12,
13
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
6
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
17
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-TABLE",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,209
|
car_road_race
|
bird:test.json:1325
|
Return the maximum and minimum age across drivers.
|
SELECT max(Age) , min(Age) FROM driver
|
[
"Return",
"the",
"maximum",
"and",
"minimum",
"age",
"across",
"drivers",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "driver"
},
{
"id": 1,
"type": "column",
"value": "age"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
1,210
|
human_resources
|
bird:train.json:8948
|
What is the average salary of the employees who work as a Trainee?
|
SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) AS avg FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'
|
[
"What",
"is",
"the",
"average",
"salary",
"of",
"the",
"employees",
"who",
"work",
"as",
"a",
"Trainee",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "positiontitle"
},
{
"id": 4,
"type": "column",
"value": "positionid"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "table",
"value": "position"
},
{
"id": 3,
"type": "value",
"value": "Trainee"
},
{
"id": 6,
"type": "column",
"value": "salary"
},
{
"id": 5,
"type": "value",
"value": ","
},
{
"id": 7,
"type": "value",
"value": "4"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"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": [
4
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,211
|
local_govt_in_alabama
|
spider:train_spider.json:2151
|
How many events did not have any participants?
|
SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)
|
[
"How",
"many",
"events",
"did",
"not",
"have",
"any",
"participants",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "participants_in_events"
},
{
"id": 1,
"type": "column",
"value": "event_id"
},
{
"id": 0,
"type": "table",
"value": "events"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,212
|
european_football_2
|
bird:dev.json:1108
|
What was the build up play speed class for "Willem II" on 2011/2/22?
|
SELECT t2.buildUpPlaySpeedClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Willem II' AND SUBSTR(t2.`date`, 1, 10) = '2011-02-22'
|
[
"What",
"was",
"the",
"build",
"up",
"play",
"speed",
"class",
"for",
"\"",
"Willem",
"II",
"\"",
"on",
"2011/2/22",
"?"
] |
[
{
"id": 0,
"type": "column",
"value": "buildupplayspeedclass"
},
{
"id": 2,
"type": "table",
"value": "team_attributes"
},
{
"id": 4,
"type": "column",
"value": "team_long_name"
},
{
"id": 3,
"type": "column",
"value": "team_api_id"
},
{
"id": 6,
"type": "value",
"value": "2011-02-22"
},
{
"id": 5,
"type": "value",
"value": "Willem II"
},
{
"id": 1,
"type": "table",
"value": "team"
},
{
"id": 7,
"type": "column",
"value": "date"
},
{
"id": 9,
"type": "value",
"value": "10"
},
{
"id": 8,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3,
4,
5,
6,
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
10,
11
]
},
{
"entity_id": 6,
"token_idxs": [
14
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
1,213
|
address_1
|
bird:test.json:830
|
Give the city name of the city with greatest distance from Boston.
|
SELECT T3.city_name 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" ORDER BY distance DESC LIMIT 1
|
[
"Give",
"the",
"city",
"name",
"of",
"the",
"city",
"with",
"greatest",
"distance",
"from",
"Boston",
"."
] |
[
{
"id": 4,
"type": "table",
"value": "direct_distance"
},
{
"id": 5,
"type": "column",
"value": "city2_code"
},
{
"id": 7,
"type": "column",
"value": "city1_code"
},
{
"id": 0,
"type": "column",
"value": "city_name"
},
{
"id": 6,
"type": "column",
"value": "city_code"
},
{
"id": 3,
"type": "column",
"value": "distance"
},
{
"id": 2,
"type": "column",
"value": "Boston"
},
{
"id": 1,
"type": "table",
"value": "city"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
1,214
|
e_learning
|
spider:train_spider.json:3825
|
Return the descriptions and names of the courses that have more than two students enrolled in.
|
SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2
|
[
"Return",
"the",
"descriptions",
"and",
"names",
"of",
"the",
"courses",
"that",
"have",
"more",
"than",
"two",
"students",
"enrolled",
"in",
"."
] |
[
{
"id": 3,
"type": "table",
"value": "student_course_enrolment"
},
{
"id": 1,
"type": "column",
"value": "course_description"
},
{
"id": 0,
"type": "column",
"value": "course_name"
},
{
"id": 5,
"type": "column",
"value": "course_id"
},
{
"id": 2,
"type": "table",
"value": "courses"
},
{
"id": 4,
"type": "value",
"value": "2"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
13,
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O"
] |
1,215
|
party_people
|
spider:train_spider.json:2075
|
What are the names of parties with at least 2 events?
|
SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING count(*) >= 2
|
[
"What",
"are",
"the",
"names",
"of",
"parties",
"with",
"at",
"least",
"2",
"events",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "party_events"
},
{
"id": 1,
"type": "column",
"value": "party_name"
},
{
"id": 0,
"type": "column",
"value": "party_id"
},
{
"id": 3,
"type": "table",
"value": "party"
},
{
"id": 4,
"type": "value",
"value": "2"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1,
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
1,216
|
authors
|
bird:train.json:3639
|
How many authors are affiliated with NASA Langley Research Center?
|
SELECT COUNT(Name) FROM Author WHERE Affiliation = 'NASA Langley Research Center'
|
[
"How",
"many",
"authors",
"are",
"affiliated",
"with",
"NASA",
"Langley",
"Research",
"Center",
"?"
] |
[
{
"id": 2,
"type": "value",
"value": "NASA Langley Research Center"
},
{
"id": 1,
"type": "column",
"value": "affiliation"
},
{
"id": 0,
"type": "table",
"value": "author"
},
{
"id": 3,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7,
8,
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
1,217
|
movies_4
|
bird:train.json:428
|
How many female characters are there in the movie "Spider-Man 3"?
|
SELECT COUNT(*) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T2.gender_id = T3.gender_id WHERE T1.title = 'Spider-Man 3' AND T3.gender = 'Female'
|
[
"How",
"many",
"female",
"characters",
"are",
"there",
"in",
"the",
"movie",
"\"",
"Spider",
"-",
"Man",
"3",
"\"",
"?"
] |
[
{
"id": 5,
"type": "value",
"value": "Spider-Man 3"
},
{
"id": 2,
"type": "table",
"value": "movie_cast"
},
{
"id": 3,
"type": "column",
"value": "gender_id"
},
{
"id": 8,
"type": "column",
"value": "movie_id"
},
{
"id": 0,
"type": "table",
"value": "gender"
},
{
"id": 6,
"type": "column",
"value": "gender"
},
{
"id": 7,
"type": "value",
"value": "Female"
},
{
"id": 1,
"type": "table",
"value": "movie"
},
{
"id": 4,
"type": "column",
"value": "title"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
10,
11,
12,
13
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
2
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"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",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
1,218
|
icfp_1
|
spider:train_spider.json:2892
|
Which papers have "Stephanie Weirich" as an author?
|
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Stephanie" AND t1.lname = "Weirich"
|
[
"Which",
"papers",
"have",
"\"",
"Stephanie",
"Weirich",
"\"",
"as",
"an",
"author",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "authorship"
},
{
"id": 6,
"type": "column",
"value": "Stephanie"
},
{
"id": 2,
"type": "table",
"value": "authors"
},
{
"id": 4,
"type": "column",
"value": "paperid"
},
{
"id": 8,
"type": "column",
"value": "Weirich"
},
{
"id": 1,
"type": "table",
"value": "papers"
},
{
"id": 9,
"type": "column",
"value": "authid"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 5,
"type": "column",
"value": "fname"
},
{
"id": 7,
"type": "column",
"value": "lname"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
4
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
5
]
},
{
"entity_id": 9,
"token_idxs": [
9
]
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
1,219
|
toxicology
|
bird:dev.json:259
|
How many elements are there for single bond molecules?
|
SELECT COUNT(DISTINCT T.element) FROM ( SELECT DISTINCT T2.molecule_id, T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '-' ) AS T
|
[
"How",
"many",
"elements",
"are",
"there",
"for",
"single",
"bond",
"molecules",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "molecule_id"
},
{
"id": 3,
"type": "column",
"value": "bond_type"
},
{
"id": 6,
"type": "table",
"value": "molecule"
},
{
"id": 0,
"type": "column",
"value": "element"
},
{
"id": 2,
"type": "table",
"value": "bond"
},
{
"id": 5,
"type": "table",
"value": "atom"
},
{
"id": 4,
"type": "value",
"value": "-"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"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": [
8
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O"
] |
1,220
|
csu_1
|
spider:train_spider.json:2338
|
What is the campus fee of "San Francisco State University" in year 1996?
|
SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND T2.year = 1996
|
[
"What",
"is",
"the",
"campus",
"fee",
"of",
"\"",
"San",
"Francisco",
"State",
"University",
"\"",
"in",
"year",
"1996",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "San Francisco State University"
},
{
"id": 0,
"type": "column",
"value": "campusfee"
},
{
"id": 1,
"type": "table",
"value": "campuses"
},
{
"id": 2,
"type": "table",
"value": "csu_fees"
},
{
"id": 4,
"type": "column",
"value": "campus"
},
{
"id": 6,
"type": "column",
"value": "year"
},
{
"id": 7,
"type": "value",
"value": "1996"
},
{
"id": 3,
"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": [
3
]
},
{
"entity_id": 5,
"token_idxs": [
7,
8,
9,
10
]
},
{
"entity_id": 6,
"token_idxs": [
13
]
},
{
"entity_id": 7,
"token_idxs": [
14
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
1,221
|
music_1
|
spider:train_spider.json:3581
|
What are the ids of songs that are available in either mp4 format or have resolution above 720?
|
SELECT f_id FROM files WHERE formats = "mp4" UNION SELECT f_id FROM song WHERE resolution > 720
|
[
"What",
"are",
"the",
"ids",
"of",
"songs",
"that",
"are",
"available",
"in",
"either",
"mp4",
"format",
"or",
"have",
"resolution",
"above",
"720",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "resolution"
},
{
"id": 3,
"type": "column",
"value": "formats"
},
{
"id": 0,
"type": "table",
"value": "files"
},
{
"id": 1,
"type": "table",
"value": "song"
},
{
"id": 2,
"type": "column",
"value": "f_id"
},
{
"id": 4,
"type": "column",
"value": "mp4"
},
{
"id": 6,
"type": "value",
"value": "720"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
"token_idxs": [
15
]
},
{
"entity_id": 6,
"token_idxs": [
17
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
1,222
|
hospital_1
|
spider:train_spider.json:3956
|
List the names of all distinct medications, ordered in an alphabetical order.
|
SELECT DISTINCT name FROM medication ORDER BY name
|
[
"List",
"the",
"names",
"of",
"all",
"distinct",
"medications",
",",
"ordered",
"in",
"an",
"alphabetical",
"order",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "medication"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,223
|
codebase_community
|
bird:dev.json:677
|
How many posts did Jay Stevens have in 2010?
|
SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T2.CreaionDate) = '2010' AND T1.DisplayName = 'Jay Stevens'
|
[
"How",
"many",
"posts",
"did",
"Jay",
"Stevens",
"have",
"in",
"2010",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "owneruserid"
},
{
"id": 5,
"type": "column",
"value": "displayname"
},
{
"id": 6,
"type": "value",
"value": "Jay Stevens"
},
{
"id": 8,
"type": "column",
"value": "creaiondate"
},
{
"id": 0,
"type": "table",
"value": "users"
},
{
"id": 1,
"type": "table",
"value": "posts"
},
{
"id": 4,
"type": "value",
"value": "2010"
},
{
"id": 2,
"type": "column",
"value": "id"
},
{
"id": 7,
"type": "value",
"value": "%Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
4,
5
]
},
{
"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",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
1,224
|
card_games
|
bird:dev.json:510
|
Among the cards that doesn't have multiple faces on the same card, who is the illustrator of the card art that has the highest cost of converted mana?
|
SELECT artist FROM cards WHERE side IS NULL ORDER BY convertedManaCost DESC LIMIT 1
|
[
"Among",
"the",
"cards",
"that",
"does",
"n't",
"have",
"multiple",
"faces",
"on",
"the",
"same",
"card",
",",
"who",
"is",
"the",
"illustrator",
"of",
"the",
"card",
"art",
"that",
"has",
"the",
"highest",
"cost",
"of",
"converted",
"mana",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "convertedmanacost"
},
{
"id": 1,
"type": "column",
"value": "artist"
},
{
"id": 0,
"type": "table",
"value": "cards"
},
{
"id": 2,
"type": "column",
"value": "side"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
21
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
28,
29
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,225
|
card_games
|
bird:dev.json:358
|
What is the border color of card "Ancestor's Chosen"?
|
SELECT DISTINCT borderColor FROM cards WHERE name = 'Ancestor''s Chosen'
|
[
"What",
"is",
"the",
"border",
"color",
"of",
"card",
"\"",
"Ancestor",
"'s",
"Chosen",
"\"",
"?"
] |
[
{
"id": 3,
"type": "value",
"value": "Ancestor's Chosen"
},
{
"id": 1,
"type": "column",
"value": "bordercolor"
},
{
"id": 0,
"type": "table",
"value": "cards"
},
{
"id": 2,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
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",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
1,226
|
superstore
|
bird:train.json:2359
|
How many art products were ordered in 2013 in the east superstore?
|
SELECT COUNT(DISTINCT T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Sub-Category` = 'Art' AND T1.Region = 'East' AND STRFTIME('%Y', T1.`Order Date`) = '2013'
|
[
"How",
"many",
"art",
"products",
"were",
"ordered",
"in",
"2013",
"in",
"the",
"east",
"superstore",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "east_superstore"
},
{
"id": 3,
"type": "column",
"value": "Sub-Category"
},
{
"id": 2,
"type": "column",
"value": "Product ID"
},
{
"id": 9,
"type": "column",
"value": "Order Date"
},
{
"id": 1,
"type": "table",
"value": "product"
},
{
"id": 5,
"type": "column",
"value": "region"
},
{
"id": 6,
"type": "value",
"value": "East"
},
{
"id": 7,
"type": "value",
"value": "2013"
},
{
"id": 4,
"type": "value",
"value": "Art"
},
{
"id": 8,
"type": "value",
"value": "%Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
10
]
},
{
"entity_id": 7,
"token_idxs": [
7
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"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-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
1,227
|
codebase_comments
|
bird:train.json:673
|
What is the comment format of method number 50 with the solution path "managedfusion_managedfusion\ManagedFusion.sln"?
|
SELECT CASE WHEN T2.CommentIsXml = 0 THEN 'isNotXMLFormat' WHEN T2.CommentIsXml = 1 THEN 'isXMLFormat' END format FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Id = 50 AND T1.Path = 'managedfusion_managedfusionManagedFusion.sln'
|
[
"What",
"is",
"the",
"comment",
"format",
"of",
"method",
"number",
"50",
"with",
"the",
"solution",
"path",
"\"",
"managedfusion_managedfusion\\ManagedFusion.sln",
"\"",
"?"
] |
[
{
"id": 6,
"type": "value",
"value": "managedfusion_managedfusionManagedFusion.sln"
},
{
"id": 7,
"type": "value",
"value": "isNotXMLFormat"
},
{
"id": 9,
"type": "column",
"value": "commentisxml"
},
{
"id": 8,
"type": "value",
"value": "isXMLFormat"
},
{
"id": 3,
"type": "column",
"value": "solutionid"
},
{
"id": 0,
"type": "table",
"value": "solution"
},
{
"id": 1,
"type": "table",
"value": "method"
},
{
"id": 5,
"type": "column",
"value": "path"
},
{
"id": 2,
"type": "column",
"value": "id"
},
{
"id": 4,
"type": "value",
"value": "50"
},
{
"id": 10,
"type": "value",
"value": "0"
},
{
"id": 11,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"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": [
12
]
},
{
"entity_id": 6,
"token_idxs": [
14
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
4
]
},
{
"entity_id": 9,
"token_idxs": [
3
]
},
{
"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",
"B-COLUMN",
"B-VALUE",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
1,228
|
toxicology
|
bird:dev.json:279
|
What is the label for bond ID TR001_10_11?
|
SELECT T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_id = 'TR001_10_11'
|
[
"What",
"is",
"the",
"label",
"for",
"bond",
"ID",
"TR001_10_11",
"?"
] |
[
{
"id": 4,
"type": "value",
"value": "TR001_10_11"
},
{
"id": 5,
"type": "column",
"value": "molecule_id"
},
{
"id": 2,
"type": "table",
"value": "molecule"
},
{
"id": 3,
"type": "column",
"value": "bond_id"
},
{
"id": 0,
"type": "column",
"value": "label"
},
{
"id": 1,
"type": "table",
"value": "bond"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"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",
"B-COLUMN",
"B-VALUE",
"O"
] |
1,229
|
driving_school
|
spider:train_spider.json:6703
|
How many lessons were taught by a staff member whose first name has the letter 'a' in it?
|
SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
|
[
"How",
"many",
"lessons",
"were",
"taught",
"by",
"a",
"staff",
"member",
"whose",
"first",
"name",
"has",
"the",
"letter",
"'",
"a",
"'",
"in",
"it",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "first_name"
},
{
"id": 4,
"type": "column",
"value": "staff_id"
},
{
"id": 0,
"type": "table",
"value": "lessons"
},
{
"id": 1,
"type": "table",
"value": "staff"
},
{
"id": 3,
"type": "column",
"value": "%a%"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
10,
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",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,230
|
company_office
|
spider:train_spider.json:4569
|
Please show each industry and the corresponding number of companies in that industry.
|
SELECT Industry , COUNT(*) FROM Companies GROUP BY Industry
|
[
"Please",
"show",
"each",
"industry",
"and",
"the",
"corresponding",
"number",
"of",
"companies",
"in",
"that",
"industry",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "companies"
},
{
"id": 1,
"type": "column",
"value": "industry"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
1,231
|
financial
|
bird:dev.json:138
|
In the branch where the second-highest number of crimes were committed in 1995 occurred, how many male clients are there?
|
SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A15 = (SELECT T3.A15 FROM district AS T3 ORDER BY T3.A15 DESC LIMIT 1, 1)
|
[
"In",
"the",
"branch",
"where",
"the",
"second",
"-",
"highest",
"number",
"of",
"crimes",
"were",
"committed",
"in",
"1995",
"occurred",
",",
"how",
"many",
"male",
"clients",
"are",
"there",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "district_id"
},
{
"id": 2,
"type": "column",
"value": "client_id"
},
{
"id": 1,
"type": "table",
"value": "district"
},
{
"id": 0,
"type": "table",
"value": "client"
},
{
"id": 4,
"type": "column",
"value": "gender"
},
{
"id": 6,
"type": "column",
"value": "a15"
},
{
"id": 5,
"type": "value",
"value": "M"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
20
]
},
{
"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",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
1,233
|
professional_basketball
|
bird:train.json:2820
|
In which league did the player who weighs 40% less than the heaviest player and whose height is 80 inches play?
|
SELECT T2.lgID FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID GROUP BY T2.lgID, T1.weight HAVING T1.weight = MAX(T1.weight) - MAX(T1.weight) * 0.4
|
[
"In",
"which",
"league",
"did",
"the",
"player",
"who",
"weighs",
"40",
"%",
"less",
"than",
"the",
"heaviest",
"player",
"and",
"whose",
"height",
"is",
"80",
"inches",
"play",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "players_teams"
},
{
"id": 4,
"type": "column",
"value": "playerid"
},
{
"id": 2,
"type": "table",
"value": "players"
},
{
"id": 1,
"type": "column",
"value": "weight"
},
{
"id": 0,
"type": "column",
"value": "lgid"
},
{
"id": 5,
"type": "value",
"value": "0.4"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,234
|
sales_in_weather
|
bird:train.json:8156
|
What is the percentage of the units of item no.5 sold among all units of items sold in store no.3 on the day with the highest max temperature in 2012?
|
SELECT CAST(SUM(CASE WHEN T1.item_nbr = 5 THEN units * 1 ELSE 0 END) AS REAL) * 100 / SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' AND T3.tmax = ( SELECT MAX(T3.tmax) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' )
|
[
"What",
"is",
"the",
"percentage",
"of",
"the",
"units",
"of",
"item",
"no.5",
"sold",
"among",
"all",
"units",
"of",
"items",
"sold",
"in",
"store",
"no.3",
"on",
"the",
"day",
"with",
"the",
"highest",
"max",
"temperature",
"in",
"2012",
"?"
] |
[
{
"id": 1,
"type": "table",
"value": "sales_in_weather"
},
{
"id": 3,
"type": "column",
"value": "station_nbr"
},
{
"id": 4,
"type": "column",
"value": "store_nbr"
},
{
"id": 2,
"type": "table",
"value": "relation"
},
{
"id": 12,
"type": "column",
"value": "item_nbr"
},
{
"id": 0,
"type": "table",
"value": "weather"
},
{
"id": 7,
"type": "value",
"value": "%2012%"
},
{
"id": 10,
"type": "column",
"value": "units"
},
{
"id": 6,
"type": "column",
"value": "date"
},
{
"id": 8,
"type": "column",
"value": "tmax"
},
{
"id": 9,
"type": "value",
"value": "100"
},
{
"id": 5,
"type": "value",
"value": "3"
},
{
"id": 11,
"type": "value",
"value": "0"
},
{
"id": 13,
"type": "value",
"value": "5"
},
{
"id": 14,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
18
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
29
]
},
{
"entity_id": 8,
"token_idxs": [
26
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": [
13
]
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": [
8
]
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"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",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
1,236
|
european_football_1
|
bird:train.json:2791
|
Please list the home teams in the matches of the Bundesliga division that ended with a home victory in the 2021 season.
|
SELECT DISTINCT T1.HomeTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2021 AND T1.FTR = 'H' AND T2.name = 'Bundesliga'
|
[
"Please",
"list",
"the",
"home",
"teams",
"in",
"the",
"matches",
"of",
"the",
"Bundesliga",
"division",
"that",
"ended",
"with",
"a",
"home",
"victory",
"in",
"the",
"2021",
"season",
"."
] |
[
{
"id": 10,
"type": "value",
"value": "Bundesliga"
},
{
"id": 2,
"type": "table",
"value": "divisions"
},
{
"id": 0,
"type": "column",
"value": "hometeam"
},
{
"id": 4,
"type": "column",
"value": "division"
},
{
"id": 1,
"type": "table",
"value": "matchs"
},
{
"id": 5,
"type": "column",
"value": "season"
},
{
"id": 6,
"type": "value",
"value": "2021"
},
{
"id": 9,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "column",
"value": "div"
},
{
"id": 7,
"type": "column",
"value": "ftr"
},
{
"id": 8,
"type": "value",
"value": "H"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
"token_idxs": [
21
]
},
{
"entity_id": 6,
"token_idxs": [
20
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": [
15,
16
]
},
{
"entity_id": 10,
"token_idxs": [
10
]
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
1,237
|
works_cycles
|
bird:train.json:7458
|
What is the organization level for Human Resources Manager?
|
SELECT OrganizationLevel FROM Employee WHERE JobTitle = 'Human Resources Manager'
|
[
"What",
"is",
"the",
"organization",
"level",
"for",
"Human",
"Resources",
"Manager",
"?"
] |
[
{
"id": 3,
"type": "value",
"value": "Human Resources Manager"
},
{
"id": 1,
"type": "column",
"value": "organizationlevel"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 2,
"type": "column",
"value": "jobtitle"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
1,238
|
software_company
|
bird:train.json:8510
|
How many customers have never married?
|
SELECT COUNT(ID) FROM Customers WHERE MARITAL_STATUS = 'Never-married'
|
[
"How",
"many",
"customers",
"have",
"never",
"married",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "marital_status"
},
{
"id": 2,
"type": "value",
"value": "Never-married"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 3,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
1,239
|
advertising_agencies
|
bird:test.json:2096
|
Return the invoice status that has the most invoices.
|
SELECT invoice_status FROM Invoices GROUP BY invoice_status ORDER BY count(*) DESC LIMIT 1
|
[
"Return",
"the",
"invoice",
"status",
"that",
"has",
"the",
"most",
"invoices",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "invoice_status"
},
{
"id": 0,
"type": "table",
"value": "invoices"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,240
|
department_store
|
spider:train_spider.json:4752
|
What are the names and ids of products costing between 600 and 700?
|
SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700
|
[
"What",
"are",
"the",
"names",
"and",
"ids",
"of",
"products",
"costing",
"between",
"600",
"and",
"700",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "product_price"
},
{
"id": 1,
"type": "column",
"value": "product_name"
},
{
"id": 2,
"type": "column",
"value": "product_id"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 4,
"type": "value",
"value": "600"
},
{
"id": 5,
"type": "value",
"value": "700"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs": [
12
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
1,241
|
law_episode
|
bird:train.json:1326
|
Among the American casts, how many were uncredited on episode ID tt0629228?
|
SELECT COUNT(T1.person_id) FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.episode_id = 'tt0629228' AND T1.category = 'Cast' AND T1.credited = 'false' AND T2.birth_country = 'USA'
|
[
"Among",
"the",
"American",
"casts",
",",
"how",
"many",
"were",
"uncredited",
"on",
"episode",
"ID",
"tt0629228",
"?"
] |
[
{
"id": 9,
"type": "column",
"value": "birth_country"
},
{
"id": 3,
"type": "column",
"value": "episode_id"
},
{
"id": 2,
"type": "column",
"value": "person_id"
},
{
"id": 4,
"type": "value",
"value": "tt0629228"
},
{
"id": 5,
"type": "column",
"value": "category"
},
{
"id": 7,
"type": "column",
"value": "credited"
},
{
"id": 0,
"type": "table",
"value": "credit"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 8,
"type": "value",
"value": "false"
},
{
"id": 6,
"type": "value",
"value": "Cast"
},
{
"id": 10,
"type": "value",
"value": "USA"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
3
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
1,242
|
storm_record
|
spider:train_spider.json:2719
|
What are the names of storms that did not affect any regions?
|
SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)
|
[
"What",
"are",
"the",
"names",
"of",
"storms",
"that",
"did",
"not",
"affect",
"any",
"regions",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "affected_region"
},
{
"id": 2,
"type": "column",
"value": "storm_id"
},
{
"id": 0,
"type": "table",
"value": "storm"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"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",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O"
] |
1,243
|
aircraft
|
spider:train_spider.json:4797
|
How many aircrafts are there?
|
SELECT count(*) FROM aircraft
|
[
"How",
"many",
"aircrafts",
"are",
"there",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "aircraft"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
1,244
|
sales_in_weather
|
bird:train.json:8153
|
What is the ID of the item that sold the best on the day with the highest max temperature in store no.3 in 2012?
|
SELECT T1.item_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' AND tmax = ( SELECT MAX(tmax) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' ) GROUP BY T1.item_nbr ORDER BY SUM(units) DESC LIMIT 1
|
[
"What",
"is",
"the",
"ID",
"of",
"the",
"item",
"that",
"sold",
"the",
"best",
"on",
"the",
"day",
"with",
"the",
"highest",
"max",
"temperature",
"in",
"store",
"no.3",
"in",
"2012",
"?"
] |
[
{
"id": 2,
"type": "table",
"value": "sales_in_weather"
},
{
"id": 4,
"type": "column",
"value": "station_nbr"
},
{
"id": 5,
"type": "column",
"value": "store_nbr"
},
{
"id": 0,
"type": "column",
"value": "item_nbr"
},
{
"id": 3,
"type": "table",
"value": "relation"
},
{
"id": 1,
"type": "table",
"value": "weather"
},
{
"id": 8,
"type": "value",
"value": "%2012%"
},
{
"id": 10,
"type": "column",
"value": "units"
},
{
"id": 7,
"type": "column",
"value": "date"
},
{
"id": 9,
"type": "column",
"value": "tmax"
},
{
"id": 6,
"type": "value",
"value": "3"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
20
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
23
]
},
{
"entity_id": 9,
"token_idxs": [
17
]
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
1,245
|
cs_semester
|
bird:train.json:915
|
Describe the students' full names and grades in Intro to BlockChain course.
|
SELECT T1.f_name, T1.l_name, T2.grade 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 T3.name = 'Intro to BlockChain'
|
[
"Describe",
"the",
"students",
"'",
"full",
"names",
"and",
"grades",
"in",
"Intro",
"to",
"BlockChain",
"course",
"."
] |
[
{
"id": 5,
"type": "value",
"value": "Intro to BlockChain"
},
{
"id": 7,
"type": "table",
"value": "registration"
},
{
"id": 9,
"type": "column",
"value": "student_id"
},
{
"id": 8,
"type": "column",
"value": "course_id"
},
{
"id": 6,
"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": "grade"
},
{
"id": 4,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
"token_idxs": [
9,
10,
11
]
},
{
"entity_id": 6,
"token_idxs": [
2
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
1,246
|
student_club
|
bird:dev.json:1444
|
List the expenses that spend more than fifty dollars on average.
|
SELECT expense_description FROM expense GROUP BY expense_description HAVING AVG(cost) > 50
|
[
"List",
"the",
"expenses",
"that",
"spend",
"more",
"than",
"fifty",
"dollars",
"on",
"average",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "expense_description"
},
{
"id": 0,
"type": "table",
"value": "expense"
},
{
"id": 3,
"type": "column",
"value": "cost"
},
{
"id": 2,
"type": "value",
"value": "50"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,247
|
mondial_geo
|
bird:train.json:8455
|
Which constitutional monarchy nations saw the greatest growth in the number of organizations after 1907?
|
SELECT T1.Name FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country INNER JOIN politics AS T3 ON T3.Country = T2.Country WHERE STRFTIME('%Y', T2.Established) > '1907' AND T3.Government = 'constitutional monarchy' GROUP BY T1.Name ORDER BY COUNT(DISTINCT T2.Name) DESC LIMIT 1
|
[
"Which",
"constitutional",
"monarchy",
"nations",
"saw",
"the",
"greatest",
"growth",
"in",
"the",
"number",
"of",
"organizations",
"after",
"1907",
"?"
] |
[
{
"id": 7,
"type": "value",
"value": "constitutional monarchy"
},
{
"id": 3,
"type": "table",
"value": "organization"
},
{
"id": 10,
"type": "column",
"value": "established"
},
{
"id": 6,
"type": "column",
"value": "government"
},
{
"id": 1,
"type": "table",
"value": "politics"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 4,
"type": "column",
"value": "country"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "value",
"value": "1907"
},
{
"id": 8,
"type": "column",
"value": "code"
},
{
"id": 9,
"type": "value",
"value": "%Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"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": [
14
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
1,
2
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
1,248
|
car_retails
|
bird:train.json:1650
|
Calculate the actual profit for order number 10100.
|
SELECT SUM((t1.priceEach - t2.buyPrice) * t1.quantityOrdered) FROM orderdetails AS t1 INNER JOIN products AS t2 ON t1.productCode = t2.productCode WHERE t1.orderNumber = '10100'
|
[
"Calculate",
"the",
"actual",
"profit",
"for",
"order",
"number",
"10100",
"."
] |
[
{
"id": 5,
"type": "column",
"value": "quantityordered"
},
{
"id": 0,
"type": "table",
"value": "orderdetails"
},
{
"id": 2,
"type": "column",
"value": "ordernumber"
},
{
"id": 4,
"type": "column",
"value": "productcode"
},
{
"id": 6,
"type": "column",
"value": "priceeach"
},
{
"id": 1,
"type": "table",
"value": "products"
},
{
"id": 7,
"type": "column",
"value": "buyprice"
},
{
"id": 3,
"type": "value",
"value": "10100"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
1,249
|
race_track
|
spider:train_spider.json:788
|
What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?
|
SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000
|
[
"What",
"are",
"the",
"locations",
"that",
"have",
"both",
"tracks",
"with",
"more",
"than",
"90000",
"seats",
",",
"and",
"tracks",
"with",
"fewer",
"than",
"70000",
"seats",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "column",
"value": "seating"
},
{
"id": 0,
"type": "table",
"value": "track"
},
{
"id": 3,
"type": "value",
"value": "90000"
},
{
"id": 4,
"type": "value",
"value": "70000"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
20
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
19
]
},
{
"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",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
1,250
|
shipping
|
bird:train.json:5662
|
Calculate the percentage of the weight of goods being transported by Zachery Hicks to California in year 2016.
|
SELECT CAST(SUM(CASE WHEN T2.first_name = 'Zachery' AND T2.last_name = 'Hicks' THEN T1.weight ELSE 0 END) AS REAL) * 100 / SUM(T1.weight) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE STRFTIME('%Y', T1.ship_date) = '2016'
|
[
"Calculate",
"the",
"percentage",
"of",
"the",
"weight",
"of",
"goods",
"being",
"transported",
"by",
"Zachery",
"Hicks",
"to",
"California",
"in",
"year",
"2016",
"."
] |
[
{
"id": 9,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type": "column",
"value": "driver_id"
},
{
"id": 5,
"type": "column",
"value": "ship_date"
},
{
"id": 11,
"type": "column",
"value": "last_name"
},
{
"id": 0,
"type": "table",
"value": "shipment"
},
{
"id": 10,
"type": "value",
"value": "Zachery"
},
{
"id": 1,
"type": "table",
"value": "driver"
},
{
"id": 7,
"type": "column",
"value": "weight"
},
{
"id": 12,
"type": "value",
"value": "Hicks"
},
{
"id": 2,
"type": "value",
"value": "2016"
},
{
"id": 6,
"type": "value",
"value": "100"
},
{
"id": 4,
"type": "value",
"value": "%Y"
},
{
"id": 8,
"type": "value",
"value": "0"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
17
]
},
{
"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": [
5
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": [
11
]
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": [
12
]
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,251
|
beer_factory
|
bird:train.json:5248
|
Among all the root beers purchased by Frank-Paul Santangelo, how many of them were non-sweetened?
|
SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND T4.ArtificialSweetener = 'FALSE' AND T4.Honey = 'FALSE'
|
[
"Among",
"all",
"the",
"root",
"beers",
"purchased",
"by",
"Frank",
"-",
"Paul",
"Santangelo",
",",
"how",
"many",
"of",
"them",
"were",
"non",
"-",
"sweetened",
"?"
] |
[
{
"id": 8,
"type": "column",
"value": "artificialsweetener"
},
{
"id": 0,
"type": "table",
"value": "rootbeerbrand"
},
{
"id": 12,
"type": "table",
"value": "transaction"
},
{
"id": 1,
"type": "column",
"value": "customerid"
},
{
"id": 5,
"type": "value",
"value": "Frank-Paul"
},
{
"id": 7,
"type": "value",
"value": "Santangelo"
},
{
"id": 13,
"type": "column",
"value": "rootbeerid"
},
{
"id": 11,
"type": "table",
"value": "customers"
},
{
"id": 2,
"type": "table",
"value": "rootbeer"
},
{
"id": 3,
"type": "column",
"value": "brandid"
},
{
"id": 4,
"type": "column",
"value": "first"
},
{
"id": 9,
"type": "value",
"value": "FALSE"
},
{
"id": 10,
"type": "column",
"value": "honey"
},
{
"id": 6,
"type": "column",
"value": "last"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3,
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
7,
8,
9
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
10
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": [
12,
13
]
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"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",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-VALUE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,252
|
hockey
|
bird:train.json:7775
|
Please list the names of all the teams that have played against the Buffalo Sabres.
|
SELECT DISTINCT T3.name FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.oppID = T2.tmID INNER JOIN Teams AS T3 ON T1.year = T3.year AND T1.tmID = T3.tmID WHERE T2.name = 'Buffalo Sabres'
|
[
"Please",
"list",
"the",
"names",
"of",
"all",
"the",
"teams",
"that",
"have",
"played",
"against",
"the",
"Buffalo",
"Sabres",
"."
] |
[
{
"id": 2,
"type": "value",
"value": "Buffalo Sabres"
},
{
"id": 3,
"type": "table",
"value": "teamvsteam"
},
{
"id": 1,
"type": "table",
"value": "teams"
},
{
"id": 6,
"type": "column",
"value": "oppid"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "column",
"value": "year"
},
{
"id": 5,
"type": "column",
"value": "tmid"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
13,
14
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
1,253
|
retails
|
bird:train.json:6888
|
What is the quantity of the part "burnished seashell gainsboro navajo chocolate" ordered in order no.1?
|
SELECT T1.l_quantity FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T1.l_orderkey = 1 AND T2.p_name = 'burnished seashell gainsboro navajo chocolate'
|
[
"What",
"is",
"the",
"quantity",
"of",
"the",
"part",
"\"",
"burnished",
"seashell",
"gainsboro",
"navajo",
"chocolate",
"\"",
"ordered",
"in",
"order",
"no.1",
"?"
] |
[
{
"id": 8,
"type": "value",
"value": "burnished seashell gainsboro navajo chocolate"
},
{
"id": 0,
"type": "column",
"value": "l_quantity"
},
{
"id": 5,
"type": "column",
"value": "l_orderkey"
},
{
"id": 3,
"type": "column",
"value": "l_partkey"
},
{
"id": 4,
"type": "column",
"value": "p_partkey"
},
{
"id": 1,
"type": "table",
"value": "lineitem"
},
{
"id": 7,
"type": "column",
"value": "p_name"
},
{
"id": 2,
"type": "table",
"value": "part"
},
{
"id": 6,
"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": [
14
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
8,
9,
10,
11,
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",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
1,254
|
soccer_3
|
bird:test.json:36
|
What is the number of distinct countries of all players?
|
SELECT COUNT (DISTINCT Country) FROM player
|
[
"What",
"is",
"the",
"number",
"of",
"distinct",
"countries",
"of",
"all",
"players",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "country"
},
{
"id": 0,
"type": "table",
"value": "player"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
1,255
|
movies_4
|
bird:train.json:435
|
Calculate the average budget of the movies directed by Jaume Collet-Serra.
|
SELECT CAST(SUM(T1.budget) AS REAL) / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Jaume Collet-Serra' AND T2.job = 'Director'
|
[
"Calculate",
"the",
"average",
"budget",
"of",
"the",
"movies",
"directed",
"by",
"Jaume",
"Collet",
"-",
"Serra",
"."
] |
[
{
"id": 5,
"type": "value",
"value": "Jaume Collet-Serra"
},
{
"id": 4,
"type": "column",
"value": "person_name"
},
{
"id": 2,
"type": "table",
"value": "movie_crew"
},
{
"id": 3,
"type": "column",
"value": "person_id"
},
{
"id": 7,
"type": "value",
"value": "Director"
},
{
"id": 8,
"type": "column",
"value": "movie_id"
},
{
"id": 0,
"type": "table",
"value": "person"
},
{
"id": 9,
"type": "column",
"value": "budget"
},
{
"id": 1,
"type": "table",
"value": "movie"
},
{
"id": 6,
"type": "column",
"value": "job"
}
] |
[
{
"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": [
9,
10,
11,
12
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
7
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": [
3
]
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
1,256
|
formula_1
|
spider:train_spider.json:2191
|
What are the names of races that were held after 2017 and the circuits were in the country of Spain?
|
SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2017
|
[
"What",
"are",
"the",
"names",
"of",
"races",
"that",
"were",
"held",
"after",
"2017",
"and",
"the",
"circuits",
"were",
"in",
"the",
"country",
"of",
"Spain",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "circuitid"
},
{
"id": 2,
"type": "table",
"value": "circuits"
},
{
"id": 4,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "table",
"value": "races"
},
{
"id": 5,
"type": "column",
"value": "Spain"
},
{
"id": 0,
"type": "column",
"value": "name"
},
{
"id": 6,
"type": "column",
"value": "year"
},
{
"id": 7,
"type": "value",
"value": "2017"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
{
"entity_id": 5,
"token_idxs": [
19
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
10
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
1,257
|
menu
|
bird:train.json:5557
|
What is the average number of dishes per menu in the Souper de Luxe menus? Identify what is the name of the dish that appeared the most in all of its menus.
|
SELECT COUNT(*), T1.dish_id FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.name = 'Souper de Luxe' GROUP BY T3.id ORDER BY COUNT(T1.dish_id) DESC LIMIT 1
|
[
"What",
"is",
"the",
"average",
"number",
"of",
"dishes",
"per",
"menu",
"in",
"the",
"Souper",
"de",
"Luxe",
"menus",
"?",
"Identify",
"what",
"is",
"the",
"name",
"of",
"the",
"dish",
"that",
"appeared",
"the",
"most",
"in",
"all",
"of",
"its",
"menus",
"."
] |
[
{
"id": 4,
"type": "value",
"value": "Souper de Luxe"
},
{
"id": 9,
"type": "column",
"value": "menu_page_id"
},
{
"id": 6,
"type": "table",
"value": "menuitem"
},
{
"id": 7,
"type": "table",
"value": "menupage"
},
{
"id": 1,
"type": "column",
"value": "dish_id"
},
{
"id": 8,
"type": "column",
"value": "menu_id"
},
{
"id": 2,
"type": "table",
"value": "dish"
},
{
"id": 3,
"type": "column",
"value": "name"
},
{
"id": 5,
"type": "table",
"value": "menu"
},
{
"id": 0,
"type": "column",
"value": "id"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
23
]
},
{
"entity_id": 3,
"token_idxs": [
20
]
},
{
"entity_id": 4,
"token_idxs": [
11,
12,
13
]
},
{
"entity_id": 5,
"token_idxs": [
8
]
},
{
"entity_id": 6,
"token_idxs": [
9,
10
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"I-TABLE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,258
|
college_1
|
spider:train_spider.json:3280
|
What is the name of the department and office location for the professor with the last name of Heffington?
|
SELECT T3.dept_name , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington'
|
[
"What",
"is",
"the",
"name",
"of",
"the",
"department",
"and",
"office",
"location",
"for",
"the",
"professor",
"with",
"the",
"last",
"name",
"of",
"Heffington",
"?"
] |
[
{
"id": 1,
"type": "column",
"value": "prof_office"
},
{
"id": 2,
"type": "table",
"value": "department"
},
{
"id": 4,
"type": "value",
"value": "Heffington"
},
{
"id": 0,
"type": "column",
"value": "dept_name"
},
{
"id": 3,
"type": "column",
"value": "emp_lname"
},
{
"id": 6,
"type": "table",
"value": "professor"
},
{
"id": 7,
"type": "column",
"value": "dept_code"
},
{
"id": 5,
"type": "table",
"value": "employee"
},
{
"id": 8,
"type": "column",
"value": "emp_num"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
18
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
12
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
1,259
|
candidate_poll
|
spider:train_spider.json:2405
|
Return the poll source corresponding to the candidate who has the oppose rate.
|
SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1
|
[
"Return",
"the",
"poll",
"source",
"corresponding",
"to",
"the",
"candidate",
"who",
"has",
"the",
"oppose",
"rate",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "poll_source"
},
{
"id": 2,
"type": "column",
"value": "oppose_rate"
},
{
"id": 0,
"type": "table",
"value": "candidate"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
11,
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",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,260
|
customers_and_orders
|
bird:test.json:308
|
Count the number of different customers who have bought a Monitor Product.
|
SELECT count(DISTINCT T3.customer_id) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Customer_orders AS T3 ON T3.order_id = T1.order_id WHERE T2.product_name = "Monitor"
|
[
"Count",
"the",
"number",
"of",
"different",
"customers",
"who",
"have",
"bought",
"a",
"Monitor",
"Product",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "customer_orders"
},
{
"id": 1,
"type": "column",
"value": "product_name"
},
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 4,
"type": "table",
"value": "order_items"
},
{
"id": 7,
"type": "column",
"value": "product_id"
},
{
"id": 5,
"type": "table",
"value": "products"
},
{
"id": 6,
"type": "column",
"value": "order_id"
},
{
"id": 2,
"type": "column",
"value": "Monitor"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"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",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
1,261
|
app_store
|
bird:train.json:2562
|
What is the average price of games belonging in the arcade genre which has a content rating of Everyone 10+?
|
SELECT AVG(Price) FROM playstore WHERE 'Content Rating' = 'Everyone 10+' AND Genres = 'Arcade'
|
[
"What",
"is",
"the",
"average",
"price",
"of",
"games",
"belonging",
"in",
"the",
"arcade",
"genre",
"which",
"has",
"a",
"content",
"rating",
"of",
"Everyone",
"10",
"+",
"?"
] |
[
{
"id": 2,
"type": "value",
"value": "Content Rating"
},
{
"id": 3,
"type": "value",
"value": "Everyone 10+"
},
{
"id": 0,
"type": "table",
"value": "playstore"
},
{
"id": 4,
"type": "column",
"value": "genres"
},
{
"id": 5,
"type": "value",
"value": "Arcade"
},
{
"id": 1,
"type": "column",
"value": "price"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
15,
16
]
},
{
"entity_id": 3,
"token_idxs": [
18,
19,
20
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
"token_idxs": [
10
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
1,262
|
boat_1
|
bird:test.json:886
|
How many sailors exist?
|
SELECT COUNT(*) FROM Sailors
|
[
"How",
"many",
"sailors",
"exist",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "sailors"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"O"
] |
1,263
|
pilot_1
|
bird:test.json:1175
|
Find all different planes whose names contain substring 'Bomber'.
|
SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE '%Bomber%'
|
[
"Find",
"all",
"different",
"planes",
"whose",
"names",
"contain",
"substring",
"'",
"Bomber",
"'",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "pilotskills"
},
{
"id": 1,
"type": "column",
"value": "plane_name"
},
{
"id": 2,
"type": "value",
"value": "%Bomber%"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
1,264
|
donor
|
bird:train.json:3198
|
Of the projects whose resources are provided by the vendor Lakeshore Learning Materials, the school of which project has the highest cost of labor fulfillment? Please give its school ID.
|
SELECT T2.schoolid FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name = 'Lakeshore Learning Materials' ORDER BY T2.fulfillment_labor_materials DESC LIMIT 1
|
[
"Of",
"the",
"projects",
"whose",
"resources",
"are",
"provided",
"by",
"the",
"vendor",
"Lakeshore",
"Learning",
"Materials",
",",
"the",
"school",
"of",
"which",
"project",
"has",
"the",
"highest",
"cost",
"of",
"labor",
"fulfillment",
"?",
"Please",
"give",
"its",
"school",
"ID",
"."
] |
[
{
"id": 4,
"type": "value",
"value": "Lakeshore Learning Materials"
},
{
"id": 5,
"type": "column",
"value": "fulfillment_labor_materials"
},
{
"id": 3,
"type": "column",
"value": "vendor_name"
},
{
"id": 1,
"type": "table",
"value": "resources"
},
{
"id": 6,
"type": "column",
"value": "projectid"
},
{
"id": 0,
"type": "column",
"value": "schoolid"
},
{
"id": 2,
"type": "table",
"value": "projects"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
30,
31
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
10,
11,
12
]
},
{
"entity_id": 5,
"token_idxs": [
25,
26,
27
]
},
{
"entity_id": 6,
"token_idxs": [
18
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,265
|
cre_Doc_Tracking_DB
|
spider:train_spider.json:4216
|
Show the employee ids for all employees with role name "Human Resource" or "Manager".
|
SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager"
|
[
"Show",
"the",
"employee",
"ids",
"for",
"all",
"employees",
"with",
"role",
"name",
"\"",
"Human",
"Resource",
"\"",
"or",
"\"",
"Manager",
"\"",
"."
] |
[
{
"id": 5,
"type": "column",
"value": "Human Resource"
},
{
"id": 0,
"type": "column",
"value": "employee_id"
},
{
"id": 1,
"type": "table",
"value": "employees"
},
{
"id": 3,
"type": "column",
"value": "role_code"
},
{
"id": 4,
"type": "column",
"value": "role_name"
},
{
"id": 6,
"type": "column",
"value": "Manager"
},
{
"id": 2,
"type": "table",
"value": "roles"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": [
11,
12
]
},
{
"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",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
1,266
|
college_1
|
spider:train_spider.json:3211
|
Find the count and code of the job has most employees.
|
SELECT emp_jobcode , count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1
|
[
"Find",
"the",
"count",
"and",
"code",
"of",
"the",
"job",
"has",
"most",
"employees",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "emp_jobcode"
},
{
"id": 0,
"type": "table",
"value": "employee"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"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",
"B-TABLE",
"O"
] |
1,267
|
cookbook
|
bird:train.json:8909
|
Name the recipes which can lead to constipation.
|
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20
|
[
"Name",
"the",
"recipes",
"which",
"can",
"lead",
"to",
"constipation",
"."
] |
[
{
"id": 2,
"type": "table",
"value": "nutrition"
},
{
"id": 5,
"type": "column",
"value": "recipe_id"
},
{
"id": 1,
"type": "table",
"value": "recipe"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 3,
"type": "column",
"value": "iron"
},
{
"id": 4,
"type": "value",
"value": "20"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"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-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,268
|
retail_world
|
bird:train.json:6532
|
What is the average annual amount of shipped sales from 1997 to 1998?
|
SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) / 3 FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.ShippedDate BETWEEN '1996-01-01 00:00:00' AND '1998-12-31 23:59:59'
|
[
"What",
"is",
"the",
"average",
"annual",
"amount",
"of",
"shipped",
"sales",
"from",
"1997",
"to",
"1998",
"?"
] |
[
{
"id": 3,
"type": "value",
"value": "1996-01-01 00:00:00"
},
{
"id": 4,
"type": "value",
"value": "1998-12-31 23:59:59"
},
{
"id": 1,
"type": "table",
"value": "Order Details"
},
{
"id": 2,
"type": "column",
"value": "shippeddate"
},
{
"id": 7,
"type": "column",
"value": "unitprice"
},
{
"id": 8,
"type": "column",
"value": "quantity"
},
{
"id": 10,
"type": "column",
"value": "discount"
},
{
"id": 6,
"type": "column",
"value": "orderid"
},
{
"id": 0,
"type": "table",
"value": "orders"
},
{
"id": 5,
"type": "value",
"value": "3"
},
{
"id": 9,
"type": "value",
"value": "1"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,270
|
cre_Doc_and_collections
|
bird:test.json:679
|
How many documents owned by Marlin?
|
SELECT count(*) FROM Document_Objects WHERE OWNER = "Marlin";
|
[
"How",
"many",
"documents",
"owned",
"by",
"Marlin",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "document_objects"
},
{
"id": 2,
"type": "column",
"value": "Marlin"
},
{
"id": 1,
"type": "column",
"value": "owner"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
1,271
|
customers_and_addresses
|
spider:train_spider.json:6103
|
What is the channel code and contact number of the customer contact channel that was active for the longest time?
|
SELECT channel_code , contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)
|
[
"What",
"is",
"the",
"channel",
"code",
"and",
"contact",
"number",
"of",
"the",
"customer",
"contact",
"channel",
"that",
"was",
"active",
"for",
"the",
"longest",
"time",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "customer_contact_channels"
},
{
"id": 4,
"type": "column",
"value": "active_from_date"
},
{
"id": 2,
"type": "column",
"value": "contact_number"
},
{
"id": 3,
"type": "column",
"value": "active_to_date"
},
{
"id": 1,
"type": "column",
"value": "channel_code"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
10,
11,
12
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
15,
16,
17
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O"
] |
1,272
|
movies_4
|
bird:train.json:531
|
What are the top 5 most popular movie directors?
|
SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T2.job = 'Director' ORDER BY T1.popularity DESC LIMIT 5
|
[
"What",
"are",
"the",
"top",
"5",
"most",
"popular",
"movie",
"directors",
"?"
] |
[
{
"id": 0,
"type": "column",
"value": "person_name"
},
{
"id": 4,
"type": "column",
"value": "popularity"
},
{
"id": 6,
"type": "table",
"value": "movie_crew"
},
{
"id": 7,
"type": "column",
"value": "person_id"
},
{
"id": 3,
"type": "value",
"value": "Director"
},
{
"id": 8,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 5,
"type": "table",
"value": "movie"
},
{
"id": 2,
"type": "column",
"value": "job"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": [
7
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-VALUE",
"O"
] |
1,273
|
store_1
|
spider:train_spider.json:619
|
How long does track Fast As a Shark has?
|
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
|
[
"How",
"long",
"does",
"track",
"Fast",
"As",
"a",
"Shark",
"has",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "Fast As a Shark"
},
{
"id": 1,
"type": "column",
"value": "milliseconds"
},
{
"id": 0,
"type": "table",
"value": "tracks"
},
{
"id": 2,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4,
5,
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",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O"
] |
1,274
|
architecture
|
spider:train_spider.json:6953
|
What are the ids and names of the architects who built at least 3 bridges ?
|
SELECT T1.id , T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) >= 3
|
[
"What",
"are",
"the",
"ids",
"and",
"names",
"of",
"the",
"architects",
"who",
"built",
"at",
"least",
"3",
"bridges",
"?"
] |
[
{
"id": 5,
"type": "column",
"value": "architect_id"
},
{
"id": 2,
"type": "table",
"value": "architect"
},
{
"id": 3,
"type": "table",
"value": "bridge"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 0,
"type": "column",
"value": "id"
},
{
"id": 4,
"type": "value",
"value": "3"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"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",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
1,275
|
hospital_1
|
spider:train_spider.json:3920
|
How many patients' prescriptions are made by physician John Dorian?
|
SELECT count(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = "John Dorian"
|
[
"How",
"many",
"patients",
"'",
"prescriptions",
"are",
"made",
"by",
"physician",
"John",
"Dorian",
"?"
] |
[
{
"id": 2,
"type": "column",
"value": "John Dorian"
},
{
"id": 5,
"type": "table",
"value": "prescribes"
},
{
"id": 7,
"type": "column",
"value": "employeeid"
},
{
"id": 0,
"type": "table",
"value": "physician"
},
{
"id": 6,
"type": "column",
"value": "physician"
},
{
"id": 4,
"type": "table",
"value": "patient"
},
{
"id": 8,
"type": "column",
"value": "patient"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "column",
"value": "ssn"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
4
]
},
{
"entity_id": 6,
"token_idxs": [
8
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": [
2
]
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,276
|
twitter_1
|
spider:train_spider.json:293
|
List the names of 5 users followed by the largest number of other users.
|
SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5
|
[
"List",
"the",
"names",
"of",
"5",
"users",
"followed",
"by",
"the",
"largest",
"number",
"of",
"other",
"users",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "user_profiles"
},
{
"id": 2,
"type": "column",
"value": "followers"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"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": []
},
{
"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-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,277
|
retail_world
|
bird:train.json:6504
|
Who has the highest salary? Please give their first name.
|
SELECT FirstName, LastName FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees )
|
[
"Who",
"has",
"the",
"highest",
"salary",
"?",
"Please",
"give",
"their",
"first",
"name",
"."
] |
[
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 1,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"type": "column",
"value": "lastname"
},
{
"id": 3,
"type": "column",
"value": "salary"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,278
|
theme_gallery
|
spider:train_spider.json:1687
|
Show all artist names with an average exhibition attendance over 200.
|
SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING avg(T1.attendance) > 200
|
[
"Show",
"all",
"artist",
"names",
"with",
"an",
"average",
"exhibition",
"attendance",
"over",
"200",
"."
] |
[
{
"id": 4,
"type": "table",
"value": "exhibition_record"
},
{
"id": 7,
"type": "column",
"value": "exhibition_id"
},
{
"id": 5,
"type": "table",
"value": "exhibition"
},
{
"id": 6,
"type": "column",
"value": "attendance"
},
{
"id": 0,
"type": "column",
"value": "artist_id"
},
{
"id": 2,
"type": "table",
"value": "artist"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": "200"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
7
]
},
{
"entity_id": 6,
"token_idxs": [
8
]
},
{
"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",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
1,280
|
baseball_1
|
spider:train_spider.json:3705
|
How many team franchises are active, with active value 'Y'?
|
SELECT count(*) FROM team_franchise WHERE active = 'Y';
|
[
"How",
"many",
"team",
"franchises",
"are",
"active",
",",
"with",
"active",
"value",
"'",
"Y",
"'",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "team_franchise"
},
{
"id": 1,
"type": "column",
"value": "active"
},
{
"id": 2,
"type": "value",
"value": "Y"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"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",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
1,281
|
thrombosis_prediction
|
bird:dev.json:1220
|
Provide all ID, sex and birthday of patients whose urea nitrogen (UN) just within the borderline of passing?
|
SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UN = 29
|
[
"Provide",
"all",
"ID",
",",
"sex",
"and",
"birthday",
"of",
"patients",
"whose",
"urea",
"nitrogen",
"(",
"UN",
")",
"just",
"within",
"the",
"borderline",
"of",
"passing",
"?"
] |
[
{
"id": 4,
"type": "table",
"value": "laboratory"
},
{
"id": 2,
"type": "column",
"value": "birthday"
},
{
"id": 3,
"type": "table",
"value": "patient"
},
{
"id": 1,
"type": "column",
"value": "sex"
},
{
"id": 0,
"type": "column",
"value": "id"
},
{
"id": 5,
"type": "column",
"value": "un"
},
{
"id": 6,
"type": "value",
"value": "29"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
13
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,282
|
retails
|
bird:train.json:6775
|
Calculate the difference in the average retail price of parts shipped via ship and air.
|
SELECT (CAST(SUM(IIF(T3.l_shipmode = 'SHIP', T1.p_retailprice, 0)) AS REAL) / SUM(IIF(T3.l_shipmode = 'SHIP', 1, 0))) - (CAST(SUM(IIF(T3.l_shipmode = 'AIR', T1.p_retailprice, 0)) AS REAL) / SUM(IIF(T3.l_shipmode = 'AIR', 1, 0))) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_suppkey = T3.l_suppkey
|
[
"Calculate",
"the",
"difference",
"in",
"the",
"average",
"retail",
"price",
"of",
"parts",
"shipped",
"via",
"ship",
"and",
"air",
"."
] |
[
{
"id": 9,
"type": "column",
"value": "p_retailprice"
},
{
"id": 3,
"type": "column",
"value": "ps_suppkey"
},
{
"id": 6,
"type": "column",
"value": "ps_partkey"
},
{
"id": 10,
"type": "column",
"value": "l_shipmode"
},
{
"id": 4,
"type": "column",
"value": "l_suppkey"
},
{
"id": 5,
"type": "column",
"value": "p_partkey"
},
{
"id": 0,
"type": "table",
"value": "lineitem"
},
{
"id": 2,
"type": "table",
"value": "partsupp"
},
{
"id": 1,
"type": "table",
"value": "part"
},
{
"id": 11,
"type": "value",
"value": "SHIP"
},
{
"id": 12,
"type": "value",
"value": "AIR"
},
{
"id": 7,
"type": "value",
"value": "1"
},
{
"id": 8,
"type": "value",
"value": "0"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"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": [
6,
7
]
},
{
"entity_id": 10,
"token_idxs": [
10
]
},
{
"entity_id": 11,
"token_idxs": [
12
]
},
{
"entity_id": 12,
"token_idxs": [
14
]
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
1,283
|
vehicle_rent
|
bird:test.json:420
|
Return the average age for customers who have membership above the average across all customers.
|
SELECT avg(age) FROM customers WHERE membership_credit > (SELECT avg(membership_credit) FROM customers)
|
[
"Return",
"the",
"average",
"age",
"for",
"customers",
"who",
"have",
"membership",
"above",
"the",
"average",
"across",
"all",
"customers",
"."
] |
[
{
"id": 1,
"type": "column",
"value": "membership_credit"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,284
|
olympics
|
bird:train.json:5028
|
How many male competitors were there who participated in 1948 Summer?
|
SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '1948 Summer' AND T3.gender = 'M'
|
[
"How",
"many",
"male",
"competitors",
"were",
"there",
"who",
"participated",
"in",
"1948",
"Summer",
"?"
] |
[
{
"id": 3,
"type": "table",
"value": "games_competitor"
},
{
"id": 6,
"type": "value",
"value": "1948 Summer"
},
{
"id": 5,
"type": "column",
"value": "games_name"
},
{
"id": 1,
"type": "column",
"value": "person_id"
},
{
"id": 9,
"type": "column",
"value": "games_id"
},
{
"id": 0,
"type": "table",
"value": "person"
},
{
"id": 7,
"type": "column",
"value": "gender"
},
{
"id": 2,
"type": "table",
"value": "games"
},
{
"id": 4,
"type": "column",
"value": "id"
},
{
"id": 8,
"type": "value",
"value": "M"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2,
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
9,
10
]
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
1,285
|
retail_complains
|
bird:train.json:280
|
In the calls from the mountain division, how many are from teenage clients?
|
SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.age BETWEEN 12 AND 20 AND T2.division = 'Mountain'
|
[
"In",
"the",
"calls",
"from",
"the",
"mountain",
"division",
",",
"how",
"many",
"are",
"from",
"teenage",
"clients",
"?"
] |
[
{
"id": 3,
"type": "column",
"value": "district_id"
},
{
"id": 1,
"type": "table",
"value": "district"
},
{
"id": 6,
"type": "column",
"value": "division"
},
{
"id": 7,
"type": "value",
"value": "Mountain"
},
{
"id": 0,
"type": "table",
"value": "client"
},
{
"id": 2,
"type": "column",
"value": "age"
},
{
"id": 4,
"type": "value",
"value": "12"
},
{
"id": 5,
"type": "value",
"value": "20"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": [
6
]
},
{
"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",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
1,286
|
university_basketball
|
spider:train_spider.json:985
|
How many schools are in the basketball match?
|
SELECT count(DISTINCT school_id) FROM basketball_match
|
[
"How",
"many",
"schools",
"are",
"in",
"the",
"basketball",
"match",
"?"
] |
[
{
"id": 0,
"type": "table",
"value": "basketball_match"
},
{
"id": 1,
"type": "column",
"value": "school_id"
}
] |
[
{
"entity_id": 0,
"token_idxs": [
6,
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
1,287
|
books
|
bird:train.json:6067
|
Which country is 9 Green Ridge Point, Arendal located at?
|
SELECT T2.country_name FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T1.street_number = 9 AND T1.street_name = 'Green Ridge Point' AND T1.city = 'Arendal'
|
[
"Which",
"country",
"is",
"9",
"Green",
"Ridge",
"Point",
",",
"Arendal",
"located",
"at",
"?"
] |
[
{
"id": 7,
"type": "value",
"value": "Green Ridge Point"
},
{
"id": 4,
"type": "column",
"value": "street_number"
},
{
"id": 0,
"type": "column",
"value": "country_name"
},
{
"id": 6,
"type": "column",
"value": "street_name"
},
{
"id": 3,
"type": "column",
"value": "country_id"
},
{
"id": 1,
"type": "table",
"value": "address"
},
{
"id": 2,
"type": "table",
"value": "country"
},
{
"id": 9,
"type": "value",
"value": "Arendal"
},
{
"id": 8,
"type": "column",
"value": "city"
},
{
"id": 5,
"type": "value",
"value": "9"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
3
]
},
{
"entity_id": 6,
"token_idxs": []
},
{
"entity_id": 7,
"token_idxs": [
4,
5,
6
]
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": [
8
]
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"token_idxs": []
},
{
"entity_id": 16,
"token_idxs": []
},
{
"entity_id": 17,
"token_idxs": []
},
{
"entity_id": 18,
"token_idxs": []
},
{
"entity_id": 19,
"token_idxs": []
}
] |
[
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
1,288
|
customers_and_addresses
|
spider:train_spider.json:6130
|
What is the most frequently ordered product? Tell me the detail of the product
|
SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY count(*) DESC LIMIT 1
|
[
"What",
"is",
"the",
"most",
"frequently",
"ordered",
"product",
"?",
"Tell",
"me",
"the",
"detail",
"of",
"the",
"product"
] |
[
{
"id": 1,
"type": "column",
"value": "product_details"
},
{
"id": 2,
"type": "table",
"value": "order_items"
},
{
"id": 0,
"type": "column",
"value": "product_id"
},
{
"id": 3,
"type": "table",
"value": "products"
}
] |
[
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"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": []
},
{
"entity_id": 8,
"token_idxs": []
},
{
"entity_id": 9,
"token_idxs": []
},
{
"entity_id": 10,
"token_idxs": []
},
{
"entity_id": 11,
"token_idxs": []
},
{
"entity_id": 12,
"token_idxs": []
},
{
"entity_id": 13,
"token_idxs": []
},
{
"entity_id": 14,
"token_idxs": []
},
{
"entity_id": 15,
"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-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.